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)
18 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!?
Post a Comment