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 iSCSI 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 ZStack Cloud ISO.
  • 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.

Figure 1. Network Topology of SharedBlock and iSCSI Storage


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 iSCSI storage and enable the high availability mode of the storage network to ensure redundancy.

Deploy a SharedBlock Primary Storage

Procedure

  1. Add raw devices.

    Administrators need to partition raw devices (LUN devices) of a certain capacity on an iSCSI storage.

    Figure 2. Add Raw Devices on an iSCSI Storage


  2. Add an iSCSI storage.

    You can add an iSCSI server on the ZStack Cloud UI with no need to configure each host manually. After you added an iSCSI server, the Cloud will automatically scan and detect disks for you.

    Set the following parameters:
    • Name: Enter the name of the iSCSI storage.
    • IP Address: Set the IP address of the iSCSI storage.
    • Port: Set the port of the iSCSI storage. Default port: 3260.
    • Cluster: Optional. Select a cluster. You can also attach a cluster after you add the iSCSI storage.
      Note: Before adding a SharedBlock primary storage using block devices of an iSCSI storage, ensure that the iSCSI storage is attached to the same cluster.
    • CHAP Username: Optional. Enter the CHAP username if the iSCSI storage has CHAP authentication configured.
    • CHAP Password: Optional. Enter the CHAP password if the iSCSI storage has CHAP authentication configured.
    Figure 3. Add iSCSI Storage


  3. 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 of an iSCSI storage as needed.
      Note:
      • Make sure that the compute node is properly connected with the storage and added to the Cloud.
      • To make block devices on an iSCSI storage available to choose from, you need to first attach it to the same cluster of the SharedBlock primary storage. Make sure the SharedBlock primary storage and its associated iSCSI storage stay in the same cluster at all times during use.
    • 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 4. Add SharedBlock Primary Storage


Operational Management

You can perform the following actions on a SharedBlock primary storage:
  • 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.
    • Before adding a SharedBlock primary storage using block devices of an iSCSI storage, ensure that the iSCSI storage is attached to the same 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.
    Note: Before adding a SharedBlock primary storage using block devices of an iSCSI storage, ensure that the iSCSI storage is attached to the same cluster.
Figure 5. Add Shared Block


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

SharedBlock Storage Deployment Tutorial (iSCSI Storage) | 4.8.38 | ZStack Cloud · ZCF | ZStack Resource Center