Volume

What is Volume?

A volume provides storage space for a VM instance. Volumes are categorized into root volumes and data volumes.
Volume Type Description
Root Volume A root volume provides support for the system operations of a VM instance.
Data Volume Classic Volume A data volume provides extended storage space for a VM instance. Classic volumes are similar to hard disks in PCs. Classic volumes must be attached to VM instances for use and cannot be used alone.
Shared Volume A data volume provides extended storage space for a VM instance. A shared volume is essentially the volume that can be attached to multiple VM instances for use, which is similar to a physical disk in that the disk can be attached to multiple physical servers, and each server can read data from and write data into the disk.
Uninstantiated Volume A new data volume will be displayed on the Uninstantiated tab if you do not specify a primary storage or VM instance for it. When you attach instance for the uninstantiated volume, it can be used by the VM instance as an available resource.

Considerations

  • AVM instance can have a maximum of 24 data volumes attached.
  • A root volume is an integral part of a VM instance. It cannot be detached from a VM instance.
  • A data volume attached to a VM instance can be detached from the VM instance and then attached to another VM instance of the same hypervisor type. While a data volume attached to a VM instance cannot be attached to a VM instance of another hypervisor type. For example, a KVM VM volume cannot be attached to a VMware VM instance.
  • A classic volume can be attached to only one VM instance. A shared volume can be created on a Ceph primary storage and SharedBlock primary storage and allows simultaneous access from multiple VM instances.
  • If you simply attach a shared volume to multiple VM instances, files cannot be shared between VM instances. Build a shared file system if you need to share files between VM instances.
  • The storage space that a volume takes up is calculated based on the virtual size of the volume. When a volume is created, the virtual size of the volume is deducted. The actual storage space that the volume takes up is small upon creation while increases along with growing data writes.
  • When multiple primary storage are available, you can specify a primary storage to create a volume. If you do not specify a primary storage when you create a volume, note that:
    • For LocalStorage primary storage, the volume is created on the primary storage with the largest available space by default.
    • For NFS primary storage, the volume is created on a random primary storage by default.
    • For the combination of LocalStorage and NFS primary storage or the combination of LocalStorage and SharedMountPoint (SMP) primary storage, by default, the volume is created on a primary storage that does not store the root volume of the VM instance.
  • You can set the QoS for a data volume to limit its disk bandwidth. Note that an excessively low QoS may greatly lower I/O performance.
  • To attach a VirtIO volume to a VM instance, make sure that a VirtIO driver is installed on the VM instance. Mainstream Linux distributions such as CentOS 6 and CentOS 7 are integrated with VirtIO drivers. Therefore, you do not need to install them again. For Windows-based VM instances, you need to install VirtIO drivers manually by installing GuestTools on the VM details page.

Application Scenarios

  • Oracle RAC

    Oracle Real Application Clusters (Oracle RAC) was originally designed to enhance database services. Over the years, it has evolved into a comprehensive high availability (HA) framework, serving as the foundation for cloud database systems and ensuring high availability, scalability, flexibility, and agility for all applications in a data center. Oracle RAC uses a shared disk architecture, requiring volume management and file systems for database storage to support cluster awareness. Oracle Automatic Storage Management (ASM) is the recommended volume manager for Oracle databases in a clustered environment.

    ASM automatically manages shared disks, allowing users to use shared volume for RAC nodes. This enables data management by RAC without the need for an additional shared file system deployment.

Create a Data Volume

On the main menu of ZStack Cube Ultimate, choose Resource Center > Resource Pool > Virtual Resource > Volume > Data Volume. On the Data Volume tab, click Create Data Volume. The Create Data Volume page appears.

The following lists the four data volume creation scenarios:
  • Create a classic volume based on a disk offering.
  • Create a classic volume based on a volume image.
  • Create a shared volume based on a disk offering.
  • Create a shared volume based on a volume image.

Create Classic Volume Based on a Disk Offering

