Notes on resizing file system in LVM (Shrink)

1. Umount the filesystem and check it with e2fsck

umount /var/lib/vz

e2fsck -f /dev/mapper/pve-data

2. Re-size the file system of /dev/mapper/pve-data (Let said to 500GB)

resize2fs /dev/mapper/pve-data 500G

3. Resize the Logical Volume of LVM

 lvresize -L 500G /dev/pve/data

4. Check the size of the Logical Volume

lvdisplay /dev/pve/data

5. Mount the filesystem and check the size

mount /var/lib/vz

df -h

 

Enjoy it.

 

Reference:

http://www.tcpdump.com/kb/os/linux/lvm-resizing-guide/shrink.html

Leave a Reply

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close Menu