Storage: CloudStack

Description

Storage is a separate component in the resource pool. Storage consists of two types of volumes—root volume and data volume. You boot your OS from a root volume. Any additional disk is a data volume. The data volumes you create may or may not be associated to an instance. In order to associate a volume to an instance, you must attach the volume to the instance.


Contents

Viewing Storage (by filter)

There are various filters using which you can sort and view storage. 

Perform the following steps to view storage:

  1. On the left panel, click Storage.
    The Storage page displays.
  2. Click the "Select view" drop down list and select an option to view the storage. The following options are provided:


    Field Name Description
    Volumes A domainadmin can view all volumes in the domain. A normal user can view volumes associated to instances or volumes which were created by the user. Apart from listing volumes, you can upload or add (create) volume from this page.
    Snapshots A domainadmin can view all volume snapshots in the domain. A normal user can view snapshots taken for a volume which is attached to an instance that is associated to or created by the user.
    VM Snapshots A domainadmin can view all VM snapshots in the domain. A normal user can view VM snapshots taken from an instance that is associated to or created by the user.
  3. Based on your selection, the following information is displayed:

    For Volumes:

    Field Name Description
    Name Displays the name of the volume. Note: You can click on individual volumes to view additional information and perform various tasks.
    Type Displays the type of storage volume. Note: The two types that can display are ROOT and DATADISK. If there is one disk associated to an instance, by default, it is the ROOT disk. Any additional disk displays as DATADISK.
    Domain The domain in which the volume exists.
    Account The account to which the volume belongs.
    VM display name Displays the name of the instance to which the volume is associated. Note: This is an editable field.
    State Displays the current state of the Volume.
    Quickview Displays additional information about the volume, and the tasks that can be performed on it. It also contains a quick link to snapshots made of the volume.

    For Snapshots:

    Field Name Description
    Volume Displays the name of the volume from where the snapshot was taken.
    Name Displays the name of the snapshot.
    Interval Type Displays whether the snapshot is taken manually or automatically scheduled.
    Domain The domain in which the snapshot exists.
    Account The account to which the snapshot belongs.
    Created Displays the time when the snapshot was taken.
    State Displays the current state of the snapshot.
    Quickview Displays additional information about the snapshot and the tasks that can be performed on it.

    For VM Snapshots:

    Field Name Description
    Name Displays the user given name of the VM snapshot .
    State Displays the current state of the snapshot.Possible options are "Creating " and "Ready".
    Type Displays the type of VM snapshot taken. Default value is "Disk and Memory".
    IsCurrent Displays  whether the VM snapshot is current or not. Possible values are Yes or NO.
    Parent Displays the name of a parent  if the snapshot is an incremental snapshot from a parent snapshot . If no parent snapshot , blank is displayed.
    Date Displays the time and date at which VM snapshot is created from corresponding instance.
    Quick view Displays additional information about the VM snapshot and the tasks that can be performed on it.

Adding a Volume

When you add (create) a new volume, it is stored as a separate entity in CloudStack. To allocate the volume to an instance, you must attach the volume to that instance. You can attach multiple data disk volumes to an instance (up to the limits of your storage capacity).

A volume can only be associated to 1 instance at a time. For sharing a data volume, the operating system on the instance would have to be accordingly configured.

Perform the following steps to add a volume:

  1. On the left panel, click Storage.
    The Storage page displays.
  2. Click the "Select view" drop down list and select Volumes.
    The Volumes page displays. 
     

  3. Click + Add Volume.
    The Add Volume dialog box displays.
     
  4. Enter the following information and click OK.


    Field Name Description
    Name Enter a name using which you can identify the volume.
    Availability Zone Select the zone where the volume should reside. Note: Currently, LeaseWeb provides only 1 pre-configured zone.
    Disk Offering Select from the list of pre-configured disk offerings. Note: To set your own disk size, select Custom Disk. The Disk Size (in GB) field displays. Enter the size of the disk. Only integers can be entered.

Uploading a Volume

You can upload existing data (via a webserver or local file) and make it available for use by uploading the file. The volume that you upload should be within the available volume limit configured for you. 

