partition destroyed with lvm manager (?)


I just installed openSuse11.0 with KDE 3.5. I wanted to mount the home directory of another linux installation. As I did not see the mount point options in the partitioning tool, I tried the LVM (bad idea as I know now).

I created a group and added /dev/sda6 (the partition I wanted to mount) as a physical volume. Because I could not mount it afterwards I had another look in Yast and found the right options in the partitioning tool. But I could not mount it because of the filesystem. So I changed the type to “0x83 Linux” and it says “Linux native” in the partitioner’s overview.

But mounting it is still not possible. “mount /dev/sda6 /media/sda6” (directory exists) gives "mount: unbekannter Dateisystemtyp “LVM2_member” (german error message). In english this should be something likle "unknown filesystem “LVM2_member”.

Are there any suggestions what to do to mount the device / rescue data?

Thanks a lot!

First thing is don’t mess with that partition until your sure which way you want to go… you could make a dd image for safekeeping.
(make a zipped image:

dd if=/dev/<lvm systemname>/<lvm volume> | gzip -c > /path/<your image fiz>/img.gz

You could dump it to a usb drive if you don’t have enough space on the system drive.

I haven’t run into this situation yet, but it’s plausible that LVM has only changed the partition type and included the partition in it’s system configuration. If that’s the case (e.g. you haven’t configured LVM volumes on it) all you have to do is set it back to type 0x83, like you have done & remove the volume from the LVM configuration (normally done first).
Could be you have to set the partition type back to 0x8E before you can remove the partition from your LVM config.

If all goes well the partition should be mountable again.

Fingers crossed!

Thanks for the reply!

I did not configure LVM volumes on the physical drive. I only added /dev/sda6 to a lvm group and confirmed this.

I already tried to set it back to type 0x83 (after removing the physical volume from lvm and deleting the lvm group). At first with the partitioning tool from yast2… still the same error from “mount” afterwards.

The next try was with TestDisk. Suprisingly this tool showd type “Linux LVM” in it’s overview, although I changed it back to 0x83 before with Yast’s partitioning tool. So I changed it to 0x83 again with TestDisk… again the error message from mount stays the same.

TestDisk did find ext2 superblocks… might this be helpful?

I am doing the data dump right now… thanks for the hint! But I still dont know how to get the partition to work. Any further ideas? Some information needed I could gather?

hmmm… could try testing this with a vm I have running…

Have you tried rebooting after setting back the partition type. could be LVM is still holding on to the partition. What do pvdisplay & lvdisplay tell you?

I did a reboot and I even tried to mount the device on a separate linux installation (ubuntu 8.04). The error message is the same…

lvdisplay does not give any output.
output of pvdisplay:

"/dev/sda6" is a new physical volume of "44.87 GB"
--- NEW Physical Volume ---
PV Name         /dev/sda6
VG Name
PV Size         44.87 GB
Allocatable     NO
PE SIze (KByte) 0
Total PE        0
Free PE         0
Allocated PE    0
PV UUID         <.....>

(there might be small typos, as I could not copy+paste. also I did not give the UUID which is shown by pvdisplay)

Should I run

e2fsck -y -b <...> /dev/sda6

on one of the superblocks TestDisk found to restore the filesystem?

Ok… been testing this on a vm.

The next step is probably to force the mount and set the type to ext3:

mount -t ext3 /dev/<diskpart> /<mountpoint> -f

when that is done, unmount it and reset the mount point using YaST > Partitioner

When this is done unmount the volume and fsch it to fix any errors.

With luck you should have your files back!

Fingers double crossed!


Superb, I am able to mount the device and as it seems there was no data lost. Thanks a lot!

But there is still a minor problem as I have to give the option “-t ext3” to mount/fstab. Otherwise it does not work because of an unknown filesystem “LVM2_member”.

What I did:
Forced mounting did not work: No error message, but I still could not access the drive. So of course unmounting the device gave an error “/dev/sda6 is not mounted” (or something similar…).

Changing the mount point in with Yast > Partitioner did not work either, because the filesystem was unknown.

The next step I ran “fsck -t ext3 /dev/sda6” and let it fix a lot of errors (free blocks, inodes, etc). After rebooting, the device is mounted (there is an entry in fstab WITH ext3 filesystem given).

Mounting the device manualy only works with the option “-t ext3”. So there still seems to be a problem with this…

Any ideas how to finaly fix this?

Maybe fix the last bits by re-running fsck?

To be on the safe side you could move/copy the data to another device, remake/format the partition, and move the data back.

Glad you still have the data! :slight_smile: