You can add more data disk volumes to a Guest Instance at any time, up to the limits of your storage capacity. When you create a new volume, it is stored as an entity in the database, but the actual storage resources are not allocated on the physical storage device until you attach the volume.
When creating a new volume from an existing ROOT Volume Snapshot, it is required to explicitly define a Disk offering (UI will offer only Disk offerings whose disk size is equal or bigger than the size of the Snapshot).

When creating a new volume from an existing DATA Volume Snapshot, the disk offering associated with the Snapshots (inherited from the original volume) is assigned to the new volume.
Log in to the UI as a User or admin.
In the left navigation bar, click Storage.
In Select View, choose Volumes.
To create a new volume, click Add Volume, provide the following details, and click OK.
The new volume appears in the list of volumes with the state “Allocated.” The volume data is stored in the database, but the volume is not yet ready for use
To start using the volume, continue to Attaching a Volume
Existing data can be made accessible to an Instance. This is called uploading a volume to the Instance. For example, this is useful to upload data from a local file system and attach it to an Instance.
The upload is performed using HTTP. The uploaded volume is placed in the zone’s secondary storage
You cannot upload a volume if the preconfigured volume limit has already been reached.
To upload a volume:
Name and Description. Any desired name and a brief description that can be shown in the UI.
Availability Zone. Choose the zone where you want to store the volume. Instances running on hosts in this zone can attach the volume.
Format. Choose one of the following to indicate the disk image format of the volume.
| Hypervisor | Disk Image Format |
|---|---|
| XenServer | VHD |
| VMware | OVA |
| KVM | QCOW2 |
URL. The secure HTTP or HTTPS URL that can be used to access your disk. The type of file at the URL must match the value chosen in Format. For example, if Format is VHD, the URL might look like the following:
http://yourFileServerIP/userdata/myDataDisk.vhd
MD5 checksum. (Optional) Use the hash that you created in step 1.
You can attach a volume to a Guest Instance to provide extra disk storage. Attach a volume when you first create a new volume, when you are moving an existing volume from one Instance to another, or after you have migrated a volume from one storage pool to another.
A volume can be detached from a Guest Instance and attached to another guest. Both administrators and users can detach volumes from Instances and move them to other Instances.
If the two Instances are in different clusters, and the volume is large, it may take several minutes for the volume to be moved to the new Instance.
Zergaw CloudStack provides the ability to resize data disks; Volume sizing is controlled by using disk offerings. Additionally, using the resizeVolume API, a data volume can be moved from a static disk offering to a custom disk offering with the size specified.
Before you try to resize a volume, consider the following:
To resize a volume:
Log in to the UI as a user or admin.
In the left navigation bar, click Storage.
In Select View, choose Volumes.
Select the volume name in the Volumes list, then click the Resize Volume button ![]()
In the Resize Volume pop-up, choose desired characteristics for the storage.

If you select Custom Disk, specify a custom size.
Click Shrink OK to confirm that you are reducing the size of a volume.
This parameter protects against inadvertent shrinking of a disk, which might lead to the risk of data loss. You must sign off that you know what you are doing.
Click OK.
If a Service Offering is created with a root disk size, then resizing the Root volume is possible only by resizing the Instances service offering.
Service offering Root resizing constrains:
There are volume operations like migrate volume and resize volume and both accepts new disk offering to replace the existing disk offering of volume. Instead of using these APIs directly, the operation can be performed in the UI using change offering in the details view for the volume. Upon changing the disk offering the volume will be resized and/or migrated to the suitable storage pool if required according to the new disk offering.
To change the disk offering of a volume:
Log in to the UI as a user or admin.
In the left navigation bar, click Storage.
In Select View, choose Volumes.
Select the volume name in the Volumes list, then click the Change Offering for Volume button
In the Change Offering For Volume pop-up, choose desired disk offering for the
volume.

Click OK.
You can specify that you want to discard the root disk and create a new one whenever a given Instance is rebooted. This is useful for secure environments that need a fresh start on every boot and for desktops that should not retain state. The IP address of the Instance will not change due to this operation.
To enable root disk reset on Instance reboot:
When creating a new service offering, set the parameter isVolatile to True. Instances created from this service offering will have their disks reset upon reboot. See “Creating a New Compute Offering”.
Zergaw CloudStack protects volumes from accidental deletion using a delete protection flag, which is false by default. When delete protection is enabled for a volume, it cannot be deleted through the UI or API. It can only be deleted after removing delete protection from the volume.
Delete protection can be enabled for a volume via updateVirtualMachine API.
cmk update volume id=<volume id> deleteprotection=true
To remove delete protection, use the following command:
cmk update volume id=<volume id> deleteprotection=false
To enable/disable delete protection for a volume using the UI, follow these steps:
The volume delete protection is only considered when the volume is being
deleted through the UI or via deleteVolume or destroyVolume API. If the
domain/project is deleted, the volumes under the domain/project will be
deleted irrespective of the delete protection status.
The deletion of a volume does not delete the Snapshots that have been created from the volume.
When an Instance is destroyed, data disk volumes that are attached to the Instance are not deleted unless specified.
Volume statistics are collected on a regular interval (600 seconds). This feature is currently only available for VMware and KVM. Volume stats include include bytes/s and IO/s statistics as shown in the API output below.
[root@mgmt]# cmk list volumesmetrics id=272c3d8b-ef2c-499e-abfb-736b54d3d6b1
{
"count": 1,
"volume": [
{
...
"diskiopstotal": 30245,
"diskioread": 22443,
"diskiowrite": 7802,
"diskkbsread": 343124,
"diskkbswrite": 217619,
...
Bytes read/write, as well as the total IO/s, are exposed via UI, as shown in the image below.

These statistics are obtained from the hypervisor directly and they represent “current” bytes/s and IO/s values at the time of collection.