Partition Size Planner
Plan a recommended partition layout for root, home, var, tmp and swap based on total disk size and use case.
Inputs
Recommended Layout
/ (root): 100GB, /home: 50GB, /var: 150GB, /tmp: 25GB, swap: 50GB
/ (root)
100.0GB
/home
50.0GB
/var
150.0GB
/tmp
25.0GB
swap
50.0GB
Remaining / Unallocated
125.0GB
Step by step
Values used
Total Disk Size = 500 GB; Use Case = Server
Partition size
partition_size = max(minimum_size, total_disk × allocation_percent)
Recommended Layout
= / (root): 100GB, /home: 50GB, /var: 150GB, /tmp: 25GB, swap: 50GB
/ (root)
= 100.0 GB
/home
= 50.0 GB
/var
= 150.0 GB
/tmp
= 25.0 GB
swap
= 50.0 GB
How it works
Server and desktop workloads have different storage access patterns, so this planner allocates disk space using different percentage splits for each: servers typically need a larger /var (logs, databases, container images, package caches) relative to /home, since most server systems have few or no interactive user accounts, while desktops need a much larger /home to store user documents, media and application data. A minimum floor size is enforced per partition regardless of the percentage-derived figure, since a tiny /tmp or root partition can cause practical problems even on a small disk.
Formula
Partition size
partition_size = max(minimum_size, total_disk × allocation_percent)
- T
- total disk size
- p
- allocation percentage for the partition
- P_{min}
- minimum floor size for the partition
Frequently Asked Questions
Why does a server need a bigger /var than a desktop?
/var holds logs, package manager caches, mail spools, container images and often database data directories — all of which grow continuously on a running server. Desktops generate comparatively little of this data since they run fewer background services and rarely host databases or long-running application logs.
Should I use separate partitions or a single root partition with LVM?
Separate partitions (or LVM logical volumes) for /var, /home and /tmp isolate failure domains — a runaway log file filling /var won't take down the root filesystem needed to boot and run core services — while LVM adds the flexibility to resize volumes later without repartitioning, which is why many production deployments combine both approaches.
Is swap still necessary with modern amounts of RAM?
Some swap is still recommended even on high-memory systems, both as a safety net against unexpected memory spikes and because the kernel can use it to move rarely-accessed pages out of RAM — see the Swap Size Calculator for RAM-based sizing guidance rather than a fixed percentage of total disk.