Operating System - HP-UX
1833310 Members
3042 Online
110051 Solutions
New Discussion

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...
Helen French
Honored Contributor

Re: Volume Group Disk Problem

The unavailable PV status comes only when the communication fails between LVM and the disk. It can be either a HDD problem or LVM structure issue. From your outputs it's look like the HDD is working fine (check again the output of ioscan, diskinfo, dd, stm etc).

If you are sure that the disk is fine, then consider doing a vgcfgrestore to this specific disk:

# man vgcfgrestore

That will restore the VG structure back to the disk.
Life is a promise, fulfill it!
Helen French
Honored Contributor

Re: Volume Group Disk Problem

Again, IMPORTANT: make sure that you have a clean backup of all the file systems and data on this disk and the VG before changing anything!
Life is a promise, fulfill it!
Michael Tully
Honored Contributor

Re: Volume Group Disk Problem

A simple test of the disk should tell us something.

What does this do:

dd if=/dev/dsk/c0t0d0 of=/dev/null bs=1024k
Anyone for a Mutiny ?
Helen French
Honored Contributor

Re: Volume Group Disk Problem

Michael,

First, congratulations on your new hat!

He checked the dd output and said it was okay on an earlier post.

Look back ... do not drink too much to celebrate your new hat level =))
Life is a promise, fulfill it!
T G Manikandan
Honored Contributor

Re: Volume Group Disk Problem

I doubt some problem with the disk

With VG activated and PV status unavailable I would first suggest to check your
/var/adm/syslog/syslog.log for any scsi errors on the disk.
Also do check for the latest SCSI patches for the system.

Re: Volume Group Disk Problem

Hey all,

First of all, thanks for your help! vgcfgrestore is hanging. I've included a file with an excerpt of the syslog file. The latest XSWGR1100 patch bundle installed is B.11.00.49.3

Re: Volume Group Disk Problem

Oh, by the way, path 8/8.8.0
.255.0.0.0
is the path to the disk in question.
S.K. Chan
Honored Contributor

Re: Volume Group Disk Problem

Take a look at my answer here. Somewhat the same scenario and the vgexport/vgimport seems to solve the problem.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xe50c237a4bc6d611abdb0090277a778c,00.html
Let us know if you have any question on that.
T G Manikandan
Honored Contributor

Re: Volume Group Disk Problem

Please revert on the output of

#vgdisplay -v /dev/vg2
Do check the count of Cur PV and Act PV.
#vgdisplay -v /dev/vg1
#strings /etc/lvmtab
#ioscan -fnC disk

Please post the output


Thanks
John Dvorchak
Honored Contributor

Re: Volume Group Disk Problem

This sounds eriely familiar to me. I had the exact same problem but the disk was on an EMC array. It seems that One, I should not have seen the power fail message and two I should not have seen the "can't write to the PVDA". A call to EMC provided me with a utility that repaired or masked the bad PVDA and I was able to deactivate the VG and vgcfgrestore the disk back into the VG. Status is now good. You didn't mention if this is a locally attached disk or a disk in a SAN etc.

If it has wheels or a skirt, you can't afford it.
RolandH
Honored Contributor

Re: Volume Group Disk Problem

Check out these document.

Read the chapter about the "ghost disk"


Regards
Roland
Sometimes you lose and sometimes the others win