Operating System - HP-UX
1834187 Members
2817 Online
110064 Solutions
New Discussion

How to I change the lvmtab with the correct block device

 
SOLVED
Go to solution
Harvey Lindsay
Occasional Contributor

How to I change the lvmtab with the correct block device

After a reboot I can not accesses my vg03 volume.. The block device has changed and is the wrong on in the lvmtab. How do I edit the lvmtab to have the correct block device for vg03.

I'm connecting to a EMC san cx600. For some odd reason my block device changed on the HP box. I can't access's my data.
vg03 use to be c10t0d0 but now the device is c30t0d0. how do I make it correct.

Lvmtab:
^CM-h^D/dev/vg00
G"^P^^@M-^BM-H^V^A/dev/dsk/c1t2d0
/dev/vg01
G"^P^^@M-^BM-H^X^B/dev/dsk/c4t0d0
/dev/dsk/c4t0d1
/dev/vg02
G"^P^^@M-^BM-H^]^A/dev/dsk/c4t0d2
/dev/vg03
G"^P^^AbM-yM-1^B/dev/dsk/c10t0d0
/dev/dsk/c12t0d0

root(sh) $ vgscan -a -v
vgscan: The physical volume "/dev/dsk/c1t2d0" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c4t0d0" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c4t0d1" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c4t0d2" is already recorded in the "/etc/lvmta
b" file.
Couldn't stat physical volume "/dev/dsk/c3t2d0":
Invalid argument
Couldn't stat physical volume "/dev/dsk/c22t0d0":
Invalid argument
Couldn't stat physical volume "/dev/dsk/c24t0d0":
Invalid argument
Couldn't stat physical volume "/dev/dsk/c26t0d0":
Invalid argument
Couldn't stat physical volume "/dev/dsk/c28t0d0":
Invalid argument


/dev/vg00
/dev/dsk/c1t2d0



/dev/vg03
/dev/dsk/c30t0d0
/dev/dsk/c32t0d0
/dev/dsk/c34t0d0
/dev/dsk/c36t0d0



/dev/vg01
/dev/dsk/c4t0d0
/dev/dsk/c4t0d1



/dev/vg02
/dev/dsk/c4t0d2


Scan of Physical Volumes Complete.
Thank you
4 REPLIES 4
Jeff Schussele
Honored Contributor
Solution

Re: How to I change the lvmtab with the correct block device

Hi,

All you need to do is:

1) Move the /etc/lvmtab somewhere out of /etc
2) Run
vgscan -av

This will rebuild the lvmtab as it should be.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
HGN
Honored Contributor

Re: How to I change the lvmtab with the correct block device

Hi

The /etc/lvmtab file should be renamed to someother name(like .old) then after that do a vgscan -av (-a for all controller device path for all available disks & -v for verbose o/p)
this should create the lvmtab.
You can always use
#strings /etc/lvmtab to read what is in the file.

Rgds

HGN


Denver Osborn
Honored Contributor

Re: How to I change the lvmtab with the correct block device

how about vgexport/vgimport...

# vgexport -v -s -m /tmp/vg03.map /dev/vg03
# mkdir /dev/vg03
# mknod /dev/vg03/group c 64 0x030000
# vgimport -v -s -m /tmp/vg03.map /dev/vg03


-denver

Harvey Lindsay
Occasional Contributor

Re: How to I change the lvmtab with the correct block device

Thank you all for the help. The vgscan -av worked out. Thank you all for a quick response.