On the displayed page, set the following parameters:
  • Name: Enter a name for the volume.
  • Description: Optional. Enter a description for the volume.
  • Quantity: Enter the number of volumes that you want to create.
    Note: Enter an integer that ranges from 1 to 24.
  • Volume Mode: Select Classic Volume.
  • Creation Method: Select an existing disk offering or customize a disk offering.
  • Primary Storage: Optional. Select a primary storage.
  • Instance: Optional. Select a VM instance or elastic baremetal instance to which the volume is attached.
  • VirtioSCSI: Choose whether to use the Virtio-SCSI bus to create an SCSI data volume.
    Note:
    1. Classic Volume: By default, VirtIO SCSI is disabled. If it is enabled, you can use it to create a VirtIO SCSI data volume.
    2. Shared Volume: By default, VirtIO SCSI is enabled and cannot be disabled.
    3. VirtIO SCSI data volumes allow multi-queue I/O operations and have worldwide names (WWNs) as their unique IDs.
    4. We recommend that you do not create VirtIO SCSI data volumes on LocalStorage primary storage.
    5. You cannot create VirtIO SCSI data volumes on Vhost primary storage.
图 1. Create Classic Volume Based on Disk Offering


Create Classic Volume Based on a Volume Image

On the displayed page, set the following parameters:
  • Name: Enter a name for the volume.
  • Description: Optional. Enter a description for the volume.
  • Quantity: You can only create one volume a time by using a volume image.
  • Volume Mode: Select Classic Volume.
  • Creation Method: Select Volume Image.
  • Instance: Optional. Select a VM instance or elastic baremetal instance to which the volume is attached.
  • Primary Storage: Optional. Select a primary storage on which the volume is created.
    Note: You can use a volume image stored on an ImageStore image storage to create a volume on a Ceph primary storage.
  • VirtioSCSI: Choose whether to use the Virtio-SCSI bus to create an SCSI data volume.
    Note:
    1. Classic Volume: By default, VirtIO SCSI is disabled. If it is enabled, you can use it to create a VirtIO SCSI data volume.
    2. Shared Volume: By default, VirtIO SCSI is enabled and cannot be disabled.
    3. VirtIO SCSI data volumes allow multi-queue I/O operations and have worldwide names (WWNs) as their unique IDs.
    4. We recommend that you do not create VirtIO SCSI data volumes on LocalStorage primary storage.
    5. You cannot create VirtIO SCSI data volumes on Vhost primary storage.
图 2. Create Classic Volume Based on Volume Image


Create Shared Volume Based on Disk Offering

On the displayed page, set the following parameters:
  • Name: Enter a name for the volume.
  • Description: Optional. Enter a description for the volume.
  • Quantity: Enter the number of volumes that you want to create.
    Note: Enter an integer that ranges from 1 to 24.
  • Volume Mode: Select Shared Volume.
    Note:
    • You can create a shared volume on a Ceph primary storage or a Shared Block primary storage. Other types of primary storage do not support this operation.
    • You cannot create a thin-provisioned shared volume on a Shared Block primary storage.
  • Creation Method: Select Disk Offering.
  • Primary Storage: Optional. Select a primary storage.
  • Instance: Optional. Select a VM instance or elastic baremetal instance to which the volume is attached.
  • VirtioSCSI: Choose whether to use the Virtio-SCSI bus to create an SCSI data volume.
    Note:
    1. Classic Volume: By default, VirtIO SCSI is disabled. If it is enabled, you can use it to create a VirtIO SCSI data volume.
    2. Shared Volume: By default, VirtIO SCSI is enabled and cannot be disabled.
    3. VirtIO SCSI data volumes allow multi-queue I/O operations and have worldwide names (WWNs) as their unique IDs.
    4. We recommend that you do not create VirtIO SCSI data volumes on LocalStorage primary storage.
    5. You cannot create VirtIO SCSI data volumes on Vhost primary storage.
图 3. Create Shared Volume Based on Disk Offering


Create Shared Volume Based on Volume Image

On the displayed page, set the following parameters:
  • Name: Enter a name for the volume.
  • Description: Optional. Enter a description for the volume.
  • Quantity: You can only create one volume a time by using a volume image.
  • Volume Mode: Select Shared Volume.
    Note:
    • You can create a shared volume on a Ceph primary storage or a Shared Block primary storage. Other types of primary storage do not support this operation.
    • You cannot create a thin-provisioned shared volume on a Shared Block primary storage.
  • Creation Method: Select Volume Image.
  • Instance: Optional. Select a VM instance or elastic baremetal instance to which the volume is attached.
  • Primary Storage: Optional. Select a primary storage on which the volume is created.
    Note: You can use a volume image stored on an ImageStore image storage to create a volume on a Ceph primary storage.
  • VirtioSCSI: Choose whether to use the Virtio-SCSI bus to create an SCSI data volume.
    Note:
    1. Classic Volume: By default, VirtIO SCSI is disabled. If it is enabled, you can use it to create a VirtIO SCSI data volume.
    2. Shared Volume: By default, VirtIO SCSI is enabled and cannot be disabled.
    3. VirtIO SCSI data volumes allow multi-queue I/O operations and have worldwide names (WWNs) as their unique IDs.
    4. We recommend that you do not create VirtIO SCSI data volumes on LocalStorage primary storage.
    5. You cannot create VirtIO SCSI data volumes on Vhost primary storage.
