AIX LVM migrates data without downtime
Migrating data doesn’t always have to mean system downtime. The AIX Logical Volume Manager (LVM) lets you move or copy a logical volume to a new storage-area network (SAN) LUN, and do it all online. That’s good news when you want to move a file system across the SAN–or even to a completely new SAN–without disrupting users.
You can use LVM to migrate data online with a few very helpful commands (Figure 1). You can mirror a complete volume group using mirrorvg. You can move data from one disk to another using the migratepv command. Or you can make a mirror copy of a logical volume with mklvcopy and remove one of the copies later (rmlvcopy).
A Look in the Mirror
Before the days of virtualization and SAN storage, the root volume group (rootvg) was typically mirrored across two internal, physical disks with the mirrorvg command. Mirroring the rootvg was a simple way of providing some protection from disk failures. Removing the mirror could be done with unmirrorvg.
As disk subsystems developed, redundant array of independent disks (RAID) replaced software mirroring. These days, redundancy is generally handled at the SAN level. In AIX, we still refer to disks as physical volumes (PVs), but they're usually not physical any more. They're generally virtual disks, such as SAN LUNs.
Although mirroring the root volume group via the OS isn’t as common as it used to be, the commands for mirroring and migrating data still come in handy for moving data around.
A common reason for moving data is to place it onto new SAN LUNs. The new LUNs might be on better performing disks, for example. Or you may be moving to a completely different SAN, and want to avoid bringing the system down unnecessarily. If your SAN utilities or application don't allow you to migrate data online, the AIX LVM commands may be just what you need. For a working example of using the LVM to do a complete SAN migration, see the Resources section.
You don't have to mirror an entire volume group. The LVM commands are very granular. With migratepv, you can move the data off a single PV onto one or more target PVs. If you want to move only the physical partitions of a single logical volume from a PV, you can do that, too. And, if you want to move a whole logical volume–even if it's on more than one PV–you can make a mirror copy of it first with mklvcopy. Once the mirror is synchronized, you can remove the data from the original physical volume(s), and it can all be done while the logical volume and its file system are in use.
Search our new 2013 Buyer's Guide.
E-Newsletter | AIX LVM migrates data without downtime
Web Exclusive | Move data without downtime using AIX