加入收藏
最新动态
最新动态
HP小型机

Exporting and Importing an LVM volume group

来源:未知 作者:admin 人气: 时间:2014-02-07
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

 

  • 用友
  • IBM
  • oracle
  • 联想
  • 华为
  • 思科
  • 公司地址:广州市天河区燕岭路95号四楼404室A20 邮编:510000
    电话:020-31600147 传真:020-31600147
      Copyright © 2015-2024 yunyuns.cn 云云(广州)科技有限公司 版权所有 ICP备13000495号-10