1833178 Members
3027 Online
110051 Solutions
New Discussion

Re: Problems with LVM

 
SOLVED
Go to solution
Richard Davies
Occasional Advisor

Problems with LVM

I have recently taken over support of a D350 running HPUX 10.20. The machines has 8 disks mirrored with 2 disks in vg00 and 6 in vg01. If I try do do any lvm operations, such as split mirrors, etc I get error messages, examples below. I have deleted /etc/lvmtab and run vgscan, hoping it would correct the errors, but it do not work. Any ideas or help would be appreciated.

lvdisplay: Warning: couldn't query physical volume "":
The specified path does not correspond to physical volume attached to
this volume group
lvdisplay: Warning: couldn't query all of the physical volumes.


lvlnboot: Warning: couldn't query physical volume "":
The specified path does not correspond to physical volume attached to
this volume group
lvlnboot: Warning: couldn't query all of the physical volumes.
vgcfgbackup: Warning: couldn't query physical volume "":
The specified path does not correspond to physical volume attached to
this volume group
vgcfgbackup: Warning: couldn't query all of the physical volumes.
vgcfgbackup: Couldn't query physical volume "":
The specified path does not correspond to physical volume attached to
this volume group
vgcfgbackup: /etc/lvmtab is out of date with the running kernel:Kernel indicates
8 disks for "/dev/vgchsp2"; /etc/lvmtab has 7 disks.
Cannot proceed with backup.
15 REPLIES 15
John Poff
Honored Contributor

Re: Problems with LVM

Hello,

It looks like you might have lost a disk. Can you post the output from 'vgdisplay -v' and 'ioscan -fnC disk'? Also, are you seeing any errors in the /var/adm/syslog/syslog.log file?

JP
Tom Danzig
Honored Contributor

Re: Problems with LVM

I concur with John. The last line of your post shows:

8 disks for "/dev/vgchsp2"; /etc/lvmtab has 7 disks.
Cannot proceed with backup.

Do a "strings /etc/lvmtab" to get a list and check your disks for failure. vgdisplay -v vgname should show any stale LV extents. They should all read:

LV Status available/syncd
Richard Davies
Occasional Advisor

Re: Problems with LVM

 
Eugeny Brychkov
Honored Contributor

Re: Problems with LVM

John is right - if disk failed you should see messages like "PV1 power failed" in syslog.log.
To check if all physical volumes are available to the system try following "ioscan -fnC disk" output and checking disks with "pvdisplay". If you'll find physical volume telling you "can't query..." it should be the cause... If not, then you have probmels somewhere in HP-UX data structures/service files (like lvmtab)
Eugeny
Jean-Louis Phelix
Honored Contributor
Solution

Re: Problems with LVM

Hello,

Quite strange ... Cur PV = 8, act PV =6. You could try a 'vgreduce -f /dev/vgchsp2' (no other argument).

Do you get anny error on 'vgdisplay -v vg00' ?

Regards,

Jean-Louis.
It works for me (© Bill McNAMARA ...)
Richard Davies
Occasional Advisor

Re: Problems with LVM

Hi Tom

strings /etc/lvmtab shows what I expect, two disks in vg00 and 6 disks in vg01 (vgchsp2), and the correct device files are listed for the the 8 disks.

There are no stale extents on any of the logical volumes.

A bit more background. The reason I came across this problem was a set up a backup script that ran last night via cron, to split the mirrors, backup the system, etc. I noticed this morning it had not remerged the mirrors. when I started to remerge them manully I started getting these errors.
John Poff
Honored Contributor

Re: Problems with LVM

Hi again,

Your ioscan output doesn't look like you have lost a disk as they are all in a "CLAIMED" state. Can you post the output of 'vgdisplay -v vg00'? Also, can you post the output of 'strings /etc/lvmtab'?

JP
Vincent Farrugia
Honored Contributor

Re: Problems with LVM

Hello,

The problem is that the message you have is "Couldn't query physical volume "";". Usually it's more like "Couldn't query physical volume c1t2d0". That is what is strange...

Vince
Tape Drives RULE!!!
John Poff
Honored Contributor

Re: Problems with LVM

Do you save the output from your backup script? If so, does it give any clues?

JP
T G Manikandan
Honored Contributor

Re: Problems with LVM

In your vgdisplay output

PV=8 AV=6
Only 6 disks in the volume group are active.

I would like to do a
#vgreduce -f /dev/vgchsp2
which should remove the missing Physical volumes from the volume group.
check for the man pages of
vgreduce -f


Thanks
Richard Davies
Occasional Advisor

Re: Problems with LVM

Hi Jean-Louis

I agree, this is all very strange, never come across this before, and have been working with HPUX and LVM for some time
There are errors generated when running lvm commands on vg00.

Hi Eugeny

No errors messages in syslog.log. First place I looked expecting to see a scsi disk acting up, powerfailing.
Richard Davies
Occasional Advisor

Re: Problems with LVM

Hi All

Thanks for all your help.

vgreduce -f

followed by a vgscan and a vgcfgbackup seem to have sorted things out.

Would like to know why it all went wrong in the first place, but will probably never know.

Thanks again.

Richard
Jean-Louis Phelix
Honored Contributor

Re: Problems with LVM

Richard,

Perhaps we should have look to your script. But I would first try to correct cur pv againts act pv using vgreduce -f /dev/vgchsp2

regards,

Jean-Louis.
It works for me (© Bill McNAMARA ...)
Dietmar Konermann
Honored Contributor

Re: Problems with LVM

Hmm, the kernel believes that the VG consists of 8 PVs... although there should be only 6 PVs.

This can typically only happen if the VG was vgextend'ed somehow, since VGRA on disk contains records for a VG with 8 PVs.

Pls check the PVID/VGID that are stamped on each disk... I would like to see the result of:

for i in /dev/rdsk/c[12]*; do
xd -j8200 -N16 $i
done

Regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Dietmar Konermann
Honored Contributor

Re: Problems with LVM

Oops... I was a little too late. Now you should check that "Cur PV" and "Act PV" is both 6. vgchange -a y must not complain about anything. strings /etc/lvmtab should list the correct paths. lvdisplay -v must show clean results, no ???, no stale, etc.

Regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)