Create Volume

ZStack allows you to create one or more volumes at a time.

On the Volume management page, click Create Volume. On the displayed Create Volume page, set the following parameters:
  • Add Method: Select an add method to determine whether to create multiple volumes at a time. Options: Single | Multiple. If you select Multiple, specify the number of volumes to be created. You can create 1 to 24 volumes in bulk.
  • Name: Enter a name for the volume.
  • Description: Optional. Enter a description for the volume.
  • Volume Type: Select a volume type. Options: Normal volume | Shared volume.
    Note:
    • Normal volume:

      All primary storages support normal volumes.

    • Shared volume:
      1. Ceph and thick provisioned Shared Block primary storages support shared volumes. The same shared volume can be attached by multiple VM instances.
      2. A shared volume is of the VirtioSCSI type. Therefore, if you select shared volume, the VirtioSCSI checkbox is selected by default.
      3. Reading and writing a volume at the same time might cause data inconsistencies. Make sure that you know expressly how to use a volume properly. Do not detach the corresponding VM instances when a volume is written.
  • Create Method: Select a creation method for creating a volume. Options: Disk offering | Volume image.
    Note: Only the disk offering method supports batch volume creation.
As shown in Figure 1.
Figure 1. Create Volume


Four Volume Creation Scenarios

This section describes four volume creation scenarios.
  1. Create a normal volume from a disk offering.
  2. Create a normal volume from a volume image.
  3. Create a shared volume from a disk offering.
  4. Create a shared volume from a volume image.
