cancel
Showing results for 
Search instead for 
Did you mean: 

LVM

 
Rg_4
Advisor

LVM

How to recover from corrupted lvmtab
7 REPLIES
Ivan Krastev
Honored Contributor

Re: LVM

Use vgscan to recreate lvmtab:
vgscan -a

regards,
ivan
Sunny123_1
Esteemed Contributor

Re: LVM

Hi

Use vgscan to recover it .

Regards
Sunny
Robert-Jan Goossens
Honored Contributor

Re: LVM

Hi Ragesh,

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

Regards,
Robert-Jan
Sajjad Sahir
Honored Contributor

Re: LVM


Dear Ragesh

vgscan

The vgscan command allows the re-creation of the /etc/lvmtab file and possibly the associated volume group device files. This command should be run only in the event of a catastrophic error such as the deletion of the /etc/lvmtab file or the mismatch of names of the physical volumes in the /etc/lvmtab file to the actual physical volume path configuration. If the /etc/lvmtab file exists, the information contained in the file is used to assist in rebuilding the file, but the existing file is updated with the new corrected configuration.

vgscan searches each physical volume connected to the system, looking for logical volumes. If there are dual controller devices, only the primary controller device path is scanned, unless you specify the -a option to allow access to all paths. It groups these physical volumes into volume groups by matching the volume group information found on the physical volumes. Then it searches the /dev directory for all group device files with the LVM major number, and tries to match device files with the logical volumes' information found on the physical volumes.

If matches occur, it determines the volume group name from the device file path, and updates the /etc/lvmtab file with the volume group name and the list of physical volumes paths contained in that volume group. For volume groups where the device files cannot be matched, it prints the list of physical volumes for each volume group.

thanks and regards

Sajjad sahir
R.K. #
Honored Contributor

Re: LVM

Hi,

As already said,

Make a backup of current lvtmab
# mv /etc/lvmtab /etc/lvmtab.bak

Recreate new lvmtab:
# vgscan -v

-R.K
Don't fix what ain't broke
Taifur
Respected Contributor

Re: LVM

Hi Ragesh,

Use lvsync and vgsync command

Check below link as follows,
http://docs.hp.com/en/B3921-60631/lvsync.1M.html

http://docs.hp.com/en/B2355-90692/vgsync.1M.html

Rgds//
Taifur
Patrick Wallek
Honored Contributor

Re: LVM

Why do you think it is corrupted?

Is it because you see output like this:

# strings /etc/lvmtab
/dev/vg00
#c>3?
/dev/dsk/c1t0d0
/dev/dsk/c2t0d0

With strange characters, like the #c>3?, in my output above?

If that is the case, don't worry about it. That is perfectly normal. There is nothing wrong with the lvmtab file.