Shrink ext4 volume

From DWIKI
Revision as of 13:21, 24 June 2022 by Tony (talk | contribs) (Created page with "=Run fsck= e2fsck -f /dev/mapper/foo =Check minimum size= e2fsck -P /dev/mapper/foo gives you minimum size in blocks =Shrink filesystem= resize2fs -p /dev/mapper/foo 500G =Shrink volume= lresize -L 500T /dev/mapper/foo")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Run fsck

e2fsck -f /dev/mapper/foo

Check minimum size

e2fsck -P /dev/mapper/foo

gives you minimum size in blocks

Shrink filesystem

resize2fs -p /dev/mapper/foo 500G

Shrink volume

lresize -L 500T /dev/mapper/foo