Mount a LVM partition under Ubuntu

From The IT Community
Jump to: navigation, search

A LVM (Logical Volume Manager) partition can have many advantages. For example, you can resize partitions or take snapshots. But have you ever tried to mount a LVM volume under a freshly installed Ubuntu system?

Here is how to mount a LVM partition under Ubuntu:

  • All these steps have to be performed in a bash.
sudo mkdir /mnt/mountpoint
sudo apt-get install lvm2
sudo modprobe dm-mod
sudo vgscan
  • Look at the result of the vgscan. Replace <yourVolume> in the following line with the result:
sudo vgchange -ay <yourVolume>
sudo lvs
  • Once again look at the result of lvs, it will tell you the logical volume. Now replay <yourVolume> and <logicalVolume> with the results:
sudo mount /dev/<yourVolume>/<logicalVolume> /mnt/mountpoint -o ro,user

Your LVM volume is now mounted under /mnt/mountpoint, you can access the data there.

Was this article helpful? Then please donate to keep The IT Community alive...

If you found this article helpful please share it, comment and help others by writing your own article.

Translate this page: