Supercharge Volume Management With EVMS For Linux

By Carla Schroder | Jul 12, 2005 | Print this Page
http://www.enterprisenetworkingplanet.com/netsysm/article.php/3519641/Supercharge-Volume-Management-With-EVMS-For-Linux.htm

The Enterprise Volume Management System (EVMS) is one of those utilities that, once you start using it, you wander around with a happy grin wondering why you didn't start using it eons ago. Sure, you can live a long, happy life without ever touching EVMS, if you don't mind hassling with traditional inflexible disk partitioning, and exercising perfect prescience when designing your data storage schemes. (If your foresight is so good why waste it on disk partitioning schemes? Buy lottery tickets instead.)

EVMS is a marvelous piece of work that integrates all aspects of managing storage on locally-attached hard disks under one unified management interface, and provides nearly unlimited flexibility and scaleability. EVMS does it all: RAID, clustering, file system management, partition management, clustering, resizing partitions, drive linking and logical volume management, and bad block relocating. It supports most popular filesystems, including Reiser, EXT2/3, XFS, JFS, DOS/Windows, and Mac.

A really slick feature is the ability to take a snapshot of a specific volume, then make a backup of the snapshot. So you don't have to take the original volume offline, which is very handy for databases and busy fileservers. You may also use a snapshot to restore a volume to an earlier state.

Some other amazing and stupendous tasks you can do with EVMS are:

  • Resize volumes. Some filesystems must be mounted for this to work, some must be unmounted. (See Table 16.1 in the EVMS User Guide.)
  • Move data from one partition to another. I am not making this up -- you can lift the whole works and drop it in a different location. And even more fun is you may do this on a live filesystem -- that's right, while it is mounted. Though I caution you, from bitter experience, that unmounting it first is safer.
  • Drive-linking is my absolute favoritest feature -- this lets you link together any number and type of storage units into a single logical unit. Suppose you need a couple of gigabytes to dedicate to storing photos of your adorable kitty cats -- with drive-linking you can grab chunks of space from wherever they exist and knit them into one big chunk.

You can add EVMS to existing systems and immediately reap the benefits of not being tied to physical disk geometry or size. You can manage your storage needs very easily, re-allocating and adding space as you need. This means you can use all of your available storage space very efficiently, since you don't have to create partitions with all kinds of wasted space that may or may not be needed for future growth. New drives are divided up and allocated into logical units that fit wherever you need them. Mix-and-match all these different functions as you need -- be strait-jacketed no more by the tyranny of the obsolete x86 logical disk architecture.

For anyone who is wondering "what about LVM?" it's in there. You get LVM and LVM2, plus a skillion more features than LVM offers.

Installing EVMS
Some Linux distributions include LVM as an installation option, like Red Hat and the new Debian Sarge installer. This is not EVMS. The Related Projects and Web Sites list includes SUSE, Debian, Gentoo and Ubuntu as distributions that support EVMS. For others, the chances are you'll have to patch your kernel and install the user-space tools yourself. See the excellent EVMS installation guide for help with all of this. Patching a kernel is easy; don't let that scare you off. Pay especial attention to the "Patching, Configuring, and Building Your Kernel" section; it details everything you need. Installing the user-space tools is as easy as finding the correct package for your distribution.

Note also on the Related Projects and Web Sites page the link to the SystemRescue CD site. Definitely make yourself one of these, because rescue disks without EVMS support, like Knoppix, will not work.

You are not required to manage the root filesystem with EVMS. The root filesystem can be on its own separate partition or hard disk. The advantage is you won't need to create a ramdisk, or initrd image, to boot the system. However this creates a couple of problems.

With 2.6 kernels you won't be able to manage the disk containing the root filesystem with EVMS at all. "There can be only one" -- the 2.6 kernel allows only a single owner of a block device. See the "BD-Claim Patch" section to learn more. And you'll lose the multiple-disk features like RAID and drive linking. Better to bite the bullet and make a ramdisk, which isn't difficult at all.

Continued on page 2: Using EVMS

Continued From Page 1

Using EVMS
EVMS come with three different management interfaces:command-line, Ncurses, and a GTK-based GUI. I recommend the GUI; or if you don't want to run X use the Ncurses interface. The Ncurses and GUI interfaces are pretty much the same and a lot easier to use than the CLI, which might be useful if there are tasks you want to script, but otherwise forget it. (See these screenshots.)

As good as the graphical interfaces are, EVMS is complex, and takes some study to learn your way around. It's important to get their terminology down, so here is a quick review of basic disk terminology:

  • Disk Sector
    The smallest addressable bit of a physical drive, usually 512 bytes.
  • Storage region
    A related set of logically contiguous sectors that may not be physically contiguous.
  • Disk Segment
    This is what EVMS calls a hard disk partition.
  • Storage object
    A catchall term for physical or logical disks, disk segments, and storage regions.
  • Logical Volume
    A mountable storage object; in other words, this is the unit that you will mount and access like any Linux filesystem.

EVMS is very powerful and easy to use, once you learn the terminology and concepts. Be sure to practice on nothing-to-lose systems, because bad things will happen while you are learning. The EVMS User Guide is first-rate and tells everything you need to know. And, as always, check out the mailing lists for additional help.

Resources