[[en:centro:servizos:cloud|>>Back to main page]]
====== Disk management ======
==== Introduction ====
Virtual machines in Cloudstack have two types of disks:\\
- root disk: first disk when the VM is created, holds the operating system and there is always just one. Templates only have "root disk".
- data disk: disks to have additional space. They can be freely added and removed and even exchanged between VM.
All Cloudstack disks have [[http://en.wikipedia.org/wiki/Qcow|qcow2]] format.
Default templates have small "root" disks to economize space in the shared storage. When in need of using big sized programs or data is better to add additional disks.
When a disk is created in Cloudstack it exists without being associated to any particular VM. Afterwards the disk can be connected to a VM or other actions.
==== Create a new volume ====
- Choose "Storage" in the left column.
- In "Select view" select "Volumes" (should be selected by default).
- Click "Add Volume".
- Fill in the options and press "Ok". The new disk appears in the volume list with state "Allocated".
Options are the following:
* Name: An unique name that identifies the volume.
* Availability Zone: Only one option, leave it.
* Disk offering: Choose disk size among the available.
==== Add a volume to a VM ====
There is a limit of 6 data disks per VM.
- Choose "Storage" in the left column.
- In "Select view" choose "Volumes" (should be selected by default).
- Select the volume in the list.
- Click "Attach Disk".
- In the instance selection popup choose the VM to add the volume to.
After this you can see the volume associated to the VM by clicking "Instances", then in the instance name and lastly in "View volumes".
Once associated the disk will be automatically recognized by the operating system in the VM and then the appropriate tools should be used to partition, format and mount it.
Una vez asociado el disco será detectado automáticamente por el Sistema Operativo de la máquina y habrá que utilizar sus herramientas para particionarlo, formatearlo y montarlo.