Mounting is an easy process to do, provided the filesystem type you are using is supported. What happen when you have an LVM formatted disk, and you need to mount it because the disk cannot be booted and a hell lot of valuable data kept inside?? Do not worry, because the solution is here.......
1. Get a live cd, for example, Ubuntu. For this article, I use Ubuntu 6.06 (I cannot find any latest version of ubuntu at my place)
2. Boot using the live cd. Search for these tools: lvm2. If the cd do not have it, install it.
# apt-get install lvm2
3. To make sure the harddisk is recognised, you can use fdisk
# fdisk -lu
4. Once installed, run pvscan to scan all disks for physical volume. this to make sure your LVM harddisk is detected by Ubuntu
# pvscan
PV /dev/sda2 VG VolGroup00 lvm2 [74.41 GB / 32.00 MB free]
Total: 1 [74.41 GB] / in use: 1 [74.41 GB] / in no VG: 0 [0 ]
5. After that run vgscan to scan disks for volume groups.
# vgscan
Reading all physical volumes. This may take a while...
Found volume group "VolGroup00" using metadata type lvm2
6. Activate all volume groups available.
# vgchange -a y
2 logical volume(s) in volume group "VolGroup00" now active
7. Run lvscan to scan all disks for logical volume. You can see partitions inside the hard disk now active.
# lvscan
ACTIVE '/dev/VolGroup00/LogVol00' [72.44 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol01' [1.94 GB] inherit
8. Mount the partition to any directory you want, usually to /mnt
# mount /dev/VolGroup00/LogVol00 /mnt
9. You can access the partition in the /mnt directory and can backup your data
Wednesday, November 21, 2007
Mounting LVM Disk using Ubuntu livecd
Subscribe to:
Post Comments (Atom)
52 comments:
This is exactly the solution I was searching for, and it worked a treat. Thanks. Please leave this page up for others!
Hi thanks for this post. For some reason I add to load a driver manually after having installed the lvm2 package:
$ modprobe dm-mod
Otherwise you get the following:
$ lvscan
/proc/misc: No entry for device-mapper found
Is device-mapper driver missing from kernel?
Thanks a lot, for the post and anonymous for the comment about modprobe dm-mod!
At first, I got a couple of lines like:
ubuntu@ubuntu:~$ sudo vgchange -a y
/proc/misc: No entry for device-mapper found
Is device-mapper driver missing from kernel?
Failure to communicate with kernel device-mapper driver.
and lvscan gave problems as well:
Failure to communicate with kernel device-mapper driver.
Incompatible libdevmapper 1.02.20 (2007-06-15)(compat) and kernel driver
inactive '/dev/tmp/tmp' [2.00 GB] inherit
After sudo modprobe dm-mod, it worked like a charm.
Thanks a lot, for the post and anonymous for the comment about modprobe dm-mod!
At first, I got a couple of lines like:
ubuntu@ubuntu:~$ sudo vgchange -a y
/proc/misc: No entry for device-mapper found
Is device-mapper driver missing from kernel?
Failure to communicate with kernel device-mapper driver.
and lvscan gave problems as well:
Failure to communicate with kernel device-mapper driver.
Incompatible libdevmapper 1.02.20 (2007-06-15)(compat) and kernel driver
inactive '/dev/tmp/tmp' [2.00 GB] inherit
After sudo modprobe dm-mod, it worked like a charm.
Great post indeed, and thank you 100 times for the 2nd post! This helped med alot.
Thanks a lot you guys for all the comments. Learned a lot from the comments
This post has been immensely helpful. I can now see my LVM filesystem in Thunar File Manager and can access the files... with one small caveat. The one directory that I really need access to has an X on the folder and tells me permission denied. Anyone have any ideas?
rfinn, if you log in as root or just use the "sudo" command, it ignores the permissions and lets you look at the file (and also to change its permissions, if you so desire).
What a lifesaver! Thanks for the information. Adding modprobe dm-mod (per one of the comments) between steps 1 and 2 did the trick for me. Thanks to your post, I retrieved all data I thought I was never going to be able to from an lvm disk.
Many thanks for the posting....
It helps me a lot to restore and move my company's old files to new server...
really works...
thanks
thanks for modprobe dm-mod ....
Thanks a lot! It was very useful for me
Sweet!
This worked like a charm and allowed me to access a ton of information I had stored on a LVM partition.
Thanks a million.
anon delived
modprobe dm-mod
is what i needed
nice post
"After sudo modprobe dm-mod, it worked like a charm."
Bacon SAVED!!!! thanks
Thank you for this, within 5min I got what I wanted.
Lifesaver. Where do I donate!?
So many thanks for this tip! It worked just fine. Please leave it for others too.
thanks a lot , I was looking for this .
You can do all things using GUI tool too. "logical volume manager" package from ubuntu.
Thank you, thank you.
Excellent! Exactly what I needed.
very helpful post, thank you.
two thumbs up! thanks!
it's 8 hours i look for it !
thank you verrrrrrrrrry much ;)
Hello, Thanks by your Post, I follow all successfully, but, in the las step say:
# /bin/mount /dev/VolGroup00/LogVol00 /disco2/
mount: debe especificar el tipo de sistema de ficheros
can you helpme please? regards wualfred
Hello, Thanks by your Post, I follow all successfully, but, in the las step say:
# /bin/mount /dev/VolGroup00/LogVol00 /disco2/
mount: debe especificar el tipo de sistema de ficheros
can you helpme please? regards wualfred
thx ! exactly what I need. Good job.
Thanks very much for this great tutorial. I followed the instructions exactly as posted and it worked like a charm. Keep up the good work.
by Mike A.
Thank you so much for posting this, it was very helpful. I did have some issues with permissions when I was trying to get the data off the old LVM partitioned disks. I was able to fix it with chmod and chown commands run under sudo, and remember to use the -R switch so that the new permissions will be applied to all sub folders and files recursively.
THANKS AGAIN!!!
Thank you very much !!!
Beautiful. Thank you very much. nothing like screwing up the boot sequence on an lvm locked drive.
Thank you!!!!
Thank you so much
Many thanks, please keep the post.
Great concept chosen in this post, which seems to be really helpful to everyone to improve their knowledge.
Thanks for sharing the nice thought with the readers..
This was really usefull for me. Thanks very much!
Just wanted to convey my appreciation for what I learned from this article. I look forward to learning more on this website.
Thanks man, this works fine!
Thanks. I was pulling my hair out trying to figure this out. Surprised there's not more guides out there on this.
TKS, YOU SAVE MY LIFE!
Hey guys, i want to ask for help in mounting logical volume. I followed the instructions above and from others sites. But my problem is on mussing volume groups. when I run pvscan,pvs, pvdisplay, the VG field is empty. When I run lvscan and vgscan, No volume groups found message would be return. Hope you will help me. I have been researching this for two days now. Thanks.
Hi Jan Mark Salarda,
if your pv is not available, u need to create it first using pvcreate command, followed by vgcreate command and then lvcreate to create logical volume. You then need to format it out to whatever file system you desire, before you can mount it to any directory that you wish.
Hope that helps :)cf c
Thanks for reply.
My physical volumes are available.
Pvs command will return two PV. But VG field is empty on the two PV result. I'm thinking of creating a new VG then adding the existing PV.
But my concern is if my deleted will be deleted if I'm going to do it. Will my data be deleted? Thanks
This saves a huge time of mine for reinstallation..thanks a lot!! simply superb!
Thanks a lot!!!!
Really helped me!!!
The ubuntu 13.04 to 13.10 boned up my LVM array. This saved my stuffs!
Happy to see your blog as it is just what I’ve looking for and excited to read all the posts. I am looking forward to another great article from you.
Your guide is still useful in 2014! An update to grub 2.0 left my system unbootable. So I booted with a Live CD, but I couldn't mount my root partition, which is in LVM. Then I found your page, installed lvm2 as you described, and ran all the lvm commands pvscan, vgscan, etc, and it all worked perfectly - I can mount and browse the partition now. Next task: repair the GRUB damage.
Thanks for this excellent solution.
Thanks for all your efforts that you have put in this.Very interesting information.I would like to do all the information
Computer Repairing Services In Delhi
Post a Comment