How to mount LVM partition in Debian/Ubuntu


How to mount LVM partition that just appended into system? Just follow below steps and get it!
  1. Install package:lvm2 if you did not enable it.
    $ sudo apt-get install lvm2
  2. Load the necessary module: dm-mod.
    $ sudo modprobe dm-mod
  3. Scan LVM volumes in your system.
    $ sudo vgscan
    or
    $ sudo pvs
  4. Activate the LVM volume.
    $ sudo vgchange -a y [LVM Group]
  5. Find the logical volume.
    $ sudo lvs
    or
    $ sudo lvdisplay /dev/[LVM_group_name]
  6. Mount the logical volume you want access it.
    $ sudo mount /dev/mapper/[LVM_group_name]-[LVM-logical-volume-name] /mnt -o ro,user
  7. You can access the LVM partition now in /mnt.
Enjoy it. :-)

Comments

Popular posts from this blog

How to construct a B+ tree with example

How to show only month and year fields in android Date-picker?

Visitor Counter Script Using PHP