Chinaunix首页 | 论坛 | 博客
  • 博客访问: 383085
  • 博文数量: 146
  • 博客积分: 7142
  • 博客等级: 少将
  • 技术积分: 975
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-03 09:43
文章分类

全部博文(146)

文章存档

2012年(1)

2011年(5)

2010年(24)

2009年(116)

我的朋友

分类: LINUX

2010-01-04 22:37:18

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.

阅读(1579) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~