Overview
SharedBlock is a new type of primary storage supported by ZStack Cloud. You can use LUNs on a SAN storage as your storage pool and pass through them to VM instances. Compared with Shared Mount Point (SMP), SharedBlock features easier deployment, more flexible scaling, and higher performance. According to test data, SharedBlock can deliver the maximum performance of a physical disk.
Currently, SharedBlock storage supports multiple storage network protocols including iSCSI, FC, and NVMe.
This tutorial describes the deployment of a SharedBlock storage based on FC storage in a virtualized storage environment.
Environment Preparations
Physical Server
The following table lists necessary servers and their configurations for this tutorial.
| Server | Hardware Configuration | IP Address | Hostname Configuration |
|---|---|---|---|
| zstack-mn | 4C 8G | 172.20.12.249 | hostnamectl set-hostname zstack-mn |
| sharedblock-host1 | 4C 8G | 172.20.11.107 | hostnamectl set-hostname sharedblock-host1 |
| sharedblock-host2 | 4C 8G | 172.20.11.244 | hostnamectl set-hostname sharedblock-host2 |
| sharedblock-host3 | 4C 8G | 172.20.12.241 | hostnamectl set-hostname sharedblock-host3 |
- All servers are installed with the same version of operating system, i.e. all are installed with h76c ISO or all are installed with h79c ISO.
- Install one of the servers as Management Node.
- Install the other three servers as Compute Node or Expert Mode.
- When the installation completes, run the following command to configure the
hostname
resolution:
[root@sharedblock-host1 ~]# cat /etc/hosts ... 172.20.11.107 sharedblock-host1 172.20.11.244 sharedblock-host2 172.20.12.241 sharedblock-host3 ... - Add the three servers to the management node. All hosts will be automatically installed with necessary toolkits including LVM and Multipath.
Now the physical servers are ready.
Storage Network Topology
The following figure shows the network topology of physical servers, storage devices, and a SAN switch.

For better understanding, the above topology is based on a single-link scenario. If you deploy a SharedBlock storage in a production environment, we highly recommend you use a dual-controller FC storage and enable the high availability mode of the storage network to ensure redundancy.
Deploy a SharedBlock Primary Storage
Procedure
-
Add raw devices.
Administrators need to partition raw devices (LUN devices) of a certain capacity on an FC storage and scan the disks online using the following command:
[root@sharedblock-host1 ~]# echo "- - -" > /sys/class/scsi_host/host1/scan [root@sharedblock-host1 ~]# echo "- - -" > /sys/class/scsi_host/host2/scan [root@sharedblock-host1 ~]# echo "- - -" > /sys/class/scsi_host/host3/scan # /dev/sdg is the newly scanned device [root@sharedblock-host1 ~]# lsscsi -s [0:0:0:3] disk DELL MD32xx 0784 /dev/sdd 2.19TB [0:0:1:3] disk DELL MD32xx 0784 /dev/sdg 2.19TB [0:0:2:3] disk DELL MD32xx 0784 /dev/sdj 2.19TB -
Add a primary storage.
Set the following parameters:
- Zone: By default, the current zone is displayed.
- Name: Enter a name for the primary storage.
- Description: Enter a description for the primary storage.
- Type: Select SharedBlock Storage.
- Default Storage Space Allocation Strategy:
Select a storage space allocation strategy, including thick
provisioning and thin provisioning.
- Thick Provisioning: Allocates the required storage space in advance to provide sufficient storage capacities and to ensure storage performance.
- Thin Provisioning: Allocates storage spaces as needed to achieve a higher storage utilization.
- Storage Network: Enter the storage network
specified for the shared storage. The storage network can be the
management network of the management node.
Note:
- If you have a dedicated storage network, enter its CIDR.
- We recommend that you plan an independent storage network in advance to avoid potential risks. If you do not have an independent storage network, enter the network address according to your actual needs.
- The Cloud uses the storage network to check the health status of VM instances.
- Cluster: Select a cluster to which the SharedBlock primary storage is attached.
- LUN: Select one or more LUN devices as
needed.
Note: Make sure that the compute node is properly
connected with the storage and added to the Cloud. - Cleanse LUN: Optional. Determine whether to
cleanse LUN devices. By default, LUN devices are not cleansed.
Note:
- If you choose to cleanse LUN devices, the residual data, such as file systems, RAID, or signatures of partition tables in the LUN devices will be forced to clean up.
- If data exists in your LUN devices, and you do not cleanse the devices, you will fail to add LUN devices or attach primary storage.
- The LUN devices to be added cannot have partitions. Otherwise, you will fail to add the devices.
Figure 2. Add SharedBlock Primary Storage 
Operational Management
- Enable: Enable the disabled primary storage.
- Disable: Disable the primary storage. After the primary storage is disabled, you cannot use it to create VM instances, volumes, or snapshots. However, existing resources are not affected.
- Reconnect: Reconnect the primary storage. This action will update the storage
information about the primary storage.
Note: If any host can connect properly to
the primary storage, the status of the primary storage will be
Connected. - Create Volume: Create a volume on the primary storage. Then, this volume will be an instantiated volume.
- Attach Cluster: Attach the primary storage to a cluster.
- A cluster can have one or more SharedBlock primary storage attached.
- A cluster can have both a LocalStorage and a SharedBlock primary storage attached.
- Detach Cluster: Detach the primary storage from a cluster.
- Enter Maintenance Mode: Placing a primary storage into maintenance mode also stops associated VM instances including those with HA enabled.
- Delete: Delete the primary storage.
Note:
- Before you can delete the primary storage, detach it from all clusters.
- Deleting a primary storage also deletes all the resources on the primary storage, such as VM instances, elastic baremetal instances, volumes, and snapshots. Even if you add this primary storage again, the original files cannot be automatically detected.
- Add Shared Block: Add LUN devices online.
- Refresh Capacity: Refresh the storage capacity, especially when you have resized the LUN devices.
Add Shared Block
You can add one or more LUNs to a SharedBlock primary storage by following these steps:
- On the Primary Storage page, choose a SharedBlock primary storage and enter its details page.
- On the details page, click and enter the LUN tab, and then click Add.
- On the Add Shared Block page, select target LUN(s) and click OK.

Now, you have learnt how to deploy a SharedBlock storage based on FC storage on ZStack Cloud.
