免费注册 查看新帖 |

Chinaunix

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

Moving a Volume Group to Another System [复制链接]

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

You can move an entire LVM volume group to another system. It is recommended that you usethe vgexport and vgimport commands when you do this.
The vgexport command makes an inactive volume group inaccessible to the system, whichallows you to detach its physical volumes. The vgimport command makes a volume groupaccessible to a machine again after the vgexport command has made it inactive.
To move a volume group form one system to another, perform the following steps:
1. Make sure that no users are accessing files on the active volumes in the volume group, thenunmount the logical volumes.
2. Use the -a n argument of the vgchange command to mark the volume group as inactive,which prevents any further activity on the volume group.
3. Use the vgexport command to export the volume group. This prevents it from beingaccessed by the system from which you are removing it.
After you export the volume group, the physical volume will show up as being in an exportedvolume group when you execute the pvscan command, as in the following example.
[root@tng3-1]# pvscan
PV /dev/sda1 is in exported VG myvg [17.15 GB / 7.15 GB free]
PV /dev/sdc1 is in exported VG myvg [17.15 GB / 15.15 GB free]
PV /dev/sdd1 is in exported VG myvg [17.15 GB / 15.15 GB free]
...
When the system is next shut down, you can unplug the disks that constitute the volume group and connect them to the new system.
4. When the disks are plugged into the new system, use the vgimport command to import the volume group, making it accessible to the new system.
5. Activate the volume group with the -a y argument of the vgchange command.
6. Mount the file system to make it available for use.


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

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP