LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   LVM problems (VGs found, but not LVs) (https://www.linuxquestions.org/questions/linux-software-2/lvm-problems-vgs-found-but-not-lvs-391474/)

jimisola 12-11-2005 04:46 AM

LVM problems (VGs found, but not LVs)
 
Hi!

I did an upgrade of Mandriva to 2006.0 a couple of months ago that failed - hard.
Disconnected two disks with LVMs that I have music and other personal stuff on and then went on with trying to upgrade, clean install etc. I finally gave up and installed OpenSuse instead - which I don't regret at all!

However, I connected my two disks with LVMs and thought that it with me just to mount them up again.
Sadly, the volume groups are found (vg01 and vg02) but not the expected logical volumes within them.

Is there a way for me to fix this? I have years of personal stuff on these disks so I don't mind spending some time on getting this fixed.

Regards,
Jimisola

fermat:/scratch # vgchange -ay
0 logical volume(s) in volume group "vg02" now active
5 logical volume(s) in volume group "system" now active
0 logical volume(s) in volume group "vg01" now active
fermat:/scratch # vgdisplay
--- Volume group ---
VG Name vg02
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 255
Cur LV 0
Open LV 0
Max PV 255
Cur PV 1
Act PV 1
VG Size 45.90 GB
PE Size 4.00 MB
Total PE 11750
Alloc PE / Size 0 / 0
Free PE / Size 11750 / 45.90 GB
VG UUID crHchE-236z-G24u-AGhW-MgDd-nTxD-1MnxHn

--- Volume group ---
VG Name system
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 7
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 5
Open LV 5
Max PV 0
Cur PV 1
Act PV 1
VG Size 97.66 GB
PE Size 4.00 MB
Total PE 25001
Alloc PE / Size 11506 / 44.95 GB
Free PE / Size 13495 / 52.71 GB
VG UUID qMe8jO-4Qyl-Weno-k09t-n2Pd-Jo5G-Co7kpn

--- Volume group ---
VG Name vg01
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 12
VG Access read/write
VG Status resizable
MAX LV 255
Cur LV 0
Open LV 0
Max PV 255
Cur PV 1
Act PV 1
VG Size 232.88 GB
PE Size 4.00 MB
Total PE 59618
Alloc PE / Size 0 / 0
Free PE / Size 59618 / 232.88 GB
VG UUID YowUTE-awQj-OyKP-0UGH-nwkD-MZzt-e8P0kK

MensaWater 12-11-2005 11:30 AM

Have a look at the vgscan man page:

http://linux.about.com/library/cmd/blcmdl8_vgscan.htm

This is designed to find LVM information on your hard drives and recreate your lvmtab. (You don't by any chance have lvmtab from the old system do you?)

How by the way did it "find" your VGs? Did you do new pvcreate/vgcreate after the reinstall? If so you may already have lost the information you could have found with vgscan.

I'd probably deactivate the VGs before running the vgscan. You might want to save the lvmtab you already have as lvmtab.orig before running the vgscan so you can at least get back to where you were. Also doing diff between that and the one created by vgscan will let you know quickly if it actually found anything for you. After the scan reactivating the VGs and doing a vgdisplay should let you know if it found what you needed.

jimisola 12-11-2005 11:59 AM

Where is lvmtab suppose to be located? Under etc/lvmtab? I don't have that file in my current installation or in my backup from the old system.
I never used pvcreate och vgcreate after the reinstall. I simply used vgchange -ay (see my original post for output).

I ran vgscan:

Reading all physical volumes. This may take a while...
Found volume group "vg02" using metadata type lvm2
Found volume group "system" using metadata type lvm2
Found volume group "vg01" using metadata type lvm2

fermat:/etc # vgchange -ay
0 logical volume(s) in volume group "vg02" now active
5 logical volume(s) in volume group "system" now active
0 logical volume(s) in volume group "vg01" now active

But, as you can see I still have the same problem that my LVs are not found.

Any other ideas?


All times are GMT -5. The time now is 09:51 AM.