Splitting A Volume Group - HP -UX 11i Administrator's Manual

Logical volume management
Hide thumbs Also See for HP-UX 11i:
Table of Contents

Advertisement

# rm /etc/lvmconf/vg01.conf
Note: if your volume group is Version 2.x and does not have any bootable physical volumes,
and if you have configured a new path for the configuration file using the
LVMP_CONF_PATH_NON_BOOT variable in the /etc/lvmrc file, you need to remove the
configuration file from the new path.
9.
Update all references to the old name in any other files on the system. These include /etc/
fstab for mounted file systems or swap devices, and existing mapfiles from a vgexport
command.

Splitting a Volume Group

You can use the vgchgid to split an existing volume group into two or more volume groups,
provided that the physical volumes to be split are self-contained; that is, any logical volumes on
the physical volumes must be wholly contained on those physical volumes. For example, a splittable
volume group can have logical volumes 1, 2, and 3 on physical volumes 0 and 1, and logical
volumes 4, 5, and 6 on physical volumes 2, 3, 4, and 5.
In this example, volume group vgold contains physical volumes /dev/disk/disk0 through
/dev/disk/disk5. Logical volumes lvol1, lvol2, and lvol3 are on physical volumes /dev/
disk/disk0 and /dev/disk/disk1, and logical volumes lvol4, lvol5, and lvol6 are on
the remaining physical volumes.
To keep /dev/disk/disk0 and /dev/disk/disk1 in vgold and split the remaining physical
volumes into a new volume group named vgnew, follow these steps:
1.
Deactivate the volume group as follows:
# vgchange -a n vgold
2.
Export the volume group as follows:
# vgexport vgold
3.
Change the VGID on the physical volumes to be assigned to the new volume group as follows:
# vgchgid -f /dev/rdisk/disk2 /dev/rdisk/disk3 \
/dev/rdisk/disk4 /dev/rdisk/disk5
4.
If you are using an HP-UX release before March 2008, or if you want to specify the minor
number of the vgold group file, create it using the procedure in
Device File" (page
5.
If you are using an HP-UX release before March 2008, or if you want to specify the minor
number of the vgnew group file, create it using the procedure in
Device File" (page
6.
Import the physical volumes in the old volume group as follows:
# vgimport /dev/vgold /dev/rdisk/disk0 /dev/rdisk/disk1
7.
Import the physical volumes in the new volume group as follows:
# vgimport /dev/vgnew /dev/rdisk/disk2 /dev/rdisk/disk3 \
/dev/rdisk/disk4 /dev/rdisk/disk5
8.
Activate the volume groups. Disable quorum checks for the old volume group (it is missing
over half its disks) as follows:
# vgchange -a y -q n /dev/vgold
# vgchange -a y /dev/vgnew
9.
The logical volumes are currently defined in both volume groups. Remove the duplicate logical
volumes from the volume group that no longer contains them as follows:
# lvremove -f vgold/lvol4 vgold/lvol5 vgold/lvol6
# lvremove -f vgnew/lvol1 vgnew/lvol2 vgnew/lvol3
10. The physical volumes are currently defined in both volume groups. Remove the missing physical
volumes from both volume groups as follows:
44).
44).
"Creating the Volume Group
"Creating the Volume Group
Common LVM Tasks
67

Advertisement

Table of Contents
loading

Table of Contents