1752598 Members
5057 Online
108788 Solutions
New Discussion юеВ

Problems with LVMTab

 
SOLVED
Go to solution
Michael Kohs
New Member

Problems with LVMTab

Hi everybody,

It seems like I have a corrupt lvmtab on my hp-ux 11iv3 system... Recentyl I tried to increase vg00 by adding the disk c0t1d0 to this volume group. For some reason this process failed but I managed to free enough space on one of the logical volumes on vg00 to keep the system running.

Now I tried to create a Serviceguard cluster and got an error which suggested I should issue a pvcreate to the disk "c0t1d0". I did this and I'm now able to create a SG cluster.

However when I stat "pvdisplay c0t1d0" I get the following output

bb90:root:/etc pvdisplay /dev/dsk/c0t1d0
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/c0t1d0" belongs.
pvdisplay: Cannot display physical volume "/dev/dsk/c0t1d0".

vgdisplay -v vg00:

bb90:root:/etc vgdisplay -v vg00
vgdisplay: Volume group "/dev/vg00" does not exist in the "/etc/lvmtab" file.
vgdisplay: Volume group "/dev/vg00" does not exist in the "/etc/lvmtab_p" file.
vgdisplay: Cannot display volume group "vg00".

And finally: vgscan -a

Physical Volume "/dev/dsk/c0t1d0" is not part of a Volume Group

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

Couldn't stat physical volume "/dev/dsk/c0t3d0":Invalid argument
Couldn't stat physical volume "/dev/dsk/c0t2d0":Invalid argument
Couldn't stat physical volume "/dev/dsk/c2t0d1":Invalid argument
Couldn't stat physical volume "/dev/dsk/c2t0d2":Invalid argument
Couldn't stat physical volume "/dev/dsk/c2t0d3":Invalid argument
Couldn't stat physical volume "/dev/dsk/c2t0d5":Invalid argument
Couldn't stat physical volume "/dev/dsk/c2t0d6":Invalid argument
Couldn't stat physical volume "/dev/dsk/c2t0d7":Invalid argument
Couldn't stat physical volume "/dev/dsk/c2t0d4":Invalid argument

So there are definately some things wrong... But I have no idea where to start since I'm not able to create a new lvmtab file...
10 REPLIES 10
Basheer_2
Trusted Contributor

Re: Problems with LVMTab

what is the output of
strings /etc/lvmtab
cp /etc/lvmtab /etc/lvmtab.old

vgscan

strings /etc/lvmtab


if you are getting
pvdisplay: Cannot display physical volume "/dev/dsk/c0t1d0".

this means this pv doesn't beling to any vg.

johnsonpk
Honored Contributor

Re: Problems with LVMTab

Hi Michael,

>> But I have no idea where to start since I'm not able to create a new lvmtab file...


move the lvmtab to some other name and do a vgscan

#mv /etc/lvmtab /etc/lvmtab.old
#vgscan -v


Rgds
Johnson

Sajjad Sahir
Honored Contributor

Re: Problems with LVMTab

Dear friend

run vgscan command

The vgscan commadn recreates the /etc/lvmtab file. You should use this command when this file is corrupted. This file stores the bindings of physical volumes to their corresponsing volume groups.

thanks and regards

Sajjad Sahir
Michael Kohs
New Member

Re: Problems with LVMTab

Thanks to all your answers, I renamed the lvmtab file and started a vgscan -v as suggested.

Unfortunately the output is:

bb90:root:/etc mv lvmtab lvmtab_corrupt
bb90:root:/etc vgscan -v
Creating "/etc/lvmtab".
vgscan: Couldn't access the list of physical volumes for volume group "/dev/vg00".
Physical Volume "/dev/dsk/c0t1d0" is not part of a Volume Group

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

