Skip to the posts
Buffalo's neighborhood journals since 2003 🍀 Patrick Spicy Devil Logan🌭 Sahlen🥨 Weber Spank🥟 Pierogi🐸 Scaj🍺 Labatt Utica Pink Cherio❄️ Snow Murder

paul’s journal

LVM - Moving empty space from one logical volume to another

·

I resized the logical volumes for the site VM on KVM to steal some size from home and add it to root. Its actually really simple. It was all able to be done while the server was online. Go LVM.

//unmount home
umount /home

//check file system
e2fsck -f /dev/vg_estrip/lv_home 35G

//reduce home to total size of 35G
lvreduce -L 35G /dev/vg_estrip/lv_home

//remount home and check files
mount /home

//extend root by adding 50GB
lvextend -L+50G /dev/vg_estrip/lv_root

//resize fs to take up the 50GB
resize2fs /dev/vg_estrip/lv_root

💬 2 comments

  1. uncutsaniflush ·

    Thanks for posting this. I've successfully enlarged logical volumes but I've not been able to shrink a logical volume (and file system) successfully. I assume you are running fedora or centos? What file system are you using?
  2. paul ·

    Centos and ext4.

💬 Write a comment