LVM: Difference between revisions

From Leo's Notes
This page was last edited on 26 April 2017, at 17:46.
m Leo moved page Mounting / Unmounting LVM to LVM
formatting
Line 1: Line 1:
== Linux ==
LVM is a volume manager used on Linux.


== Quick Usage ==
=== Mounting / Unmounting Volumes ===
If you have a LVM partition, you can see what physical volumes there are under the LVM by running:
If you have a LVM partition, you can see what physical volumes there are under the LVM by running:


# pvs
{{highlight|lang=terminal|code=
PV              VG                Fmt    Attr    PSize      PFree
# pvs
  /dev/hda2   VolGroup01 lvm2  a-      148.94G   32.00M
PV              VG                Fmt    Attr    PSize      PFree
/dev/hda2       VolGroup01       lvm2  a-      148.94G     32.00M
}}
 
The volume group (VG) is {{code|VolumeGroup01}}. To view the logical volumes under this volume group, run:
 
{{highlight|lang=terminal|code=
# lvdisplay /dev/VolumeGroup01
}}


The volume group (VG) is 'VolumeGroup01'. To view the logical volumes under this volume group, run:
Once you have located the logical volume you want to mount, say {{code|LogVol00}}, run:


# lvdisplay /dev/VolumeGroup01
{{highlight|lang=terminal|code=
# mount /dev/VolumeGroup01/LogVol00 /mnt/disk
}}


Once you have located the logical volume you want to mount, say LogVol00, run:


# mount /dev/VolumeGroup01/LogVol00 /mnt/disk




[[Category:Linux]]
[[Category:Linux]]


{{Navbox Linux}}
{{Navbox Linux}}

Revision as of 17:46, 26 April 2017

LVM is a volume manager used on Linux.

Quick Usage

Mounting / Unmounting Volumes

If you have a LVM partition, you can see what physical volumes there are under the LVM by running:

# pvs
PV               VG                Fmt    Attr    PSize       PFree
/dev/hda2        VolGroup01        lvm2   a-      148.94G     32.00M

The volume group (VG) is VolumeGroup01. To view the logical volumes under this volume group, run:

# lvdisplay /dev/VolumeGroup01

Once you have located the logical volume you want to mount, say LogVol00, run:

# mount /dev/VolumeGroup01/LogVol00 /mnt/disk