November 18

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


Copyright 2021. All rights reserved.

Posted November 18, 2021 by Timothy Conrad in category "Linux

About the Author

If I were to describe myself with one word it would be, creative. I am interested in almost everything which keeps me rather busy. Here you will find some of my technical musings. Securely email me using - PGP: 4CB8 91EB 0C0A A530 3BE9 6D76 B076 96F1 6135 0A1B