Use it to create, resize or identify partitions.
Partitions
Partitions divide a disk into regions recorded in the partition table (MBR or GPT), each with a start, end and type, and appear as /dev/sda1, /dev/nvme0n1p1.
1. lsblk — current partitions.
2. Create: parted/gdisk/fdisk.
3. Grow: growpart /dev/<disk> <n> then grow LVM/filesystem.
4. partprobe /dev/<disk>.
5. Verify with lsblk and df -h.
partition table edited → kernel re-reads it → partition device appears → used by filesystem or LVM
For Disks & Block Devices → Partitions, continue with the first unproven Topic check: Map each partition to its exact parent disk and start/end sector boundaries. If that boundary is healthy, advance to the adjacent check: Identify current consumers such as filesystem, PV, RAID member or swap. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
lsblk /dev/sdbVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
parent disk → partition-table entry → LBA range → kernel partition device → consumer metadata → mount/workload
Healthy evidence: partition boundaries are intentional, aligned, non-overlapping, match the parent disk and are consumed by exactly the expected upper-layer object.
Step 2 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Map each partition to its exact parent disk and start/end sector boundaries.
- Identify current consumers such as filesystem, PV, RAID member or swap.
- Check alignment and table flags/types relevant to the consumer.
- After resize/change, confirm kernel reread and then grow/shrink upper layers in their required order.
Verification chain. parent disk → partition-table entry → LBA range → kernel partition device → consumer metadata → mount/workload
Step 3 Commands Verify boundary
parted /dev/sdb mklabel gpt mkpart data xfs 1MiB 100%
partprobe /dev/sdb
lsblk /dev/sdb
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: a partition was changed without resizing its consumer, the kernel uses stale table state, or start-sector movement threatens metadata at the beginning of the partition.
Step 5 Common mistakes Narrow the fault
- Misaligned partitions.
- Not re-reading the partition table.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Back up before changing partitions. Grow online with growpart then grow the filesystem. Shrinking needs the filesystem shrunk first (XFS cannot shrink). Run partprobe after changes.
growpart /dev/<disk> <n>— grow a partition to fill the disklsblk -f— disks, partitions, filesystems, UUIDs and mount pointsblkid— UUIDs, labels and typesfdisk -l / parted -l— partition tablesudevadm info /dev/<dev>— device properties
ReferenceWhat it is1 section · depth on demand
Core model
Treat a partition as metadata describing a range, not as the filesystem itself. Verify parent disk identity, table type, partition number, start/end sectors, size, flags/type and alignment. Before resizing, determine the direction of every dependent layer so partition boundaries are changed in a safe order.
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
Partition evidence shows the allocated block range and kernel child device, not that the contained storage structure was resized or remains healthy.
In depth
Creating and changing partitions
Partitions divide a disk into separate areas, each with its own file system, LVM physical volume, RAID member or swap. The fdisk(8) manual page describes the main tool:
- fdisk creates and edits GPT, MBR (DOS), Sun, SGI and BSD tables, and recommends GPT on modern UEFI hardware.
- Partitions are aligned according to the device's I/O limits by default, which also suits 4K-sector disks.
- Sizes can be given as
+size{K,M,G,...}, relative to the start sector. -llists partition tables, and-w/-Wcontrol the wiping of old signatures.
Partitioning tools
| Tool | Style | Typical use |
|---|---|---|
fdisk | Interactive, menu-driven | Most manual work (GPT and MBR) |
sfdisk | Scriptable | Automation; back up and restore tables (-d) |
gdisk / sgdisk | Interactive / scriptable, GPT only | GPT type codes, conversion, repair |
parted | Interactive or scriptable | Resizing, unit handling |
growpart (cloud-utils) | Single command | Grow the last partition after a disk resize |
Workflow for a new data disk
| Step | Command |
|---|---|
| 1. Identify the right disk | lsblk -d -o NAME,SIZE,MODEL,SERIAL |
| 2. Create a GPT table and one partition | sgdisk -n1:0:0 -t1:8300 /dev/sdc |
| 3. Make the kernel re-read the table | partprobe /dev/sdc (usually automatic) |
| 4. Create the file system | mkfs.xfs /dev/sdc1 |
| 5. Mount and add to fstab by UUID | blkid /dev/sdc1 |
Partitioning a whole disk is often unnecessary for data that goes into LVM. pvcreate /dev/sdc on the whole device works too. A partition does make the disk's purpose visible to other tools and operating systems.
host$ lsblk -d -o NAME,SIZE,MODEL,SERIAL | grep -v nvme
sdc 100G Virtual disk 6000c29d2b1e4f0a
host$ sudo sfdisk -d /dev/sdc > /root/sdc-before.sfdisk 2>/dev/null || true
host$ sudo sgdisk -n1:0:0 -t1:8300 -c1:data /dev/sdc
The operation has completed successfully.
host$ sudo fdisk -l /dev/sdc | tail -2
Device Start End Sectors Size Type
/dev/sdc1 2048 209715166 209713119 100G Linux filesystem
host$ sudo growpart /dev/sda 3
CHANGED: partition=3 start=3147776 old: size=... new: size=...
host$ sudo sfdisk /dev/sdc < /root/sdc-before.sfdisk
Check the disk twice
Partitioning tools write to whatever device you name. Compare size, model and serial number before writing. Also check that nothing on the disk is mounted, or in use by LVM or RAID. The sfdisk -d backup taken first makes a mistake reversible.
Documented example, not captured output.
How it works at runtime
Partitions is part of Disks & Block Devices → Partitions. Partitions divide a block device into bounded LBA ranges that the kernel exposes as child block devices; their correctness depends on the parent disk, table format, alignment and non-overlapping start/end boundaries.
Topic-specific state model. Partitions divide a block device into bounded LBA ranges that the kernel exposes as child block devices; their correctness depends on the parent disk, table format, alignment and non-overlapping start/end boundaries.
Interpretation rule. - Partition exists ≠ it contains a filesystem.
- Partition size ≠ filesystem or LV usable size.
- Kernel sees new partition table ≠ every process has switched to it safely.
- Expanding a partition ≠ expanding an LVM PV or filesystem automatically.
Quick reference
Partition operations:
parted /dev/sdb unit MiB print free
growpart /dev/sda 2 # cloud-utils: extend partition 2 to fill disk (online)
parted /dev/sdb resizepart 1 100%
partx -u /dev/sdb # inform kernel about changes
lsblk /dev/sdb
Start partitions at 1 MiB for alignment. After growing a partition, grow the layer on top: pvresize (LVM), resize2fs (ext4), xfs_growfs (XFS). Shrinking partitions requires shrinking the filesystem first (not possible for XFS).
Limits and how it fails
Primary failure point. Partition evidence shows the allocated block range and kernel child device, not that the contained storage structure was resized or remains healthy.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. Partitions owns generic partition ranges and resize-order boundaries. GPT/MBR own table formats; LVM and filesystems own their own resizing semantics.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Disks & Block Devices → Partitions. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.kernel.org/filesystems/index.html · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Partitions operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for Partitions.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | Partitions divide a block device into bounded LBA ranges that the kernel exposes as child block devices; their correctness depends on the parent disk, table format, alignment and non-overlapping start/end boundaries. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin host + incident/change time → capture block topology and stable identities → validate partition/device metadata → validate filesystem identity/integrity and effective mount namespace/options → validate PV/VG/LV/device-mapper state where used → make one controlled change at the first failed boundary → re-read effective storage state → repeat original workload I/O/acceptance test. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | parent disk → partition-table entry → LBA range → kernel partition device → consumer metadata → mount/workload | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | Partition evidence proves the allocated block range and kernel child device, not that the contained storage structure was resized or remains healthy. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux storage evidence can establish this proof path: parent disk → partition-table entry → LBA range → kernel partition device → consumer metadata → mount/workload | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove behavior outside the captured device, metadata, mapping, mount or workload scope. Partition evidence proves the allocated block range and kernel child device, not that the contained storage structure was resized or remains healthy. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven boundary: prove backing identity, then on-device metadata, then filesystem/LVM mapping and effective mount/device state, and finally repeat the original workload I/O before any additional storage change. | Continue to the next unresolved boundary while preserving the original test condition. |
Partitions · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | Partitions |
|---|---|
| Topic path | Disks & Block Devices → Partitions |
| Runtime state | Partitions divide a block device into bounded LBA ranges that the kernel exposes as child block devices; their correctness depends on the parent disk, table format, alignment and non-overlapping start/end boundaries. |
| Fast checks | - Map each partition to its exact parent disk and start/end sector boundaries. - Identify current consumers such as filesystem, PV, RAID member or swap. - Check alignment and table flags/types relevant to the consumer. - After resize/change, confirm kernel reread and then grow/shrink upper layers in their required order. |
| Verification chain | parent disk → partition-table entry → LBA range → kernel partition device → consumer metadata → mount/workload Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. |
| Failure boundary | Partition evidence proves the allocated block range and kernel child device, not that the contained storage structure was resized or remains healthy. Boundary chain: process/context → userspace configuration → kernel subsystem/resource → device/network/filesystem dependency → effective state → original workload. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |