LVM Configuration Help

This help document will import the instruction in LVM terminology, hierarchy, theorem, and configuration in common use.

LVM Terminology

LVM (Logical Volume Manager)

Logical Volume Manager (shorted as LVM) is a disk management subsystem which has quite a different manner than normal disk partition in the operating system. We define it as a series of collections of operating system calls, libraries and other tools for creating and controlling logical volume region. LVM maps real physical disk into simple, flexible and virtual logical storage view so as to control disk resources. Therefore, it is a reconsideration of methods to manage the file system and volume -- the subsystem adds an extra abstract layer underneath the file system management; it is unnecessary to pursue deep understanding in details, one can realize functions such as realizing virtual partitions, or dynamically creating a logical volume and revising volume size, the permission of the file system surpassing disks, etc. LVM provides a higher viewpoint on disk storage compared with traditional disk and partition, which authorizes a system administrator with higher flexibility to assign disk space towards applications and users.

The Physical Media

Here refers to storage device of system: hard disk or partition, such as /dev/sdb, /dev/hda5, etc., is the lowest layer storage unit in the storage system.

PV (Physical Volume)

PV refers to disk partition, whole disk, or device logically containing the same function as disk partition (such as RAID). Being a fundamental storage logical block of LVM, it includes managing parameters related to LVM in contrast with basic physical storage media (partition, disk, etc.).

VG (Volume Group)

VG is similar to physical disk in the non-LVM system and comprises of physical volumes. One or several 'LVM partitions' (logical volumes) can be created on VG, and LVM VG consists of one or several physical volumes.

LV (Logical Volume)

LV is similar to disk partition in the non-LVM system and the file system (such as /home or /var, etc.) can be created on it.

PE (Physical Extent)

Every physical volume is divided into several basic units called PEs (Physical Extents). PE having the unique number is the smallest unit that can be addressed by LVM. The size of PE is able to be disposed and default is 4MB.

LE (Logical Extent)

LV is also divided into several basic units called LEs (Logical Extents) and LE can be addressed. In the same volume group, LE's size is the same as that of PE and corresponds one by one.

VGDA

The same as non-LVM system that stores meta data containing partitions information in the disk label situated at the beginning of disk, logical volumes and meta data related to volume groups are stored in VGDA (Volume Group Descriptor Area) at the beginning position of physical volumes. VGDA includes the following contents: PV descriptor, VG descriptor, LV descriptor and some PE descriptors.

Starting up a LVM system, the system activates VGs and loads VGDA to internal memory so as to identify LV's real physical storage position. When the system runs I/O operation, it will visit real physical storage position based on the reflection mechanism constructed by VGDA.

LVM Hierarchy

PV Is Made up of PE, Basic Units Having the Same Size

One VG Consists of One or More Physical Volumes

PE Maps LE One by One. LV Is Created on VG

Logical Relationship among Disk Partition, Volume Group, Logical Volume and the File System

In LVM, one PV only corresponds with one physical disk/partition. One or more PVs comprise one VG, where several LVs can be divided virtually. LV corresponds to a disk partition of the non-LVM system, on which the file system can be made.

LVM Working Theorem

When LVM prepares to store data into one LV, how does it determine which real disk(s) it should choose? In LVM, one PV comprises several PEs (Physical Extents) and one LV comprises several LEs (Logical Extents). These PEs map LEs directly and their translating relation is stored into a 'PE/LE Translation Table' (situated in VGDA). Stored in LVM disk, Translation Table will be loaded to internal memory as soon as VG is activated. PE is appointed when creating VG with 4M default size; Whether or not the size and type of the real hard disk are the same, all PEs are as big as each other in one VG. LV being created, LVM system creates LE with automatically maintenance of PE/LE Translation Table so that each LE in LV can find its mapping PE. In conclusion, LVM system knows where to write down disk data.

How to Use RFLVM (Red Flag LVM Manager)

Open RFLVM

Three ways to open RFLVM

1.    In control panel, enter into 'system configuration' page, click 'RFLVM';

2.    Enter into start menu, select 'Management Tools' -> 'RFLVM';

3.    Or enter into Linux command line terminal, key in 'rflvm'.

Creating Dynamic Disk

1.    In 'LVM' menu, click 'Create dynamic disk' item or click 'Create dynamic disk' button in tool bar (when there is no dynamic disk in the system, rflvm will remind you to create one).

Note:

Physical partition that is for creating dynamic disk will lose all of its data.

2.    Name dynamic disk

If no name is provided, a default one will be used, see demo.

3.    Set PE size

The size of PE is from 1M to 32M, default is 4M.

4.    Summary

Display a Certain Dynamic Disk's Property

1.    In console tree view, select one dynamic disk.

2.    In 'dynamic disk' menu, click 'Property' item, or click 'dynamic disk Property' button in tool bar.

3.    A dialog appears to display all properties of the dynamic disk.

Rename a Certain Dynamic Disk

1.    In console tree view, select one dynamic disk.

