The virtual disk of a virtual machine is a hard disk image. Virtual disks are stored on a local or network storage.
Logical Volume Manager is a subsystem that allows using different areas of a hard drive and/or areas from different hard drives as a single logical volume.
LVM is used for the following purposes:
- physical volumes (PV, Physical Volume) — disk partitions or entire unpartitioned disks;
- volume groups (VG, Volume Group) — physical volumes grouped into a single disk;
- logical volumes (LV, Logical Volume) — partitions created on physical space of the volumes group.
An LVM-storage supports one format of virtual disk format — RAW. Learn more in the official documentation.
Peculiarities in VMmanager
- only one storage type can be used in the cluster;
- VMmanager does not configure LVM on the cluster node. The volume group name must be specified manually before adding a node into the cluster;
- Only VM disks are stored in LVM each of them in a separate LV with the name "<vm_id>_<vm_name>". VM and OS images are stored outside the LVM;
- The VG is displayed in Nodes → node card → Disk space (a separate section).
How to create a cluster with LVM
There are two ways: the minimum and maximum ones.
- Go to Clusters → Add cluster.
- Enter the cluster Name.
- Set the default Time zone for cluster nodes and virtual machines.
- Select OS that can be installed on virtual machines on the cluster.
Select the Storage type "LVM". Click onfor advanced settings:
Enter the Volume group name (VG).
The VG name of future cluster nodes must match the specified name.
- Enter the Path for images directory.
Enter the Path for OS directory.
Directories for images an OS on future nodes must match with the specified paths.
- Specify the Overselling ratio. Learn more in the article Overselling.
- Select IP pools for virtual machines in the cluster.
- Click on Add.
- Configure the LVM on future cluster nodes: create a VG with an appropriate name and specify directories for VM and OS templates.
- Connect the nodes with the configured LVM to the cluster node. Learn more in the article Managing servers in the cluster.
How nodes with LVM are added
When adding a cluster node with LVM, VMmanager calculates the number of VG on the node and searches for the VG with the specified name:
- if it finds one or several VG with the appropriate name, the node will be added;
- if no VGs are found, the error message will be shown and the node won't be added;
- if VMmanager finds one VG with a different name it will offer to rename it;
- if VMmanager finds several VG but their names do not match it will show the error message and ask to rename them manually. The node creation will terminate.