Documentation for a newer release is available. View Latest

디스크 파티션 소개

이 부록은 AMD64와 Intel 64 이외의 구조에 필수적으로 적용되는 것은 아닙니다. 하지만, 이 곳에 언급된 일반적인 개념은 적용 될 수 있습니다.

이 부분은 리눅스 시스템과 관련된 주제에 사용되는 기본적인 디스크 개념, 디스크 파티션 전략, 파티션 이름 체계를 토의합니다.

만약 당신이 디스크 파티션에 익숙하다면, Fedora 설치를 위해 준비하는 디스크 공간을 확보하는 처리에서 보다 상세한 정보를 위해 디스크 파티션을 위한 전략을 건너 뛸 수 있습니다.

하드 디스크 기본 개념

하드 디스크는 매우 단순한 기능을 수행합니다 - 이들은 자료를 저장하고 신뢰하도록 명령에 따라 이를 끌어냅니다.

디스크 파티셔닝과 같은 문제를 토의 할 때에, 기본 하드웨어를 이해하는 것이 중요합니다; 아뭏튼, 이론은 매우 복잡하고 광범위하여, 여기서에서는 기본 개념만 설명 할 것입니다. 이 부록에서는 디스크 드라이브의 간략화된 다이어그램 설정을 사용하여 파티션 뒤에 있는 처리와 이론을 설명합니다.

사용하지 않는 디스크 드라이브, 사용하지 않은, 신규 디스크 드라이브를 보여줍니다.

사용하지 않는 디스크 드라이브 이미지.
Figure 1. 사용하지 않는 디스크 드라이브

파일 시스템

디스크 드라이브에서 자료를 저장하려면, 우선 디스크 드라이브를 초기화(format)가 필요합니다. 초기화는 (일반적으로 "file system_ 만들기"로 알려졌으며) 드라이브에 정보를 작성하며, 초기화 되지 않은 드라이브에 빈 공간에서 순서를 만듭니다.

초기화된 디스크 드라이브 이미지.
Figure 2. 파일 시스템이 있는 디스크 드라이브

파일 시스템이 있는 디스크 드라이브에서 알 수 있듯이, 파일 시스템에 의해 제공되는 순서에는 다음과 같은 몇 가지 절충-안이 포함됩니다:

  • 드라이버의 사용 가능한 공간 중의 적은 비율이 파일 시스템-연관된 자료를 저장하는 데 사용되었으며 오버헤드로 간주될 수 있습니다.

  • 파일 시스템은 나머지 공간을 일정한 크기의 작은 세그먼트로 분할합니다. 리눅스의 경우에, 이들 세그먼트는 블럭으로 알려져 있습니다 footnote: [블럭은 실제로 우리의 그림(삽화)과 다르게 크기가 일정합니다. 또한, 평균 디스크 드라이브에는 수천 개의 블럭이 포함되어 있다는 점을 기억하세요. 그림은 이와 같은 논의 목적을 위해 단순화했습니다.].

단일의 범용 파일 시스템은 없습니다. 다른 파일 시스템을 가지는 디스크 드라이브로, 디스크 드라이브는 많은 파일 시스템 중 하나가 기록되어 있을 는 것을 보여줍니다. 다른 파일 시스템은 호환되지 않는 경향이 있습니다; 이는, 하나의 파일 시스템(또는 소수의 연관 파일 시스템 유형)을 지원하는 운영 체제는 다른 파일 시스템을 지원하지 않을 수도 있습니다. 아뭏튼, Fedora는 광범위한 파일 시스템(마이크로소프트사 윈도우와 같은 다른 운영 체제에 의해 일반적으로 사용되는 것을 포함하여)을 지원하며, 다른 파일 시스템 간에 손쉽게 자료 교환을 만듭니다.

다른 파일 시스템이 있는 디스크 드라이브의 이미지.
Figure 3. 다른 파일 시스템이 있는 디스크 드라이브

파일 시스템을 디스크에 쓰는 것은 첫 번째 단계일 뿐입니다. 이와 같은 처리의 목표는 실제로 자료를 *저장*하고 *검색*하는 것입니다. 아래 그림은 일부 자료가 기록된 후의 드라이브 디스크를 보여줍니다:

