Wednesday, March 28, 2012

ProxmoxVE 2.0: Shrinking the data volume

After installing ProxmoxVE 2.0rc1, a data volume was created which makes use of most of the space on the drive.

I wanted to carve out a separate volume for some other use so I needed to shrink this data volume:

First, I unmounted the logical volume with:
umount /var/lib/vz
Then I proceeded to shrink the file system to the minimum size possible with:
resize2fs -Mf /dev/pve/data
Then I proceeded to reduce the size of the logical volume with:
lvreduce --verbose --extents -100000 /dev/pve/data
Then I proceeded to grow the file system back to occupy the now reduced volume with:
resize2fs -f /dev/pve/data
Lastly, I remounted the file system with:
mount /dev/pve/data /var/lib/vz

I hope you found the post useful. You can subscribe via email or subscribe via a feed reader to get relevant updates from this blog. Have a nice day.

No comments:

Post a Comment