Virtual Drives
Last updated
Last updated
Our basic KVM templates come with just one virtual drive that contains the OS. That drive is limited in size. LXC antlets, on the other hand, can by default access all space available on the zpool it is created in.
You can create and manage your own virtual drives in order to give your antlet more space. You can create virtual drives on any of your zpools.
Currently antlet backups only backup virtual drives created on the same zpool as the antlet. Virtual drives only work with KVM antlets.
Enter the antlet details page by clicking the name of the antlet
Select the 'Virtual Drives' tab
Click 'Create New Disk' button and fill in the form
After the virtual drive is created, note the 'Target' name, 'vdb' in this case. This is the device name in Linux antlets.
Stop and Start the antlet
After creatng a new virtual disk, you will need to format the disk in the operating system of the antlet.
- Linux antlets
Depending on the template you may need to install some packages Debian/Ubuntu:
CentOS:
Use the target
name of the disk as seen in the 'Virtual Drives' tab, e.g. 'vdb', to create the file system.
A KVM antlet will have one virtual disk (vda) by default. An LXC antlet has no virtual disks by default.
NOTE: The first disk in a KVM antlet is 'vda' and contains the operating system. Do not format this disk! It will erase the operating system.I will use 'vdb' for the following examples. Replace with your target name.
Create a directory to mount the vDrive to. This can be anywhere in your directory tree.
Mount the vDrive
Mount the vDrive automatically on reboot
If you are not familiar with the vim editor, use nano (you may need to install it).
The fstab
file contains a list of drives and their mount information.
Add the following line
- Windows antlets
For Windows antles you can format your new disk in 'Disk Manager'. Right click in the unallocated space of the new disk and choose 'New Simple Volume...'
Follow the prompts of the 'New Simple Volume Wizard' When complete your new virtual drive is ready for use.
antMan 0.8.1a With antMan 0.8.1a we can resize virtual drives from within antMan.
In the 'Virtual Drives' tab, click the drive 'Size'
Enter the new size and click the green check button.
Now you can partition and format the additional drive space in the OS of the antlet.
Best practice is to shutdown the antlet before resizing the vDrive. Specifically in Windows antlets, resizing while the antlet is running and then performing a 'rescan' in Disk Manager can corrupt the vDrive.
Prior to antMan 0.8.1a
To resize a drive we need to find the path to the virtual drive file.
First ssh to the Antsle. Then lets list the files in the antlets dirctory. The .qcow2 file extention represents a virtual drive.
Replace ZPOOL_NAME with the name of the zpool you created the antlet on. The default zpool name is 'antlets' if you have the hdd addon the zpool could be 'hdd'
Then to increase its size run:
Adjust the last option to the size you want. This will add the specifed amount of drive space.