Partition

From Gentoo Wiki
Jump to:navigation Jump to:search
Other languages:
English
Resources

A partition is a means of splitting a block device up to sub-regions. It allows creating a more manageable and adaptive "logical" structure visible to the system.

Master Boot Record (MBR)

Used for a long time to organize data, also called DOS-Partitions. Partition information is stored in the first 512 bytes of the device.

  • Widespread and supported in nearly all operating systems.
  • Very well documented.
  • Maximum of 4 primary partitions per device.
  • Maximum size of the device 2 TiB.
  • Using one primary partition as an extended partition, it is possible to create additional logical partitions to work around the problem of only 4 primary partitions.

Available software

The following programs can be used to create, alter, and remove MBR partitions:

Program Package GUI Function
cfdisk sys-apps/util-linux No Create, alter, and remove partitions.
fdisk sys-apps/util-linux No Create, alter, and remove partitions.
parted sys-block/parted No Create, alter, remove, check, copy partitions and file systems.
gparted sys-block/gparted GTK3 GNOME Partition Editor; create, alter, and remove partitions.
partitionmanager sys-block/partitionmanager Qt5 KDE Partition Manager; create, alter, and remove partitions.

Supported operating systems

  • BSD (Mac OS X) - full support.
  • DOS - full support.
  • Linux - full support.
  • Solaris - full support.
  • Windows - full support.

GUID Partition Table (GPT)

In GUID (Global Unique IDentifier) partition system, a small amount of disk space at the beginning of the device is used to store the partition information. Its main advantage is the supported size of storage devices and the creation of a backup of the partition table at the end of the device.

  • Widespread and supported in most modern operating systems.
  • Maximum of 128 primary partitions per device.
  • Maximum size of the device 8 ZiB.

Available software

The following programs can be used to create, alter, and remove GPT partitions:

Program Package GUI Function
gptfdisk sys-apps/gptfdisk No Create, alter, remove, convert MBR to GPT, and recreate partition tables from backup.
parted sys-block/parted No Create, alter, remove, check, copy partitions and file systems.
gparted sys-block/gparted GTK3 GNOME Partition Editor; create, alter, and remove partitions.
partitionmanager sys-block/partitionmanager Qt5 KDE Partition Manager; create, alter, and remove partitions.

Supported operating systems

  • BSD (Mac OS X) - full support.
  • Linux - full support.
  • Windows - Installs into the /boot/EFI/Microsoft/ subdirectory of the ESP.

Logical Volume Manager (LVM)

LVM is a complete suite to dynamically manage partitions, storage devices or other underlying systems as volumes.

  • Widespread and supported in most modern operating systems.
  • Maximum size of the device depends on the underlying systems limitations.
  • Maximum size of Logical Volumes is 8 EiB on 64-bit Linux and 16 TiB on 32-bit Linux.
  • Storage devices, RAID system, network storage (e.g. iSCSI) can be used as Physical Volumes (no need of partitioning).
  • Provides basic forms of data redundancy (RAID 1, RAID 5) or stripset (RAID 0) for performance.
Note
To use features like dynamic resizing, the used filesystem should be resizable as well.

Available software

The following programs come with sys-fs/lvm2

Program GUI Function
pvcreate No Create or remove Physical Volumes of storage devices/systems.
vgcreate No Groups PV as Volume Group.
lvcreate No Create, alter, and remove volumes.

The following programs can be used to create, alter, and remove LVM partitions:

Program Package GUI Function
partitionmanager sys-block/partitionmanager Qt5 KDE Partition Manager; create, alter, and remove LVM PVs, VGs, LVs.

Supported operating systems

  • BSD - cannot boot itself, needs Linux GRUB2 with dual boot.
  • Linux - full support.
Note
This is the Linux specific LVM implementation, other OS have their own systems, see Logical volume management.

ZFS

ZFS is a complete suite to dynamically manage storage and filesystem.

  • Support in Linux (via ZFSOnLinux[1]), Solaris, FreeBSD.
  • Needs GRUB2 bootloader.
  • Maximum size of a single zpool is 256 ZiB
  • Storage devices can be used complete as vdev (no need of partitioning)
  • Zpools are created once and cannot be resized afterwards. Every volume has access to the full capacity of the zpool, this can be reduced via quota.
  • It provides forms of redundancy like RAID 1 (mirroring), and RAID 0 (striping) for performance. Also supports RAID 5, RAID 6, etc.
  • Has its own filesystem with features like compression, copy-on-write, and deduplication.

Available software

The following programs come with sys-fs/zfs:

Program GUI Function
zpool No Manage and organize vdevs in zpools.
zfs No Create, alter (resize), and remove volumes.

Supported operating systems

  • BSD - full support.
  • Linux - built as external module because of the CDDL and GPL license conflict - mostly supported.
  • Solaris - full support.

See also

References