图 4. Create Shared Volume Based on Volume Image


Notes

  • You can batch create volumes only by using a disk offering.
  • If you create a volume by using a disk offering, you can select a primary storage and VM instance based on your business requirements:
    • If you do not select a primary storage and VM instance, the created volume is in the uninstantiated state and is listed on the Uninstantiated tab.
    • If you select a VM instance but do not select a primary storage:
      • When only one primary storage is available, the volume is created on the primary storage.
      • When multiple primary storage are available:
          • If all these primary storage are of the Local Storage type, the volume is created on the primary storage with the largest available space by default.
          • If all these primary storage are of the NFS or Shared Block type, the volume is created on a random primary storage by default.
          • If these primary storage are combinations of Local Storage and NFS primary storage, combinations of Local Storage and Shared Mount Point (SMP) primary storage, or combinations of Local Storage and Shared Block primary storage, by default, the volume is created on the primary storage that does not store the root volume of the VM instance the created volume you want to attach to.
          • If these primary storage are a combinations of Ceph and Shared Block primary storage, the volume is created on the primary storage with the largest available space by default.
    • If you only select a primary storage and do not select a VM instance, the created volume is in the available state and takes up the storage space of the primary storage.
      Note:
      • If you select a Local Storage primary storage, you must select a host.
      • If you select a Ceph primary storage, you can select a Ceph storage pool.
      • If you select a Shared Block primary storage, you must select a provisioning method, including thin provisioning and thick provisioning.
        • Thin provisioning: allocates storage space to a volume according to its data amount. This method improves usage efficiency of storage space.
        • Thick provisioning: preallocates storage space that a volume needs. This method ensures sufficient storage space for a volume and thus ensures high storage performance.
  • If you create a volume based on a volume image and do not select a primary storage:
    • If the volume image is stored on a Ceph image storage, the volume is created on a Ceph primary storage.
    • If the volume image is not stored on a Ceph image storage:
      • When multiple primary storage are available:
          • If all these primary storage are of the Local Storage type, the volume is created on the primary storage with the largest available space by default.
          • If all these primary storage are of the NFS or Shared Block type, the volume is created on a random primary storage by default.
          • If these primary storage are combinations of Local Storage and NFS primary storage, combinations of Local Storage and Shared Mount Point (SMP) primary storage, or combinations of Local Storage and Shared Block primary storage, by default, the volume is created on the primary storage that does not store the root volume of the VM instance the created volume you want to attach to.
          • If these primary storage are a combinations of Ceph and Shared Block primary storage, the volume is created on the primary storage with the largest available space by default.

Manage a Data Volume

On the main menu of ZStack Cube Ultimate, choose Resource Center > Resource Pool > Virtual Resource > Volume > Data Volume. Then, the Data Volume tab is displayed.

The following table lists the actions that you can perform on a data volume.

Action Description
Create Data Volume Create a new data volume based on a disk offering or from a volume image.
  • You can use a disk offering or volume image to create a classic volume or a shared volume.
  • A shared volume must be created on a Ceph primary storage or a thick-provisioning Shared Block primary storage.
  • A new data volume will be displayed on the Uninstantiated tab if you do not specify a primary storage or VM instance for it.
Edit Data Volume Edit the name and description of a data volume.
Enable Data Volume Enable a disabled data volume.
Disable Data Volume Disable an enabled data volume. After disabled, some of the data volume actions will be restricted, for example, attach instance, volume migration, and so on.
Attach Instance Attach a volume to an instance as its data volume.
  • On a LocalStorage primary storage, make sure that the data volume (if it is once instantiated) and the VM instance to be attached to are on the same host. Otherwise, migrate the data volume and the VM instance to a same host.
Detach Instance Detach a data volume from the instance it attached to.
Note: This action interrupts the data reads/writes of the data volume and may affect the business continuity. Please exercise caution.
Change Host Migrate a data volume to another compute note.
  • Allows you to choose target compute nodes according to their loads.
    • On the Recommended list, you can make compute nodes ranked on their CPU allocation rate or memory allocation rate. By default, the compute nodes are ranked on their memory allocation rate from low to high.
    • You can filter the top20 or top50 compute nodes according to their CPU allocation rate or memory allocation rate.
  • You can only migrate a data volume on a LocalStorage primary storage.
