Available with limitations in: Certified Core/CSE Lite (1.73), Certified Pro/CSE Pro (1.73)
Available without limitations in: Ultimate/EE
Included in extensions: Storage Integration
The module lifecycle stage: Generally available version
The module has requirements for installation
The module installs and configures the CSI driver for Huawei SAN. The module allows you to create a StorageClass in Kubernetes by creating Kubernetes custom resources HuaweiStorageClass.
The user is not allowed to create a StorageClass for the csi.huawei.com CSI driver.
Currently, supports DSS Huawei Dorado storage devices. For other Huawei SAN support please contact tech support.
Volume snapshots require the storage-foundation module. Without it, the rest of the module keeps working and no VolumeSnapshotClass is created.
Supported access modes for the module: RWO; RWX — only in DVP for SAN volumes, and for NFS volumes (see Connecting over NFS).
System requirements and recommendations
Requirements
- Presence of a deployed and configured Huawei SAN.
- Unique iqn in /etc/iscsi/initiatorname.iscsi on each of Kubernetes Nodes
Supported protocols
Storage type (storageType) |
Supported protocols (protocol) |
|---|---|
OceanStorSAN |
ISCSI, FC |
FusionStorageSAN |
ISCSI |
OceanStorNAS, OceanStorDtree |
NFS |
FusionStorageNAS |
NFS, DPC |
The ROCE, FC-NVME and SCSI protocols are not supported. The module does not label the nodes for them, so the driver finds no pool for a volume and the PersistentVolumeClaim stays Pending. A new HuaweiStorageConnection with one of these protocols is rejected. A connection created earlier is not deleted: the module controller sets it to Failed and names the unsupported protocol in status.reason. Recreate it with a supported protocol. To use ROCE, FC-NVME or SCSI, contact technical support: the module has to be extended for this mode.
Quickstart guide
Note that all commands must be run on a machine that has administrator access to the Kubernetes API.
Enabling module
-
Enable the
csi-huaweimodule. This will result in the following actions across all cluster nodes:- registration of the CSI driver;
- launch of service pods for the
csi-huaweicomponents.
d8 k apply -f - <<EOF apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: name: csi-huawei spec: enabled: true version: 1 EOF -
Wait for the module to become
Ready.d8 k get module csi-huawei -w
Creating a StorageClass
To create a StorageClass, you need to use the HuaweiStorageClass and HuaweiStorageConnection resource.
-
Here is an example command to create such a resource:
d8 k apply -f -<<EOF apiVersion: storage.deckhouse.io/v1alpha1 kind: HuaweiStorageConnection metadata: name: huaweistorageconn spec: storageType: OceanStorSAN pools: - test urls: - https://192.168.128.101:8088 login: "admin" password: "<your-password>" protocol: ISCSI portals: - 10.240.0.101 - 10.250.0.101 maxClientThreads: 30 EOFd8 k apply -f -<<EOF apiVersion: storage.deckhouse.io/v1alpha1 kind: HuaweiStorageClass metadata: name: huaweisc spec: fsType: ext4 pool: test reclaimPolicy: Delete storageConnectionName: huaweistorageconn EOF -
Check objects creation (Phase must be
Created):d8 k get huaweistorageconnections.storage.deckhouse.io <huaweistorageconnection name>d8 k get huaweistorageclasses.storage.deckhouse.io <huaweistorageclass name>
Connecting over Fibre Channel
A Fibre Channel connection uses the same HuaweiStorageConnection resource as iSCSI. The only differences are protocol: FC and the absence of portals: that field holds the data-plane IP addresses of the storage system and is used by IP transports only. The urls field still points to the management interface, because the driver talks to the storage system over the REST API, and Fibre Channel carries the data path only.
-
Here is an example command to create such a resource:
d8 k apply -f -<<EOF apiVersion: storage.deckhouse.io/v1alpha1 kind: HuaweiStorageConnection metadata: name: huawei-fc spec: storageType: OceanStorSAN pools: - prod urls: - https://192.168.128.101:8088 login: "admin" password: "<your-password>" protocol: FC maxClientThreads: 30 EOFd8 k apply -f -<<EOF apiVersion: storage.deckhouse.io/v1alpha1 kind: HuaweiStorageClass metadata: name: huawei-fc-sc spec: fsType: ext4 pool: prod reclaimPolicy: Delete storageConnectionName: huawei-fc EOF
Keep the following in mind:
- The
storageType,protocolandmaxClientThreadsfields are immutable. To switch an existing connection fromISCSItoFC, recreate theHuaweiStorageConnectionresource and theHuaweiStorageClassresources referencing it. - The protocol has to be supported by the storage type, see Supported protocols. The NAS storage types are described in Connecting over NFS. NVMe over Fibre Channel (
FC-NVME) is not supported. - Zoning on the fabric and a host (or host group) holding the WWPNs of the node HBAs must be configured on the storage system beforehand. The driver looks the hosts up by their WWPNs, but it does not create zones.
- The nodes need
multipathandmultipathd. TheNodeGroupConfigurationresources of the module, the same ones that are used for iSCSI, bring them from the module’s own package to every node withoutmultipath-tools(device-mapper-multipath) of its own. - The
topology.kubernetes.io/protocol.fclabel is set by the module controller on the nodes matching the module node selector, so no manual labeling is required.
Connecting over NFS
NFS support has not been verified on hardware by the module team: the module follows what the Huawei CSI driver expects, and the change is covered by unit tests only. Check it on your storage system before using it in production.
A NAS storage system exports every volume as an NFS share that the node mounts as a filesystem, so one volume can be used by pods on several nodes at once (ReadWriteMany). NFS is supported by these storage types:
storageType |
A volume is | protocol |
|---|---|---|
OceanStorNAS |
a file system | NFS |
OceanStorDtree |
a dtree (a directory with its own quota) in the file system named in dtreeParentName |
NFS |
FusionStorageNAS |
a file system | NFS, DPC |
-
Here is an example command to create such resources:
d8 k apply -f -<<EOF apiVersion: storage.deckhouse.io/v1alpha1 kind: HuaweiStorageConnection metadata: name: huawei-nfs spec: storageType: OceanStorNAS pools: - prod urls: - https://192.168.128.101:8088 login: "admin" password: "<your-password>" protocol: NFS portals: - 10.240.0.150 maxClientThreads: 30 EOFd8 k apply -f -<<EOF apiVersion: storage.deckhouse.io/v1alpha1 kind: HuaweiStorageClass metadata: name: huawei-nfs-sc spec: fsType: ext4 pool: prod reclaimPolicy: Delete storageConnectionName: huawei-nfs nfs: authClients: - 10.240.0.0/24 EOF
Keep the following in mind:
portalsholds exactly one address: the logical port of the storage system that serves NFS. Every node mounts the shares from this address, so it has to be reachable from every node.nfs.authClientsis required in aHuaweiStorageClassof an NFS connection and not allowed in the other ones. The storage system grants these hosts read-write access to the share of every volume it creates for the class. Thenfssettings are immutable and cannot be removed, and the volumes created before keep their own list, so to change it, create anotherHuaweiStorageClass.- By default the Huawei CSI driver opens every share with
no_root_squash: root on any host listed inauthClientsis root on all the shares of the class. List only the networks of the cluster nodes inauthClients, not*: with*, root on any host that reaches the logical port gets full access to the data of every volume of the class.nfs.rootSquash: truemaps root of the clients to an anonymous user (root_squash), but then kubelet cannot change the ownership of a volume for thefsGroupof a pod, so pods withfsGroupcannot use the volumes of such a class. Pods may also be unable to write to the share at all: if the storage system creates the root directory of a share asroot:rootwith mode755, only root may write to it, and root of the client is squashed. The permissions of the share root then have to allow the UID of the pod. The Huawei CSI driver has thefsPermissionStorageClass parameter for that, but the module does not pass it, so set the permissions on the storage system. This has not been verified on hardware by the module team. fsTypestays required in aHuaweiStorageClass, but an NFS volume does not use it.- NFS volumes support the
Filesystemvolume mode only, notBlock. - For
OceanStorDtree,dtreeParentNamenames an existing file system of the storage system, and the driver creates a dtree in it for every volume. The field is required for this storage type, not allowed for the other ones, immutable and cannot be removed. The Huawei CSI driver does not support snapshots and clones of dtree volumes. - The NFS mount helper (
mount.nfs) ships in the module image, and the mount is done by the NFS client of the node kernel. An NFSv4 mount needs nothing else on the node, so enable NFSv4 on the storage system. An NFSv3 mount needsrpcbindandrpc.statdrunning on the node (from therpcbindandnfs-commonornfs-utilspackages of the node OS), which the module does not install, andHuaweiStorageClasshas no mount options to setnfsversornolock: with a storage system that offers only NFSv3, the volumes do not mount on nodes without these services. - The
topology.kubernetes.io/protocol.nfsandtopology.kubernetes.io/protocol.dpclabels are set by the module controller on the nodes matching the module node selector, so no manual labeling is required. The driver registers the labels of a node only when itscsi-nodepod starts, so whenever the set of module nodes or their protocol labels changes, thecsi-nodeDaemonSet rolls out, one node at a time: this includes a node joining or leaving the module, and the upgrade that brings these labels. DPCneeds the Huawei DPC client on every node; the module does not install it.- The
nfs+protocol of the Huawei CSI driver and thefusionstorage-dtreestorage type are not supported.
Checking module health
You can verify the functionality of the module using the corresponding FAQ section.