VMware ESXi and vSphere Cluster Management

What Is Disk Partitioning in Linux?

Learn how Linux disk partitioning divides a physical disk, how partitions relate to file systems and mount points, and how to plan partitions safely.

Disk partitioning is the process of dividing one physical storage device into separately managed logical regions called partitions. A physical disk may be an SSD, hard disk drive, or virtual disk. Each partition can be assigned a different purpose and can often be formatted, mounted, secured, backed up, or managed independently.

For example, one disk might contain a partition for the Linux operating system, another for user files, and a third for swap space. Partitioning does not create additional physical disks; it organizes space on the same underlying device.

Disk, Partition, File System, and Mount Point

These terms describe different layers of storage. A partition is a region of a disk. A file system is the on-disk structure that organizes files and directories within a region. A mount point is a directory where Linux attaches an accessible file system to its directory tree.

ConceptWhat it representsExampleRelationship
Physical diskThe underlying storage device/dev/sda or an NVMe SSDContains a partition table and one or more partitions
PartitionA defined region of a disk/dev/sda1Can receive a file system or have a specialized role
File systemThe format that organizes files and directoriesext4, XFS, BtrfsUsually created inside a partition before normal file storage
Mount pointA directory used to attach a file system/home or /dataProvides access to the mounted file system through Linux's directory tree

A partition commonly receives a file system such as ext4, XFS, or Btrfs before it can be mounted for ordinary file storage. Not every partition contains a conventional file system. A swap partition contains a swap signature, and an EFI System Partition has a specialized boot purpose. ISO 9660 is a file-system format associated with optical media and installation images; it is not normally the format of a writable Linux system partition.

Why Use Partitions?

ReasonBenefitExample use casePotential drawback
Multiple operating systemsEach system receives its own disk areaLinux alongside another operating systemRequires careful sizing and boot compatibility
Different file systemsEach workload can use a suitable formatUsing one file system for Linux and another for a separate systemChanging a file system later may require migration or reformatting
Separating dataOperating-system files, personal files, temporary data, and application data are isolatedA dedicated /home or data partitionOne full partition cannot automatically use free space in another
AdministrationSpace and access policies can be assigned to specific purposesA separate area for logs or application dataOverly small partitions can fill unexpectedly
Security and recoveryDifferent mount options, permissions, encryption, and backup policies can be appliedBacking up user data independently from the operating systemSeparation does not replace backups or correct permissions

Partitioning can make a reinstall easier when user data is stored separately from the operating system. A new root file system may be installed while an existing /home partition is preserved. This is not automatic protection: a mistaken formatting selection, disk failure, or damaged file system can still destroy the data, so maintain a separate backup.

Common Linux Partition Purposes

RoleMount point or useTypical contentsWhen separation is useful
Root file system/Core operating-system files, system programs, libraries, and configurationAlways required as the primary Linux file system
Home/homeUser documents, settings, and personal filesUseful when user data should be managed separately from the operating system
SwapActivated as swap, not normally mounted as a directoryVirtual-memory backing and, depending on configuration, hibernation dataUseful when a swap partition is preferred over a swap file or has a specific operational role
EFI System PartitionFirmware boot partition, often mounted temporarily at /boot/efiUEFI boot filesNeeded on UEFI systems; it is normally shared by operating systems installed in the same UEFI environment
Boot-related partitionMay be /boot or a firmware-specific partitionBootloader files and kernelsUseful in particular boot, encryption, or distribution layouts
Variable data/varLogs, caches, queues, and changing application dataCan contain growth from high-write workloads, but is not universally required
Temporary data/tmpShort-lived temporary filesCan isolate temporary growth or support special security policies, but is a design choice
Application or general dataFor example, /data or a chosen directoryShared project, media, database, or application dataUseful when data has different backup, encryption, or capacity requirements

A simple modern single-boot installation often uses an EFI System Partition when required, a root file system, and swap implemented as either a swap file or a swap partition. Separate /home, /var, or /tmp partitions are optional design decisions, not universal requirements.

Partition Tables: GPT and MBR

A partition table is metadata stored on a disk that records partition boundaries, sizes, and types. Linux and firmware use it to find the partitions on the device.

CharacteristicGPTMBRPlanning implication
MeaningGUID Partition TableMaster Boot Record partitioning schemeBoth describe disk layout, but they target different compatibility needs
Typical environmentModern UEFI systemsLegacy BIOS and older compatibility scenariosFirmware mode is an important selection factor
Layout flexibilitySupports a more flexible modern partition layout and many partitions without the same historical primary-partition arrangementUses an older layout model with more historical restrictionsGPT is generally the standard choice for new UEFI installations
CompatibilityWell supported by current Linux systems and UEFI firmwareMay be required by older firmware or softwareDo not choose solely by capacity; consider firmware, operating-system, and boot compatibility

GPT is normally the practical choice for a modern UEFI computer. MBR can still be appropriate for legacy systems or specific compatibility requirements. Changing the partition-table format usually changes the whole disk layout and can erase existing partitions, so it should be planned carefully.

How Linux Identifies Partitions

Linux exposes storage devices through device nodes, which are paths under /dev. A SATA disk might appear as /dev/sda, with its first partition as /dev/sda1. An NVMe disk might appear as /dev/nvme0n1, with its first partition as /dev/nvme0n1p1. The p before the partition number is part of the NVMe naming convention.

The device name identifies where the partition is currently exposed, but persistent configuration commonly uses a UUID, a unique identifier assigned to a file system or swap area. Device names can vary when hardware or detection order changes; UUIDs are intended to remain stable for the same formatted storage area.

An /etc/fstab entry connects these concepts for automatic mounting. It can identify a file system by UUID, specify its mount point and file-system type, and define mount options. Swap areas can also be listed there for automatic activation.