Change Primary Storage Allows you to migrate a data volume across primary storage of same type, including Ceph↔Ceph, NFS↔NFS, and Shared Block↔Shared Block. Changing primary storage only migrates valid data, and the migrated volume follows the provisioning type of the target primary storage.
  • Ceph↔Ceph:
    • Make sure that the volume is not attached to any VM instance.
    • Make sure that the Mon notes of the original primary storage and the target primary storage can intercommunicate with each other.
  • NFS↔NFS:
    • Make sure that the volume is not attached to any VM instance.
    • Make sure that the target NFS primary storage can be attach to the cluster of the volume.
  • Shared Block↔Shared Block
    • You can migrate a volume from a SharedBlock primary storage after you attach the volume to a VM instance that is in the running or stopped state.
    • A shared volume to be migrated across Shared Block primary storage cannot be attached to any VM instance.
    • Make sure that the target Shared Block primary storage can be attached to the cluster of the volume.
Note:
  • The original data of the volume is maintained on the original primary storage and displayed on the Data Cleanup tab page after the migration.
  • You can manually cleanup the original data if you ensure that the volume data is integrity and undamaged after the migration. The cleaned data cannot be recovered. Please exercise caution.
Change Owner Change the owner of the data volume.
  • The tenant tags are detached from the volume after you change its owner. Admin tags are not affected.
Resize Volume Allows you to resize a data volume when the VM instance its attached to is running or stopped.
  • The new size must greater than the original size and the increment must no smaller than 4 MB. The new size takes effect immediately.
  • The new size must be a multiple of 4 MB. For example, if you enter a size of 37 MB, the actual volume size is 40 MB after the resize.
  • You cannot resize a shared volume on a Shared Block primary storage.
  • To resize a volume on a Ceph primary storage, make sure that the volume is not attached to any VM instance, or stop the VM instance it attached to in advance.
  • We recommend that you manually create a snapshot before you resize the data volume. This allows fast rollback when needed.
Attach Tag Attach tags to a volume.
  • You can make the tags sorted according to their attachment time or names. By default, the tags are sorted according to names. You can change the Tag Sort Method in Global Setting.
    Note:
    • The priority of name sort: symbol > digit > Chinese character > English letter. English letters are case insensitive.
    • After you upgrade a 3.4.0 or earlier version to the latest version, the resource tags are sorted by tag names by default.
Detach Tag Detach tags from a volume.
Note:
  • Admin tags are created and owned by administrators (admin and platform managers). Tenant tags are created and owned by tenants (normal accounts and projects).
  • Tenant tags can be attached to the resources belong to the tenant. Admin tags can be attached to any resources.
  • Administrators can detach or delete tenant tags.
  • Tags in a project are owned by the projects. All project members (project admin, project managers, and normal members) can perform on these tags.
  • All tenant tags are detached from the volume after you change its owners. Admin tags are not affected.
  • All old versions are displayed in the latest way after the seamless Cloud upgrade. You can refresh your browser or recreate the tags if exceptions occur.
  • You can detach tags from a resource or detach resources from a tag in bulk.
  • A tenant can detach tags only from the resources belong to the tenant. An administrator can detach tags from all resources.
Create Backup Create a backup for a data volume.
  • Before you create a backup, make sure that the volume is attached to a VM instance and that the VM instance is in the running or paused state.
  • If the VM instance attached by the volume has a CDP task, no backup can be created.
  • If the authorized quota of the backup service is insufficient, no backup can be created.
    Note: Resources that are already within the authorized quota of the backup service can normally create backups or associate backup jobs.
  • You cannot create a backup for shared volumes.
  • You can create a full backup or an incremental backup for a volume.
  • Before you create a backup, add a local backup service to the Cloud in advance.
  • You can synchronize the backup data to a remote backup server. Note that you need to add a remote backup server to the Cloud in advance.
Associate Backup Job Associate a backup job with a data volume.
  • Data volumes that already have backup jobs associated do not support this operation.
  • Before you associate a backup job, make sure that the data volume is attached to a VM instance and that the VM instance is in the running or paused state.
  • Before you associate a backup job, make sure that the VM instance attached by the data volume does not have a CDP task.
  • If the authorized quota of the backup service is insufficient, no backup job can be associated.
    Note: Resources that are already within the authorized quota of the backup service can normally create backups or associate backup jobs.
