Shrink an unmounted LV containing an ext4 filesystem.
Backups are complete and the data fits within the smaller target size.
Which order is appropriate?
Shrink the upper filesystem first, then shrink the underlying LV. Reducing the LV first can cut off blocks still used by the filesystem.
Detailed explanation
Correct. Unmount and check the filesystem, shrink ext4, then reduce the LV.
Incorrect. Shrinking the LV first can discard blocks still used by ext4.
Incorrect. Removing the VG destroys the existing layout and data.
Incorrect. The layer order and operation directions are unsafe for an existing filesystem.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' 'unmount/check -> shrink filesystem -> shrink LV'Expected result
上位ファイルシステムから下位LVへ縮小する順序Key points
- Shrink upper layers first
- Take a backup and check consistency
- Some filesystems such as XFS cannot shrink
Notes
- Environment: ext4とLVM2の概念確認。実縮小は行わない
- Use read-only inspection or a disposable disk when learning storage commands.
- Partition and LVM writes can destroy data; verify the target before running them.
Foundation review
Place the operation
The lower block device must remain large enough for the filesystem throughout the operation.
Check the side effect
Back up, unmount, check, and verify used space before any shrink operation.