There may come a time when you're about to run out of space on a logical volume, or perhaps it has already happened and you need to fix it quick, but all the data is terribly terribly important so you can't move or delete any of it.
What do you do? Why, just resize the filesystem of course!
Normally, this isn't so simple. You would tend to have to unmount the partition, then resize it using some kinda beta software that warns you it may not be quite working yet. Then cross your fingers and remount. Erk.
Using the dynamic duo of LVM and Reiserfs, this whole process is made so much more relaxing. Resizing can be done on the fly!
Read on...
To find out how much space you have left to play with:
# vgdisplay -s vgdisplay -- "vg00" (active/used) 11.62 GB [4.91 GB used / 6.72 GB free]
So we have 6.72 GB as yet unallocated. Say we want to resize the /databases partition, giving it another 1GB of breathing space. First, extend the logical volume in question (eg. /dev/vg00/databases):
# lvextend -L+1000m /dev/vg00/databasesThis hasn't changed the size of the partition, only the size of the container. We need to resize the reiserfs filesystem contained therein, in order to fill the new space:
# resize_reiserfs -f -s+1000m /dev/vg00/databases
And that's it. You'll find that you now have a gigabyte more room on /databases (or wherever you have /dev/vg00/databases mounted), and all is well with the world.
Back to Tech index