1833777 Members
2200 Online
110063 Solutions
New Discussion

lvm problem

 
Tore_1
Regular Advisor

lvm problem

Hi, strange lvm problem.

system disk in vg00. mount confirms this.
However, vg00 is not in /etc/lvmtab! And
lvcommands fails with vg00 not in lvmtab.

Any suggestions?
9 REPLIES 9
Thierry Poels_1
Honored Contributor

Re: lvm problem

Hi,

/etc/lvmtab corrupted??
->
mv /etc/lvmtab /etc/lvmtab.old
(file MUST be removed or renamed)
vgscan -a

check with "strings /etc/lvmtab" if all required VG's are detected. If not put /etc/lvmtab.old back in place.

good luck,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Clemens van Everdingen
Honored Contributor

Re: lvm problem

Hi,

You can do a vgscan -p -v to preview what vgscan would do to the lvmtab file if this command was run.
If this looks OK to you You can run vgscan -v to recreate lvmtab.

Move the old one away before doing this.

In case of mirrored disk or alternate links be carefull to run this.
Primary and alternate may possibble switch around.

Regards,
C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Tore_1
Regular Advisor

Re: lvm problem

Thanks. But how can lvmtab be corrupted. And how come the system is able to boot and mount the logical volumes in vg00 while vg00 isnt in /etc/lvmtab?
Clemens van Everdingen
Honored Contributor

Re: lvm problem

Hi,

Booting is not dependent on the lvmtab file.
Mounting filesystems is done from /etc/fstab.

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Trond Haugen
Honored Contributor

Re: lvm problem

lvmtab isn't consulted when activating a vg or mounting filesystems. Only when changing the LVM configuration.
As it seems lvmtab is OK (apart from missing vg00) my guess isit was removed and then some more vg's added.

Regards,
Trond
Regards,
Trond Haugen
LinkedIn
Krishna Prasad
Trusted Contributor

Re: lvm problem

Hello Tore,

This would also indicate that /etc/lvmtab became corrupt after you booted.

- Because a volume group does have to be activated inorder to mount logical volumes in that volume group.

- Look in your syslog.log file and look around the last boot time. I wouldn't think you would have any errors around vg00 until afterwards.

/etc/dmesg will also show errors activating a volume group.
Positive Results requires Positive Thinking
pap
Respected Contributor

Re: lvm problem

Hi Tore,

I think this problem is related to service guard environment.

Please look at the thread below and it will help you in resolving your problem.



http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xe0e65f260cafd4118fef0090279cd0f9,00.html


-pap

"Winners don't do different things , they do things differently"
S.K. Chan
Honored Contributor

Re: lvm problem

Another possible reason why you're getting this is that you got an inconsistency VGID between lvmtab and the disks (VGRA). I'm not sure how to extract the VGID and compare them but one way they can be different is that you got the disk connected to 2 systems for example plu if you got patch PHCO_21630 (for 11.00) installed, it enforces the consistency check. If found different it'll report the error. To solve your problem, do what others have suggested (recreate lvmtab).
Tim D Fulford
Honored Contributor

Re: lvm problem

To further Chan's point

I've seen two systems where someone has copied the /etc/lvmtab file from one machine to the other (SG pair). It will work, for a while. Anyway to check the VGID on a disk use

dd if= bs=1024 skip=8 count=9 | dd bs=8 skip=2 count=1 | od -x | head -1

==> 0000000 77e4 2b30 3905 58f0

VGID=77e4 2b30 3905 58f0

to see the same info in the /etc/lvmtab is slightly more difficult as it is hidden. The VGID is only listed on the first disk in the VG so if you do a more on /etc/lvmtab you get something like
^CM-h^B/dev/vg00
wM-d+09^EXM-p^A/dev/dsk/c1t6d0
/dev/vgswap

wM-d+09M-HM-E+^D/dev/dsk/c0t2d0

/dev/dsk/c0t3d0

/dev/dsk/c0t4d0

/dev/dsk/c0t5d0

Again use od -x /etc/lvmtab and look for the VGID you found on the disk. (remember to ignore the first column
od -x /etc/lvmtab
0000000 03e8 0000 0000 0002 0000 0000 2f64 6576
0000020 2f76 6730 3000 0000 0000 0000 0000 0000
0000040 0000 0000 0000 0000 0000 0000 0000 0000
*
0002000 0000 0000 0000 0000 0000 0000 77e4 2b30
0002020 3905 58f0 0000 0000 0000 0000 0001 0000
0002040 0000 0000 0000 0000 0000 2f64 6576 2f64
0002060 736b 2f63 3174 3664 3000 0000 0000 0000
0002100 0000 0000 0000 0000 0000 0000 0000 0000
*
0004040 0000 0000 0000 0000 0000 0000 0000 2f64
.
.
.
You can see the VGID in the 1st & 2nd line of the second set of text here (which is listing the disk)

I do not know of any tools that will figure this out for you

Regards

Tim
-