UUID=example-uuid  /data  ext4  defaults  0  2

The example means: find the file system with that UUID, attach it at /data, treat it as ext4, and use the listed mount and boot-check settings. Use the actual UUID and file-system type from your system; do not copy an example UUID literally.

Partitioning During Linux Installation

Linux installers normally offer automatic partitioning and manual or custom partitioning.

  • Automatic partitioning: The installer chooses a layout and sizes for you. It is often suitable for a beginner installing Linux on a new or intentionally erased disk.
  • Manual partitioning: You select the disk, partition sizes, file systems, mount points, and formatting actions. It is useful for dual boot, preserving an existing data partition, encryption or LVM designs, and specialized layouts.

Example: single-boot workstation

On a new UEFI computer, automatic installation might create an EFI System Partition, a root file system, and swap as a file or partition. This avoids unnecessary sizing decisions and is usually a reasonable starting point for a new user.

Example: separate home data

A custom layout might place the operating system at / and personal files at /home. During a reinstall, the root partition can be formatted while the home partition is deliberately preserved. The installer choices must be reviewed carefully, and a backup remains necessary.

Example: dual boot

A dual-boot computer allocates separate disk space to Linux and another operating system. Do not format or resize the other system's partitions without understanding their role. The firmware mode, usually UEFI on modern computers, and the EFI System Partition must remain compatible with the boot arrangement.

Basic Partition-Management Workflow

  1. Inspect the current state. Identify disks, partitions, file systems, sizes, labels, and mount points.
  2. Plan the layout. Allow capacity for system files, personal data, swap, applications, and future growth.
  3. Preserve needed data. Make and verify backups before modifying an existing disk.
  4. Review consequences. Resizing, deleting, and creating partitions can affect neighboring data and boot files.
  5. Create or resize partitions. Apply changes only after checking the target device and the proposed operations.
  6. Create the intended file systems or swap signature. Formatting an existing partition destroys its previous file-system contents.
  7. Mount and configure. Attach file systems at the intended mount points and use UUID-based persistent entries where appropriate.
  8. Verify. Confirm mounts, available capacity, permissions, and boot behavior.

Useful inspection commands

lsblk -f
blkid
df -h
findmnt
  • lsblk -f displays block devices, partitions, file-system types, labels, UUIDs, and mount points.
  • blkid displays file-system and swap identifiers, including UUIDs.
  • df -h reports capacity and usage for mounted file systems in readable units.
  • findmnt shows which devices and file systems are mounted at which locations.

Partition editors and file-system tools can perform destructive operations. Use the documentation for your distribution and verify the selected device before confirming an operation.

Graphical Partitioning Tools

Linux distributions commonly provide partitioning through the installer and may also provide desktop tools. On SUSE-based systems, the YaST Partitioner, also called the SUSE Partitioner, provides a graphical interface for reviewing and configuring disks, partitions, file systems, and mount points. GParted is another commonly encountered graphical partition editor. It is useful when run in an appropriate environment, but it is not required on every distribution.

Graphical tools show partition boundaries, sizes, file-system types, and sometimes mount points. They make the layout easier to visualize, but they do not make destructive operations safe. Read the pending-operation summary and confirm the target disk before applying changes.

Planning Trade-offs and Risks

Partitioning can improve organization and administration, but it also creates fixed boundaries. If a separate /var partition becomes full while the root partition has free space, applications may fail even though the disk still has unused capacity. Excessive separation can therefore make free space difficult to reallocate.

  • Estimate system growth, personal files, application data, and logs rather than sizing only for the first installation.
  • Keep frequently growing data in a partition with enough room, or choose a storage design that can expand more easily.
  • Use separate encryption, permissions, mount options, and backup policies only when the operational benefit justifies the extra administration.
  • Remember that partitions are not backups. A disk failure can affect every partition on that disk.
  • Before resizing, check whether the partition is mounted, whether the file system supports the operation, and whether a tested backup exists.

Troubleshooting Common Problems

A new partition does not appear in the file browser

A partition alone is not necessarily a usable mounted file system. Check whether it has been formatted, whether it is mounted, whether the intended mount-point directory exists, and whether permissions allow your user to access it. Use lsblk -f and findmnt to inspect the result.

A disk worked once but is unavailable after reboot

Check the relevant /etc/fstab entry. Confirm that the UUID, file-system type, mount point, and options are correct. Prefer a stable UUID over a device name when configuring a persistent mount, and verify that the mount-point directory exists.

The installer reports insufficient space even though another partition has free space

Partitions normally have separately allocated sizes. Free space in one partition is not automatically available to another. Identify which partition is full and decide whether it can be resized safely or whether the layout should be changed.

The wrong partition may be formatted during installation

Stop and identify disks using their capacity, model, labels, existing file systems, and layout. Review every formatting and deletion selection before applying changes. Back up critical data first.

Boot problems occur after changing the layout

Check that the boot-related partition still exists and is compatible with the firmware mode. Verify UUID references and mount configuration. Destructive partition changes can require bootloader or boot-configuration repair.

Key Points

  • A physical disk is the underlying device; partitions are independently managed regions within it.
  • A partition and a file system are different: the file system organizes files inside a storage region.
  • Linux commonly uses /, optional /home, swap, and a UEFI EFI System Partition where applicable.
  • GPT is generally the modern choice for UEFI systems, while MBR remains relevant for legacy compatibility.
  • Linux identifies partitions with device nodes such as /dev/sda1 and /dev/nvme0n1p1; UUIDs are preferred for persistent mounts.
  • Automatic installation is often suitable for beginners, while custom layouts are useful for dual boot and specialized storage plans.
  • Back up data and verify the target disk before any operation that deletes, formats, or resizes partitions.

For a related introduction, see What Is Partitioning?.