Create Volume Image Create an image based on a volume. The image can be used to create new data volumes.
  • You can create a image for a volume on a Ceph primary storage and store the image in an ImageStore image storage.
  • To create an image for a shared volume on a Shared Block primary storage, stop all VM instance that the shared volume is attached to in advance.
Create Data Volume Snapshot Create a data volume snapshot to record the volume state at a specified time point before important actions. This allows a quick rollback in case of breakdowns.
  • A snapshot contains all volume data at one time point. You can use the snapshot to recover the volume to the stats at this time point. This is a temporal backup manual. For a long-term backup, we recommend that you use Backup Management.
  • It may cost you a relatively long time to store the snapshot if you are creating a snapshot for the first time.
  • You cannot create a snapshot for a shared volume.
Set Volume QoS You can set a upper limit for a volume bandwidth by either setting its total speed or read/write speed.
  • A normal account or project member can set QoS for any volume that is created from a disk offering without bandwidth limit. By default, a disk offering is not set with a bandwidth.
  • If the disk offering is set with disk bandwidth, a normal account or project member can set QoS for volumes created from it, but the bandwidth of volumes cannot exceed the bandwidth of the disk offering
  • The method a normal account or project member used to set a volume QoS should be the same as that used to set the disk bandwidth of the disk offering.
Flatten Volume Merges multiple snapshots of selected resources to improve resource performance and data security. By flattening, you can unlink the dependency between linked clone VM instances/volumes and source VM instances/volumes to achieve data independence.
Note:
  • Flatten may take a long time if the selected resources have relatively large data.
  • During flattening, operations on VM instances/volumes will be conducted after the flattening is completed.
  • After flattened, storage space occupied by cloned VM instances/volumes may increase.
  • You cannot flatten a shared volume.
  • You cannot flatten a disabled volume. Enable the volume and try again.
  • You cannot flatten a volume if the VM instance attached by the volume has a running CDP task and primary storage of the volume is not Ceph.
  • You cannot flatten a volume if the primary storage of the volume is Vhost (ZHPS).
Export Volume Exports a CSV file that contains volume information.
  • You can select the information items that are contained in the exported files. By default, the information items displayed on the current volume main list are contained.
  • When you export available volumes, you can select Export Root Volume Simultaneously. Then, the exported file can contain the information of root volumes associated with the current data volumes.
Delete Data Volume A deleted volume is displayed on the Recycle Bin tab page.
Note:
  • Deleting a volume detaches the volume from the VM instance it attached to and interrupts the volume reads/writes. Please exercise caution.
  • Deleting a volume detaches the volume from the elastic baremetal instance it attached to and interrupts the volume reads/writes. Please exercise caution.
Expunge/Recover Data Volume You can expunge or recover a deleted volume. A recovered volume is displayed on the Available tab page.

Manage a Root Volume

On the main menu of ZStack Cube Ultimate, choose Resource Center > Resource Pool > Virtual Resource > Volume > Root Volume. Then, the Root Volume tab is displayed.

The following table lists the actions that you can perform on a root volume.
Action Description
Edit Name and Description Edit the name and description of a root volume.
Resize Volume Resize a root volume when the VM instance its attached to is running or stopped.
  • The new size must greater than the original size and the increment must no smaller than 4 MB. The new size takes effect immediately.
  • The new size must be a multiple of 4 MB. For example, if you enter a size of 37 MB, the actual volume size is 40 MB after the resize.
  • We recommend that you manually create a snapshot before you resize the root volume. This allows fast rollback when needed.
Attach Tag Attach tags to a volume.
  • You can make the tags sorted according to their attachment time or names. By default, the tags are sorted according to names. You can change the Tag Sort Method in Global Setting.
    Note:
    • The priority of name sort: symbol > digit > Chinese character > English letter. English letters are case insensitive.
    • After you upgrade a 3.4.0 or earlier version to the latest version, the resource tags are sorted by tag names by default.
Detach Tag Detach tags from a volume.
  • You can detach tags from a resource or detach resources from a tag in bulk.
  • A tenant can detach tags only from the resources belong to the tenant. An administrator can detach tags from all resources.
Backup Now Create a backup for a root volume.
  1. Make sure the VM instance where the root volume is located is in the running or paused state.
  2. Make sure the VM instance where the root volume is located does not have an associated CDP task.
  3. Make sure you have sufficient authorized quota of the backup service.