자료가 기록된 디스크 드라이버의 이미지.
Figure 4. 자료가 기록된 디스크 드라이브

자료가 기록된 디스크 드라이브에서 보여지는, 이전에-빈 블록의 일부는 현재 자료를 갖고 있습니다. 아무튼, 이와 같은 사진만 보고, 이 드라이브에서 얼마나 많은 파일이 있는지 정확하게 알 수 없습니다. 모든 파일은 적어도 하나의 블록을 사용하고 몇몇 파일들은 다중 블록을 사용하기 때문에 하나의 파일 또는 많을 수 있습니다. 주목해야 할 또 다른 중요한 점은 사용된 블록이 인접 영역을 형성 해야 할 필요가 없습니다; 사용되고 사용되지 않은 블록은 산재되어 있을 수 있습니다. 이는 _조각화_로 알려져 있습니다. 조각화는 기존 파티션의 크기를 조정하려고 할 때 역할을 할 수 있습니다.

As with most computer-related technologies, disk drives changed over time after their introduction. In particular, they got bigger. Not larger in physical size, but bigger in their capacity to store information. And, this additional capacity drove a fundamental change in the way disk drives were used.

파티션: 하나의 드라이버를 다수로 전환하기

디스크 드라이버는 파티션에서 나눠 질 수 있습니다. 각각의 파티션은 만약 분리된 디스크가 있는 것처럼 접근 될 수 있습니다. 이는 파티션 테이블의 추가를 통해서 수행됩니다.

디스크 공간을 별도의 디스크 파티션에 할당하는데 몇 가지 이유가 있으며, 다음과 같은 예입니다:

  • 사용자 자료에서 운영체제 시스템 자료의 논리적인 분할

  • 다른 파일 시스템 사용에 대한 능력

  • 하나의 장비에 다중 운영체제를 실행하는 능력

There are currently two partitioning layout standards for physical hard disks: Master Boot Record (MBR) and GUID Partition Table (GPT). MBR is an older method of disk partitioning used with BIOS-based computers. GPT is a newer partitioning layout that is a part of the Unified Extensible Firmware Interface (UEFI). This section and Partitions Within Partitions - An Overview of Extended Partitions mainly describe the Master Boot Record (MBR) disk partitioning scheme. For information about the GUID Partition Table (GPT) partitioning layout, see GUID Partition Table (GPT).

While the diagrams in this chapter show the partition table as being separate from the actual disk drive, this is not entirely accurate. In reality, the partition table is stored at the very start of the disk, before any file system or user data. But for clarity, they are separate in our diagrams.

파티션 표가 있는 사용하지 않는 디스크 드라이브의 이미지.
Figure 5. 파티션 표가 있는 디스크 드라이브

As Disk Drive with Partition Table shows, the partition table is divided into four sections or four primary partitions. A primary partition is a partition on a hard drive that can contain only one logical drive (or section). Each section can hold the information necessary to define a single partition, meaning that the partition table can define no more than four partitions.

각각 파티션 표 항목은 파티션의 몇 가지 중요한 특성을 포함합니다:

  • 파티션 시작과 끝의 위치에 있는 디스크 지점

  • 파티션이 "활성화"인지 여부

  • 파티션 유형

The starting and ending points define the partition’s size and location on the disk. The "active" flag is used by some operating systems' boot loaders. In other words, the operating system in the partition that is marked "active" is booted.

The type is a number that identifies the partition’s anticipated usage. Some operating systems use the partition type to denote a specific file system type, to flag the partition as being associated with a particular operating system, to indicate that the partition contains a bootable operating system, or some combination of the three.

단일 파티션이 있는 디스크의 예제를 위해 단일 파티션이 있는 디스크를 참고하세요.

단일 파티션이 있는 디스크 드라이브의 이미지.
Figure 6. 단일 파티션이 있는 디스크 드라이브

The single partition in this example is labeled as DOS. This label shows the partition type, with DOS being one of the most common ones. The table below shows a list of some of the commonly used partition types and hexadecimal numbers used to represent them.

Table 1. 파티션 유형
파티션 유형 파티션 유형

Empty

00

Novell Netware 386

65

DOS 12-bit FAT

01

