Assign the same EMC LUNs to the new server. Recognize all the LUNs in newserver from ioscan.
#ioscan -fnKC disk
Create a script with the following contents to get the VG info. Here created the script in filename /usr/bin/vgid.
# vi /usr/bin/vgid
echo ” Disk Name CPU ID PV ID CPU ID VG ID”
echo ” ———————————————————“
for i in `ioscan -FnkCdisk | grep dsk`
done | grep rdsk |while read DSKNAME
echo “Disk : $DSKNAME `xd -An -j8200 -N16 -tx $DSKNAME 2> /dev/null || echo — Failed to read. Please check`”
echo ” “
done | sort -k 7 | grep Disk | sed ‘s/rdsk/dsk/’
Change the permission to this script file using below command.
# chmod a+x /usr/bin/vgid (this command will add execute permission for all users)
Execute the script
From the output of above, number of VG and associated LUNs (PV) can be identified by VGID. VGID is unique for each Volume Group. So now the VG configuration can be collected and conclude that which LUN (PV) belong to which VG.
Then go for vgimport for each volume group with the associated LUNs (PV).
# mkdir /dev/vgnn
# mknod /dev/vgnn/group c 64 0xhh0000
vgimport -v /dev/vgnn pvanmes assosiated with vgnn
Here all LVs under this vgnn are getting created in default names like LV1 and LV2… etc.
Warning: A backup of this volume group may not exist on this machine.
Please remember to take a backup using the vgcfgbackup command after activating the volume group
#mount LVname DIR
Add the entries in /etc/fstab.
Repeat the each steps to all VGs.