Thursday, December 23, 2010

After Ignite, problem with HP LVM

Recently we ignited the HP-UX server, later we had issues in LVM.
We were not able to delete the VGs when we wished to re-layout the VG and restore the data from Backup.

Beloa are the one finally helped.

vgchange -a n /dev/vg
vgexport /dev/vg

in script -
for vg in $(strings /etc/lvmtab | grep vg)
do
echo vgchange -a n $vg
echo vgexport $vg
done


Some useful scripts -

# printf "%-18s | %-17s | %-17s\n" "PV" "VGID" "PVID"; \ for pv in `ls /dev/rdsk/*` do xd -An -j8200 -N16 $pv > /dev/null 2>&1 if [[ $? -eq 0 ]]; then echo "$pv \c" xd -An -j8200 -N16 -tx $pv 2> /dev/null fi done \ | awk '$0 ~ /dev/ {printf "%-18s | %8s %8s | %8s %8s\n", $1, $4, $5, $2, $3}' \ | sort -k 2,5

Wednesday, December 22, 2010

HP UNIX - To Find the Alternate Links

for pv in $(ls /dev/rdsk/*)
do
echo $pv
xd -An -j8200 -N16 -tx $pv 2> /dev/null
done > /tmp/output