HP-UX System Administrator's Guide: Logical Volume Management (5900-3028, March 2013)

Moving Disks Within a System
There a two procedures for moving the disks in a volume group to different hardware locations on
a system. Choose a procedure depending on whether you use persistent or legacy device files for
your physical volumes; the types of device files are described in “Legacy Device Files versus
Persistent Device Files” (page 13).
LVM Configuration with Persistent Device Files
If your LVM configuration uses persistent device files, follow these steps:
1. Be sure that you have an up-to-date backup for both the data within the volume group and
the volume group configuration.
2. Deactivate the volume group by entering the following command:
# vgchange -a n /dev/vgnn
3. Physically move your disks to their desired new locations.
4. Activate the volume group as follows:
# vgchange -a y /dev/vgnn
LVM Configuration with Legacy Device Files
The names of legacy device files change when the hardware paths to their physical devices change.
Therefore, you must update the LVM configuration by exporting and importing the volume group
to use the new legacy device files. Follow these steps:
1. Be sure that you have an up-to-date backup for both the data within the volume group and
the volume group configuration.
2. Deactivate the volume group as follows:
# vgchange -a n /dev/vgnn
3. If you want to retain the same minor number for the volume group, examine the volume group's
group file as follows:
# ls -l /dev/vgnn/group
crw-r--r-- 1 root sys 64 0x010000 Mar 28 2004 /dev/vgnn/group
For this example, the volume group major number is 64, and the minor number is 0x010000.
4. Remove the volume group device files and its entry from the LVM configuration files by entering
the following command:
# vgexport -v -s -m /tmp/vgnn.map /dev/vgnn
5. Physically move your disks to their desired new locations.
6. To view the new locations, enter the following command:
# vgscan -v
7. If you are using an HP-UX release before March 2008, or if you want to retain the minor
number of the volume group device file, create it using the procedure in “Creating the Volume
Group Device File” (page 44).
Since the group file in this example has a major number of 64 and a minor number of
0x01000000, enter the following commands:
# mkdir /dev/vgnn
# mknod /dev/vgnn/group c 64 0x010000
8. Add the volume group entry back to the LVM configuration files using the vgimport command
as follows:
# vgimport -v -s -m /tmp/vgnn.map /dev/vgnn
9. Activate the newly imported volume group as follows:
# vgchange -a y /dev/vgnn
Moving and Reconfiguring Your Disks 71