Saturday, August 8, 2009

Mounting LVM on external hard disk

Uh oh.. Fedora laptop cannot start. Need to copy data out of it. Take out hard disk, put into usb external hard disk adapter and BAM!!! when you try to mount it says:

mount: unknown filesystem type 'LVM2_member'

Alhamdullillah there's google. A quick search and I found this little gem which basically says to install the lvm2 package and as root do:


which would display the partition lvm, for example:

PV VG Fmt Attr PSize PFree
/dev/sdb1 R51 lvm2 a- 10.72G 0
/dev/sdb5 R51 lvm2 a- 26.31G 32.00M

And then use the lvdisplay command to show the volumes like so:

#lvdisplay R51

Which would give more greater details about your lvm:

LV Name /dev/R51/home
VG Name R51
LV UUID VfabJ0-E2hS-HLw4-3Swc-tnkm-SesH-fFxlUB
LV Write Access read/write
LV Status available

And then you should use the LV Name to mount your partition. But... it didn't work for me.. a little bit more googling found this site which tells you to use the command:

# lvscan

Which would display the state of the LV. And all of mine was inactive. To activate them all do:

# vgchange -ay

And then alhamdullillah the partition was mountable. Fuh.. time to do some backup..


Anonymous said...

Thanks a lot! - I had the same problem.

Dogbart said...

Thank you!!!! You saved my data!!! Thanks a lot!!!

Haiya ala Solah