Logical Volume Manager

As Linux systems administrators watch over their hardware and software infrastructures, they constantly have to look ahead to how much space to allocate to hard-disk partitions to meet changing needs.

But the process of adding disks or reconfiguring existing drive space is slowed when servers have to be taken off-line for new drive installation and time-consuming rebooting or backup, repartitioning and data restoration.

Those changes can more easily be made using a logical volume manager (LVM), which precludes the need for reboots, shutdowns or downtime. Thus, an LVM can be an administrator's best friend.

Microsoft's Windows and Sun's Solaris and other Unix operating systems have similar volume manager capabilities.

Under Linux, an LVM is enabled by a kernel-loadable module, similar to a device driver in Windows. Kernel modules capture disk functions from user operations and convert them to write to the correct part of the disk. They work like a file system driver, but are far more dynamic.

Support for an LVM wasn't built into the Linux kernel until Version 2.4, but it was available as an add-on. It has been an important tool as Linux continues to make its way into enterprise computing.

"It's a common feature because it's so useful," says Chris Mason, a Linux kernel developer at Nuremburg, Germany-based Linux vendor SuSE Linux AG. "A lot of people, especially in Windows, may not know a lot about it," Mason says. "It's an extra layer to learn about, so a lot of people don't. Then when they move from a smaller server to a larger server, they don't realize how much more easily they can make it work."

The LVM creates an abstraction layer over all the combined storage in a system, so that the details about where the data actually resides are hidden. That allows the total separation of hardware and software because the LVM keeps a table of where the data is written and what volume group and volume it belongs to, allowing drives to be added or changed even while the system is running. And all this happens without software applications or users noticing the changes.

Systems without LVMs are also set up with physical hard drives, but they don't have this virtualization layer. When more disk space is needed, the system must be shut down and the new drives installed, and then they must be provided with file systems to organize data storage. If the new drive is replacing the original drive, the old drive must be backed up so the new drive can receive its data. That all takes time.

Organized Resources

With an LVM, the physical drives or hard disks are organized into "volume groups." Created inside those volume groups are "logical volumes," which are comparable to disk partitions in systems without LVMs. By keeping the hardware and software separate, drive changes can be made without shutdown or rebooting, and data can be moved to a different location while the system is running.

Joaquin Ruiz, vice president of marketing and product management at Minneapolis-based Sistina Software Inc., which has largely developed the LVM for Linux as an open-source program, says the LVM is important because it makes it much easier to administer storage.

Management Is Key

"The bottom line is management," Ruiz says. Without a volume manager, the burden of how to represent and deal with data storage is left up to the developer of the application you want to run, he says. That potentially permits "applications to be stepping on other applications" as they compete for disk space, says Ruiz. That's why all robust operating systems have volume management features, he says.

Sistina contributed the LVM technology to the Linux open-source community to improve the lineage, he says. By adding the LVM, Linux becomes more scalable. The LVM aggregates information about physical volumes, which are the actual hard-disk partitions, and presents them through the file system to the applications.

Sistina's LVM is supported by the standard Linux kernel version, beginning with 2.4, Red Hat 7.3 and Red Hat 2.1 Advanced Server editions, and is built natively into Red Hat 8.0. It is also supported by SuSE 7.3 and 8.0 and SuSE Linux Enterprise Server 7. SuSE was an early supporter of the LVM and has included the Sistina LVM in all its operating systems since SuSE Linux 6.3. It was also built into UnitedLinux Version 1.0, which is packaged and sold by the four UnitedLinux partners. It's compatible with all major Linux applications, including Web applications, databases and the Samba file-sharing system.

Brian Stevens, senior director of engineering at Red Hat Inc. in Raleigh, N.C., says the LVM addresses three areas for IT administrators: availability, performance and manageability of storage drive space. "Administrators love it because it gives control, uptime and doesn't waste space," he says.

Presently, the Red Hat Linux Advanced Server operating system doesn't include an LVM natively, but Red Hat partners with Veritas Software Corp. in Mountain View, Calif., to offer an LVM as an add-on. LVM software will be included in the next version of Advanced Server, Stevens says. Red Hat is more concerned with adding to the OS enterprise-mandated features such as scalability, threading and clustering capabilities before adding an LVM, even though customers have asked for it, Stevens says.

"It is a committed feature for the next version," he says.

How it works: A logical volume manager puts the physical entities (physical volumes) into storage pools called volume groups. An LVM can manage whole SCSI or IDE disks and partitions in a volume group, as well as hardware and even software RAID devices. A volume group is the equivalent of a physical disk from the system’s point of view. The equivalent of partitions into which the storage space is divided is called a logical volume.

See additional Computerworld QuickStudies.


Copyright © 2003 IDG Communications, Inc.

It’s time to break the ChatGPT habit
Shop Tech Products at Amazon