Primary Storage


Overview

A primary storage is a storage server used to store disk files, such as root volumes, data volumes, root volume snapshots, data volume snapshots, and image caches, for VM instances.

As shown in Primary Storage.
Figure 1. Primary Storage


A primary storage can either be a local storage or a shared storage.
  • Local Storage: Use the hard disks of a host to store disk files.
  • Network Shared Storage: Support NFS, Shared Mount Point, Ceph, and Shared Block.
    • NFS is a network file system storage.
    • Shared Mount Point supports network shared storages provided by commonly used distributed file systems such as MooseFS, GlusterFS, OCFS2, and GFS2.
    • Ceph uses distributed block storages.
    • Shared Block uses shared block storages.

Inventory

Properties

Name Description Optional Optional Value Starting Version
uuid The UUID. For more information, see Resource Property. 0.6
name The name. For more information, see Resource Property. 0.6
description The description. For more information, see Resource Property. Yes 0.6
zoneUuid The parent zone UUID. 0.6
totalCapacity The total disk capacity. Unit: byte. 0.6
availableCapacity The available disk capacity. Unit: byte. 0.6
url The URL. For more information, see URL. 0.6
type The primary storage type.
  • SharedMountPoint
  • XSky
  • Ceph
  • NFS
  • ZSES
  • VCenter
  • LocalStorage
0.6
state The state. For more information, see State.
  • Enabled
  • Disabled
0.6
status The status. For more information, see Status.
  • Connecting
  • Connected
  • Disconnected
0.6
attachedClusterUuids The UUIDs of clusters to which the primary storage is attached. 0.6
createDate The creation date. For more information, see Resource Property. 0.6
lastOpDate The last operation date. For more information, see Resource Property. 0.6

Sample

{     "inventories": {             "attachedClusterUuids": [                 "967a353c2893409dab9312cf3033a98c"             ],             "availableCapacity": 152897413120,             "availablePhysicalCapacity": 186166145024,             "createDate": "Oct 30, 2017 3:05:29 PM",             "description": "",             "lastOpDate": "Oct 31, 2017 10:41:26 AM",             "mountPath": "/zstack_ps",             "name": "LS-1",             "state": "Enabled",             "status": "Connected",             "systemUsedCapacity": 9330311168,             "totalCapacity": 205177397248,             "totalPhysicalCapacity": 205177397248,             "type": "LocalStorage",             "url": "/zstack_ps",             "uuid": "037bd212f7a1488da4f94360ccfaf6ab",             "zoneUuid": "e59b71e99d8a4ea1952b578388b8cd1d"         } }
Table 1. Shared Block Primary Storage Inventory
Name Description Optional Optional Value Starting Version
uuid The UUID. For more information, see Resource Property. 2.3.2
name The name. For more information, see Resource Property. 2.3.2
description The description. For more information, see Resource Property. Yes 2.3.2
zoneUuid The zone UUID. 2.3.2
url The reserved field. 2.3.2
totalCapacity The total disk capacity. Unit: byte. 2.3.2
availableCapacity The available capacity. Unit: byte. 2.3.2
totalPhysicalCapacity The total physical capacity. 2.3.2
availablePhysicalCapacity The available physical capacity. 2.3.2
systemUsedCapacity The system used capacity. 2.3.2
type The primary storage type.
  • sharedblock
2.3.2
state The state. For more information, see State. 2.3.2
status The status. For more information, see Status. 2.3.2
mountPath The reserved field. 2.3.2
attachedClusterUuids The attached clusters. 2.3.2
sharedBlocks 2.3.2
sharedBlockGroupType 2.3.2
createDate The creation date. For more information, see Resource Property. 2.3.2
lastOpDate The last operation date. For more information, see Resource Property. 2.3.2
groupBy Groups rows into subgroups based on values of columns or expressions. This field is equivalent to the Group By clause in MySQL, such as groupBy=type. Yes 2.3.2
userTags The user tags. For more information, see CreateUserTag. Yes 2.3.2
systemTags The system tags. For more information, see CreateSystemTag. Yes 2.3.2

Sample:

