The Re-Import VG Procedure

domingo, 8 de janeiro de 2012

The following steps are needed to perform the re-import of an LVM cluster VG. We assume
that a cluster volume group /dev/vg01 with VG group special file minor number 0x010000
needs to be re-imported.
• Steps for the node that has the VG active:
1. Create a mapfile:
node1# vgexport –v –p –s –m /tmp/vg01.map vg01
Warning messages indicating that the VG is active should be ignored.
2. Copy mapfile to each of the other cluster nodes (using for example rcp, ftp, etc.)
node1# rcp /tmp/vg01.map node2:/tmp/vg01.map
...
• Steps to be performed on each of the other nodes:
3. Note VG minor number and permissions/ownership:
node2# ll /dev/vg01
total 12
drwxr-xr-x 2 root root 1024 Apr 16 12:04 ./
dr-xr-xr-x 19 bin bin 5120 Jun 20 06:44 ../
crw-r----- 1 root sys 64 0x010000 Apr 4 13:32 group
brw-r----- 1 root sys 64 0x010001 Apr 4 13:32 lvol1
crw-r----- 1 root sys 64 0x010001 Apr 4 13:32 rlvol1
4. Export the VG:
node2# vgexport vg01
5. Re-create VG directory:
node2# mkdir /dev/vg01
6. Re-create VG group special file, use minor number noted above.
node2# mknod /dev/vg01/group c 64 0x010000
7. Run vgimport using the copied mapfile:
node2# vgimport –v –s –m /tmp/vg01.map vg01
Messages indicating that no backup for this VG may exist should be ignored.
8. Change permissions and ownership of the VG directory and its device special files
according to the information noted above.
9. Test the activation of the VG in read-only mode and perform vgcfgbackup:
node2# vgchange –a r vg01
node2# vgcfgbackup vg01
node2# vgchange –a n vg01