Filesystem Resize Calculator
Calculate new usable capacity after growing or shrinking a filesystem or partition.
About Filesystem Resize Calculator
Growing a filesystem is almost always safe and often possible online (ext4, XFS and Btrfs all support online growth once the underlying block device has more space). Shrinking is riskier: XFS cannot shrink at all — only ext4 and Btrfs (and, at the block-device level, LVM) support it, and it must never take the filesystem below its currently used space. For LVM-backed filesystems, remember the correct order matters: grow the LV before growing the filesystem, but shrink the filesystem before shrinking the LV, or you risk truncating live data.
Formula
New size
new_size = current_size + delta (delta negative for shrink)
- S_cur
- current filesystem size
- \Delta
- requested change (signed)
Worked example
With the default values below, Filesystem Resize Calculator returns New Filesystem Size (GB) of 150.00. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Current Filesystem Size (GB)minimum 0.1
- 100
- Change Amount (GB)
- 50
- Filesystem Typeone of ext4, XFS, Btrfs, LVM Logical Volume (any fs)
- ext4
- Currently Used Space (GB)minimum 0
- 60
Results
- New Filesystem Size (GB)
- 150.00
- Feasibility Note
- Growth can be performed online (filesystem mounted and in use).
- Can Grow Online
- true
- Shrink Supported
- true
- LVM Extents Changed
- N/A
- Suggested Command Pattern
- resize2fs /dev/xxx (or xfs_growfs for XFS, after growing the block device)
Step by step
- 1Values used
- 2New size
- 3New Filesystem Size (GB)= 150.00
- 4Feasibility Note= Growth can be performed online (filesystem mounted and in use).
- 5Can Grow Online= Yes
- 6Shrink Supported= Yes
- 7LVM Extents Changed= N/A
- 8Suggested Command Pattern= resize2fs /dev/xxx (or xfs_growfs for XFS, after growing the block device)
Assumptions and limits
- The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
Why can't XFS filesystems be shrunk?
XFS's on-disk allocation group layout is fixed at creation time and doesn't support relocating data to free space at the end of the device, which shrinking requires. The only reliable path to a smaller XFS filesystem is backup, reformat at the new size, and restore.
What order should I resize an LVM logical volume in?
When growing: extend the LV first (lvextend), then grow the filesystem (resize2fs/xfs_growfs) to fill it. When shrinking: shrink the filesystem first to a size at or below the target, then shrink the LV (lvreduce) — doing it in the wrong order on a shrink can truncate live data.
Do I need to unmount the filesystem to resize it?
Growing ext4, XFS and Btrfs can all be done online (mounted). Shrinking ext4 requires unmounting; Btrfs can shrink online in most cases; XFS cannot shrink under any circumstance.
