免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1542 | 回复: 0
打印 上一主题 下一主题

Exporting and Importing an LVM volume group [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-12-16 12:38 |只看该作者 |倒序浏览

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

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/27852/showart_216758.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP