1,Unmount any logical volumes associated with the volume group you wish to export
# umount /dev/vgXX/lvol*
2,Make the volume group unavailable
# vgchange -a n /dev/vgXX
3,Use vgexport to remove volume group information from /etc/lvmtab
# vgexport -v /dev/vgXX
NOTE: If the logical volumes used specific names, instead of the defaults, and these need to be kept you will need to specify the -m option for vgexport followed by a filename:
# vgexport -v -m vgXXlvols /dev/vgXX
This file will need to be transferred to the other system by tape or network before the vgimport command is executed
4,Using vi or ed,remove any lines in /etc/fstab that refer to logical volumes in the volume group to be exported
5,shut the system down
# cd /
# shutdown -hy 0
6,Detach the physical disks from the exported system. Physically attach them to the new host system. Check the bus addresses to assure no confict, power the new disk on , and boot the new host
7,Create a new directory under /dev for the volume group you wish to import
# mkdir /dev/vgYY
8,Make a group character device file for the volume group to be imported
# mknod /dev/vgYY/group c 64 0xZZ0000
9,Determine the logical unit number for the new disks to be imported
# ioscan -kfC disk
10,Now import the volume group
# vgimport -v /dev/vgYY /dev/dsk/cxtxdx
If multiple disks, include block device file for each disk being imported on this line.
NOTE:If a mapfile was created, specify its name as shown to keep the original logical volume
names:
# vgimport -v -m vgXXlvols /dev/dsk/cxtxdx
11,Activate the newly imported volume group
# vgchange -a y /dev/vgYY
12,Make a mount-point-directory on root for each logical volume in the newly imported volume group
# mkdir /vgYYlvolM
13,Add a new line in /etc/fstab using vi or ed for the new logical volume
/dev/vgYY/lvolM /vgYYlvolM hfs rw 0 P # /vgYYlvolM
14,Mount the new file system
# mount -a
15,Backup the LVM data structures(PVRA and VGRA) for all groups affected. The default path name for the backup will be /etc/lvmconf/vgYY.conf
# vgcfgbackup /dev/vgYY
阅读(1046) | 评论(0) | 转发(0) |