Mounting a Linux LVM volume

Okey, maybe this will be a bit technical, but it worth if you want to mount a lvm volume to a linux system. 

in my case, there is hard disk which i want to look inside but unfortunately its still on lvm volume and i had a suprised that i can't just mount it to linux system.

#fdisk -l /dev/hdd

Disk /dev/hdd: 10.2 GB, 10242892800 bytes
255 heads, 63 sectors/track, 1245 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdd1 * 1 13 104391 83 Linux
/dev/hdd2 14 1245 9896040 8e Linux LVM

its clear that /dev/hdd2 is linux LVM which i want to mount.

now we use pvs to determined the volume group!

#pvs

 PV           VG             Fmt Attr PSize PFree
/dev/hda2 VolGroup00 lvm2 a- 38,06G 32,00M

and to find out what device it will mount to system, we use:

lvdisplay /dev/VolGroup00

  — Logical volume —
  LV Name                /dev/VolGroup00/LogVol00
  VG Name                VolGroup00
  LV UUID                OaGyCv-UkUn-IFL1-xEd8-V3mJ-IG85-XMChWW
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                37,03 GB
  Current LE             1185
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:0

  — Logical volume —
  LV Name                /dev/VolGroup00/LogVol01
  VG Name                VolGroup00
  LV UUID                x7itWw-eS0L-kjV7-72Fl-pTZX-fSKl-AqxxjX
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                1,00 GB
  Current LE             32
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:1

and that's it. the device is at /dev/VolGroup00/LogVol00, now let just mount it to system.

mount /dev/VolGroup00/LogVol00 /mnt/hd

done. 

This entry was posted in Information Technology. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>