1752763 Members
4681 Online
108789 Solutions
New Discussion

pv issue

 
SOLVED
Go to solution
Jakes Louw
Trusted Contributor

Re: pv issue

Firstly: do a "vgdisplay -v" on that VG. Make a note of the PV names recorded at the end of the vgdisplay output.
Secondly: do "strings /etc/lvmtab > /var/lvmtab_garbage". Cat or more the file /var/lvmtab_garbage, and see what is recorded under the entry for your VG.

There should be a clear discrepancy: one disk should show up on the VGDISPLAY but not in the LVMTAB output.
Now, check the VGDISPLAY again: are any LVOLS marked as unavailable? If not, then the disk simply has something in the VGDA that implies that it is owned by that VG. If you do an IOSCAN, does that disk come up as a seperate disk, or as an additional Special File or path to an existing disk? Sometimes, injudicious use of INSF can create an extra special file that confuses LVM. If there is actually a disk with that name, you will have to do:
"dd if=/dev/null of=/dev/rdsk/funnydisk count=100". BEWARE: You MUST be sure of what you are doing in this case.
Then do a "vgchange -a y " for that VG, and the problem should be fixed.

If any LVOLS are actually marked as unavailable, you have a problem.
That implies that the disk went unavailable prior to the last VGSCAN. I hope you have backups....
Fix the disk, then:
pvcreate /dev/rdsk/funnydisk
vgcfgrestore -n VGNAME /dev/rdsk/funnydisk
mv /etc/lvmtab /etc/lvmtab.old (IMPORTANT BIT!)
vgscan -av
This will re-create your LVMTAB by re-scanning all the disks.
Do the "strings /etc/lvmtab" thing again to see what LVM thinks
Trying is the first step to failure - Homer Simpson