Add New Storage

From Virtualizor Wiki
Jump to: navigation, search

Overview

This guide shows you how to create a Storage in Virtualizor. This is supported in versions 2.6.6+ only.
You can define multiple storage per physical node.


Note

Space gets synced on panel once you go to create vps page.

Add / Define Storage

To add a new storage go to the Virtualizor Admin Panel -> Storage -> Add Storage.
Following is a screenshot :

Add Storage


LVM Based Storage

Create Storage

This example creates an LVM logical volume called new_logical_volume that consists of the disks at /dev/sda1, /dev/sdb1, and /dev/sdc1.
Step 1: Creating the Physical Volumes To use disks in a volume group, you label them as LVM physical volumes.

Warning :This command destroys any data on /dev/sda1, /dev/sdb1, and /dev/sdc1.

root> pvcreate /dev/sda1 /dev/sdb1 /dev/sdc1
  Physical volume "/dev/sda1" successfully created
  Physical volume "/dev/sdb1" successfully created
  Physical volume "/dev/sdc1" successfully created

Step 2: Creating the Volume Group The following command creates the volume group new_vol_group.

root> vgcreate new_vol_group /dev/sda1 /dev/sdb1 /dev/sdc1
  Volume group "new_vol_group" successfully created

You can use the vgs command to display the attributes of the new volume group.

root> vgs
  VG            #PV #LV #SN Attr   VSize  VFree
  new_vol_group   3   0   0 wz--n- 51.45G 51.45G

Note: The VFree size shown in the vgs command will be used for creating VMs, so please make sure the size is always greater than zero.

Add Storage

Add Storage

After creating the Storage you will need to add it on Virtualizor panel.
Storage Type : Storage type should be LVM.
Path : In case of LVM please specify the Volume Group path /dev/VG_NAME.


File Based Storage (RAW/QCOW2)

Create Storage

You will need to create the storage before adding it in Virtualizor.
You will just need to create a folder on the target node :

root> mkdir /vms # You can create any path as per your choice.

Add Storage

Add Storage

After creating the Storage you will need to add it on Virtualizor panel.
Storage Type : Storage type should be File.
Path : Path should be the full name of the directory created in the previous step (/vms in this case) to store VMs disk.
File Format : You can choose the Format as RAW or QCOW2 for File based storage.RAW has better performance but no overselling where as QCOW2 supports overselling of Disk Space.


ZFS Storage

Virtualizor supports ZFS Storage.
You can follow the guide in the link below for configuring and adding ZFS Storage in Virtualizor.

http://www.virtualizor.com/wiki/ZFS


Thin LVM Based Storage

Warning : Thin LVM is unstable and is in beta ! By choosing Thin LVM as a storage if your VPS(s) cease to function/work then Virtualizor will not be responsible for it.

Create Storage

You will need to create a Thin Pool on the main node from an already existing Volume gorup.
In the following example we will be creating a thin pool of size 100GB in the Volume group "MyVolumeGroup".
You will just need to create a folder on the target node :

root> lvcreate --size 100G --type thin-pool --thinpool thin_pool MyVolumeGroup

Add Storage

After creating the Storage you will need to add it on Virtualizor panel.

Storage Type : Storage type should be Thin LVM.
Path : Path should be the full path of the thin pool /dev/VGName/THINPOOLNAME.If we consider the above example then the path will be "/dev/MyVolumeGroup/thin_pool".


Support

If you need any assistance, please email support@virtualizor.com