Scan of Physical Volumes Complete.
*** LVMTAB has been created successfully.
*** Do the following to resync the information on the disk.
*** #1. vgchange -a y
*** #2. lvlnboot -R
Couldn't stat physical volume "/dev/dsk/c0t3d0":Invalid argument
Couldn't stat physical volume "/dev/dsk/c0t2d0":Invalid argument
Couldn't stat physical volume "/dev/dsk/c2t0d1":Invalid argument
Couldn't stat physical volume "/dev/dsk/c2t0d2":Invalid argument
Couldn't stat physical volume "/dev/dsk/c2t0d3":Invalid argument
Couldn't stat physical volume "/dev/dsk/c2t0d5":Invalid argument
Couldn't stat physical volume "/dev/dsk/c2t0d6":Invalid argument
Couldn't stat physical volume "/dev/dsk/c2t0d7":Invalid argument
Couldn't stat physical volume "/dev/dsk/c2t0d4":Invalid argument

Scan of Physical Volumes Complete.


strings /etc/lvmtab shows nothing... Still seems to be empty
sujit kumar singh
Honored Contributor
Solution

Re: Problems with LVMTab

Hi
do the following

This command shall remove the useless entries for the the absent PVs from the VG.
See Man(1M) vgreduce.
http://docs.hp.com/en/B2355-60130/vgreduce.1M.html

#vgreduce -f /dev/vg00
#vgscan -k -f /dev/vg00

OR

#vgreduce -f /dev/vg00
#mv /etc/lvmtab /etc/lvmtab.old
#vgscan -av
do make sure that you check the following things and set them after that.


#setboot
#lvlnboot -v
#lvlnboot -R
#lvlnboot -v

regards
sujit
Michael Kohs
New Member

Re: Problems with LVMTab

Thanks!

#vgscan -k -f /dev/vg00

solved the issue with lvmtab and after issuing "strings lvmtab" I now get the following:

/dev/vg00
LE`{I
/dev/disk/disk7_p2

But one issue still remains. When I stat "pvdisplay /dev/dsk/c0t1d0" I still get

pvdisplay: Couldn't find the volume group to which physical volume "dev..." belongs.
pvdisplay: Cannot display physical volume"...".

So I thought of removing the vg headers from the disk but

#vgreduce /dev/vg00 /dev/dsk/c0t1d0

shows

vgreduce: Too many physical volumes specified. At least one physical volume must stay in the volume group.

I would be really happy I someone could assist me getting rid of this last issue.

Thanks!
johnsonpk
Honored Contributor

Re: Problems with LVMTab

Hi Michael,

I believe you are playing with the disk which is already there in the vg00 .The vg00 uses PDSF of your hdd /dev/dsk/c0t1d0 (the vgg might be using one section of your /dev/dsk/c0t1d0)

You can confirm this by executing
#ioscan -m dsf /dev/disk/disk7_p2
and see what is the dsf corresponding address for that



You can also do a reverse lookup for pdsf by
#ioscan -m dsf /dev/dsk/c0t1d0


Rgds
Johnson
Michael Kohs
New Member

Re: Problems with LVMTab

Hi Johnson,

I checked the dsf of /dev/disk/disk7_p2 and the corresponding legacy dsf is "/dev/dsk/c0t0d0s2"

The persistent dsf of /dev/dsk/c0t1d0 is /dev/disk/disk4 and it is not used in any vg.

Is it possible to just "override" the pv by another #pvcreate? I am 100% sure that there is no data on this disk.
johnsonpk
Honored Contributor

Re: Problems with LVMTab

Hi Micahel,

>>The persistent dsf of /dev/dsk/c0t1d0 is /dev/disk/disk4 and it is not used in any vg.

Is it possible to just "override" the pv by another #pvcreate? I am 100% sure that there is no data on this disk.

On safer side ,just confirm the below things before you execute pvcreate again

#ioscan -m dsf /dev/disk/disk4 and see any of the dsfs related to your disk4 is not present any of your local node by doing #strings /etc/lvmatb |grep -i


Take the serial number and WWID of disk4 from the node you are working on and confirm no vgs on the second node of your cluster is disk with wwid of disk4

To find wwid and serail number
#scsimgr get_info -D /dev/rdisk/disk4 |grep -e "WWID" -e "Serial"


Once you confirm this ,you can goa head with pvcreate

#pvcreate /dev/rdisk/disk4
if any error use -f with pvcreate

Rgds
Johnson