PIC/IX

75

XENIX root

02

Old MINIX

80

XENIX usr

03

Linux/MINUX

81

DOS 16-bit ⇐32M

04

Linux swap

82

Extended

05

Linux native

83

DOS 16-bit >=32

06

Linux extended

85

OS/2 HPFS

07

Amoeba

93

AIX

08

Amoeba BBT

94

AIX bootable

09

BSD/386

a5

OS/2 Boot Manager

0a

OpenBSD

a6

Win95 FAT32

0b

NEXTSTEP

a7

Win95 FAT32 (LBA)

0c

BSDI fs

b7

Win95 FAT16 (LBA)

0e

BSDI swap

b8

Win95 Extended (LBA)

0f

Syrinx

c7

Venix 80286

40

CP/M

db

Novell

51

DOS access

e1

PReP Boot

41

DOS R/O

e3

GNU HURD

63

DOS secondary

f2

Novell Netware 286

64

BBT

ff

파티션 안에 있는 파티션 - 확장 파티션 개요

4개의 파티션인 경우는 자신의 목적에 따라 불충분하면, 추가 파티션을 생성하기 위하여 확장 파티션을 사용 할 수 있습니다. 당신은 파티션 유형을 "확장파티션"으로 설정 할 수 있습니다.

An extended partition is like a disk drive in its own right - it has its own partition table which points to one or more partitions (now called logical partitions, as opposed to the four primary partitions) contained entirely within the extended partition itself. Disk Drive With Extended Partition, shows a disk drive with one primary partition and one extended partition containing two logical partitions (along with some unpartitioned free space).

확장된 파티션이 있는 디스크 드라이브의 이미지.
Figure 7. 확장된 파티션이 있는 디스크 드라이브

As this figure implies, there is a difference between primary and logical partitions - there can only be four primary partitions, but there is no fixed limit to the number of logical partitions that can exist. However, due to the way in which partitions are accessed in Linux, no more than 12 logical partitions should be defined on a single disk drive.

GUID 파티션 표 (GPT)

GUID Partition Table (GPT) is a newer partitioning scheme based on using Globally Unique Identifiers (GUID). GPT was developed to cope with limitations of the MBR partition table, especially with the limited maximum addressable storage space of a disk. Unlike MBR, which is unable to address storage space larger than 2.2 terabytes, GPT can be used with hard disks larger than this; the maximum addressable disk size is 2.2 zettabytes. In addition, GPT by default supports creating up to 128 primary partitions. This number could be extended by allocating more space to the partition table.

GPT 디스크는 논리 블록 주소(LBA)를 사용하고 파티션 배열은 다음과 같습니다:

  • MBR 디스크와의 역-호환성을 유지하기 위해, GPT*의 첫 번째 섹터(*LBA 0)는 MBR 자료용으로 예약되어 있고 "보호 MBR"이라고 칭합니다.

  • The primary GPT header begins on the second logical block (LBA 1) of the device. The header contains the disk GUID, the location of the primary partition table, the location of the secondary GPT header, and CRC32 checksums of itself and the primary partition table. It also specifies the number of partition entries of the table.

  • 기본 GPT 테이블에는 기본적으로 각각 항목 크기가 128 바이트인 파티션 항목 128개, 이와 같은 파티션 유형 GUID와 고유 파티션 GUID가 포함됩니다.

  • 보조(secondary) GPT 테이블은 기본(primary) GPT 테이블과 동일합니다. 이는 기본 파티션 테이블이 망가진 경우에 복구를 위한 복구(백업) 테이블처럼 주로 사용됩니다.

  • The secondary GPT header is located on the last logical sector of the disk and it can be used to recover GPT information in case the primary header is corrupted. It contains the disk GUID, the location of the secondary partition table and the primary GPT header, CRC32 checksums of itself and the secondary partition table, and the number of possible partition entries.

There must be a BIOS boot partition for the boot loader to be installed successfully onto a disk that contains a GPT (GUID Partition Table). This includes disks initialized by Anaconda. If the disk already contains a BIOS boot partition, it can be reused.

디스크 재-파티션을 위한 전략

