☰ Categories

Linux: Resizing lvm when using LUKS

Fedora by default gives the home directory too much space and you may run out of space on your root partition.  In this example we will shrink home and give the space to root.
Start sizesvolume 465 GBhome = 407 GBroot = 50 GBswap = 8 GB
Boot computer using an external boot OSsudo su -fdisk -l
find the LUKS volume.  It is likely /dev/sda3
cryptsetup luksOpen /dev/sda3 cryptdiskenter your password:
pvdisplayvgdisplaylvdisplay
scan the volume you are wanting to shrinke2fsck -f /dev/vgroupname/home

Make home 350 GBlvresize –resizefs –size 350G /dev/vgroupname/home
Make root 100GBlvresize -l +100%FREE /dev/vgroupname/root

Check File Systemse2fsck -f /dev/vgroupname/homee2fsck -f /dev/vgroupname/root

Final sizesvolume 465 GBhome = 350 GBroot = 100 GBswap = 8 GB