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
10. Back up the volume group configuration as follows:
# vgcfgbackup /dev/vgnn
Moving Disks Between Systems
To move the disks in a volume group to different hardware locations on a different system, export
the volume group from one system, physically move the disks to the other system, and import the
volume group there. The procedures for exporting and importing a volume are described in
“Exporting a Volume Group” (page 57)
and
“Importing a Volume Group” (page 58)
. They are
illustrated in the following example.
NOTE:
If the volume group contains any multipathed disks, see the note under
“Importing a
Volume Group” (page 58)
.
To move the three disks in the volume group
/dev/vg_planning
to another system, follow these
steps:
1.
If any of the logical volumes contain a file system, unmount the file system. If any of the logical
volumes are used as secondary swap, disable swap and reboot the system; for information
on secondary swap, see HP-UX System Administrator's Guide: Configuration Management.
2.
Make the volume group and its associated logical volumes unavailable to users as follows:
# vgchange -a n /dev/vg_planning
3.
Preview the removal of the volume group information from the LVM configuration files using
the following command:
# vgexport -p -v -s -m /tmp/vg_planning.map /dev/vg_planning
With the
-m
option, you can specify the name of a map file that will hold the information that
is removed from the LVM configuration files. The map file contains the names of all logical
volumes in the volume group. You use this map file when you set up the volume group on the
new system.
4.
If the preview is satisfactory, remove the volume group information as follows:
# vgexport -v -s -m /tmp/vg_planning.map /dev/vg_planning
The
vgexport
command removes the volume group from the system and creates the
/tmp/
vg_planning.map
file.
5.
Connect the disks to the new system and copy the
/tmp/vg_planning.map
file to the new
system.
72
Administering LVM