Associate Backup Job Associate a backup job with a root volume.
  1. Make sure the VM instance where the root volume is located is in the running or paused state.
  2. Make sure the VM instance where the root volume is located doesn't have an associated CDP task.
  3. Make sure the selected root volume does not have an associated backup task.
  4. Make sure you have sufficient authorized quota of the backup service.
Create Volume Image Create an image based on a root volume. The image can be used to create new volumes.
Create Root Volume Snapshot Create a root volume snapshot to record the volume state at a specified time point before important actions. This allows a quick rollback in case of breakdowns.
Set Volume QoS Set the maximum bandwidth of the root volume by setting the total speed or read/write speed.
  • A normal account or project member can set QoS for any volume that is created from a disk offering without bandwidth limit. By default, a disk offering is not set with a bandwidth.
  • If the disk offering is set with disk bandwidth, a normal account or project member can set QoS for volumes created from it, but the bandwidth of volumes cannot exceed the bandwidth of the disk offering
  • The method a normal account or project member used to set a volume QoS should be the same as that used to set the disk bandwidth of the disk offering.
Flatten Volume Merges multiple snapshots of selected resources to achieve data independence and improve resource performance and data security.
  • Flatten may take a long time if the selected resources have relatively large data.
  • During flattening, operations on root volumes will be conducted after the flattening is completed.
  • After flattened, storage space occupied by cloned root volumes may increase.
Export Volume List Exports a CSV file that contains volume information.
  • You can select the information items that are contained in the exported files. By default, the information items displayed on the current volume main list are contained.

Volume Details

Volume Snapshot

Snapshot: A snapshot is a point-in-time capture of data status in a volume. Create a snapshot to store the volume state before you perform important actions. The snapshot helps you recover the volume data when exceptions occur during the action. However, this is only a temporal solution. For a long-term backup, we recommend that you use Backup Management.

Volume Snapshot Type

Volume snapshots are categorized into the following two types:
  • Manual snapshot: Data volume snapshots that you manually create at any time points.
  • Automatic snapshot: Snapshots automatically created by scheduled jobs or by the system in specific scenarios.
    • To use a scheduled job to create snapshots, configure a scheduled snapshot policy in advance. The system automatically creates snapshots on corresponding resources at specified time points.
    • The system automatically create volume snapshots in the following scenarios:
      • Resizing a data volume.
      • Making a data rollback with a volume snapshot.
        Note:
        • By default, the system does not create volume snapshots automatically when you make a data rollback with a snapshot.
        • To make the system automatically create volume snapshots whenever a snapshot rollback occurs, follow this method:

          On the main menu of ZStack Cube Ultimate, choose Settings > Platform Setting > Global Setting > Advanced > Resource Center > Resource Pool > Snapshot. Enable Volume Snapshot Auto Creation.

      • Creating a data volume image on a Ceph primary storage.

Scenarios

Snapshots apply to following scenarios:
  • Quick recovery from breakdowns: You can use a snapshot to recover the volume to a normal state when exceptions occur in a production environment. This is a temporal solution. For a long-term and more completed data protection, we recommend that you use Backup Management.
  • Data exploration: You can create snapshots based on production data, so as to provide a nearly real-time production data for exploration, report query, development, and testing.
  • Fault tolerance improvement: We recommend that you create on or more snapshots before you perform important actions on resources, such as the system upgrading and data migration. You can quickly recover the data with the snapshots if exceptions occur during the upgrading or migration.

Create a Data Volume Snapshot

You can create a snapshot on the data volume details page. Follow these steps:

On the main menu of ZStack Cube Ultimate, choose Resource Center > Resource Pool > Virtual Resource > Volume > Data Volume. On the Data Volume page, click a data volume to enter its details page. On the details page, click Snapshot > Create Snapshot. Then the Create Data Volume Snapshot page is displayed.

If the volume is attached to a VM instance. You can create a snapshot for it on the VM instance details page. On the VM details page, choose Configuration Info > Resource Configurations > Volume. Click a data volume to enter its details page. On the volume details page, click Snapshot > Create Snapshot. Then, the Create Data Volume Snapshot page is displayed.

Create a Root Volume Snapshot

You can create a snapshot on the root volume details page. Follow these steps:

On the main menu of ZStack Cube Ultimate, choose Resource Center > Resource Pool > Virtual Resource > Volume > Root Volume. On the Root Volume page, click a root volume to enter its detail page. On the details page, click Snapshot > Create Snapshot. Then, the Create Root Volume Snapshot page is displayed.