Perform the following steps to upload a volume:

  1. On the left panel, click Storage.
    The Storage page displays.
  2. Click the "Select view" drop down list and select Volumes.
    The Volumes page displays. 

  3. To upload local file , Click Upload from Local tab.
    The Upload volume from Local dialog box displays.
  4. Enter the following information and click OK.


    Field Name Description
    Local file Browse and point to the local data file to be uploaded.
    Name Enter a name using which you can identify the volume.
    Availability Zone Select the zone where the volume should reside. Currently, LeaseWeb provides only 1 pre-configured zone.
    Format Because LeaseWeb uses KVM, the file must be of the QCOW2 format.
    MD5 checksum If available, enter the checksum number associated to the file. You may find it in the webserver from where you are uploading the file. Note: This number is used to verify file integrity.
  5. To upload from URL ,Click Upload volume from URL tab.

  6. The Upload volume dialog box displays

  7. Enter the following information and click Ok.


    Field Name Description
    URL Upload the local data file via a specified URL.
    Name Enter a name using which you can identify the volume.
    Availability Zone Select the zone where the volume should reside. Currently, LeaseWeb provides only 1 pre-configured zone.
    Format Because LeaseWeb uses KVM, the file must be of the QCOW2 format.
    Custom Disk Offering Specifies the characteristics of the storage mainly custom disk size , write or disk cache.
    MD5 checksum If available, enter the checksum number associated to the file. You may find it in the webserver from where you are uploading the file. Note: This number is used to verify file integrity.

Taking a Snapshot of the Volume

By taking a snapshot, you create copy (a moment in time) of the volume. 

To take a snapshot, the instance on which the volume resides must be stopped. The storage limit configured for you must be sufficient to take a snapshot of the volume.


Often, there are multiple paths to get to certain functionality in the Cloud stack user interface. You can also create a snapshot of a volume from the Instance Details tab:


Select the relevant instance, select "View Volumes", select the relevant volume, and click the Create Snapshot icon.  

Perform the following steps to take a snapshot of a volume: 

  1. On the left panel, click Storage.
    The Storage page displays.
  2. Click the "Select view" drop down list and select Volumes.
    The Volume page displays. 
  3. Click the volume for which you want to take a snapshot.
    The Details tab displays.
     
  4. Click the Take Snapshot icon.
    A Confirmation dialog box displays. 
  5. Click Yes to confirm.
    A snapshot copy of the volume is taken.
    You can view this snapshot copy by clicking View Snapshots.

Attaching a Disk to an Instance

Once you add a volume, it is displayed in the Volumes list. However, the volumes are not yet attached to any instance. You can select a volume from the volume list and attach it to an instance. Once attached, this volume will be available in the instance. Depending on your operating system you still need to configure and prepare the disk of course. Just like you would have to do with an added physical disk in a physical machine.

Perform the following steps to attach a disk to an instance: 

  1. On the left panel, click Storage.
    The Storage page displays.
  2. Click the "Select view" drop down list and select Volumes.
    The Volumes page displays. 
  3. Click the volume that you want to attach to an instance.
    The Details tab displays.
     
  4. Click the Attach Disk icon.
    The Attach Disk dialog box displays.
     

    The Instance drop-down list will display only the instances associated to or created by you. If the state of your instance is Destroyed, it will not display.

  5. Select the instance to which you want to attach the volume from the Instance drop-down list, and click OK.

    Once a volume is attached to an instance, the ID and status of the instance is displayed.

    To detach the volume from the instance, you must click the Detach Disk icon.
     

Downloading a Volume

You can download volumes displayed in the Volumes page to your local system.

You cannot download a volume that is attached to a running instance.

Perform the following steps to download a volume: 

  1. On the left panel, click Storage.
    The Storage page displays.
  2. Click the "Select view" drop down list and select Volumes.
    The Volumes page displays. 
  3. Click the volume that you want to download to your local system.
    The Details tab displays.
     
  4. Click the Download Volume icon.
    A Confirmation dialog box displays.
     
  5. Click Yes to download the volume.
    The Status dialog box displays the link which you can use to download the volume.
     