디스크는 재파티션 할 수 있는 몇 가지 다른 방법이 있습니다. 이 부분은 다음 가능한 접근을 토의합니다:

  • 분할되지 않는 여유 공간을 사용 할 수 있습니다

  • 사용되지 않는 파티션을 사용 할 수 있습니다

  • 동적으로 사용된 파티션에 있는 여유 공간을 사용 할 수 있습니다

Note that this section discusses the aforementioned concepts only theoretically and it does not include any procedures showing how to perform disk repartitioning step-by-step. Such detailed information are beyond the scope of this document.

Keep in mind that the following illustrations are simplified in the interest of clarity and do not reflect the exact partition layout that you encounter when actually installing Fedora.

파티션 되어 있지 않은 여유 공간 사용하기

In this situation, the partitions already defined do not span the entire hard disk, leaving unallocated space that is not part of any defined partition. Disk Drive with Unpartitioned Free Space, shows what this might look like.

파티션 되어 있지 않는 여유 공간을 갖는 디스크 드라이브의 이미지
Figure 8. 파티션 되어 있지 않은 여유 공간을 갖는 디스크 드라이브

위의 예제에서, '1’은 할당되지 않은 공간에 정의되지 않은 파티션을 나타내고 '2’는 할당된 공간에 정의된 파티션을 나타냅니다.

사용하지 않는 하드 디스크도 또한 이런 종류에 속합니다. 단지 차이점은 모든 공간이 정의된 파티션의 일부가 아니라는 것입니다.

In any case, you can create the necessary partitions from the unused space. Unfortunately, this scenario, although very simple, is not very likely (unless you have just purchased a new disk just for Fedora). Most pre-installed operating systems are configured to take up all available space on a disk drive (see Using Free Space from an Active Partition).

사용되지 않는 파티션에서 공간 사용하기

이와 같은 경우에, 아마도 더 이상 사용하지 않는 하나 또는 그 이상의 파티션을 가지고 있습니다. 사용하지 않는 파티션인 디스크 드라이브, 이와 같은 상태를 표시합니다.

사용되지 않는 파티션을 갖는 디스크 드라이브의 이미지
Figure 9. 사용되지 않는 파티션을 갖는 디스크 드라이브

In the above example, 1 represents an unused partition and 2 represents reallocating an unused partition for Linux.

In this situation, you can use the space allocated to the unused partition. You first must delete the partition and then create the appropriate Linux partition(s) in its place. You can delete the unused partition and manually create new partitions during the installation process.

Using Free Space from an Active Partition

This is the most common situation. It is also, unfortunately, the hardest to handle. The main problem is that, even if you have enough free space, it is presently allocated to a partition that is already in use. If you purchased a computer with pre-installed software, the hard disk most likely has one massive partition holding the operating system and data.

Aside from adding a new hard drive to your system, you have two choices:

Destructive Repartitioning

In this case, the single large partition is deleted and several smaller ones are created instead. Any data held in the original partition is destroyed. This means that making a complete backup is necessary. It is highly recommended to make two backups, use verification (if available in your backup software), and try to read data from the backup before deleting the partition.

If an operating system was installed on that partition, it must be reinstalled if you want to use that system as well. Be aware that some computers sold with pre-installed operating systems may not include the installation media to reinstall the original operating system. You should check whether this applies to your system is before you destroy your original partition and its operating system installation.

After creating a smaller partition for your existing operating system, you can reinstall software, restore your data, and start the installation. Disk Drive Being Destructively Repartitioned shows this being done.

Image of a disk drive being destructively repartitioned
Figure 10. Disk Drive Being Destructively Repartitioned

In the above example, 1 represents before and 2 represents after.

Any data previously present in the original partition is lost.

Non-Destructive Repartitioning

With non-destructive repartitioning you execute a program that makes a big partition smaller without losing any of the files stored in that partition. This method is usually reliable, but can be very time-consuming on large drives.

While the process of non-destructive repartitioning is rather straightforward, there are three steps involved:

  1. Compress and backup existing data

  2. Resize the existing partition

  3. Create new partition(s)

Each step is described further in more detail.

Compress Existing Data

As the following figure shows, the first step is to compress the data in your existing partition. The reason for doing this is to rearrange the data such that it maximizes the available free space at the "end" of the partition.

