1827318 Members
5112 Online
109961 Solutions
New Discussion

Lost vg01!

 
TWBSupport
Regular Advisor

Lost vg01!

Hi all.. My power outage whoes continue.. Different box than my hostname issue, still 11.11.
System is running fine, can access ALL data & ALL disks are showing up claimed & working properly. If I do the following:
vgdisplay -v vg01
vgdisplay: Volume group "/dev/vg01" does not exist in the "/etc/lvmtab" file.
vgdisplay: Cannot display volume group "vg01".

Again, all hard drives are reporting fine & data is being accessed on the disks that are allocated to vg01. What's the best method to get vg01 back into the lvmtab w/o losing data? /etc/vg01 does exist & does have all the entries in it. I'm reading posts on the forums, but nothing actually tells me if I will lose data or not following the advice given. As always, thanks a TON for your time.
7 REPLIES 7
Patrick Wallek
Honored Contributor

Re: Lost vg01!

The first thing I would try is:

# mv /etc/lvmtab /etc/lvmtab.old

# vgscan -av

This will NOT result in a loss of data. vgscan rebuilds the /etc/lvmtab file from the information it finds in the VGRA on the disks themselves.

# man vgscan

for more information.
Rick Garland
Honored Contributor

Re: Lost vg01!

Check out the vgscan command.
This will update the lvmtab file.

First make a backup copy of the present lvmtab file.

Then run vgscan in the preview mode - make sure all you want is there.

vgscan -p

Can use the verbose mode as well, the -v switch to the command


Juan M Leon
Trusted Contributor

Re: Lost vg01!

I concur with everyone also I would suggest check the PV. after the vgscan
do the following,
strings /etc/lvmtab
you will see something like this
/dev/vg01
/dev/dsk/c#t#d#
then execute pvdisplay -v /dev/dsk/c#t#d#



hope it helps
TWBSupport
Regular Advisor

Re: Lost vg01!

Well... this doesn't look good at all.
s02 # vgscan -av
Creating "/etc/lvmtab".

/dev/vg00
/dev/dsk/c1t15d0
/dev/dsk/c3t15d0

Following Physical Volumes belong to one Volume Group.
Unable to match these Physical Volumes to a Volume Group.
Use the vgimport command to complete the process.
/dev/dsk/c4t0d0
/dev/dsk/c4t1d0

Following Physical Volumes belong to one Volume Group.
Unable to match these Physical Volumes to a Volume Group.
Use the vgimport command to complete the process.
/dev/dsk/c4t2d0
/dev/dsk/c4t3d0
/dev/dsk/c4t14d0

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

/dev/vg02
/dev/dsk/c4t6d0

/dev/vg03
/dev/dsk/c4t7d0
/dev/dsk/c4t8d0
/dev/dsk/c4t9d0
/dev/dsk/c4t10d0
/dev/dsk/c4t11d0

/dev/vg04
/dev/dsk/c4t12d0
/dev/dsk/c4t13d0

Scan of Physical Volumes Complete.
s02 # strings /etc/lvmtab
/dev/vg00
/dev/dsk/c1t15d0
/dev/dsk/c3t15d0
/dev/vg02
/dev/dsk/c4t6d0
/dev/vg03
/dev/dsk/c4t7d0
/dev/dsk/c4t8d0
/dev/dsk/c4t9d0
/dev/dsk/c4t10d0
/dev/dsk/c4t11d0
/dev/vg04
/dev/dsk/c4t12d0
/dev/dsk/c4t13d0
s02 # pvdisplay -v /dev/dsk/c4t0d0
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/c4t0d0" belongs.
pvdisplay: Cannot display physical volume "/dev/dsk/c4t0d0"

Any advice GREATLY appreciated...
Venkatesan_5
Frequent Advisor

Re: Lost vg01!

From the /etc/lvmtab file it seems all below mentioned disks belongs to /dev/vg01
c4t0d0
c4t1d0
c4t2d0
c4t3d0
c4t14d0

As per my understanding ....you are able to access all data and you have all /dev/vg01 files also.....okay..
If you want the data and an entry in /etc/lvmtab ...then please follow the steps given below.....

1. Please take the backup of all /dev/vg01/lvol's which are currently mounted
2. unmount all /dev/vg01 /lvol's
3.# mkdir /dev/vg05 ---- for example
4. # mknod /dev/vg05/group c 64 0x050000
5. # vgimport /dev/vg05 /dev/dsk/c4t0d0 /dev/dsk/c4t1d0 /dev/dsk/c4t2d0 /dev/dsk/c4t3d0 /dev/dsk/c4t14d0
6. now check in /dev/vg05 by # ls /dev/vg01 ....now u could see all the device files for all logical volumes...
7. # vgchange -a y /dev/vg05
8. now mount all filesystems as per your requirement.
------------------------ please do not give vgscan after all these steps -------------------------------
hope this should work....i tested it in server ....it worked....
please note you cannot do vgexport /dev/vg01 because /dev/vg01 entry is not there in /etc/lvmtab ...


regds
Venkatesan
Giacomo TOTTI
Advisor

Re: Lost vg01!

Hi,
check if you have these files under /etc/lvmconf directory:

vg01.conf
vg01.conf.old

so try this solution:

vgcfgrestore -f /etc/lvmconf/vg_01.conf /dev/dsk/c4t0d0
vgcfgrestore -f /etc/lvmconf/vg_01.conf /dev/dsk/c4t1d0

OR

vgcfgrestore -f /etc/lvmconf/vg_01.conf.old /dev/dsk/c4t0d0
vgcfgrestore -f /etc/lvmconf/vg_01.conf.old /dev/dsk/c4t1d0


hope this help

Giacomo
Devender Khatana
Honored Contributor

Re: Lost vg01!

Hi,

As indicated in the error during vgscan it seems the device files for disks under /dev/dsk are not equal in no. as under /dev/rdsk. Were these modified/removed manually after reboot? Compare two directories & there should not be any differences.

HTH,
Devender
Impossible itself mentions "I m possible"