{     "inventories": [         {             "attachedClusterUuids": [                 "4fe9c130224c4e59b0e8f3c5154c2cf6"             ],             "availableCapacity": 401458101248,             "availablePhysicalCapacity": 400363094016,             "createDate": "Jul 19, 2018 7:59:08 PM",             "description": "",             "lastOpDate": "Jul 19, 2018 8:01:37 PM",             "mountPath": "SharedBlock",             "name": "ps2-cluster3",             "sharedBlockGroupType": "LvmVolumeGroupBasic",             "sharedBlocks": [                 {                     "createDate": "Jul 19, 2018 7:59:08 PM",                     "diskUuid": "scsi-360014056cc00bd98c3740eeb9955af2c",                     "lastOpDate": "Jul 19, 2018 7:59:08 PM",                     "name": "disk-scsi-360014056cc00bd98c3740eeb9955af2c",                     "sharedBlockGroupUuid": "17edb2c2f5b841069d043a28758434f6",                     "state": "Enabled",                     "status": "Connected",                     "type": "LvmLogicalVolumeBasic",                     "uuid": "37ce4c4747914c01919f5474d1c7edfe"                 }, ],             "state": "Enabled",             "status": "Connected",             "totalCapacity": 639883018240,             "totalPhysicalCapacity": 639883018240,             "type": "SharedBlock",             "url": "sharedblock://ec6a1dbaf6d645a182e1f0e393eb0761",             "uuid": "ec6a1dbaf6d645a182e1f0e393eb0761",             "zoneUuid": "ddad0dc2c4bd4ffbb53147ea3dbf15c3"         }     ],     "success": true } 
Table 2. Shared Block Primary Storage and Host Reference Inventory
Name Description Optional Optional Value Starting Version
primaryStorageUuid The primary storage UUID. 2.3.2
hostUuid The host UUID. 2.3.2
hostId The host ID. 2.3.2
status The status. For more information, see Status.
  • Connecting
  • Connected
  • Disconnected
2.3.2
createDate The creation date. For more information, see Resource Property. 2.3.2
lastOpDate The last operation date. For more information, see Resource Property. 2.3.2
groupBy Groups rows into subgroups based on values of columns or expressions. This field is equivalent to the Group By clause in MySQL, such as groupBy=type. Yes 2.3.2
userTags The user tags. For more information, see CreateUserTag. Yes 2.3.2
systemTags The system tags. For more information, see CreateSystemTag. Yes 2.3.2

Sample:

{     "inventories": [         {             "createDate": "Jul 19, 2018 7:59:09 PM",             "hostId": 85,             "hostUuid": "18fb1cf9713a4a50baf95fbaf37bfba6",             "lastOpDate": "Jul 19, 2018 7:59:09 PM",             "primaryStorageUuid": "17edb2c2f5b841069d043a28758434f6",             "status": "Connected"         }     ],     "success": true } 
Table 3. Shared Block Inventory
Name Description Optional Optional Value Starting Version
uuid The UUID. For more information, see Resource Property. 2.3.2
name The name. For more information, see Resource Property. 2.3.2
description The description. For more information, see Resource Property. Yes 2.3.2
sharedBlockGroupUuid The LUN group UUID. 2.3.2
diskUuid The unique identifier of the disk. For example, UUID, WWN, and WWID. 2.3.2
type The primary storage type.
  • sharedblock
2.3.2
state The state. For more information, see State. 2.3.2
status The status. For more information, see Status. 2.3.2
createDate The creation date. For more information, see Resource Property. 2.3.2
lastOpDate The last operation date. For more information, see Resource Property. 2.3.2
groupBy Groups rows into subgroups based on values of columns or expressions. This field is equivalent to the Group By clause in MySQL, such as groupBy=type. Yes 2.3.2
userTags The user tags. For more information, see CreateUserTag. Yes 2.3.2
systemTags The system tags. For more information, see CreateSystemTag. Yes 2.3.2
Sample:
{     "inventories": [         {             "createDate": "Jul 17, 2018 8:50:14 PM",             "diskUuid": "lvm-pv-uuid-h6Zlks-feeq-Jonz-eXLw-tyso-NPXn-6B6jfs",             "lastOpDate": "Jul 17, 2018 8:50:14 PM",             "name": "disk-lvm-pv-uuid-h6Zlks-feeq-Jonz-eXLw-tyso-NPXn-6B6jfs",             "sharedBlockGroupUuid": "ec6a1dbaf6d645a182e1f0e393eb0761",             "state": "Enabled",             "status": "Connected",             "type": "LvmLogicalVolumeBasic",             "uuid": "08dad40070054309b00d2174a1476675"         } ],     "success": true }

Capacity

ZStack monitors disk capacities of primary storages to select one suitable primary storage for creating volumes. Different primary storage plugins may report different disk capacities.
  • For primary storages that support over-provisioning, the reported capacity will be larger than the actual capacity.
  • For primary storages that do not support over-provisioning, the reported capacity may be smaller than or equal to the actual capacity.