2.    In 'dynamic disk' menu, click 'Rename' item, or click 'Rename dynamic disk' button in tool bar.

3.    A dialog pops up, see illustration.

4.    Key in a new name in 'New Name' column.

Freeze/Defreeze to Resize a Certain Dynamic Disk

1.    In console tree view, select one dynamic disk.

A dynamic disk with disposition of no size adjustment allowed, 2 is available; if it is allowed, 3 is available.

2.    In 'dynamic disk' menu, click 'Defreeze', or click 'Defreeze dynamic disk' button in tool bar.

3.    In 'dynamic disk' menu, click 'Freeze', or click 'Freeze dynamic disk' button in tool bar.

Activate/Deactivate a Certain Dynamic Disk

1.    In console tree view, select one dynamic disk.

If a dynamic disk is disposed to be non-activated, 2 is available; if it is activated, 3 is available.

2.    In 'dynamic disk' menu, click 'Activate', or click 'Activate dynamic disk' button in tool bar.

In 'dynamic disk' menu, click 'Deactivate', or click 'Deactivate dynamic disk' button in tool bar.

Delete a Certain Dynamic Disk

1.    In console tree view, select one dynamic disk.

2.    In 'dynamic disk' menu, click 'Delete', or click 'Delete dynamic disk' button in tool bar.

Note:

The operation can be fulfilled only when there are none dynamic partitions on this dynamic disk which is under non-activated situation.

Resize a Certain Dynamic Disk

1.    In console tree view, select one dynamic disk.

2.    In 'dynamic disk' menu, click 'Resize', or click 'Resize dynamic disk' button in tool bar.

3.    A dialog appears, see illustration.

Using '>>' button in the dialog to add physical partitions into the dynamic disk, so it will be enlarged.

Using '<<' button to return physical partitions in dynamic disk to the system, so the dynamic disk will be reduced.

Note:

Only when there are none dynamic partitions on the physical partition belonging to dynamic disk (or this physical partition has not been utilized by any dynamic disks), the physical partition can be returned to the system.

Create Dynamic Partition on a Certain Dynamic Disk

1.    In console tree view, select one dynamic disk.

2.    In 'dynamic disk' menu, click 'Create dynamic partition', or click 'Create dynamic partition' button in tool bar.

3.    A dialog appears, see illustration.

Key in the dynamic partition name, select its size, the file system to be created on this partition, stripe number, read ahead sector count and data allocation policy on this dynamic partition.

Click 'OK', a dynamic partition should be created for use.

Noun Explanation

Stripes: It refers to how many physical partitions the data of created dynamic partition will be distributed. If a dynamic disk includes several physical partitions, RAID0 can be realized when the stripe size is installed as >1.

Read Ahead Sectors: In order to enhance data performance of reading and writing, the action of reading sector numbers from dynamic partition is in advance when operating readings.

Allocation Policy: The Contiguous display data storage, some enough space should be found to hold whole data; if there is free space unit, the Next Free will distribute data whether the space is successive or not.

Note:

When selecting the ReiserFS file system, if the dynamic partition is smaller than 32M, the creation of a file system will fail.

Display a Certain Dynamic Partition's Property

1.    In console tree view, select one dynamic partition.

2.    In 'dynamic partition' menu, click 'Property', or click 'dynamic partition Property' button in tool bar.

3.    A dialog appears to show every property of the dynamic partition.

Rename a Certain Dynamic Partition

1.    In console tree view, select a dynamic partition.

2.    In 'dynamic partition' menu, click 'Rename', or click 'Rename dynamic partition' button in tool bar.

3.    A dialog appears, see illustration.

4.    Key in a new name in 'New Name' column.

Delete a Certain Dynamic Partition

1.    In console tree view, select a dynamic partition.

2.    In 'dynamic partition' menu, click 'Delete', or click 'Delete dynamic partition' button in tool bar.

Note:

Only when the backups of this dynamic partition do not exist, the operation can be taken.

Resize a Certain Dynamic Partition

1.    In console tree view, select a dynamic partition.

2.    In 'dynamic partition' menu, click 'Resize', or click 'Resize dynamic partition' button in tool bar.

3.    A dialog appears, see illustration.

4.    Dragging slider or selecting spin box to resize.

Note:

After the dynamic partition has been mounted upon the file system, it would be better not to take this adjustment only after unmounting the dynamic partition.

At present, only enlargement operation is supported.

After one dynamic partition is resized, its backups' size will automatically synchronize with that of it.

This operation is unavailable to the backup of dynamic partition.

Create a Certain Dynamic Partition Backup

1.    In console tree view, select a dynamic partition.

2.    In 'dynamic partition' menu, click 'Backup', or click 'Backup dynamic partition' button in tool bar.

3.    A dialog appears, see illustration.

4.    Key in the backup name, with the successful creation, the same size dynamic partition with the original will come into being; the data on the backup is a data copy of original dynamic partition from creation of instant. This data is read-only.

Note:

A backup of dynamic partition cannot create one more backup.