HP-UX: Importing SAN VG from a failed server

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`
do
echo $i
done | grep rdsk |while read DSKNAME
do
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
# vgid

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

#fstyp LVname
#mkdir DIR
#mount LVname DIR

Add the entries in /etc/fstab.

Repeat the each steps to all VGs.
#fstyp /dev/vg01/lvol1

Leave a Comment

Your email address will not be published. Required fields are marked *

CAPTCHA * Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top