Partitioning
Partitioning is a decision you make in five minutes and live with for years. A few defaults are worth overriding.
GPT, always
MBR caps out at 2 TB and four primary partitions. GPT has neither limit, keeps a backup table at the end of the disk, and is what UEFI expects. There is no modern reason to choose MBR.
parted /dev/sda mklabel gpt
Alignment
Partitions must start on a boundary the underlying device likes, or every write
becomes a read-modify-write. Modern tools do this for you —
parted with optimal, or fdisk with its default
2048-sector start — but check:
parted /dev/sda align-check optimal 1
On NVMe and SSDs a misaligned partition can cost a third of your write performance, and it is invisible until you benchmark. See benchmarking a new server.
A layout that holds up
- EFI system partition
- 512 MB, FAT32, on every bootable disk. See UEFI and boot order.
- /boot
- 1 GB. The classic 512 MB fills up after a handful of kernel updates and then upgrades start failing — a genuinely common support ticket.
- swap
- A few GB, or none with plenty of memory. See swap and the OOM killer.
- /
- 40–80 GB is plenty for the system.
- The rest
- In LVM, and do not allocate it all. Space left free is what makes snapshots and growth possible later.
Separate partitions worth having
Not for everything — a dozen tiny partitions is its own problem — but these two earn their keep:
- /var/log on a busy machine, so a runaway log cannot fill the root filesystem and stop everything. See logs and a disk that fills up.
- Your data directory, so the system can be reinstalled without touching it.
Mount options matter here: noatime everywhere, and
nodev,nosuid,noexec on anything holding user uploads. See
IO scheduler and tuning.
UUIDs in fstab, never device names
blkid to find them, then use
UUID=... in /etc/fstab. Device names move between boots,
particularly after a disk is added or replaced, and a machine that boots into an
emergency prompt because /dev/sdb1 is now /dev/sdc1 is a
trip to rescue mode for no reason.
Decide before delivery
We install the machine for you, so tell us the layout you want when you order — LVM with room left over, a separate data partition, a larger /boot. Changing it afterwards means a reinstall, and a reinstall destroys what is on the disks.
Still stuck? Mail support@novogara.com — an engineer answers, at any hour. Back to the knowledge base