Image of a disk drive being compressed
Figure 11. Disk Drive Being Compressed

In the above example, 1 represents before and 2 represents after.

This step is crucial. Without it, the location of the data could prevent the partition from being resized to the extent desired. Note also that, for one reason or another, some data cannot be moved. If this is the case (and it severely restricts the size of your new partition(s)), you may be forced to destructively repartition your disk.

Resize the Existing Partition

Disk Drive with Partition Resized shows the actual resizing process. While the actual result of the resizing operation varies depending on the software used, in most cases the newly freed space is used to create an unformatted partition of the same type as the original partition.

Image of a disk drive with a resized partition
Figure 12. Disk Drive with Partition Resized

In the above example, 1 represents before and 2 represents after.

It is important to understand what the resizing software you use does with the newly freed space, so that you can take the appropriate steps. In the case illustrated here, it would be best to delete the new DOS partition and create the appropriate Linux partition(s).

Create new partition(s)

As the previous step implied, it may or may not be necessary to create new partitions. However, unless your resizing software is Linux-aware, it is likely that you must delete the partition that was created during the resizing process. Disk Drive with Final Partition Configuration, shows this being done.

Image of a disk drive with final partition configuration
Figure 13. Disk Drive with Final Partition Configuration

In the above example, 1 represents before and 2 represents after.

Partition Naming Schemes and Mount Points

A common source of confusion for users unfamiliar with Linux is the matter of how partitions are used and accessed by the Linux operating system. In DOS/Windows, it is relatively simple: Each partition gets a "drive letter." You then use the correct drive letter to refer to files and directories on its corresponding partition. This is entirely different from how Linux deals with partitions and, for that matter, with disk storage in general. This section describes the main principles of partition naming scheme and the way how partitions are accessed in Fedora.

Partition Naming Scheme

Linux uses a naming scheme that is file-based, with file names in the form of /dev/xxyN.

Device and partition names consist of the following:

/dev/

This is the name of the directory in which all device files reside. Because partitions reside on hard disks, and hard disks are devices, the files representing all possible partitions reside in /dev/.

xx

The first two letters of the partition name indicate the type of device on which the partition resides, usually sd.

y

This letter indicates which device the partition is on. For example, /dev/sda for the first hard disk, /dev/sdb for the second, and so on.

N

The final number denotes the partition. The first four (primary or extended) partitions are numbered 1 through 4. Logical partitions start at 5. So, for example, /dev/sda3 is the third primary or extended partition on the first hard disk, and /dev/sdb6 is the second logical partition on the second hard disk.

Even if your system can identify and refer to all types of disk partitions, it might not be able to read the file system and therefore access stored data on every partition type. However, in many cases, it is possible to successfully access data on a partition dedicated to another operating system.

Disk Partitions and Mount Points

Each partition is used to form part of the storage necessary to support a single set of files and directories. This is done by associating a partition with a directory through a process known as mounting. Mounting a partition makes its storage available starting at the specified directory (known as a mount point).

For example, if partition /dev/sda5 is mounted on /usr/, that would mean that all files and directories under /usr/ physically reside on /dev/sda5. So the file /usr/share/doc/FAQ/txt/Linux-FAQ would be stored on /dev/sda5, while the file /etc/gdm/custom.conf would not.

Continuing the example, it is also possible that one or more directories below /usr/ would be mount points for other partitions. For instance, a partition (say, /dev/sda7) could be mounted on /usr/local/, meaning that /usr/local/man/whatis would then reside on /dev/sda7 rather than /dev/sda5.

How Many Partitions?

At this point in the process of preparing to install Fedora, you should give some consideration to the number and size of the partitions to be used by your new operating system. However, there is no one right answer to this question. It depends on your needs and requirements.

Unless you have a reason for doing otherwise, you should at least create a /boot partition and a / (root) partition. Depending on your system’s hardware specifications, additional partitions may be necessary, such as /boot/efi for 64-bit AMD and Intel systems with UEFI firmware, a biosboot partition for AMD and Intel systems with a GUID Partition Table (GPT) label on the system disk, or a PReP Boot partition on IBM Power Systems servers.

See Recommended Partitioning Scheme for more information about the recommended partitioning scheme.