Monday, December 7, 2015

How to import and export Volume Group when the device file names have changed (11iv2) HP-UX


In HP-UX 11iv2 or older the device files of the disks can change when you change the slot of the FC card or also when by any reasons the CxTxDx number changes. 11iv2 unlike 11iv3 does not use the persistent DSF.

The persistent DSFs bind to the WWID of a LUN in 11iv3 which does not change even if the controller position or the instance changes.

I suggest that you have  the latest map files of the VGs which are supposed to get affected.



Create a map file for all the VGs, say vg01,vg02 etc


1)


vgexport -p -v -s -m /tmp/vg01.map /dev/vg01
vgexport -p -v -s -m /tmp/vg02/map /dev/vg02


also make a note of

2)


ll /dev/*/group


note this information.


now ftp these map files like vg01.map,vg02.map etc to your desktop.

3) With the OS instance booted vgexport the current definitions of the VGs for which the disk cxtydz numbers have changed.


vgexport /dev/vg01
vgexport /dev/vg02


Create the VG Directories


mkdir /dev/vg01 /dev/vg02


Create the Group special files.

mknod /dev/vg01/group c 64 0xNN0000
mknod /dev/vg02/group c 64 0xMM0000


for these do refer to the info in 2) for the minor number information for the group file and try to keep this consistent for the VG as in the earlier Config.

then ftp the map files that had been saved to the desktop doing FTP after step 1). to /tmp directory of the server.

then using these do vgimport to get the new VGs come in 

vgimport -v -s -m /tmp/vg01.map /dev/vg01
vgimport -v -s -m /tmp/vg02.map /dev/vg02


Activate the VGs.

vgchange -a y vg01
vgchange -a y vg02



Take a new configuration backup of the VGs which are imported.


vgcfgbackup /dev/vg01
vgcfgbackup /dev/vg02


Do the mount operations for the file systems.

No comments:

Post a Comment