Mounting LVM Using Ubuntu Live CD

Overview

My system died recently and I needed to access the data on the hard drives. I had two 1TB drives in a logical volume which I needed to pull data off of. Luckily the drivers were in tact.

Live CD

Using a Ubuntu 12.04 Desktop CD or USB(prefered), boot into Ubuntu and select the try Ubuntu option. Wait for everything to load up.

LVM

Fortunately GParted is available as part of the live CD but LVM is not. Start a a terminal window by pressing Ctrl + Alt + T. Run the following command to install LVM:
sudo apt-get install lvm2

Mounting LVM

Perform a scan of the HDD to see if a LVM is available:
sudo pvscan

It should list all pysical disks which contain a LVM volume

Perform a scan on the disks to find volumes. This must be done otherwise lvgchange will not be recognized:
vgscan

To list all the groups use:
sudo vgdisplay -v

The group name should be on the line:

Finding volume group “mygroup”

where mygroup is the group name in the volume.

Activate the group using the following command if you have one group:
lvgchange -a y

otherwise use append the LV Name under — Logical Volume — section to the above command. For example:
lvgchange -a y /dev/mygroup/firstvolume

Once active it is available to mount just like any other drive using the LV Name E.g:
sudo mount /dev/mygroup/firstvolume /media/floppy0
where /media/floppy0 is an existing folder usually used when a floppy disk is inserted however as long as it’s not in use, it is fine to use as a mount point.

Summary

LVMs are slightly more tricky when it comes to recovery than just a single disk but it’s still accessible.

How to mount LVM partition on Ubuntu

About Danny

I.T software professional always studying and applying the knowledge gained and one way of doing this is to blog. Danny also has participates in a part time project called Energy@Home [http://code.google.com/p/energyathome/] for monitoring energy usage on a premise. Dedicated to I.T since studying pure Information Technology since the age of 16, Danny Tsang working in the field that he has aimed for since leaving school. View all posts by Danny → This entry was posted in Linux and tagged , , , , , . Bookmark the permalink.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.