NFS Capacity

NFS does not support over-provisioning. Therefore, the NFS capacity is calculated by volumes' virtual sizes according to the following formulas:
totalCapacity = NFS's total capacity availableCapacity = totalCapacity - sum (volumes' virtual sizes)

Simply put, a volume's virtual size is the size when a volume is fully filled. For example, when you create a volume with 1 GB capacity, its actual size may be 10 MB due to the thin-provisioning technology before the volume is fully filled.

URL

A URL is a string that contains information needed by primary storage to control storage systems. Although its name is URL, the exact format of the string is up to primary storage types and is not necessary to strictly follow the URL convention. This gives flexibilities to plugins to encode information that may not be able to fit in the URL format.

NFS URL

For an NFS primary storage, the URL is encoded as follows:
nfs server ip/dns:/absolute path to directory
For example,
192.168.0.220:/storage/nfs/

State

A primary storage has the following two states:
  • Enabled

    Indicates that volumes can be created.

  • Disabled

    Indicates that volumes cannot be created.

Status

Similar to host status, primary storage status reflects the status of command channels between ZStack management nodes and primary storages. Command channels are the ways ZStack management nodes communicate with storage systems represented by primary storage. Different primary storage types can have different command channels. For example, a command channel can be HTTP connections among ZStack management nodes and primary storage agents or communication methods provided by storage SDKs.

A primacy storage has the following three statuses:
  • Connecting:

    Indicates that a ZStack management node is trying to establish a command channel between the node itself and a primary storage. At this stage, you cannot perform any operation on the primary storage.

  • Connected:

    Indicates that the command channel between a ZStack management node and a primary storage is established successfully. At this stage, you can perform related operations on the primary storage.

  • Disconnected:

    Indicates that the command channel between a ZStack management node and a primary storage is lost. At this stage, you cannot perform any operation on the primary storage.

When a ZStack management node starts, the management node will try to establish command channels to primary storages. When the management node is running, it will periodically send ping commands to the primary storages to check the health status of command channels. Once a primary storage fails to respond, or a ping command times out, the status of the primary storage will be changed to Disconnected.

The status transition diagram of a primary storage is shown in Status Transition Diagram of Primary Storage.
Figure 1. Status Transition Diagram of Primary Storage


State

The states have no direct relation to the statuses. States represent your decisions on a primary storage, while statuses represent the communication condition of a primary storage.

Attaching Cluster

Attaching clusters is to associate primary storage to sibling clusters. This provides a flexible method to maintain relations between hosts and storage systems in a real data center. For example, assume that a cluster (cluster A) is attached to an NFS primary storage (NFS1), as shown in Attach a Cluster to NFS Primary Storage.
Figure 2. Attach a Cluster to NFS Primary Storage


After a period of time, Cluster A is running out of memory, but NFS1 still has sufficient disk spaces. So you decide to create another cluster (Cluster B) and then attach NFS1 to Cluster B, as shown in Attach Multiple Clusters to NFS Primary Storage.
Figure 3. Attach Multiple Clusters to NFS Primary Storage


After another period of time, the hardware of Cluster A becomes outdated, and you decide to stop using Cluster A. Then, you attach a new, stronger cluster (Cluster C) to NFS1, and set all VM instances in Cluster A to maintenance mode. In this regard, all VM instances that are running in Cluster A will be migrated to Cluster B or Cluster C. Finally, you detach NFS1 from Cluster A, and then delete Cluster A. Now, the data center in shown in Migrated Data Center.
Figure 4. Migrated Data Center


Finally, NFS1 is running out of capacity, you add another NFS primary storage (NFS2), and attach it to both Cluster B and Cluster C, as shown in Attach Multiple Clusters to Multiple NFS Primary Storages.
Figure 5. Attach Multiple Clusters to Multiple NFS Primary Storages

















































Back to Top

Download

Already filled the basic info?Click here.

Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

An email with a verification code will be sent to you. Make sure the address you provided is valid and correct.

Download

Not filled the basic info yet? Click here.

Invalid email address or mobile number.

Email Us

contact@zstack.io
ZStack Training and Certification
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

Email Us

contact@zstack.io
Request Trial
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

Email Us

contact@zstack.io

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder. After receiving the email, click the URL to download the documentation.

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder.
Or click on the URL below. (For Internet Explorer, right-click the URL and save it.)

Thank you for using ZStack products and services.

Submit successfully.

We'll connect soon.

Thank you for using ZStack products and services.