Deleting a Volume

You cannot delete a volume that is attached to an instance. Once you delete a volume, it is immediately removed from the resource pool.

Perform the following steps to delete a volume: 

  1. On the left panel, click Storage.
    The Storage page displays.
  2. Click the "Select view" drop down list and select Volumes.
    The Volumes page displays. 
  3. Click the volume that you want to delete.
    The Details tab displays.
     
  4. Click the Delete Volume icon.
    A Confirmation dialog box displays.
  5. Click Yes to delete the volume.
    The volume gets deleted from the list of volumes that display in the Volumes page.

Resizing a Volume

When you increase the size of your volume, ensure that it's within the limit of storage assigned to you.

Perform the following steps to resize a volume: 

  1. On the left panel, click Storage.
    The Storage page displays.
  2. Click the "Select view" drop down list and select Volumes.
    The Volumes page displays. 
  3. Click the volume that you want to resize.
    The Details tab displays.
     
  4. Click the Resize Volume icon.
    The Resize Volume dialog box displays.
     
  5. Enter the following information and click OK.


    Field Name Description
    New Offering Select from the list of pre-configured disk offerings. Note: To set your own disk size, select Custom Disk. The Disk Size (in GB) field displays. Enter the size of the disk.

Creating a Template from a Snapshot

The snapshot taken on a volume can be used to create a template, which can be used to deploy new instances. If this template is made Public, it will be available to other users on the domain. 

Perform the following steps to create a template from a snapshot: 

  1. On the left panel, click Storage.
    The Storage page displays.
  2. Click the "Select view" drop down list and select Snapshots.
    The Snapshots page displays. 
  3. Click the snapshot from which you want to create a template.
    The Details tab displays.
     
  4. Click the Create template icon.
    The Create template dialog box displays.
     
  5. Enter the following information and click OK.


    Field Name Description
    Name Enter the name using which you can identify the template. This is an editable field.
    Description Enter a description for the template. This is an editable field.
    OS Type Select the operating system of the template that you want to create. Note: It is important to select the correct operating system as it will impact performance. If you do not find your specific operating system from the drop-down list, select either "Other PV (32-bit)" or "Other PV (64-bit) depending on the type of operating system.
    Public Select this check box to make this template available to the community. Any user on the platform can access it. Once made public, you cannot revert the state.
    Password Enabled Select this check box if you want your template to have the capability of resetting password. Note: If you select this check box, the Reset Password icon will appear for the instance. In order to have this capability, your template must have the "cloud-set-guest-password" script file. If you are configuring the template yourself, you can download the "cloud-set-guest-password" script file from the following locations: Linux/Windows

Creating a Volume from a Snapshot

You cannot directly copy a volume. You can create a snapshot of the volume, and create a volume of that snapshot. Total capacity of the volumes you can create should be within the limits of resource pack configured for you.

Perform the following steps to create a volume from a snapshot copy: 

  1. On the left panel, click Storage.
    The Storage page displays.
  2. Click the "Select view" drop down list and select Snapshots.
    The Snapshots page displays. 
  3. Click the snapshot from which you want to create a volume.
    The Details tab displays.
     
  4. Click the Create Volume icon.
    The Create Volume dialog box displays.
     
  5. Enter a name using which you can identify this volume, and click OK. 

Deleting a Snapshot

Once deleted, you cannot recover the snapshot.  

Perform the following steps to delete a snapshot: 

  1. On the left panel, click Storage.
    The Storage page displays.
  2. Click the "Select view" drop down list and select Snapshots.
    The Snapshots page displays. 
  3. Click the snapshot that you want to delete.
    The Details tab displays.
  4. Click the Delete Snapshot icon.
    A Confirmation dialog box displays.
  5. Click Yes to delete the snapshot copy. 


FAQs about CloudStack Storage

Can I download root volume of a stopped instance and a detached volume? 

Yes you can. If the instance is in stopped state, both root volume and data volumes (state of data volume, whether attached or dettached does not matter) are downloadable. Only when the instance is in running state, root volume is not downloadable. The data volumes can be downloadable even for running instance if it is successfully detached from the instance.