[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] Lost a VG - please help



After doing some more research throughout the
day, I've tried a few solutions for other
somewhat similar problems, all to no avail.

Fortunately, I still have the old system
drive with its /etc/lvm* data, so I plugged
it back in hoping to resurrect my data.

>From this message:
http://www.somelist.com/mails/403762/
I tried a similar solution:

[root terminus root]# cp
/etc/lvmconf/vg_data.conf /etc/lvmtab.d/vg_data
[root terminus root]# echo -ne "vg_data\0" >>
/etc/lvmtab
[root terminus root]# vgchange -ay vg_data
vgchange -- ERROR: physical volume "/dev/md0"
of volume group "vg_data" is inconsistent
vgchange -- run vgscan

[root terminus root]#

Of course, running vgscan just results in the
bogus "vg_wbl" being detected.

Then I tried vgcfgrestore, again without any
luck:

[root terminus root]# vgcfgrestore -l -n vg_data
vgcfgrestore -- INFO: using backup file
"/etc/lvmconf/vg_data.conf"
--- Volume group ---
VG Name               vg_data
VG Access             read/write
VG Status             NOT available/resizable
VG #                  1
MAX LV                256
Cur LV                6
Open LV               0
MAX LV Size           2 TB
Max PV                256
Cur PV                1
Act PV                1
VG Size               447.09 GB
PE Size               32 MB
Total PE              14307
Alloc PE / Size       11862 / 370.69 GB
Free  PE / Size       2445 / 76.41 GB
VG UUID              
HKLIZ7-72l6-OjsA-ujH0-qpMz-tDi7-1R18jZ


[root terminus root]# vgcfgrestore -t -n
vg_data /dev/md0
vgcfgrestore -- INFO: using backup file
"/etc/lvmconf/vg_data.conf"
vgcfgrestore -- backup of volume group
"vg_data"  is consistent
vgcfgrestore -- test run for volume group
"vg_data" end

[root terminus root]# vgcfgrestore -n vg_data
/dev/md0
vgcfgrestore -- INFO: using backup file
"/etc/lvmconf/vg_data.conf"
vgcfgrestore -- physical volume "/dev/md0"
belongs to volume group "vg_wbl"

[root terminus root]#


I am sure the data on /dev/md0 is undamaged,
I just need to get the appropriate LVM
metadata back onto it to make it accessible.
 Is there any way to "force" vfcfgrestore to
write to /dev/md0 ?  If I "remove" it from
the VG "vg_wbl" and then try vgcfgrestore,
will that work ?  Will running "pvcreate"
possibly allow the vgcfgrestore to work ? 
Will that damage any of the non-LVM
structures on the disk ?

Also, does anyone have any theories on how
this might have happened, so I don't
inadvertently do it again the next time I
want to reinstall this system ?

Regards,
CS

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]