Operating System - HP-UX
1825668 Members
3408 Online
109686 Solutions
New Discussion

vgdisplay lists incorrect quantity of physical volumns

 
SOLVED
Go to solution
RussellFrost
New Member

vgdisplay lists incorrect quantity of physical volumns

I have a system running 11.11 which is showing an incorrect quantity of physical disks when using the vgdisplay command:

# vgdisplay -v /dev/vg01
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 3
Act PV 1
Max PE per PV 17502
VGDA 2
PE Size (Mbytes) 4
Total PE 17499
Alloc PE 17499
Free PE 0
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/oradatavg/oradatalv
LV Status available/syncd
LV Size (Mbytes) 69996
Current LE 17499
Allocated PE 17499
Used PV 1


--- Physical volumes ---
PV Name /dev/dsk/c1t0d0
PV Status available
Total PE 17499
Free PE 0
Autoswitch On




# strings /etc/lvmtab
/dev/vg00
/dev/dsk/c1t2d0
/dev/vg01
/dev/dsk/c1t0d0


The "Cur PV 3" line from vgdisplay is incorrect - I know that there is only one physical disk in vg01. There are only two disks currently in the system. ioscan verifies that two disks are available, diskinfo verifies that both disks are working OK.

How do I correct the "Cur PV" information?

Thanks for your time,
Russell
7 REPLIES 7
RAC_1
Honored Contributor

Re: vgdisplay lists incorrect quantity of physical volumns

mv /etc/lvmtab/etc/lvmtab.old

vgscan -pva (to check in preview mode)
vgscan -av (To rebuild /etc/lvmtab)

check and post the results.

Anil
There is no substitute to HARDWORK
Ashwani Kashyap
Honored Contributor

Re: vgdisplay lists incorrect quantity of physical volumns

Do you get any error messages when doing vgdisplay -v /dev/vg01 ?

Is is possible that some unused disks that were part of vg01 were removed from the system .

Did someone accidently replace the lvmtab file from some old copy .

Check the contents of /etc/lvmconf directory and look for the last succesful backup of vg01.conf .

Use: vgcfgrestore -n /dev/VG_NAME -l to see the list of physical volumes contained within the last good backup.
RussellFrost
New Member

Re: vgdisplay lists incorrect quantity of physical volumns

Here are the results of vgscan:

# vgscan -pva
vgscan: The physical volume "/dev/dsk/c1t0d0" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c1t2d0" is already recorded in the "/etc/lvmtab" file.
Couldn't stat physical volume "/dev/dsk/c3t2d0":
Invalid argument

vgscan: has no correspoding valid raw device file under /dev/rdsk.
Verification of unique LVM disk id on each disk in the volume group
/dev/vg01 failed.


/dev/vg00
/dev/dsk/c1t2d0


(Note - "/dev/dsk/c3t2d0" is the CDROM)

and here is the result of vgcfgrestore:

# vgcfgrestore -n /dev/vg01 -l
Volume Group Configuration information in "/etc/lvmconf/vg01.conf"
VG Name /dev/vg01
---- Physical volumes : 1 ----
/dev/rdsk/c1t0d0 (Non-bootable)



I'm sure that _something_ must have changed - but I don't know the history of this particular system and the local admin swears that no disk related changes have been made. I do have the ability to recover the entire system from tape if I need to, but I would rather understand the problem and correct it.
RAC_1
Honored Contributor

Re: vgdisplay lists incorrect quantity of physical volumns

How many disk you have on your system?

ioscan -fnCdisk

(exclude CDROM) and do pvdisplay on each disk. Check how many reports they belong to vg01. I doubt only one will report.

Though this can be corrected, we will try to find out what is reporting that.

Anil
There is no substitute to HARDWORK
Geoff Wild
Honored Contributor
Solution

Re: vgdisplay lists incorrect quantity of physical volumns

Ok - current PV = 3, yet only 1 physical volume is listed....

force reduction of missing physical volume(s) in a given volume group.

vgreduce -f /dev/vg01

Then:

rmsf -a /dev/dsk/c3t2d0

then try the vgdisplay -v....

If that doesn't clear it up, you might have to un mount it as well:

umount /mntpoint

then vgchange -a n it, then vgchange -a y it, then remount - see if you still see the 3 PV's....

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Helen French
Honored Contributor

Re: vgdisplay lists incorrect quantity of physical volumns

I think your issue is the difference between the running kernel and your LVM defenitions. Both should match inorder to get the same number in current and active PV numbers. The reason might be becuase of an improper disk removal, in correct vgimport etc. This document has a good explanation and solution (TKB #KBRC00000632):

http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000065011231
Life is a promise, fulfill it!
RussellFrost
New Member

Re: vgdisplay lists incorrect quantity of physical volumns

"vgreduce -f" fixed the problem. Here's what I did:

vgreduce -f /dev/vg01
mv /etc/lvmtab /etc/lvmtab.old
vgscan -av
vgcfgbackup /dev/vg01

Thank you all for the help.