You can also create a snapshot for the root volume on the VM instance details page. On the VM instance details page, choose Configuration Info > Resource Configurations > Volume. Click a root volume to enter its details page. On the volume details page, click Snapshot > Create Snapshot. Then, the Create Root Volume Snapshot page is displayed.

Resize a Volume

ZStack Cube Ultimate allows you to increasing the size of a volume. The resize procedure consists of resizing the volume on the Cloud and resizing the hard disk in the VM operating system.

Resize Volume on Cloud

On the Volume page, locate the volume you want to resize. Click Actions > Resize Volume. Then, the Resize Volume dialog box is displayed.
Note:
  • The new size must greater than the original size and the increment must no smaller than 4 MB.
  • The new size must be a multiple of 4 MB. For example, if you enter a size of 37 MB, the actual volume size is 40 MB after the resize.
  • We recommend that you manually create a snapshot before you resize the volume. This allows fast rollback when needed.
图 1. Resize Volume on Cloud


Resize Hard Disk in VM Operating System

The resize method varies according to the VM type, partition, and file system.
Note:
  • The risize operation has potential risks. For security reasons, we recommend that you plan a new partition for the new size.
  • Only increasing the volume size is supported
  • The increased size can be merged into the last partition for continuous use.

The following are three different resize scenarios:

  1. Use the resize2fs command to resize the ext4 partition.
    Note: Resize partition is a risky operation. Please exercise caution. We recommend that you back up important data before the resize in case of data loss.

    Assume that the VM instance uses a CentOS7 operating system. The original size of the ext4 partition and the volume are both 60 GB. After the resize, the volume size is increased to 100 GB, and the new size is planned to be added to the ext4 partition.

    Procedure:
    1. Run lsblk to query the current partition. You can see that the new size is not allocated to the disk partition.
      [root@10-0-18-185 ~]# lsblk
      NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
      vda      8:0    0   60G  0 disk 
      └─vda1   8:1    0   60G  0 part /
      sr0     11:0    1 1024M  0 rom  
      sda    253:0    0    100G  0 disk 
      └─sda1 253:1    0    60G  0 part /data
    2. Run fdisk /dev/sda to recreate the partition.
      Note: The start sector of the new partition should be consistent with that of the original disk. Otherwise, the data may be lost.
      [root@10-0-18-185 ~]# fdisk /dev/sda
      Welcome to fdisk (util-linux 2.23.2).
      
      Changes will remain in memory only, until you decide to write them.
      Be careful before using the write command.
      
      
      Command (m for help): d    # Delete the current partition
      Selected partition 1
      Partition 1 is deleted
      
      Command (m for help): n    # Create a new partition
      Partition type:    # Set the partition type as primary
         p   primary (0 primary, 0 extended, 4 free)
         e   extended
      Select (default p):
      Using default response p
      Partition number (1-4, default 1):    # Set the partition number as 1
      First sector (2048-209715199, default 2048):    # Set a start sector consistent with that of the original disk in case of data loss
      Using default value 2048
      Last sector, +sectors or +size{K,M,G} (2048-209715199, default 209715199):    # Set the end sector as the default value to allocate all disk space to the new partition
      Using default value 209715199
      Partition 1 of type Linux and of size 100 GiB is set
      
      Command (m for help): w    # Write these configurations into the disk
      The partition table has been altered!
      
      Calling ioctl() to re-read partition table.
      
      WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
      The kernel still uses the old table. The new table will be used at
      the next reboot or after you run partprobe(8) or kpartx(8)
      Syncing disks.
    3. Run partprobe to query the partition list.
      [root@10-0-18-185 ~]# partprobe
    4. Run e2fsck -f /dev/sda1 to check whether the file system partition works as expected.
      [root@10-0-18-185 ~]# e2fsck -f /dev/sda1
      e2fsck 1.42.9 (28-Dec-2013)
      Pass 1: Checking inodes, blocks, and sizes
      Pass 2: Checking directory structure
      Pass 3: Checking directory connectivity
      Pass 4: Checking reference counts
      Pass 5: Checking group summary information
      /dev/sda1: 12/2621440 files (0.0% non-contiguous), 209591/10485504 blocks
    5. Run resize2fs to make the new size recognized by the xfs file system.
      [root@10-0-18-185 ~]# resize2fs /dev/sda1
      resize2fs 1.42.9 (28-Dec-2013)
      Resizing the filesystem on /dev/sda1 to 26214144 (4k) blocks.
      The filesystem on /dev/sda1 is now 26214144 blocks long.
    6. Run lsblk to query the current partition size.
      [root@10-0-18-185 ~]# lsblk
      NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
      sda      8:0    0  100G  0 disk
      └─sda1   8:1    0  100G  0 part /data
      sr0     11:0    1 1024M  0 rom
      vda    253:0    0    60G  0 disk
      └─vda1 253:1    0    60G  0 part /
  2. Use the xfs_growfs command to resize the xfs partition.
    Note:
    • This solution applies to the dynamic xfs resize. You do not need to attach an ISO or use a LVM partition tool to manage the disk.
    • The partition resize is a risky operation. We recommend that you back up important data before you exercise the resize.

    Assume that the VM instance uses a CentOS 7 operating system. The original size of the xfs partition and the volume are both 60 GB. The xfs partition is mounted to /data. After the size, the volume size is increased to 100 GB, and the new size is planned to be added to the xfs partition.

    Procedure:
    1. Run lsblk to query the current partition. You can see that the new size is not allocated to the disk partition.
      [root@10-0-44-210 ~]# lsblk
      NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
      vda      8:0    0   50G  0 disk 
      └─vda1   8:1    0   50G  0 part /
      sr0     11:0    1 1024M  0 rom  
      sdb    253:0    0    100G  0 disk 
      └─sdb1 253:1    0    60G  0 part /data
    2. Detach the mount point.
      The changed partition cannot be occupied before you running partprobe. Run umount /data to detach the mount point of /dev/sdb1.
      [root@10-0-44-210 ~]# umount /data
    3. Run fdisk /dev/sdb to recreate the partition.
      Note: The start sector of the new partition should be consistent with that of the original disk. Otherwise, the data may be lost.
      [root@10-0-44-210 ~]# fdisk /dev/sdb
      Welcome to fdisk (util-linux 2.23.2).
      
      Changes will remain in memory only, until you decide to write them.
      Be careful before using the write command.
      
      
      Command (m for help): d    # Delete the current partition
      Selected partition 1
      Partition 1 is deleted
      
      Command (m for help): n    # Create a new partition
      Partition type:    # Set the partition type as primary
         p   primary (0 primary, 0 extended, 4 free)
         e   extended
      Select (default p):
      Using default response p
      Partition number (1-4, default 1):    # Set the partition number as 1
      First sector (2048-209715199, default 2048):    # Set a start sector consistent with that of the original disk incase of data loss
      Using default value 2048
      Last sector, +sectors or +size{K,M,G} (2048-209715199, default 209715199):    # Set the end sector as the default value to allocate all disk space to the new partition
      Using default value 209715199
      Partition 1 of type Linux and of size 100 GiB is set
      
      Command (m for help): w    # Write these configurations into the disk
      The partition table has been altered!
      
      Calling ioctl() to re-read partition table.
      
      WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
      The kernel still uses the old table. The new table will be used at
      the next reboot or after you run partprobe(8) or kpartx(8)
      Syncing disks.
    4. Run partprobe to query the partition list.
      [root@10-0-44-210 ~]# partprobe
    5. Run mount /dev/sdb1 /data to attach the new partition to the mount point /data.
      [root@10-0-44-210 ~]# mount /dev/sdb1 /data
    6. Run xfs_growfs /dev/sdb1 to make the new size recognized by the xfs file system.
      [root@10-0-44-210 ~]# xfs_growfs /dev/sdb1
      meta-data=/dev/sdb1              isize=512    agcount=7, agsize=3932096 blks
               =                       sectsz=512   attr=2, projid32bit=1
               =                       crc=1        finobt=0 spinodes=0
      data     =                       bsize=4096   blocks=26214144, imaxpct=25
               =                       sunit=0      swidth=0 blks
      naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
      log      =internal               bsize=4096   blocks=7679, version=2
               =                       sectsz=512   sunit=0 blks, lazy-count=1
      realtime =none                   extsz=4096   blocks=0, rtextents=0
      data blocks changed from 16214144 to 28835584
    7. Run lsblk to query the current partition size.
      [root@10-0-44-210 ~]# lsblk
      NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
      sdb      8:16   0  100G  0 disk
      └─sdb1   8:17   0  100G  0 part /data
      sr0     11:0    1 1024M  0 rom
      vda    253:0    0    50G  0 disk
      └─vda1 253:1    0    50G  0 part /
  3. Resize the Windows partition.
    You can directly resize the Windows partition on the Disk Management page.
    Note: Rescan the disk after the resize.