Linux Logical Volume Management Concepts: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 11: Line 11:
[[File:LogicalVolumeManagementComponents.png]]
[[File:LogicalVolumeManagementComponents.png]]


!!!Physical Volumes (PVs)
=Physical Volumes (PVs)=


Is typically a hard disk, or any device that looks like a hard disk. Physical volumes are allocated to a volume group (VG).
Is typically a hard disk, or any device that looks like a hard disk. Physical volumes are allocated to a volume group (VG).


!!Physical Extent (PE ) / Logical Extents (LE)
==Physical Extent (PE ) / Logical Extents (LE)==


Each physical volume is divided in chunks of data - they have the same size as the logical extents for the volume group. Each logical volume is also split into chunks of data with the same size for all logical volumes in the volume group.
Each physical volume is divided in chunks of data - they have the same size as the logical extents for the volume group. Each logical volume is also split into chunks of data with the same size for all logical volumes in the volume group.


!!!Volume Group (VG)
==Volume Group (VG)==


A Volume Group (VG) gathers together a collection of Logical Volumes and Physical Volumes into one administrative unit.
A Volume Group (VG) gathers together a collection of Logical Volumes and Physical Volumes into one administrative unit.


The Volume Groups are mapped under {{dev}}:
The Volume Groups are mapped under <tt>/dev</tt>:


{{{
<pre>
/dev/<VG-name>
/dev/<VG-name>
}}}
</pre>


!!!Logical Volume (LV)
=Logical Volume (LV)=


The equivalent of a partition on a non-LVM system. The LV is visible as a standard block device, it can contain a file system.
The equivalent of a partition on a non-LVM system. The LV is visible as a standard block device, it can contain a file system.


The LV is mapped under {{/dev/&lt;VG-name&gt;}}
The LV is mapped under <tt>/dev/<VG-name></tt>:


{{{
<pre>
/dev/<VG-name>/<LV-name>
/dev/<VG-name>/<LV-name>
}}}
</pre>


!!!Topology
=Topology=


Volume Groups present on a system are available as directories right under {{/dev}}. Each Volume Group directory contains "Logical Volumes", which are links to {{/dev/mapper}} block devices:
Volume Groups present on a system are available as directories right under <tt>/dev</tt>. Each Volume Group directory contains "Logical Volumes", which are links to <tt>/dev/mapper</tt> block devices:


{{{
<pre>
     /dev
     /dev
     |       
     |       
Line 55: Line 55:
           ...
           ...


}}}
</pre>

Revision as of 02:11, 3 May 2017

External

Internal

Overview

LogicalVolumeManagementComponents.png

Physical Volumes (PVs)

Is typically a hard disk, or any device that looks like a hard disk. Physical volumes are allocated to a volume group (VG).

Physical Extent (PE ) / Logical Extents (LE)

Each physical volume is divided in chunks of data - they have the same size as the logical extents for the volume group. Each logical volume is also split into chunks of data with the same size for all logical volumes in the volume group.

Volume Group (VG)

A Volume Group (VG) gathers together a collection of Logical Volumes and Physical Volumes into one administrative unit.

The Volume Groups are mapped under /dev:

/dev/<VG-name>

Logical Volume (LV)

The equivalent of a partition on a non-LVM system. The LV is visible as a standard block device, it can contain a file system.

The LV is mapped under /dev/<VG-name>:

/dev/<VG-name>/<LV-name>

Topology

Volume Groups present on a system are available as directories right under /dev. Each Volume Group directory contains "Logical Volumes", which are links to /dev/mapper block devices:

    /dev
     |      
     + VolGroup00
           |
           + LogVol00           -> /dev/mapper/VolGroup00-LogVol00
           + LogVol01           -> /dev/mapper/VolGroup00-LogVol01
           + borabora           -> /dev/mapper/VolGroup00-borabora
           + centos55reference  -> /dev/mapper/VolGroup00-centos55reference
           + raiatea 
           ...