English French
xref:figu-partitions-unused-drive[An Unused Disk Drive], shows a brand-new, unused disk drive.
xref:figu-partitions-resize-existing[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.
Writing a file system to disk is only the first step. The goal of this process is to actually *store* and *retrieve* data. The figure below shows a drive disk after some data have been written to it:
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:
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.
Whether the partition is "active"
When discussing issues such as disk partitioning, it is important to have a understanding of the underlying hardware; however, since the theory is very complicated and expansive, only the basic concepts will be explained here. This appendix uses a set of simplified diagrams of a disk drive to help explain what is the process and theory behind partitions.
Using Unpartitioned Free Space
Using Space from an Unused Partition
Using Free Space from an Active Partition
Unpartitioned free space is available
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.
To store data on a disk drive, it is necessary to _format_ the disk drive first. Formatting (usually known as "making a _file system_pass:attributes[{blank}]") writes information to the drive, creating order out of the empty space in an unformatted drive.
To preserve backward compatibility with MBR disks, the first sector (*LBA* 0) of *GPT* is reserved for *MBR* data and it is called "protective MBR".
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.
This section discusses basic disk concepts, disk repartitioning strategies, the partition naming scheme used by Linux systems, and related topics.
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.
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/`.
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.