Operating System - HP-UX
1830829 Members
2673 Online
110017 Solutions
New Discussion

Unable to extract PVID/VGID from LVM disk

 
Ra Jose
Regular Advisor

Unable to extract PVID/VGID from LVM disk

I added a disk to a VG (vg04). The disk is not assigned to any LVs. I did pvcreate, vgextend and then trying to check its PVID and VGID from the techniques I got from the forum.
# xd -j8200 -N16 -td /dev/dsk/c32t5d2
I get following
0000000 -1134413123 1174322453 0 0
0000010
I am wondering why I am getting this -ve (1134413123) and my 3rd and 4th fields are zero (which should have been my vgid). Can anyone shed light on what wrong I might have done or my checking is not right.

Below I have given another way -
# echo "0x2008?4D" | adb /dev/dsk/c32t5d2
2008: -1134413123 1174322453 0 0

Thank you all for your responses.
Rajos
12 REPLIES 12
Patrick Wallek
Honored Contributor

Re: Unable to extract PVID/VGID from LVM disk

Have you tried doing a 'vgdisplay -v vg04' to see what disks the VG things it has? If that indicates that the appropriate disks are there then I'm not sure what you gain by checking the PVID / VGID on the disk itself.

Ra Jose
Regular Advisor

Re: Unable to extract PVID/VGID from LVM disk

vgdisplay -v vg04 does show this disk and also it's alternate link. I want to make sure the vgid put on this disk is same as other disks in the VG. In this case, I have 4 other disks and all show same vgid. This disk does not show the same vgid after adding it to the VG( shows zero).
Rajos
Court Campbell
Honored Contributor

Re: Unable to extract PVID/VGID from LVM disk

Do a vgcfgbackup or a vgchange -a y on vg04. It looks like the vgra has not been updated. The kernel lvm structures and the disk lvm structures don't always get updated at the same time.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Court Campbell
Honored Contributor

Re: Unable to extract PVID/VGID from LVM disk

Also try this:

xd -An -j8200 -N16 -tx /dev/dsk/c32t5d2
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Ra Jose
Regular Advisor

Re: Unable to extract PVID/VGID from LVM disk

Tried both what Campbell has suggested. No change. The vgid still does not show up.
Rajos
Court Campbell
Honored Contributor

Re: Unable to extract PVID/VGID from LVM disk

can you post the output from:

strings /etc/lvmtab
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
James R. Ferguson
Acclaimed Contributor

Re: Unable to extract PVID/VGID from LVM disk

Hi:

I've used both techniques in the past. I prefer the first, since it doesn't rely on reading what the kernel thinks but rather what's written on the physical disk.

Make _sure_ that you have the proper device file. The 'vgid' of zero would suggest that the device does _not_ belong to a volume group.

Regards!

...JRF...
Court Campbell
Honored Contributor

Re: Unable to extract PVID/VGID from LVM disk

James and I are thinking the same thing.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Tommy_6
Regular Advisor

Re: Unable to extract PVID/VGID from LVM disk

Have you tried using sam? Go into Disks and File Systems, then Volume Groups. View more information on the Volume group and see if everything looks alright. Hope this helps!
Ra Jose
Regular Advisor

Re: Unable to extract PVID/VGID from LVM disk

% > pvdisplay /dev/dsk/c24t4d2
--- Physical volumes ---
PV Name /dev/dsk/c32t5d2
PV Name /dev/dsk/c42t5d2 Alternate Link
VG Name /dev/vg04
PV Status available
Allocatable yes
VGDA 2
Cur LV 0
PE Size (Mbytes) 4
Total PE 2157
Free PE 2157
Allocated PE 0
Stale PE 0
IO Timeout (Seconds) 60
Autoswitch On

% > strings /etc/lvmtab

/dev/vg00
/dev/dsk/c2t0d0
/dev/dsk/c2t1d0
/dev/vg04
/dev/dsk/c32t3d0
/dev/dsk/c32t3d1
/dev/dsk/c32t3d2
/dev/dsk/c32t3d3
/dev/dsk/c42t3d0
/dev/dsk/c42t3d1
/dev/dsk/c42t3d2
/dev/dsk/c42t3d3
/dev/dsk/c32t5d2
/dev/dsk/c42t5d2
Ra Jose
Regular Advisor

Re: Unable to extract PVID/VGID from LVM disk

Sorry about it.
The pvdisplay out is for
% > pvdisplay /dev/dsk/c32t5d2
Rajos
Ra Jose
Regular Advisor

Re: Unable to extract PVID/VGID from LVM disk

Here is what I did to get the correct VGID.
% > pvchange -a n /dev/dsk/c32t5d2
% > pvchange -a n /dev/dsk/c42t5d2
% > vgcfgrestore -n vg04 /dev/rdsk/c32t5d2
% > pvchange -a y /dev/dsk/c32t5d2
% > pvchange -a y /dev/dsk/c42t5d2
% > xd -j8200 -N16 -td /dev/dsk/c32t5d2
0000000 -1134413123 1174322453 639308353 1047182634
0000010

Thank you all for your suggestions.
Rajos.