Create New LVM Logical Volume

Now that you have a LVM volume, you can now create the logical volume to use. In this section, it guides us through on how to create a logical volume for usage. Keep in mind that a logical volume uses the LVM volume created using vgcreate. In another word, logical volume is on top of the LVM volume.

Creating LVM Logical Volume

Once you're ready, you may begin to create the LVM logical volume.

Identify LVM Volume Labels

Before starting to create LVM logical volume, you need to identify the LVM volume you wish to use. You may querying it using the following commands:


Create LVM Logical Volume

To create disk, use the lgcreate command. Example:

$ lgcreate -n <logical volume name> -L <logical volume size> <LVM Volume Name>


# Example:
$ lgcreate -n localstore_root -L 100G lvmVG01
$ lgcreate -n localstore_backup -L 100%FREE lvmVG01

Then wait its completion. A logical volume device is created automatically like /dev/<volume_name/logical_name. Based on the example above, it should be /dev/lvmVG01/localstore_root.

TIP
100%FREE means use up the remaining free space in 100% manner.


Query Disk Status

Once everything is done, you may proceed to query the LVM logical volume status for double-checking the progress.


Format the Logical Volume to Desired Format

With the logical volume ready, you can proceed to format it for usage.

That's all for creating new LVM logical volume.