Skip to main content

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:

#pvs

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..

Comments

Anonymous said…
Thanks a lot! - I had the same problem.
Dogbart said…
Thank you!!!! You saved my data!!! Thanks a lot!!!

Popular posts from this blog

Dell Inspiron Mini 9

Yesterday went to Low Yat to buy my cousin a sub RM 1500 notebook. Of course with that kind of price tag it would have to be a netbook jelah. Anyhow, I was short on time so I didn't get to browse thoroughly. Just went for one quick round around level 2 and picked the one that I thought would fulfil his need. The thing is, as soon as I stepped out of the lift there was a shop that sold the new Dell Inspiron Mini 9 for only RM 1199. I was suprised. Just 1199. I couldn't believe my eyes. With original Windows XP and all. RM 1199. I thought there must be something wrong. Better survey first. So went around level 2. There was nothing that could match that price. Most of the other netbook from acer, asus and lenovo even was around RM 1600. So I decided I'll just go with the Dell lah. But to tell you the truth if I had money to buy for my own use, I'd go with the Lenovo Ideapad S10. Fuh.. she's one sweet mama... Smooth rounded curves, slim white profile. Pergh.. But anyway

First godot game published

I haven't published anything in google play for a very long time. I'm very happy to finally introduce my latest project to the public. It is a casual game called..... Add Block. Yeah.. The best original game name award coming right up. But seriously, try it out. Find in at the play store here . I love playing casual games on my phone. It's great to pass the time. But it doesn't really do anything for your skills. Or at least not anything for real life important skills (yes, I don't consider being able to identify the consecutive shapes or color as really important). So I decided to create one. So in this game, you practice your math skills. Find the adjacent blocks that add up to the total you need. So it's math, math is important right? Right?.... The levels are unlimited, the idea is that you keep on playing until you can't anymore. You'll die if you finally can't get the number of wins required to pass the level in time. You only have 100 se

Rendering template from string using thymeleaf in spring

Finally solved a very big problem for me... How do I render a page in spring framework that uses the thymeleaf templating engine? The string most probably will come from the database. After long hours of searching and trying, I've got it. First I've got a clue from this particular stackoverflow question . But following an example from there got me an error about class not found for ognl.PropertyAccessor. That solution was found here . So here's how I finally done it... First thing is to create a service where that service can be used wherever you need it in your spring app. @Service public class PortalService { private TemplateEngine templateEngine; private final static String TEMPLATE_LOCAL = "US"; private TemplateEngine getTemplateEngine(){ if(null == templateEngine){ templateEngine = new TemplateEngine(); StringTemplateResolver templateResolver = new StringTemplateResolver(); templat