Operating System - HP-UX
1748069 Members
5645 Online
108758 Solutions
New Discussion юеВ

Re: Volume Group Disk Problem

 
SOLVED
Go to solution

Volume Group Disk Problem

I have a disk in a VG that's in an unavailable PV status. How do I change the status? pvdisplay does show that the PV should be in the VG.
20 REPLIES 20
John Meissner
Esteemed Contributor

Re: Volume Group Disk Problem

is the vg active and available?

All paths lead to destiny
LucianoCarvalho
Respected Contributor

Re: Volume Group Disk Problem

hi,
try to run vgsync.
vgsync vgxx.

regards
James R. Ferguson
Acclaimed Contributor

Re: Volume Group Disk Problem

Hi:

A 'vgdisplay' which returns "unavailable" for the VG status suggests an a deactivated volume group. Do:

# vgchange -a y

Regards!

...JRF...
S.K. Chan
Honored Contributor

Re: Volume Group Disk Problem

Yeah but what does this shows ..?
# pvdisplay /dev/dsk/cXtXdX|grep Status
It should be consistent with the vgdisplay output ie ..
PV status ===> unavailable
Try to run ..
# vgchange -a y /dev/vgXX
to reactive the VG which this PV resides and see if it helps. If it doesn't you probably got a bad disk. Check with ..
# /etc/diskinfo /dev/rdsk/cXtXdX
and
# ioscan -fnC disk
John Meissner
Esteemed Contributor

Re: Volume Group Disk Problem

james.... S.K...... exactly what I was getting at.

if the volume group is not available you will need to activate it with the vgchange command. I guess I should have included that in my first post
All paths lead to destiny

Re: Volume Group Disk Problem

Hey all,

Thanks for your help so far. Yes, the VG is active and pvdisplay shows the disk unavailable as well. Diskinfo returns a valid disk.I also tried a dd and the records in matched the records out, so I believe the disk is ok. Maybe the VGDA is corrupt? I've also tried deactivating and reactivating with no luck.
James R. Ferguson
Acclaimed Contributor
Solution

Re: Volume Group Disk Problem

Hi (again):

So let's try reading the LVM header:

if [ "`xd -An -j 8192 -N8 -tc $DEV | xargs" = "L V M R E C 0 1" ]
then
INFO=`xd -An -j8200 -N16 -tx $DEV`
PVID=`echo $INFO | awk ???{print $1 $2}???`
VGID=`echo $INFO | awk ???{print $3 $4}???`
#
echo "$DEV : PVID = $PVID : VGID = $VGID"
else
echo ">>> Can't find LVMREC <<<"
fi

Regards!

...JRF...
Helen French
Honored Contributor

Re: Volume Group Disk Problem

What's the status of PV in this command:

# pvdisplay -v pv_name
Life is a promise, fulfill it!

Re: Volume Group Disk Problem

Here's what I got after running the pvdisplay -v

root@rcptst01 / # pvdisplay -v /dev/dsk/c0t0d0
--- Physical volumes ---
PV Name /dev/dsk/c0t0d0
VG Name /dev/vgCPE
PV Status unavailable
Allocatable yes
VGDA 2
Cur LV 20
PE Size (Mbytes) 4
Total PE 38262
Free PE 47
Allocated PE 38215
Stale PE 0
IO Timeout (Seconds) default

... and so on. It did give the logical volumes but I wanted to keep this message short. James, the script is just hanging now...