Details of volume creation scenarios are as follows:
  1. Create a normal volume from a disk offering.
    On the Volume management page, click Create Volume. On the displayed Create Volume page, set the following parameters:
    • Volume Type: Select normal volume.
    • Create Method: Select disk offering.
    • Disk Offering: Select a proper disk offering.
    • Primary Storage and VM Instance:
      • If neither of these two parameters is specified, the volume you created will not be instantiated, and will be displayed on the Not Instantiated tab page.
      • If you select only a VM instance,
        • Single primary storage scenario: The volume will be created on the primary storage where the VM instance is running.
        • Multiple-primary storage scenario:
          • Assume that you do not specify a primary storage.
            • When you have multiple LocalStorage primary storages, the system prefers to create a volume from the primary storage with large available capacity.
            • When you have multiple NFS primary storages or multiple Shared Block primary storages, the system will randomly select a primary storage to create a volume.
            • When you have a combination of primary storages, such as LocalStorage+NFS, LocalStorage+Shared Mount Point, and LocalStorage+Shared Block primary storage, the system automatically selects a primary storage that does not attach the current root volume to create a volume.
            • When you have a combination of Ceph primary storage and a Shared Block primary storage, the system prefers to create a volume from the primary storage with large available capacity.
      • If you select only a primary storage, the volume that you created will be available and will occupy actual space.
        Note:
        • When you select a LocalStorage primary storage, specify a host.
        • When you select a Ceph primary storage, specify a Ceph storage pool.
        • When you select a SharedBlock primary storage, select a provisioning method, including thin provisioning and thick provisioning.
          • Thin provisioning: Allocates a storage space to a volume according to actual usages to achieve higher storage utilizations.
          • Thick provisioning: Preallocates the required storage space to provide sufficient storage capacities for a volume and to ensure storage performances.
    • VirtioSCSI: By default, this checkbox is selected, indicating that a VirtioSCSI bus is used to create a VirtioSCSI volume.
      Note:
      • After selected, the system will automatically allocate an ID (WWN) to the volume by initializing the volume.
      • After you start a VM instance (such as a Linux VM), you can check the WWN under the /dev/disk/by-id/ file path. WWN allows you to simply attach and detach data volumes.
      • We do not recommend that you create a VirtioSCSI volume from a LocalStorage primary storage.
    As shown in Create Normal Volume from Disk Offering.
    Figure 2. Create Normal Volume from Disk Offering


  2. Create a normal volume from a volume image.
    On the Volume management page, click Create Volume. On the displayed Create Volume page, set the following parameters:
    • Volume Type: Select normal volume.
    • Create Method: Select volume image.
    • Volume Image: Select a proper volume image.
    • VM Instance: Select a VM instance that you need to attach.
    • Primary Storage: Optional. Specify a primary storage as needed.
      • If you specify a primary storage, this data volume will be created on the specified primary storage.
      • If you do not specify a primary storage:
        • If the volume image is running on a Ceph backup storage, the volume will be created from a Ceph primary storage.
        • If the volume image is not running on a Ceph backup storage,
          • When you have multiple LocalStorage primary storages, the system prefers to create a volume from the primary storage with large available capacity.
          • When you have multiple NFS primary storages or multiple Shared Block primary storages, the system will randomly select a primary storage to create a volume.
          • When you have a combination of primary storages, such as LocalStorage+NFS, LocalStorage+Shared Mount Point, and LocalStorage+Shared Block primary storage, the system automatically selects a primary storage that does not attach the current root volume to create a volume.
          • When you have a combination of Ceph primary storage and a Shared Block primary storage, the system prefers to create a volume from the primary storage with large available capacity.
      Note: A volume image that is running on an ImageStore backup storage can be used to create a volume on a Ceph primary storage.
    • VirtioSCSI: By default, this checkbox is selected, indicating that a VirtioSCSI bus is used to create a VirtioSCSI volume.
      Note:
      • After selected, the system will automatically allocate an ID (WWN) to the volume by initializing the volume.
      • After you start a VM instance (such as a Linux VM), you can check the WWN under the /dev/disk/by-id/ file path. WWN allows you to simply attach and detach data volumes.
      • We do not recommend that you create a VirtioSCSI volume from a LocalStorage primary storage.
    As shown in Create Normal Volume from Volume Image.
    Figure 3. Create Normal Volume from Volume Image


  3. Create a shared volume from a disk offering.
    On the Volume management page, click Create Volume. On the displayed Create Volume page, set the following parameters:
    • Volume Type: Select shared volume.
      Note:
      • Currently, only Ceph and Shared Block primary storages support shared volumes.
      • Shared Block primary storage does not support thin provisioned shared volumes.
    • Create Mode: Select disk offering.
    • Disk Offering: Select a proper disk offering.
    • Primary Storage and VM Instance:
      • If neither of these two parameters is specified, the volume you created will not be instantiated, and will be displayed on the Not Instantiated tab page.
      • If you select only a VM instance,
        • Single primary storage scenario: The volume will be created on the primary storage where the VM instance is running.
        • Multiple-primary storage scenario:
          • Assume that you do not specify a primary storage.
            • When you have multiple LocalStorage primary storages, the system prefers to create a volume from the primary storage with large available capacity.
            • When you have multiple NFS primary storages or multiple Shared Block primary storages, the system will randomly select a primary storage to create a volume.
            • When you have a combination of primary storages, such as LocalStorage+NFS, LocalStorage+Shared Mount Point, and LocalStorage+Shared Block primary storage, the system automatically selects a primary storage that does not attach the current root volume to create a volume.
            • When you have a combination of Ceph primary storage and a Shared Block primary storage, the system prefers to create a volume from the primary storage with large available capacity.
      • If you select only a primary storage, the volume that you created will be available and will occupy actual space.
        Note:
        • When you select a LocalStorage primary storage, specify a host.
        • When you select a Ceph primary storage, specify a Ceph storage pool.
        • When you select a SharedBlock primary storage, select a provisioning method, including thin provisioning and thick provisioning.
          • Thin provisioning: Allocates a storage space to a volume according to actual usages to achieve higher storage utilizations.
          • Thick provisioning: Preallocates the required storage space to provide sufficient storage capacities for a volume and to ensure storage performances.
    • VirtioSCSI: By default, this checkbox is selected, indicating that a VirtioSCSI bus is used to create a VirtioSCSI volume.
      Note:
      • A shared volume is of the VirtioSCSI type. Therefore, if you select shared volume, the VirtioSCSI checkbox is selected by default.
      • After selected, the system will automatically allocate an ID (WWN) to the volume by initializing the volume.
      • After you start a VM instance (such as a Linux VM), you can check the WWN under the /dev/disk/by-id/ file path. WWN allows you to simply attach and detach data volumes.
    As shown in Create Shared Volume from Disk Offering.
    Figure 4. Create Shared Volume from Disk Offering


  4. Create a shared volume from a volume image.
    On the Volume management page, click Create Volume. On the displayed Create Volume page, set the following parameters:
    • Volume Type: Select shared volume.
    • Note:
      • Currently, only Ceph and Shared Block primary storages support shared volumes.
      • Shared Block primary storage does not support thin provisioned shared volumes.
    • Create Mode: Select volume image.
    • Volume Image: Select a proper volume image.
    • VM Instance: Select a VM instance that you need to attach.
    • Primary Storage: Optional. Specify a primary storage as needed.
      • If you specify a primary storage, this data volume will be created on the specified primary storage.
      • If you do not specify a primary storage:
        • If the volume image is running on a Ceph backup storage, the volume will be created from a Ceph primary storage.
        • If the volume image is not running on a Ceph backup storage,
          • When you have multiple LocalStorage primary storages, the system prefers to create a volume from the primary storage with large available capacity.
          • When you have multiple NFS primary storages or multiple Shared Block primary storages, the system will randomly select a primary storage to create a volume.
          • When you have a combination of primary storages, such as LocalStorage+NFS, LocalStorage+Shared Mount Point, and LocalStorage+Shared Block primary storage, the system automatically selects a primary storage that does not attach the current root volume to create a volume.
          • When you have a combination of Ceph primary storage and a Shared Block primary storage, the system prefers to create a volume from the primary storage with large available capacity.
      Note: A volume image that is running on an ImageStore backup storage can be used to create a volume on a Ceph primary storage.
    • VirtioSCSI: By default, this checkbox is selected, indicating that a VirtioSCSI bus is used to create a VirtioSCSI volume.
      Note:
      • After selected, the system will automatically allocate an ID (WWN) to the volume by initializing the volume.
      • After you start a VM instance (such as a Linux VM), you can check the WWN under the /dev/disk/by-id/ file path. WWN allows you to simply attach and detach data volumes.
      • We do not recommend that you create a VirtioSCSI volume from a LocalStorage primary storage.
    As shown in Create Shared Volume from Volume Image.
    Figure 5. Create Shared Volume from Volume Image