Logical Volume Manager – LVM



Logical Volume Manager, LVM, allows for very flexible disk space management. It provides features like the ability to add (or remove) disk space to a filesystem while that filesystem is mounted and active and it allows for the collection of multiple physical hard drives and partitions into a single volume group which can then be divided into logical volumes.

Running out of Disk Space in VirtualBox

June 9, 2009 was the first day of release for the new Fedora 11 distribution. I always like to run new distributions in a VirtualBox virtual machine for a few days or weeks to ensure that I will not run into any devastating problems when I start installing it on my production machines.

This morning, June 10, I started installing Fedora 11 in a new virtual machine on my primary workstation, thinking I had enough disk space allocated to the filesystem in which it was being installed. I did not. About a third of the way through the installation I ran out of space on that filesystem. Fortunately VirtualBox is great software itself. It detected the out of space condition and paused the virtual machine and even displayed an error message indicating the exact cause of the problem.

Adding Disk Space on the Fly

Since most modern distributions use Logical Volume Management, and I had some free space available on the hard drive, I was able to assign additional disk space to the appropriate filesystem on the fly. This means that I did not have to reformat the entire hard drive and reinstall the operating system or even reboot. I simply assigned some of the available space to the appropriate logical volume and resized the filesystem — all while the filesystem was on-line and the running program, VirtualBox was using the filesystem and waiting. I resumed running the virtual machine and the installation continued as if nothing had occurred.

Although this type of problem may never have happened to you, running out of disk space while a critical program is running has happened to many people. And while many programs, especially Windows programs, are not as well written and resilient as VirtualBox, Linux Logical Volume Management made it possible to recover without losing any data and without having to restart the time-consuming installation.

This section contains information about using and managing Logical Volumes.



Sub Pages: