This is the multi-page printable view of this section. Click here to print.
Basic Services
- 1: Storage Backend Management
- 1.1: Configuring the Storage Backend
- 1.1.1: Flash Storage (OceanStor Dorado/OceanStor V5/OceanStor V6 and Later)
- 1.1.1.1: File System
- 1.1.1.2: Dtree
- 1.1.1.3: Block Service
- 1.1.1.3.1: iSCSI
- 1.1.1.3.2: FC
- 1.1.1.3.3: NVMe over RoCE
- 1.1.1.3.4: FC-NVMe
- 1.1.2: Flash Storage (OceanStor A600/A800)
- 1.1.2.1: Local File System
- 1.1.3: Mass Storage (OceanStor Pacific Series)
- 1.1.3.1: Namespace
- 1.1.3.2: Dtree
- 1.1.3.3: Block Service
- 1.1.4: Mass Storage (OceanDisk Series)
- 1.1.4.1: File System
- 1.1.4.1.1: NFS
- 1.1.4.2: Block Service
- 1.1.4.2.1: iSCSI
- 1.1.4.2.2: FC
- 1.1.4.2.3: NVMe over RoCE
- 1.2: Managing Storage Backends
- 1.2.1: Querying a Storage Backend
- 1.2.2: Updating a Storage Backend
- 1.2.2.1: Updating the Password of a Storage Backend Using oceanctl
- 1.2.2.2: Updating the Login Authentication Mode of a Storage Backend
- 1.2.2.3: Updating a Storage Backend
- 1.2.3: Deleting a Storage Backend
- 1.2.4: Adding a Storage Backend Certificate
- 1.2.5: Deleting a Storage Backend Certificate
- 2: StorageClass Management
- 2.1: Configuring a StorageClass
- 2.1.1: Flash Storage (OceanStor Dorado/OceanStor V5/OceanStor V6 and Later)
- 2.1.1.1: File System
- 2.1.1.2: Dtree
- 2.1.1.3: Block Service
- 2.1.2: Flash Storage (OceanStor A600/A800)
- 2.1.2.1: File System
- 2.1.3: Mass Storage (FusionStorage Block/OceanStor Pacific Series)
- 2.1.3.1: File System
- 2.1.3.2: Dtree
- 2.1.3.3: Block Services
- 2.1.4: Mass Storage (OceanDisk Series)
- 2.1.4.1: File System
- 2.1.4.2: Block Services
- 2.2: Managing a StorageClass
- 2.2.1: Querying a StorageClass
- 2.2.2: Modifying a StorageClass
- 2.2.3: Deleting a StorageClass
- 3: Persistent Volume Management
- 3.1: Configuring PVs
- 3.1.1: Configuring Dynamic PVs
- 3.1.2: Configuring a Static PV
- 3.1.3: Managing PVs
- 3.2: Managing PVs
- 3.2.1: Expanding the Capacity of a PV
- 3.2.2: Cloning a PV
- 3.2.3: Changing a PV
- 3.2.3.1: Enabling the PVC Change Feature
- 3.2.3.1.1: Enabling the PVC Change Feature Using Helm
- 3.2.3.1.2: Enabling the PVC Change Feature Manually
- 3.2.3.2: Configuring PVC Changes
- 3.2.3.2.1: Creating a PVC Change
- 3.2.3.2.2: Querying a PVC Change
- 3.2.3.2.3: Deleting a PVC Change
1 - Storage Backend Management
Backend is an abstract concept of Huawei storage resources. Each Huawei storage device can abstract multiple backend resources using features such as tenants, storage pools, and protocols. Each backend exists independently and defines Huawei storage information required for providing persistent volumes for Kubernetes clusters.
This section describes how to use the oceanctl tool to configure and manage storage backends.
Description of the oceanctl Tool
- You have obtained the oceanctl tool, copied the oceanctl tool to the environment directory, for example, /usr/local/bin, and obtained the execute permission. The oceanctl tool is stored in /bin/oceanctl of the software package.
- The oceanctl tool depends on kubectl (for the Kubernetes platform) or oc (for the OpenShift platform) commands. Therefore, you need to run the tool on a node where kubectl or oc commands can be executed.
- By default, the user who runs oceanctl commands must have the read and write permissions on the /var/log directory. If you do not have the permissions on the directory, run the –log-dir=/path/to/custom command to specify a directory on which you have the permissions as the log file directory.
- huawei-csi is the default namespace used by oceanctl to create a backend.
- For details about oceanctl commands, see Description of oceanctl Commands .
1.1 - Configuring the Storage Backend
- When oceanctl is used to create a storage backend, the entered account and key information is stored in the Secret object. It is recommended that the customer container platform encrypt the Secret object based on the suggestions of the supplier or K8s community. For details about how to encrypt the Secret object in the K8s community, see Encrypting Confidential Data at Rest .
- When a backend is created using a .json file, the backend name of an earlier version may contain uppercase letters or underscores (_). In this case, the old name is remapped to a new name. The mapping process automatically occurs and does not affect the original functions. For example, ABC_123 is mapped to abc-123-fd68e. The mapping rules are as follows:
- Uppercase letters are converted to lowercase letters.
- An underscore (_) is converted to a hyphen (-).
- A 5-digit hash code is added to the end.
- If a storage backend is connected to a vStore, the vStore name cannot be changed after the storage backend is created.
1.1.1 - Flash Storage (OceanStor Dorado/OceanStor V5/OceanStor V6 and Later)
1.1.1.1 - File System
1.1.1.1.1 - NFS
This section describes how to create a storage backend of the NFS protocol type.
Configuration Item Description
Table 1 backend parameters
Storage backend name. The value can contain a maximum of 63 characters, including lowercase letters, digits, and hyphens (-). It must start with a letter or digit. | ||||
The storage backend must be in the same namespace as Huawei CSI. | ||||
vStore name on the storage side. This parameter needs to be specified when the connected backend is OceanStor V5 and resources need to be provisioned under a specified vStore. | This parameter needs to be specified only when the backend is OceanStor V5 and vStores need to be supported. | |||
Management URLs of storage device. The value format is a list. The value can be a domain name or an IP address + port number. | ||||
Storage pools of storage devices. The value format is a list. | ||||
| ||||
Service access port. Nodes will use this port to read and write storage resources. The value format is a list. | ||||
This parameter is mandatory when a PV to be created on the storage side needs to support the NAS HyperMetro feature. In this case, you need to enter the ID of the HyperMetro vStore pair to which the PV to be created belongs. | You can query the HyperMetro vStore pair ID on DeviceManager. | |||
Backend name of the HyperMetro peer. The value is a character string. This parameter is mandatory when a PV to be created on the storage side needs to support the NAS HyperMetro feature. In this case, you need to enter the name of the other backend to form a HyperMetro pair with the current backend. | The names of the two backends in the pair must be entered. After the two backends form a HyperMetro relationship, they cannot form a HyperMetro relationship with other backends. | |||
Storage topology awareness configuration. The parameter format is JSON of the list type. | This parameter is mandatory if storage topology awareness is enabled. For details, see Configuring Storage Topology Awareness. | |||
Maximum number of concurrent connections to a storage backend. | The value ranges from 1 to 30. If this parameter is not set or the value is not in the specified range, the default value 30 is used. | |||
Authentication mode for logging in to a storage backend. The following modes are supported: | When Huawei enterprise storage is OceanStor V5, the ID of the LDAP domain authentication server must be 0. |
Creating Storage Backends of the Local Type
Prepare a backend configuration file, for example, backend.yaml.
storage: "oceanstor-nas" name: "backend-demo" namespace: "huawei-csi" urls: - "https://192.168.129.157:8088" pools: - "StoragePool001" parameters: protocol: "nfs" portals: - "10.10.30.20" maxClientThreads: "30"Run the following command to create a storage backend.
oceanctl create backend -f /path/to/backend.yaml -i yamlThe following is an example of the command output.
NUMBER CONFIGURED NAME STORAGE URLS 1 false backend-demo oceanstor-nas https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Enter the serial number of the backend to be created and enter the account and password.
Please enter the backend number to configure (Enter 'exit' to exit):1 Please enter this backend user name: admin Please enter this backend password: Backend backend-demo is configured NUMBER CONFIGURED NAME STORAGE URLS 1 true backend-demo oceanstor-nas https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Check the storage backend creation result.
oceanctl get backendThe following is an example of the command output. If the backend status is Bound, the creation is successful.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-demo nfs oceanstor-nas xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.157:8088
Creating Storage Backends of the HyperMetro Type
- Before configuring NAS HyperMetro, you need to configure the HyperMetro relationship between two storage devices, including the remote device and HyperMetro domain. The HyperMetro domain of the file system can only work in HyperMetro active-active (AA) mode. For details about the configuration operation, see the product documentation of the corresponding storage model.
- The accounts for connecting to NAS HyperMetro backends must be the administrator accounts of the storage vStores.
- Except NAS HyperMetro backends, the management URLs of other backends cannot be the URL of a logical management port of a vStore that has established the HyperMetro relationship.
- When a HyperMetro storage backend is used, do not provision common file systems. Otherwise, services may be interrupted in logical port failover scenarios.
Prepare a storage backend configuration file, for example, backend.yaml.
storage: "oceanstor-nas" name: "backend-active" namespace: "huawei-csi" urls: - "https://192.168.129.155:8088" pools: - "StoragePool001" metrovStorePairID: "2100xxxxxxxxxx0000000000600000000" metroBackend: "backend-standby" parameters: protocol: "nfs" portals: - "192.168.129.156" maxClientThreads: "30" --- storage: "oceanstor-nas" name: "backend-standby" namespace: "huawei-csi" urls: - "https://192.168.129.157:8088" pools: - "StoragePool001" metrovStorePairID: "2100xxxxxxxxxx0000000000600000000" metroBackend: "backend-active" parameters: protocol: "nfs" portals: - "192.168.129.158" maxClientThreads: "30"Run the following command to create a storage backend.
oceanctl create backend -f /path/to/backend.yaml -i yamlThe following is an example of the command output.
NUMBER CONFIGURED NAME STORAGE URLS 1 false backend-active oceanstor-nas https://192.168.129.155:8088 2 false backend-standby oceanstor-nas https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Enter the serial number of the backend to be created and enter the account and password.
Please enter the backend number to configure (Enter 'exit' to exit):1 Please enter this backend user name: user1 Please enter this backend password: Backend backend-standby is configured NUMBER CONFIGURED NAME STORAGE URLS 1 true backend-active oceanstor-nas https://192.168.129.155:8088 2 true backend-standby oceanstor-nas https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Check the storage backend creation result.
oceanctl get backendThe following is an example of the command output. If the backend status is Bound, the creation is successful.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-active nfs oceanstor-nas xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.155:8088 huawei-csi backend-standby nfs oceanstor-nas xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.157:8088
1.1.1.1.2 - NFS+
This section describes how to create a storage backend of the NFS+ protocol type.
Configuration Item Description
Table 1 backend parameters
Storage backend name. The value can contain a maximum of 63 characters, including lowercase letters, digits, and hyphens (-). It must start with a letter or digit. | ||||
The storage backend must be in the same namespace as Huawei CSI. | ||||
Management URLs of storage device. The value format is a list. The value can be a domain name or an IP address + port number. | ||||
Storage pools of storage devices. The value format is a list. | ||||
Service access port. Nodes will use this port to read and write storage resources. The value format is a list. | ||||
This parameter is mandatory when a PV to be created on the storage side needs to support the NAS HyperMetro feature. In this case, you need to enter the ID of the HyperMetro vStore pair to which the PV to be created belongs. | You can query the HyperMetro vStore pair ID on DeviceManager. | |||
Backend name of the HyperMetro peer. The value is a character string. This parameter is mandatory when a PV to be created on the storage side needs to support the NAS HyperMetro feature. In this case, you need to enter the name of the other backend to form a HyperMetro pair with the current backend. | The names of the two backends in the pair must be entered. After the two backends form a HyperMetro relationship, they cannot form a HyperMetro relationship with other backends. | |||
Storage topology awareness configuration. The parameter format is JSON of the list type. | This parameter is mandatory if storage topology awareness is enabled. For details, see Configuring Storage Topology Awareness. | |||
Maximum number of concurrent connections to a storage backend. | The value ranges from 1 to 30. If this parameter is not set or the value is not in the specified range, the default value 30 is used. | |||
Authentication mode for logging in to a storage backend. The following modes are supported: |
Creating Storage Backends of the Local Type
Prepare a backend configuration file, for example, backend.yaml.
storage: "oceanstor-nas" name: "backend-demo" namespace: "huawei-csi" urls: - "https://192.168.129.157:8088" pools: - "StoragePool001" parameters: protocol: "nfs+" portals: - "10.10.30.20" - "10.10.30.30" maxClientThreads: "30"Run the following command to create a storage backend.
oceanctl create backend -f /path/to/backend.yaml -i yamlThe following is an example of the command output.
NUMBER CONFIGURED NAME STORAGE URLS 1 false backend-demo oceanstor-nas https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Enter the serial number of the backend to be created and enter the account and password.
Please enter the backend number to configure (Enter 'exit' to exit):1 Please enter this backend user name: admin Please enter this backend password: Backend backend-demo is configured NUMBER CONFIGURED NAME STORAGE URLS 1 true backend-demo oceanstor-nas https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Check the storage backend creation result.
oceanctl get backendThe following is an example of the command output. If the backend status is Bound, the creation is successful.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-demo nfs+ oceanstor-nas xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.157:8088
Creating Storage Backends of the HyperMetro Type
- Before configuring NAS HyperMetro, you need to configure the HyperMetro relationship between two storage devices, including the remote device and HyperMetro domain. The HyperMetro domain of the file system can only work in HyperMetro active-active (AA) mode. For details about the configuration operation, see the product documentation of the corresponding storage model.
- The accounts for connecting to NAS HyperMetro backends must be the administrator accounts of the storage vStores.
- Except NAS HyperMetro backends, the management URLs of other backends cannot be the URL of a logical management port of a vStore that has established the HyperMetro relationship.
- When a HyperMetro storage backend is used, do not provision common file systems. Otherwise, services may be interrupted in logical port failover scenarios.
Procedure
Prepare a storage backend configuration file, for example, backend.yaml.
storage: "oceanstor-nas" name: "backend-active" namespace: "huawei-csi" urls: - "https://192.168.129.155:8088" pools: - "StoragePool001" metrovStorePairID: "2100xxxxxxxxxx0000000000600000000" metroBackend: "backend-standby" parameters: protocol: "nfs+" portals: - "192.168.129.156" - "192.168.129.157" maxClientThreads: "30" --- storage: "oceanstor-nas" name: "backend-standby" namespace: "huawei-csi" urls: - "https://192.168.129.158:8088" pools: - "StoragePool001" metrovStorePairID: "2100xxxxxxxxxx0000000000600000000" metroBackend: "backend-active" parameters: protocol: "nfs+" portals: - "192.168.129.159" - "192.168.129.160" maxClientThreads: "30"Run the following command to create a storage backend.
oceanctl create backend -f /path/to/backend.yaml -i yamlThe following is an example of the command output.
NUMBER CONFIGURED NAME STORAGE URLS 1 false backend-active oceanstor-nas https://192.168.129.155:8088 2 false backend-standby oceanstor-nas https://192.168.129.158:8088 Please enter the backend number to configure (Enter 'exit' to exit):Enter the serial number of the backend to be created and enter the account and password.
Please enter the backend number to configure (Enter 'exit' to exit):1 Please enter this backend user name: user1 Please enter this backend password: Backend backend-standby is configured NUMBER CONFIGURED NAME STORAGE URLS 1 true backend-active oceanstor-nas https://192.168.129.155:8088 2 true backend-standby oceanstor-nas https://192.168.129.158:8088 Please enter the backend number to configure (Enter 'exit' to exit):Check the storage backend creation result.
oceanctl get backendThe following is an example of the command output. If the backend status is Bound, the creation is successful.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-active nfs+ oceanstor-nas xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.155:8088 huawei-csi backend-standby nfs+ oceanstor-nas xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.158:8088
1.1.1.2 - Dtree
1.1.1.2.1 - NFS
This section describes how to create a storage backend of the NFS protocol type.
Configuration Item Description
Table 1 backend parameters
Storage backend name. The value can contain a maximum of 63 characters, including lowercase letters, digits, and hyphens (-). It must start with a letter or digit. | ||||
The storage backend must be in the same namespace as Huawei CSI. | ||||
Management URLs of storage device. The value format is a list. The value can be a domain name or an IP address + port number. | ||||
Service access port. Nodes will use this port to read and write storage resources. The value format is a list. | ||||
Name of a file system on the current storage device. A dtree is created in the file system. | ||||
Storage topology awareness configuration. The parameter format is JSON of the list type. | This parameter is mandatory if storage topology awareness is enabled. For details, see Configuring Storage Topology Awareness. | |||
Maximum number of concurrent connections to a storage backend. | The value ranges from 1 to 30. If this parameter is not set or the value is not in the specified range, the default value 30 is used. | |||
Authentication mode for logging in to a storage backend. The following modes are supported: |
Creating a Storage Backend
Prepare a backend configuration file, for example, backend.yaml.
storage: "oceanstor-dtree" name: "backend-demo" namespace: "huawei-csi" urls: - "https://192.168.129.157:8088" parameters: protocol: "nfs" parentname: "parent-filesystem" portals: - "10.10.30.20" maxClientThreads: "30"Run the following command to create a storage backend.
oceanctl create backend -f /path/to/backend.yaml -i yamlThe following is an example of the command output.
NUMBER CONFIGURED NAME STORAGE URLS 1 false backend-demo oceanstor-dtree https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Enter the serial number of the backend to be created and enter the account and password.
Please enter the backend number to configure (Enter 'exit' to exit):1 Please enter this backend user name: admin Please enter this backend password: Backend backend-demo is configured NUMBER CONFIGURED NAME STORAGE URLS 1 true backend-demo oceanstor-dtree https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Check the storage backend creation result.
oceanctl get backendThe following is an example of the command output. If the backend status is Bound, the creation is successful.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-demo nfs oceanstor-dtree xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.157:8088
1.1.1.2.2 - NFS+
This section describes how to create a storage backend of the NFS+ protocol type.
Configuration Item Description
Table 1 backend parameters
Storage backend name. The value can contain a maximum of 63 characters, including lowercase letters, digits, and hyphens (-). It must start with a letter or digit. | ||||
The storage backend must be in the same namespace as Huawei CSI. | ||||
Management URLs of storage device. The value format is a list. The value can be a domain name or an IP address + port number. | ||||
Service access port. Nodes will use this port to read and write storage resources. The value format is a list. | ||||
Name of a file system on the current storage device. A dtree is created in the file system. | ||||
Storage topology awareness configuration. The parameter format is JSON of the list type. | This parameter is mandatory if storage topology awareness is enabled. For details, see Configuring Storage Topology Awareness. | |||
Maximum number of concurrent connections to a storage backend. | The value ranges from 1 to 30. If this parameter is not set or the value is not in the specified range, the default value 30 is used. | |||
Authentication mode for logging in to a storage backend. The following modes are supported: |
Creating a Storage Backend
Prepare a backend configuration file, for example, backend.yaml.
storage: "oceanstor-dtree" name: "backend-demo" namespace: "huawei-csi" urls: - "https://192.168.129.157:8088" parameters: protocol: "nfs+" parentname: "parent-filesystem" portals: - "10.10.30.20" - "10.10.30.30" maxClientThreads: "30"Run the following command to create a storage backend.
oceanctl create backend -f /path/to/backend.yaml -i yamlThe following is an example of the command output.
NUMBER CONFIGURED NAME STORAGE URLS 1 false backend-demo oceanstor-dtree https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Enter the serial number of the backend to be created and enter the account and password.
Please enter the backend number to configure (Enter 'exit' to exit):1 Please enter this backend user name: admin Please enter this backend password: Backend backend-demo is configured NUMBER CONFIGURED NAME STORAGE URLS 1 true backend-demo oceanstor-dtree https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Check the storage backend creation result.
oceanctl get backendThe following is an example of the command output. If the backend status is Bound, the creation is successful.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-demo nfs+ oceanstor-dtree xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.157:8088
1.1.1.3 - Block Service
1.1.1.3.1 - iSCSI
This section describes how to create a storage backend of the iSCSI protocol type.
Configuration Item Description
Table 1 backend parameters
Storage backend name. The value can contain a maximum of 63 characters, including lowercase letters, digits, and hyphens (-). It must start with a letter or digit. | ||||
The storage backend must be in the same namespace as Huawei CSI. | ||||
Management URLs of storage device. The value format is a list. The value can be a domain name or an IP address + port number. | ||||
Storage pools of storage devices. The value format is a list. | ||||
Service access port. Nodes will use this port to read and write storage resources. The value format is a list. |
| |||
Storage topology awareness configuration. The parameter format is JSON of the list type. | This parameter is mandatory if storage topology awareness is enabled. For details, see Configuring Storage Topology Awareness. | |||
Maximum number of concurrent connections to a storage backend. | The value ranges from 1 to 30. If this parameter is not set or the value is not in the specified range, the default value 30 is used. | |||
Authentication mode for logging in to a storage backend. The following modes are supported: | When Huawei enterprise storage is OceanStor V5, the ID of the LDAP domain authentication server must be 0. |
Creating a Storage Backend
Prepare a backend configuration file, for example, backend.yaml.
storage: "oceanstor-san" name: "backend-demo" namespace: "huawei-csi" urls: - "https://192.168.129.157:8088" pools: - "StoragePool001" parameters: protocol: "iscsi" portals: - "10.10.30.20" - "10.10.30.21" maxClientThreads: "30"Run the following command to create a storage backend.
oceanctl create backend -f /path/to/backend.yaml -i yamlThe following is an example of the command output.
NUMBER CONFIGURED NAME STORAGE URLS 1 false backend-demo oceanstor-san https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Enter the serial number of the backend to be created and enter the account and password.
Please enter the backend number to configure (Enter 'exit' to exit):1 Please enter this backend user name: admin Please enter this backend password: Backend backend-demo is configured NUMBER CONFIGURED NAME STORAGE URLS 1 true backend-demo oceanstor-san https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Check the storage backend creation result.
oceanctl get backendThe following is an example of the command output. If the backend status is Bound, the creation is successful.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-demo iscsi oceanstor-san xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.157:8088
1.1.1.3.2 - FC
This section describes how to create a storage backend of the FC protocol type.
Configuration Item Description
Table 1 backend parameters
Storage backend name. The value can contain a maximum of 63 characters, including lowercase letters, digits, and hyphens (-). It must start with a letter or digit. | ||||
The storage backend must be in the same namespace as Huawei CSI. | ||||
Management URLs of storage device. The value format is a list. The value can be a domain name or an IP address + port number. | ||||
Storage pools of storage devices. The value format is a list. | ||||
Storage topology awareness configuration. The parameter format is JSON of the list type. | This parameter is mandatory if storage topology awareness is enabled. For details, see Configuring Storage Topology Awareness. | |||
Maximum number of concurrent connections to a storage backend. | The value ranges from 1 to 30. If this parameter is not set or the value is not in the specified range, the default value 30 is used. | |||
Authentication mode for logging in to a storage backend. The following modes are supported: | When Huawei enterprise storage is OceanStor V5, the ID of the LDAP domain authentication server must be 0. |
Creating a Storage Backend
Prepare a backend configuration file, for example, backend.yaml.
storage: "oceanstor-san" name: "backend-demo" namespace: "huawei-csi" urls: - "https://192.168.129.157:8088" pools: - "StoragePool001" parameters: protocol: "fc" maxClientThreads: "30"Run the following command to create a storage backend.
oceanctl create backend -f /path/to/backend.yaml -i yamlThe following is an example of the command output.
NUMBER CONFIGURED NAME STORAGE URLS 1 false backend-demo oceanstor-san https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Enter the serial number of the backend to be created and enter the account and password.
Please enter the backend number to configure (Enter 'exit' to exit):1 Please enter this backend user name: admin Please enter this backend password: Backend backend-demo is configured NUMBER CONFIGURED NAME STORAGE URLS 1 true backend-demo oceanstor-san https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Check the storage backend creation result.
oceanctl get backendThe following is an example of the command output. If the backend status is Bound, the creation is successful.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-demo fc oceanstor-san xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.157:8088
1.1.1.3.3 - NVMe over RoCE
This section describes how to create a storage backend of the NVMe over RoCE protocol type.
Configuration Item Description
Table 1 backend parameters
Storage backend name. The value can contain a maximum of 63 characters, including lowercase letters, digits, and hyphens (-). It must start with a letter or digit. | ||||
The storage backend must be in the same namespace as Huawei CSI. | ||||
Management URLs of storage device. The value format is a list. The value can be a domain name or an IP address + port number. | ||||
Storage pools of storage devices. The value format is a list. | ||||
Service access port. Nodes will use this port to read and write storage resources. The value format is a list. |
| |||
Storage topology awareness configuration. The parameter format is JSON of the list type. | This parameter is mandatory if storage topology awareness is enabled. For details, see Configuring Storage Topology Awareness. | |||
Maximum number of concurrent connections to a storage backend. | The value ranges from 1 to 30. If this parameter is not set or the value is not in the specified range, the default value 30 is used. | |||
Authentication mode for logging in to a storage backend. The following modes are supported: | When Huawei enterprise storage is OceanStor V5, the ID of the LDAP domain authentication server must be 0. |
Creating a Storage Backend
Prepare a backend configuration file, for example, backend.yaml.
storage: "oceanstor-san" name: "backend-demo" namespace: "huawei-csi" urls: - "https://192.168.129.157:8088" pools: - "StoragePool001" parameters: protocol: "roce" portals: - "10.10.30.20" - "10.10.30.21" maxClientThreads: "30"Run the following command to create a storage backend.
oceanctl create backend -f /path/to/backend.yaml -i yamlThe following is an example of the command output.
NUMBER CONFIGURED NAME STORAGE URLS 1 false backend-demo oceanstor-san https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Enter the serial number of the backend to be created and enter the account and password.
Please enter the backend number to configure (Enter 'exit' to exit):1 Please enter this backend user name: admin Please enter this backend password: Backend backend-demo is configured NUMBER CONFIGURED NAME STORAGE URLS 1 true backend-demo oceanstor-san https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Check the storage backend creation result.
oceanctl get backendThe following is an example of the command output. If the backend status is Bound, the creation is successful.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-demo roce oceanstor-san xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.157:8088
1.1.1.3.4 - FC-NVMe
This section describes how to create a storage backend of the FC-NVMe protocol type.
Configuration Item Description
Table 1 backend parameters
Storage backend name. The value can contain a maximum of 63 characters, including lowercase letters, digits, and hyphens (-). It must start with a letter or digit. | ||||
The storage backend must be in the same namespace as Huawei CSI. | ||||
Management URLs of storage device. The value format is a list. The value can be a domain name or an IP address + port number. | ||||
Storage pools of storage devices. The value format is a list. | ||||
Storage topology awareness configuration. The parameter format is JSON of the list type. | This parameter is mandatory if storage topology awareness is enabled. For details, see Configuring Storage Topology Awareness. | |||
Maximum number of concurrent connections to a storage backend. | The value ranges from 1 to 30. If this parameter is not set or the value is not in the specified range, the default value 30 is used. | |||
Authentication mode for logging in to a storage backend. The following modes are supported: | When Huawei enterprise storage is OceanStor V5, the ID of the LDAP domain authentication server must be 0. |
Creating a Storage Backend
Prepare a backend configuration file, for example, backend.yaml.
storage: "oceanstor-san" name: "backend-demo" namespace: "huawei-csi" urls: - "https://192.168.129.157:8088" pools: - "StoragePool001" parameters: protocol: "fc-nvme" maxClientThreads: "30"Run the following command to create a storage backend.
oceanctl create backend -f /path/to/backend.yaml -i yamlThe following is an example of the command output.
NUMBER CONFIGURED NAME STORAGE URLS 1 false backend-demo oceanstor-san https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Enter the serial number of the backend to be created and enter the account and password.
Please enter the backend number to configure (Enter 'exit' to exit):1 Please enter this backend user name: admin Please enter this backend password: Backend backend-demo is configured NUMBER CONFIGURED NAME STORAGE URLS 1 true backend-demo oceanstor-san https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Check the storage backend creation result.
oceanctl get backendThe following is an example of the command output. If the backend status is Bound, the creation is successful.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-demo fc-nvme oceanstor-san xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.157:8088
1.1.2 - Flash Storage (OceanStor A600/A800)
1.1.2.1 - Local File System
1.1.2.1.1 - NFS
This section describes how to create a storage backend of the NFS protocol type.
Configuration Item Description
Table 1 backend parameters
Storage backend name. The value can contain a maximum of 63 characters, including lowercase letters, digits, and hyphens (-). It must start with a letter or digit. | ||||
The storage backend must be in the same namespace as Huawei CSI. | ||||
Management URLs of storage device. The value format is a list. | The value can be a domain name or an IP address + port number. | |||
Storage pools of storage devices. The value format is a list. | ||||
Service access port. Nodes will use this port to read and write storage resources. The value format is a list. | ||||
Storage topology awareness configuration. The parameter format is JSON of the list type. | This parameter is mandatory if storage topology awareness is enabled. For details, see Configuring Storage Topology Awareness. | |||
Maximum number of concurrent connections to a storage backend. | The value ranges from 1 to 30. If this parameter is not set or the value is not in the specified range, the default value 30 is used. | |||
Authentication mode for logging in to a storage backend. The following modes are supported: |
Creating a Storage Backend
Prepare a backend configuration file, for example, backend.yaml.
storage: "oceanstor-a-series-nas" name: "backend-demo" namespace: "huawei-csi" urls: - "https://192.168.129.157:8088" pools: - "StoragePool001" parameters: protocol: "nfs" portals: - "10.10.30.20" maxClientThreads: "30"Run the following command to create a storage backend.
oceanctl create backend -f /path/to/backend.yaml -i yamlThe following is an example of the command output.
NUMBER CONFIGURED NAME STORAGE URLS 1 false backend-demo oceanstor-a-series-nas https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Enter the serial number of the backend to be created and enter the account and password.
Please enter the backend number to configure (Enter 'exit' to exit):1 Please enter this backend user name: admin Please enter this backend password: Backend backend-demo is configured NUMBER CONFIGURED NAME STORAGE URLS 1 true backend-demo oceanstor-a-series-nas https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Check the storage backend creation result.
oceanctl get backendThe following is an example of the command output. If the backend status is Bound, the creation is successful.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-demo nfs oceanstor-a-series-nas xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.157:8088
1.1.2.1.2 - DataTurbo
This section describes how to create a storage backend of the DataTurbo protocol type.
Configuration Item Description
Table 1 backend parameters
Storage backend name. The value can contain a maximum of 63 characters, including lowercase letters, digits, and hyphens (-). It must start with a letter or digit. | ||||
The storage backend must be in the same namespace as Huawei CSI. | ||||
Management URLs of storage device. The value format is a list. | The value can be a domain name or an IP address + port number. | |||
Storage pools of storage devices. The value format is a list. | ||||
Storage topology awareness configuration. The parameter format is JSON of the list type. | This parameter is mandatory if storage topology awareness is enabled. For details, see Configuring Storage Topology Awareness. | |||
Maximum number of concurrent connections to a storage backend. | The value ranges from 1 to 30. If this parameter is not set or the value is not in the specified range, the default value 30 is used. | |||
Authentication mode for logging in to a storage backend. The following modes are supported: |
Creating a Storage Backend
Prepare a backend configuration file, for example, backend.yaml.
storage: "oceanstor-a-series-nas" name: "backend-demo" namespace: "huawei-csi" urls: - "https://192.168.129.157:8088" pools: - "StoragePool001" parameters: protocol: "dtfs" maxClientThreads: "30"Run the following command to create a storage backend.
oceanctl create backend -f /path/to/backend.yaml -i yamlThe following is an example of the command output.
NUMBER CONFIGURED NAME STORAGE URLS 1 false backend-demo oceanstor-a-series-nas https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Enter the serial number of the backend to be created and enter the account and password.
Please enter the backend number to configure (Enter 'exit' to exit):1 Please enter this backend user name: admin Please enter this backend password: Backend backend-demo is configured NUMBER CONFIGURED NAME STORAGE URLS 1 true backend-demo oceanstor-a-series-nas https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Check the storage backend creation result.
oceanctl get backendThe following is an example of the command output. If the backend status is Bound, the creation is successful.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-demo dtfs oceanstor-a-series-nas xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.157:8088
1.1.3 - Mass Storage (OceanStor Pacific Series)
1.1.3.1 - Namespace
1.1.3.1.1 - NFS
This section describes how to create a storage backend of the NFS protocol type.
Configuration Item Description
Table 1 backend parameters
Storage backend name. The value can contain a maximum of 63 characters, including lowercase letters, digits, and hyphens (-). It must start with a letter or digit. | ||||
The storage backend must be in the same namespace as Huawei CSI. | ||||
This parameter is mandatory when NAS resources need to be provisioned under a specified account. | ||||
Management URLs of storage device. The value format is a list. | The value can be a domain name or an IP address + port number. | |||
Storage pools of storage devices. The value format is a list. | ||||
Service access port. Nodes will use this port to read and write storage resources. The value format is a list. | ||||
Storage topology awareness configuration. The parameter format is JSON of the list type. | This parameter is mandatory if storage topology awareness is enabled. For details, see Configuring Storage Topology Awareness. | |||
Maximum number of concurrent connections to a storage backend. | The value ranges from 1 to 30. If this parameter is not set or the value is not in the specified range, the default value 30 is used. |
Creating a Storage Backend
Prepare a backend configuration file, for example, backend.yaml.
storage: "fusionstorage-nas" name: "backend-demo" namespace: "huawei-csi" urls: - "https://192.168.129.157:8088" pools: - "StoragePool001" parameters: protocol: "nfs" portals: - "10.10.30.20" maxClientThreads: "30"Run the following command to create a storage backend.
oceanctl create backend -f /path/to/backend.yaml -i yamlThe following is an example of the command output.
NUMBER CONFIGURED NAME STORAGE URLS 1 false backend-demo fusionstorage-nas https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Enter the serial number of the backend to be created and enter the account and password.
Please enter the backend number to configure (Enter 'exit' to exit):1 Please enter this backend user name: admin Please enter this backend password: Backend backend-demo is configured NUMBER CONFIGURED NAME STORAGE URLS 1 true backend-demo fusionstorage-nas https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Check the storage backend creation result.
oceanctl get backendThe following is an example of the command output. If the backend status is Bound, the creation is successful.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-demo nfs fusionstorage-nas Bound true https://192.168.129.157:8088
1.1.3.1.2 - DPC
This section describes how to create a storage backend of the DPC protocol type.
Configuration Item Description
Table 1 backend parameters
Storage backend name. The value can contain a maximum of 63 characters, including lowercase letters, digits, and hyphens (-). It must start with a letter or digit. | ||||
The storage backend must be in the same namespace as Huawei CSI. | ||||
This parameter is mandatory when NAS resources need to be provisioned under a specified account. | ||||
Management URLs of storage device. The value format is a list. | The value can be a domain name or an IP address + port number. | |||
Storage pools of storage devices. The value format is a list. | ||||
Storage topology awareness configuration. The parameter format is JSON of the list type. | This parameter is mandatory if storage topology awareness is enabled. For details, see Configuring Storage Topology Awareness. | |||
Maximum number of concurrent connections to a storage backend. | The value ranges from 1 to 30. If this parameter is not set or the value is not in the specified range, the default value 30 is used. |
Creating a Storage Backend
Prepare a backend configuration file, for example, backend.yaml.
storage: "fusionstorage-nas" name: "backend-demo" namespace: "huawei-csi" urls: - "https://192.168.129.157:8088" pools: - "StoragePool001" parameters: protocol: "dpc" maxClientThreads: "30"Run the following command to create a storage backend.
oceanctl create backend -f /path/to/backend.yaml -i yamlThe following is an example of the command output.
NUMBER CONFIGURED NAME STORAGE URLS 1 false backend-demo fusionstorage-nas https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Enter the serial number of the backend to be created and enter the account and password.
Please enter the backend number to configure (Enter 'exit' to exit):1 Please enter this backend user name: admin Please enter this backend password: Backend backend-demo is configured NUMBER CONFIGURED NAME STORAGE URLS 1 true backend-demo fusionstorage-nas https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Check the storage backend creation result.
oceanctl get backendThe following is an example of the command output. If the backend status is Bound, the creation is successful.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-demo dpc fusionstorage-nas Bound true https://192.168.129.157:8088
1.1.3.2 - Dtree
1.1.3.2.1 - NFS
This section describes how to create a storage backend of the NFS protocol type.
Configuration Item Description
Table 1 backend parameters
Storage backend name. The value can contain a maximum of 63 characters, including lowercase letters, digits, and hyphens (-). It must start with a letter or digit. | ||||
The storage backend must be in the same namespace as Huawei CSI. | ||||
This parameter is mandatory when NAS resources need to be provisioned under a specified account. | ||||
Management URLs of storage device. The value format is a list. | The value can be a domain name or an IP address + port number. | |||
Service access port. Nodes will use this port to read and write storage resources. The value format is a list. | ||||
Name of a file system on the current storage device. A dtree is created in the file system. | ||||
Storage topology awareness configuration. The parameter format is JSON of the list type. | This parameter is mandatory if storage topology awareness is enabled. For details, see Configuring Storage Topology Awareness. | |||
Maximum number of concurrent connections to a storage backend. | The value ranges from 1 to 30. If this parameter is not set or the value is not in the specified range, the default value 30 is used. |
Creating a Storage Backend
Prepare a backend configuration file, for example, backend.yaml.
storage: "fusionstorage-dtree" name: "backend-demo" namespace: "huawei-csi" urls: - "https://192.168.129.157:8088" parameters: protocol: "nfs" parentname: "parent-filesystem" portals: - "10.10.30.20" maxClientThreads: "30"Run the following command to create a storage backend.
oceanctl create backend -f /path/to/backend.yaml -i yamlThe following is an example of the command output.
NUMBER CONFIGURED NAME STORAGE URLS 1 false backend-demo fusionstorage-dtree https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Enter the serial number of the backend to be created and enter the account and password.
Please enter the backend number to configure (Enter 'exit' to exit):1 Please enter this backend user name: admin Please enter this backend password: Backend backend-demo is configured NUMBER CONFIGURED NAME STORAGE URLS 1 true backend-demo fusionstorage-dtree https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Check the storage backend creation result.
oceanctl get backendThe following is an example of the command output. If the backend status is Bound, the creation is successful.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-demo nfs fusionstorage-dtree Bound true https://192.168.129.157:8088
1.1.3.2.2 - DPC
This section describes how to create a storage backend of the DPC protocol type.
Configuration Item Description
Table 1 backend parameters
Storage backend name. The value can contain a maximum of 63 characters, including lowercase letters, digits, and hyphens (-). It must start with a letter or digit. | ||||
The storage backend must be in the same namespace as Huawei CSI. | ||||
This parameter is mandatory when NAS resources need to be provisioned under a specified account. | ||||
Management URLs of storage device. The value format is a list. | The value can be a domain name or an IP address + port number. | |||
Storage protocol. The value is a character string.
| ||||
Name of a file system on the current storage device. A dtree is created in the file system. | ||||
Storage topology awareness configuration. The parameter format is JSON of the list type. | This parameter is mandatory if storage topology awareness is enabled. For details, see Configuring Storage Topology Awareness. | |||
Maximum number of concurrent connections to a storage backend. | The value ranges from 1 to 30. If this parameter is not set or the value is not in the specified range, the default value 30 is used. |
Creating a Storage Backend
Prepare a backend configuration file, for example, backend.yaml.
storage: "fusionstorage-dtree" name: "backend-demo" namespace: "huawei-csi" urls: - "https://192.168.129.157:8088" parameters: protocol: "dpc" parentname: "parent-filesystem" maxClientThreads: "30"Run the following command to create a storage backend.
oceanctl create backend -f /path/to/backend.yaml -i yamlThe following is an example of the command output.
NUMBER CONFIGURED NAME STORAGE URLS 1 false backend-demo fusionstorage-dtree https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Enter the serial number of the backend to be created and enter the account and password.
Please enter the backend number to configure (Enter 'exit' to exit):1 Please enter this backend user name: admin Please enter this backend password: Backend backend-demo is configured NUMBER CONFIGURED NAME STORAGE URLS 1 true backend-demo fusionstorage-dtree https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Check the storage backend creation result.
oceanctl get backendThe following is an example of the command output. If the backend status is Bound, the creation is successful.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-demo dpc fusionstorage-dtree Bound true https://192.168.129.157:8088
1.1.3.3 - Block Service
1.1.3.3.1 - iSCSI
This section describes how to create a storage backend of the iSCSI protocol type.
Configuration Item Description
Table 1 backend parameters
Storage backend name. The value can contain a maximum of 63 characters, including lowercase letters, digits, and hyphens (-). It must start with a letter or digit. | ||||
The storage backend must be in the same namespace as Huawei CSI. | ||||
Management URLs of storage device. The value format is a list. | The value can be a domain name or an IP address + port number. | |||
Storage pools of storage devices. The value format is a list. | ||||
Service access port. Nodes will use this port to read and write storage resources. The value format is a list. | ||||
Number of dynamic access links. This parameter is supported only in OceanStor Pacific 8.1.5 and later versions. | ||||
Storage topology awareness configuration. The parameter format is JSON of the list type. | This parameter is mandatory if storage topology awareness is enabled. For details, see Configuring Storage Topology Awareness. | |||
Maximum number of concurrent connections to a storage backend. | The value ranges from 1 to 30. If this parameter is not set or the value is not in the specified range, the default value 30 is used. |
Creating a Storage Backend
Prepare a backend configuration file, for example, backend.yaml.
storage: "fusionstorage-san" name: "backend-demo" namespace: "huawei-csi" urls: - "https://192.168.129.157:8088" pools: - "StoragePool001" parameters: protocol: "iscsi" portals: - "10.10.30.20" - "10.10.30.21" maxClientThreads: "30"Run the following command to create a storage backend.
oceanctl create backend -f /path/to/backend.yaml -i yamlThe following is an example of the command output.
NUMBER CONFIGURED NAME STORAGE URLS 1 false backend-demo fusionstorage-san https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Enter the serial number of the backend to be created and enter the account and password.
Please enter the backend number to configure (Enter 'exit' to exit):1 Please enter this backend user name: admin Please enter this backend password: Backend backend-demo is configured NUMBER CONFIGURED NAME STORAGE URLS 1 true backend-demo fusionstorage-san https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Check the storage backend creation result.
oceanctl get backendThe following is an example of the command output. If the backend status is Bound, the creation is successful.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-demo iscsi fusionstorage-san Bound true https://192.168.129.157:8088
1.1.3.3.2 - SCSI
This section describes how to create a storage backend of the SCSI protocol type.
Configuration Item Description
Table 1 backend parameters
Storage backend name. The value can contain a maximum of 63 characters, including lowercase letters, digits, and hyphens (-). It must start with a letter or digit. | ||||
The storage backend must be in the same namespace as Huawei CSI. | ||||
Management URLs of storage device. The value format is a list. | The value can be a domain name or an IP address + port number. | |||
Storage pools of storage devices. The value format is a list. | ||||
Service access port. Nodes will use this port to read and write storage resources. The value format is a list. | If the protocol is scsi, the port is in dictionary format where the key indicates the name of the host where the VBS client is deployed and the value indicates the IP address of the host where the VBS client is deployed. | |||
Storage topology awareness configuration. The parameter format is JSON of the list type. | This parameter is mandatory if storage topology awareness is enabled. For details, see Configuring Storage Topology Awareness. | |||
Maximum number of concurrent connections to a storage backend. | The value ranges from 1 to 30. If this parameter is not set or the value is not in the specified range, the default value 30 is used. |
Creating a Storage Backend
Prepare a backend configuration file, for example, backend.yaml.
storage: "fusionstorage-san" name: "backend-demo" namespace: "huawei-csi" urls: - "https://192.168.129.157:8088" pools: - "StoragePool001" parameters: protocol: "scsi" portals: - {"hostname01": "192.168.125.21","hostname02": "192.168.125.22"} maxClientThreads: "30"Run the following command to create a storage backend.
oceanctl create backend -f /path/to/backend.yaml -i yamlThe following is an example of the command output.
NUMBER CONFIGURED NAME STORAGE URLS 1 false backend-demo fusionstorage-san https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Enter the serial number of the backend to be created and enter the account and password.
Please enter the backend number to configure (Enter 'exit' to exit):1 Please enter this backend user name: admin Please enter this backend password: Backend backend-demo is configured NUMBER CONFIGURED NAME STORAGE URLS 1 true backend-demo fusionstorage-san https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Check the storage backend creation result.
oceanctl get backendThe following is an example of the command output. If the backend status is Bound, the creation is successful.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-demo scsi fusionstorage-san Bound true https://192.168.129.157:8088
1.1.4 - Mass Storage (OceanDisk Series)
1.1.4.1 - File System
1.1.4.1.1 - NFS
This section describes how to create a storage backend of the NFS protocol type.
Configuration Item Description
Table 1 backend parameters
Storage backend name. The value can contain a maximum of 63 characters, including lowercase letters, digits, and hyphens (-). It must start with a letter or digit. | ||||
The storage backend must be in the same namespace as Huawei CSI. | ||||
Management URLs of storage device. The value format is a list. The value can be a domain name or an IP address + port number. | If resources need to be provisioned to a specified vStore, set this parameter to the logical management port URL of the specified vStore. | |||
Storage pools of storage devices. The value format is a list. | ||||
The value is fixed to nfs. Ensure that an NFS client tool has been installed on the connected compute node. | ||||
Service access port. Nodes will use this port to read and write storage resources. The value format is a list. | ||||
Storage topology awareness configuration. The parameter format is JSON of the list type. | This parameter is mandatory if storage topology awareness is enabled. For details, see Configuring Storage Topology Awareness. | |||
Maximum number of concurrent connections to a storage backend. | The value ranges from 1 to 30. If this parameter is not set or the value is not in the specified range, the default value 30 is used. |
Creating Storage Backends of the Local Type
Prepare a backend configuration file, for example, backend.yaml.
storage: "oceanstor-nas" name: "backend-demo" namespace: "huawei-csi" urls: - "https://192.168.129.157:8088" pools: - "StoragePool001" parameters: protocol: "nfs" portals: - "10.10.30.20" maxClientThreads: "30"Run the following command to create a storage backend.
oceanctl create backend -f /path/to/backend.yaml -i yamlThe following is an example of the command output.
NUMBER CONFIGURED NAME STORAGE URLS 1 false backend-demo oceanstor-nas https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Enter the serial number of the backend to be created and enter the account and password.
Please enter the backend number to configure (Enter 'exit' to exit):1 Please enter this backend user name: admin Please enter this backend password: Backend backend-demo is configured NUMBER CONFIGURED NAME STORAGE URLS 1 true backend-demo oceanstor-nas https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Check the storage backend creation result.
oceanctl get backendThe following is an example of the command output. If the backend status is Bound, the creation is successful.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-demo nfs oceanstor-nas xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.157:8088
1.1.4.2 - Block Service
1.1.4.2.1 - iSCSI
This section describes how to create a storage backend of the iSCSI protocol type.
Configuration Item Description
Table 1 backend parameters
Storage backend name. The value can contain a maximum of 63 characters, including lowercase letters, digits, and hyphens (-). It must start with a letter or digit. | ||||
The storage backend must be in the same namespace as Huawei CSI. | ||||
Management URLs of storage device. The value format is a list. | The value can be a domain name or an IP address + port number. | |||
Storage pools of storage devices. The value format is a list. | ||||
Service access port. Nodes will use this port to read and write storage resources. The value format is a list. | ||||
Storage topology awareness configuration. The parameter format is JSON of the list type. | This parameter is mandatory if storage topology awareness is enabled. For details, see Configuring Storage Topology Awareness. | |||
Maximum number of concurrent connections to a storage backend. | The value ranges from 1 to 30. If this parameter is not set or the value is not in the specified range, the default value 30 is used. |
Creating a Storage Backend
Prepare a backend configuration file, for example, backend.yaml.
storage: "oceandisk-san" name: "backend-demo" namespace: "huawei-csi" urls: - "https://192.168.129.157:8088" pools: - "StoragePool001" parameters: protocol: "iscsi" portals: - "10.10.30.20" - "10.10.30.21" maxClientThreads: "30"Run the following command to create a storage backend.
oceanctl create backend -f /path/to/backend.yaml -i yamlThe following is an example of the command output.
NUMBER CONFIGURED NAME STORAGE URLS 1 false backend-demo oceandisk-san https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Enter the serial number of the backend to be created and enter the account and password.
Please enter the backend number to configure (Enter 'exit' to exit):1 Please enter this backend user name: admin Please enter this backend password: Backend backend-demo is configured NUMBER CONFIGURED NAME STORAGE URLS 1 true backend-demo oceandisk-san https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Check the storage backend creation result.
oceanctl get backendThe following is an example of the command output. If the backend status is Bound, the creation is successful.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-demo iscsi oceandisk-san xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.157:8088
1.1.4.2.2 - FC
This section describes how to create a storage backend of the FC protocol type.
Configuration Item Description
Table 1 backend parameters
Storage backend name. The value can contain a maximum of 63 characters, including lowercase letters, digits, and hyphens (-). It must start with a letter or digit. | ||||
The storage backend must be in the same namespace as Huawei CSI. | ||||
Management URLs of storage device. The value format is a list. | The value can be a domain name or an IP address + port number. | |||
Storage pools of storage devices. The value format is a list. | ||||
Storage topology awareness configuration. The parameter format is JSON of the list type. | This parameter is mandatory if storage topology awareness is enabled. For details, see Configuring Storage Topology Awareness. | |||
Maximum number of concurrent connections to a storage backend. | The value ranges from 1 to 30. If this parameter is not set or the value is not in the specified range, the default value 30 is used. |
Creating a Storage Backend
Prepare a backend configuration file, for example, backend.yaml.
storage: "oceandisk-san" name: "backend-demo" namespace: "huawei-csi" urls: - "https://192.168.129.157:8088" pools: - "StoragePool001" parameters: protocol: "fc" maxClientThreads: "30"Run the following command to create a storage backend.
oceanctl create backend -f /path/to/backend.yaml -i yamlThe following is an example of the command output.
NUMBER CONFIGURED NAME STORAGE URLS 1 false backend-demo oceandisk-san https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Enter the serial number of the backend to be created and enter the account and password.
Please enter the backend number to configure (Enter 'exit' to exit):1 Please enter this backend user name: admin Please enter this backend password: Backend backend-demo is configured NUMBER CONFIGURED NAME STORAGE URLS 1 true backend-demo oceandisk-san https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Check the storage backend creation result.
oceanctl get backendThe following is an example of the command output. If the backend status is Bound, the creation is successful.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-demo fc oceandisk-san xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.157:8088
1.1.4.2.3 - NVMe over RoCE
This section describes how to create a storage backend of the NVMe over RoCE protocol type.
Configuration Item Description
Table 1 backend parameters
Storage backend name. The value can contain a maximum of 63 characters, including lowercase letters, digits, and hyphens (-). It must start with a letter or digit. | ||||
The storage backend must be in the same namespace as Huawei CSI. | ||||
Management URLs of storage device. The value format is a list. | The value can be a domain name or an IP address + port number. | |||
Storage pools of storage devices. The value format is a list. | ||||
Service access port. Nodes will use this port to read and write storage resources. The value format is a list. | ||||
Storage topology awareness configuration. The parameter format is JSON of the list type. | This parameter is mandatory if storage topology awareness is enabled. For details, see Configuring Storage Topology Awareness. | |||
Maximum number of concurrent connections to a storage backend. | The value ranges from 1 to 30. If this parameter is not set or the value is not in the specified range, the default value 30 is used. |
Creating a Storage Backend
Prepare a backend configuration file, for example, backend.yaml.
storage: "oceandisk-san" name: "backend-demo" namespace: "huawei-csi" urls: - "https://192.168.129.157:8088" pools: - "StoragePool001" parameters: protocol: "roce" portals: - "10.10.30.20" - "10.10.30.21" maxClientThreads: "30"Run the following command to create a storage backend.
oceanctl create backend -f /path/to/backend.yaml -i yamlThe following is an example of the command output.
NUMBER CONFIGURED NAME STORAGE URLS 1 false backend-demo oceandisk-san https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Enter the serial number of the backend to be created and enter the account and password.
Please enter the backend number to configure (Enter 'exit' to exit):1 Please enter this backend user name: admin Please enter this backend password: Backend backend-demo is configured NUMBER CONFIGURED NAME STORAGE URLS 1 true backend-demo oceandisk-san https://192.168.129.157:8088 Please enter the backend number to configure (Enter 'exit' to exit):Check the storage backend creation result.
oceanctl get backendThe following is an example of the command output. If the backend status is Bound, the creation is successful.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-demo roce oceandisk-san xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.157:8088
1.2 - Managing Storage Backends
1.2.1 - Querying a Storage Backend
Run the following command to obtain the help information about querying a backend.
oceanctl get backend -hRun the following command to query a single storage backend in the default namespace.
oceanctl get backend <backend-name>Run the following command to query all storage backends in the specified namespace.
oceanctl get backend -n <namespace>Run the following command to format the output. Currently, json, yaml, and wide are supported.
oceanctl get backend <backend-name> -o json
1.2.2 - Updating a Storage Backend
- When you use oceanctl to update the storage backend information, only the storage backend password and authentication mode for logging in to the storage backend can be updated.
- If the backend account password is updated on the storage device, the CSI plug-in will retry due to login failures. As a result, the account may be locked. If the account is locked, change the password by referring to An Account Is Locked After the Password Is Updated on the Storage Device .
1.2.2.1 - Updating the Password of a Storage Backend Using oceanctl
Obtaining the Help Information About Updating a Backend
Run the following command to obtain the help information about updating a storage backend.
oceanctl update backend -hThe following is an example of the command output.
Update a backend for Ocean Storage in Kubernetes Usage: oceanctl update backend <name> [flags] Examples: # Update backend account information in default(huawei-csi) namespace oceanctl update backend <name> --password # Update backend account information in specified namespace oceanctl update backend <name> -n namespace --password # Update backend account information with ldap authentication mode in default(huawei-csi) namespace oceanctl update backend <name> --password --authenticationMode=ldap # Update backend account information with local authentication mode in default(huawei-csi) namespace oceanctl update backend <name> --password --authenticationMode=local # Update backend account information with ldap authentication mode in specified namespace oceanctl update backend <name> -n namespace --password --authenticationMode=ldap Flags: --authenticationMode string Specify authentication mode -h, --help help for backend -n, --namespace string namespace of resources --password Update account password Global Flags: --log-dir string Specify the directory for printing log files. (default "/var/log/huawei")
Example of Updating the Password of a Backend
Run the following command to update a storage backend. In the command, backend-name indicates the name of the storage backend to be updated.
oceanctl update backend backend-name --passwordEnter the user name and new password as prompted:
Please enter this backend user name:admin Please enter this backend password: backend/backend-name updated
1.2.2.2 - Updating the Login Authentication Mode of a Storage Backend
Example of Updating the Backend Login Authentication Type to LDAP
Run the following command to update a storage backend. In the command, backend-name indicates the name of the storage backend to be updated.
oceanctl update backend backend-name --password --authenticationMode=ldapEnter the user name and new password as prompted:
Please enter this backend user name:admin Please enter this backend password: backend/backend-name updated
1.2.2.3 - Updating a Storage Backend
- PVC provisioning must be based on a configured storage backend. Therefore, if a PVC has been provisioned on a storage backend, do not change the storage backend.
- The name uniquely identifies a storage backend. The name of a storage backend with a PVC provisioned cannot be changed.
- After a storage backend is modified, the new configuration applies only to volumes to be provisioned.
- Do not perform volume management operations during the modification of a storage backend.
Procedure
- Delete the storage backend to be modified. For details, see Deleting a Storage Backend .
- Create a storage backend with the same name. For details, see Configuring the Storage Backend . The storage backend name cannot be changed.
1.2.3 - Deleting a Storage Backend
Do not delete a storage backend when a volume management operation is being performed on it.
Example of Deleting a Backend
Run the following command to obtain information about a storage backend.
oceanctl get backendThe following is an example of the command output.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-1 roce oceanstor-san xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.157:8088 huawei-csi backend-2 roce oceanstor-san xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.158:8088Run the following command to delete the specified storage backend.
oceanctl delete backend backend-1Run the following command to check the deletion result.
oceanctl get backend backend-1The following is an example of the command output. If not found is displayed, the deletion is successful.
Error from server (NotFound): backend "backend-1" not found
1.2.4 - Adding a Storage Backend Certificate
Prerequisites
A certificate has been created. Take OceanStor Dorado as an example. For details about how to create a certificate, click here .
Example of Creating a Certificate
Prepare a certificate file in advance, for example, cert.crt.
Run the following command to obtain information about a storage backend.
oceanctl get backendThe following is an example of the command output.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-1 roce oceanstor-san xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.157:8088 huawei-csi backend-2 roce oceanstor-san xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.158:8088Run the following command to create a certificate for the specified storage backend.
oceanctl create cert cert-1 -b backend-1 -f /path/to/cert.crtCheck the certificate creation result.
oceanctl get cert -b backend-1The following is an example of the command output.
NAMESPACE NAME BOUNDBACKEND huawei-csi cert-1 backend-1
1.2.5 - Deleting a Storage Backend Certificate
Procedure
Run the following command to obtain information about a storage backend.
oceanctl get backendThe following is an example of the command output.
NAMESPACE NAME PROTOCOL STORAGETYPE SN STATUS ONLINE URL huawei-csi backend-1 roce oceanstor-san xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.157:8088 huawei-csi backend-2 roce oceanstor-san xxxxxxxxxxxxxxxxxxxx Bound true https://192.168.129.158:8088Run the following command to obtain information about the certificate of the specified storage backend.
oceanctl get cert -b backend-1The following is an example of the command output.
NAMESPACE NAME BOUNDBACKEND huawei-csi cert-1 backend-1Run the following command to delete the certificate of the specified storage backend.
oceanctl delete cert -b backend-1Check the deletion result.
oceanctl get cert -b backend-1The following is an example of the command output. If no cert found is displayed, the deletion is successful.
Error from server (NotFound): no cert found on backend backend-1 in huawei-csi namespace
2 - StorageClass Management
A StorageClass provides administrators with methods to describe a storage “class”. Different types may map to a different group of capability definitions. Kubernetes cluster users can dynamically provision volumes based on a StorageClass.
2.1 - Configuring a StorageClass
Cluster administrators can define multiple StorageClass objects as required. When configuring a PV, the cluster administrators need to specify a StorageClass that meets service requirements. When applying for resources from Huawei storage devices, Huawei CSI creates storage resources that meet service requirements based on the preset StorageClass.
2.1.1 - Flash Storage (OceanStor Dorado/OceanStor V5/OceanStor V6 and Later)
2.1.1.1 - File System
Creating a StorageClass
Prepare a StorageClass configuration file, for example, msc .yaml. For details about the StorageClass configuration, see the following example.
Run the following command to create a StorageClass using the configuration file.
kubectl apply -f mysc.yamlRun the following command to view the information about the created StorageClass.
kubectl get sc myscThe following is an example of the command output.
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE mysc csi.huawei.com Delete Immediate true 8s
NFS Protocol Configuration Example
When a container uses the NFS protocol to connect to file system resources, refer to the following StorageClass configuration example. In this example, NFS version 4.1 is specified for mounting.
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: mysc
provisioner: csi.huawei.com
parameters:
backend: nfs-nas-181
pool: StoragePool001
volumeType: fs
allocType: thin
authClient: "*"
mountOptions:
- nfsvers=4.1 # Specify the version 4.1 for NFS mounting.
NFS+ Protocol Configuration Example
When a container uses the NFS+ protocol to connect to file system resources, refer to the following StorageClass configuration example.
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: mysc
provisioner: csi.huawei.com
parameters:
backend: nfs-nas-181
pool: StoragePool001
volumeType: fs
allocType: thin
authClient: "*"
HyperMetro File System Configuration Example
When a container uses an NFS HyperMetro file system as a storage resource, refer to the following configuration example. In this example, the used backend supports HyperMetro, and hyperMetro is set to true.
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: mysc
provisioner: csi.huawei.com
parameters:
backend: nfs-hypermetro-dorado-181
pool: pool001
volumeType: fs
hyperMetro: "true" # Provision HyperMetro volumes.
allocType: thin
authClient: "*"
- Before provisioning a NAS HyperMetro volume, you need to configure the HyperMetro relationship between two storage devices, including the remote device and HyperMetro domain. The HyperMetro domain of the file system can only work in HyperMetro AA mode. For details about the configuration operation, see the product documentation of the corresponding storage model.
- If a storage device is faulty, the logical management port may fail over. In this case, you need to manually clear the corresponding storage resources after deleting the NAS HyperMetro volume.
StorageClass Parameters Supported by File Systems
Table 1 StorageClass configuration parameters
Take Kubernetes v1.22.1 as an example. The value can contain digits, lowercase letters, hyphens (-), and periods (.), and must start and end with a letter or digit. | |||||
Set this parameter to the driver name set during Huawei CSI installation. The value is the same as that of driverName in the values.yaml file. | |||||
Reclamation policy. The following types are supported: | |||||
Whether to allow volume expansion. If this parameter is set to true, the capacity of the PV that uses the StorageClass can be expanded. | This function can only be used to expand PV capacity but cannot be used to reduce PV capacity. | ||||
List of mount parameters, which can be used to specify the parameters of the -o option when the mount command is executed on a host. | For details about common parameters in mountOptions, see Table 2. | ||||
Name of the backend where the resource to be created is located. This field must be set if parameters.pool is set. | If this parameter is not set, Huawei CSI will randomly select a backend that meets the capacity requirements to create resources. You are advised to specify a backend to ensure that the created resource is located on the expected backend. | ||||
Name of the storage resource pool where the resource to be created is located. | If this parameter is not set, Huawei CSI will randomly select a storage pool that meets the capacity requirements from the selected backend to create resources. You are advised to specify a storage pool to ensure that the created resource is located in the expected storage pool. | ||||
Name of the storage resource created by dynamic volume provisioning. You can configure a placeholder to customize the storage resource name. The following placeholders are supported:
|
PVC namespace: namespace. PVC name: pvc-1. PVC UID: c2fd3f46-bf17-4a7d-b88e-2e3232bae434. volumeName is set to prefix-{{ .PVCNamespace }}_{{ .PVCName }}. The ultimate storage resource name is prefix-namespace_pvc-1-c2fd3f46bf174a7db88e2e3232bae434. | ||||
Type of the volume to be created. The following types are supported: | |||||
Allocation type of the volume to be created. The following types are supported: | If this parameter is set to thin, the required space is not allocated immediately when a volume is created. Instead, the space is dynamically allocated based on the usage. | ||||
IP address of the NFS client that can access the volume. You can enter the client host name (a full domain name is recommended), client IP address, or client IP address segment. | The asterisk (*) can be used to indicate any client. If you are not sure about the IP address of the access client, you are advised to use the asterisk (*) to prevent the client access from being rejected by the storage system. If the client host name is used, you are advised to use the full domain name. The IP addresses can be IPv4 addresses, IPv6 addresses, or a combination of IPv4 and IPv6 addresses. You can enter multiple host names, IP addresses, or IP address segments and separate them with semicolons (;). Example: 192.168.0.10;192.168.0.0/24;myserver1.test | ||||
4 indicates the highest speed. This parameter takes effect when a persistent volume is cloned or a persistent volume is created from a snapshot. | |||||
Log in to DeviceManager and choose Services > File Service > File Systems > Create to obtain the application type name. | |||||
QoS settings of the file system on the storage side for the PV. The value of the parameter is JSON character strings in dictionary format. A character string is enclosed by single quotation marks and the dictionary key by double quotation marks. Example: '{"maxMBPS": 999, "maxIOPS": 999}' | For details about the supported QoS configurations, see Table 3. | ||||
Whether a HyperMetro volume is to be created. This parameter needs to be configured when the backend is of the HyperMetro type. | When the used backend is a HyperMetro backend and a HyperMetro volume needs to be provisioned, set this parameter to true. If this parameter is set to false, services may be interrupted if the logical management port connected to the backend fails over. | ||||
Data synchronization speed of a HyperMetro pair. The value ranges from 1 to 4. | The configuration takes effect when a HyperMetro volume is created.
| ||||
For details about the configuration format, refer to the Linux permission settings, for example, 777 and 755. | |||||
Controls the root permission of the client. | |||||
Whether to retain the user ID (UID) and group ID (GID) of a shared directory. | |||||
Configures the krb5 security protocol. | During mounting, you can specify the sec parameter in mountOptions. | ||||
Configures the krb5i security protocol. | During mounting, you can specify the sec parameter in mountOptions. | ||||
Configures the krb5p security protocol. | During mounting, you can specify the sec parameter in mountOptions. | ||||
Whether the snapshot directory is visible. | |||||
OceanStor Dorado 6.1.5+ and OceanStor 6.1.5+ NAS storage devices are supported. | |||||
Whether to disable volume capacity verification. After this function is disabled, the system will not verify whether the volume capacity is an integer multiple of the sector size.
| For OceanStor Dorado and OceanStor storage, the sector size is 512 bytes. | ||||
Advanced volume creation parameters. The value of the parameter is JSON character strings in dictionary format. A character string is enclosed by single quotation marks and the dictionary key by double quotation marks. Example: '{"CAPACITYTHRESHOLD": 90}' | For details about the supported advanced parameters, see Table 4. |
Table 2 Common parameters in mountOptions
Table 3 Supported QoS configurations
Table 4 Supported advanced volume creation parameters
For details about the default value and value range, see the corresponding storage product manual. |
2.1.1.2 - Dtree
Creating a StorageClass
Prepare a StorageClass configuration file, for example, msc .yaml. For details about the StorageClass configuration, see the following example.
Run the following command to create a StorageClass using the configuration file.
kubectl apply -f mysc.yamlRun the following command to view the information about the created StorageClass.
kubectl get sc myscThe following is an example of the command output.
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE mysc csi.huawei.com Delete Immediate true 8s
Example of StorageClass Configuration Supported by the NFS Protocol
When a container uses the NFS protocol to connect to dtree resources, refer to the following StorageClass configuration example. In this example, NFS version 4.1 is specified for mounting.
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: mysc
provisioner: csi.huawei.com
parameters:
backend: nfs-dtree-181
parentname: parent-filesystem-name
volumeType: dtree
allocType: thin
authClient: "*"
mountOptions:
- nfsvers=4.1 # Specify the version 4.1 for NFS mounting.
Example of StorageClass Configuration Supported by the NFS+ Protocol
When a container uses the NFS+ protocol to connect to dtree resources, refer to the following StorageClass configuration example.
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: mysc
provisioner: csi.huawei.com
parameters:
backend: nfs-dtree-181
parentname: parent-filesystem-name
volumeType: dtree
allocType: thin
authClient: "*"
Storage Class Parameters Supported by Dtrees
Table 1 StorageClass configuration parameters
Take Kubernetes v1.22.1 as an example. The value can contain digits, lowercase letters, hyphens (-), and periods (.), and must start and end with a letter or digit. | ||||
Set this parameter to the driver name set during Huawei CSI installation. The value is the same as that of driverName in the values.yaml file. | ||||
Reclamation policy. The following types are supported: | ||||
Whether to allow volume expansion. If this parameter is set to true, the capacity of the PV that uses the StorageClass can be expanded. | This function can only be used to expand PV capacity but cannot be used to reduce PV capacity. | |||
List of mount parameters, which can be used to specify the parameters of the -o option when the mount command is executed on a host. | For details about common parameters in mountOptions, see Table 2. | |||
Name of the backend where the resource to be created is located. | If this parameter is not set, Huawei CSI will randomly select a backend that meets the capacity requirements to create resources. You are advised to specify a backend to ensure that the created resource is located on the expected backend. This parameter is mandatory if parameters.parentname is configured. | |||
Name of a file system on the current storage device. Dtree is created in the file system. | This parameter is mandatory when parentname is not configured for the backend. If parentname is configured only in the StorageClass but not configured in the storage backend, set CSIDriverObject.attachRequired to true during CSI installation. | |||
Name of the storage resource created by dynamic volume provisioning. You can configure a placeholder to customize the storage resource name. The following placeholders are supported:
|
PVC namespace: namespace. PVC name: pvc-1. PVC UID: c2fd3f46-bf17-4a7d-b88e-2e3232bae434. volumeName is set to prefix-{{ .PVCNamespace }}_{{ .PVCName }}. The ultimate storage resource name is prefix-namespace_pvc-1-c2fd3f46bf174a7db88e2e3232bae434. | |||
Type of the volume to be created. The following types are supported: | ||||
IP address of the NFS client that can access the volume. You can enter the client host name (a full domain name is recommended), client IP address, or client IP address segment. | The asterisk (*) can be used to indicate any client. If you are not sure about the IP address of the access client, you are advised to use the asterisk (*) to prevent the client access from being rejected by the storage system. If the client host name is used, you are advised to use the full domain name. The IP addresses can be IPv4 addresses, IPv6 addresses, or a combination of IPv4 and IPv6 addresses. You can enter multiple host names, IP addresses, or IP address segments and separate them with semicolons (;). Example: 192.168.0.10;192.168.0.0/24;myserver1.test | |||
For details about the configuration format, refer to the Linux permission settings, for example, 777 and 755. | ||||
Controls the root permission of the client. | ||||
Whether to retain the user ID (UID) and group ID (GID) of a shared directory. | ||||
Configures the krb5 security protocol. | During mounting, you can specify the sec parameter in mountOptions. | |||
Configures the krb5i security protocol. | During mounting, you can specify the sec parameter in mountOptions. | |||
Configures the krb5p security protocol. | During mounting, you can specify the sec parameter in mountOptions. | |||
Whether to disable volume capacity verification. After this function is disabled, the system will not verify whether the volume capacity is an integer multiple of the sector size.
| For OceanStor Dorado and OceanStor storage, the sector size is 512 bytes. | |||
Table 2 Common parameters in mountOptions
2.1.1.3 - Block Service
Creating a StorageClass
Prepare a StorageClass configuration file, for example, msc .yaml. For details about the StorageClass configuration, see the following example.
Run the following command to create a StorageClass using the configuration file.
kubectl apply -f mysc.yamlRun the following command to view the information about the created StorageClass.
kubectl get sc myscThe following is an example of the command output.
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE mysc csi.huawei.com Delete Immediate true 8s
Block Storage Class Configuration Example
If LUNs are used as storage resources and the file system needs to be formatted to a local file system, refer to the following example.
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: mysc
provisioner: csi.huawei.com
parameters:
backend: lun-181
pool: StoragePool001
volumeType: lun
allocType: thin
fsType: ext4
StorageClass Parameters Supported by Block Services
Table 1 StorageClass configuration parameters
Take Kubernetes v1.22.1 as an example. The value can contain digits, lowercase letters, hyphens (-), and periods (.), and must start and end with a letter or digit. | |||||
Set this parameter to the driver name set during Huawei CSI installation. The value is the same as that of driverName in the values.yaml file. | |||||
Reclamation policy. The following types are supported: | |||||
Whether to allow volume expansion. If this parameter is set to true, the capacity of the PV that uses the StorageClass can be expanded. | This function can only be used to expand PV capacity but cannot be used to reduce PV capacity. | ||||
List of mount parameters, which can be used to specify the parameters of the -o option when the mount command is executed on a host. | For details about common parameters in mountOptions, see Table 2. | ||||
Name of the backend where the resource to be created is located. This field must be set if parameters.pool is set. | If this parameter is not set, Huawei CSI will randomly select a backend that meets the capacity requirements to create resources. You are advised to specify a backend to ensure that the created resource is located on the expected backend. | ||||
Name of the storage resource pool where the resource to be created is located. | If this parameter is not set, Huawei CSI will randomly select a storage pool that meets the capacity requirements from the selected backend to create resources. You are advised to specify a storage pool to ensure that the created resource is located in the expected storage pool. | ||||
Name of the storage resource created by dynamic volume provisioning. You can configure a placeholder to customize the storage resource name. The following placeholders are supported:
|
PVC namespace: namespace. PVC name: pvc-1. PVC UID: c2fd3f46-bf17-4a7d-b88e-2e3232bae434. volumeName is set to prefix-{{ .PVCNamespace }}_{{ .PVCName }}. The ultimate storage resource name is prefix-namespace_pvc-1-c2fd3f46bf174a7db88e2e3232bae434. | ||||
Type of the volume to be created. The following types are supported: | |||||
Allocation type of the volume to be created. The following types are supported: | If this parameter is set to thin, the required space is not allocated immediately when a volume is created. Instead, the space is dynamically allocated based on the usage. | ||||
Type of a host file system. The supported types are:
| This parameter is available only when volumeMode of the PVC is set to Filesystem. | ||||
4 indicates the highest speed. This parameter takes effect when a PVC is cloned or a PVC is created from a snapshot. | |||||
Log in to DeviceManager and choose Services > Block Service > LUN Groups (or Namespace Groups) > LUNs (or Namespaces) > Create to obtain the application type name. | |||||
LUN/NAS QoS settings of the PV on the storage side. The value of the parameter is JSON character strings in dictionary format. A character string is enclosed by single quotation marks and the dictionary key by double quotation marks. Example: '{"maxMBPS": 999, "maxIOPS": 999}' | For details about the supported QoS configurations, see Table 3. | ||||
For details about the configuration format, refer to the Linux permission settings, for example, 777 and 755. | |||||
Whether to disable volume capacity verification. After this function is disabled, the system will not verify whether the volume capacity is an integer multiple of the sector size.
| For OceanStor Dorado and OceanStor storage, the sector size is 512 bytes. | ||||
Table 2 Common parameters in mountOptions
Automatically triggers the Trim or Discard operation when a file system is mounted. This operation instructs a block device to release unused blocks. |
Table 3 Supported QoS configurations
The value is an integer ranging from 1 to 999999999, expressed in MB/s. | ||
The value is an integer ranging from 1 to 999999999, expressed in MB/s. | ||
2.1.2 - Flash Storage (OceanStor A600/A800)
2.1.2.1 - File System
Creating a StorageClass
Prepare a StorageClass configuration file, for example, msc .yaml. For details about the StorageClass configuration, see the following example.
Run the following command to create a StorageClass using the configuration file.
kubectl apply -f mysc.yamlRun the following command to view the information about the created StorageClass.
kubectl get sc myscThe following is an example of the command output.
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE mysc csi.huawei.com Delete Immediate true 8s
NFS Protocol Configuration Example
When a container uses the NFS protocol to connect to file system resources, refer to the following StorageClass configuration example. In this example, NFS version 4.1 is specified for mounting.
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: mysc
provisioner: csi.huawei.com
parameters:
backend: nfs-nas-181
pool: StoragePool001
volumeType: fs
allocType: thin
authClient: "*"
mountOptions:
- nfsvers=4.1 # Specify the version 4.1 for NFS mounting.
DataTurbo Protocol Configuration Example
If a container uses OceanStor A series storage and the storage supports DataTurbo-based access, you can refer to the following configuration example. In this example, the DataTurbo share user name is user01.
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: mysc
provisioner: csi.huawei.com
parameters:
backend: dtfs-nas-181
pool: pool001
volumeType: fs
allocType: thin
authUser: user01
StorageClass Parameters Supported by File Services
Table 1 StorageClass configuration parameters
Take Kubernetes v1.22.1 as an example. The value can contain digits, lowercase letters, hyphens (-), and periods (.), and must start and end with a letter or digit. | |||||
Set this parameter to the driver name set during Huawei CSI installation. The value is the same as that of driverName in the values.yaml file. | |||||
Reclamation policy. The following types are supported: | |||||
Whether to allow volume expansion. If this parameter is set to true, the capacity of the PV that uses the StorageClass can be expanded. | This function can only be used to expand PV capacity but cannot be used to reduce PV capacity. | ||||
List of mount parameters, which can be used to specify the parameters of the -o option when the mount command is executed on a host. | For details about common parameters in mountOptions, see Table 2. | ||||
Name of the backend where the resource to be created is located. This field must be set if parameters.pool is set. | If this parameter is not set, Huawei CSI will randomly select a backend that meets the capacity requirements to create resources. You are advised to specify a backend to ensure that the created resource is located on the expected backend. | ||||
Name of the storage resource pool where the resource to be created is located. | If this parameter is not set, Huawei CSI will randomly select a storage pool that meets the capacity requirements from the selected backend to create resources. You are advised to specify a storage pool to ensure that the created resource is located in the expected storage pool. | ||||
Name of the storage resource created by dynamic volume provisioning. You can configure a placeholder to customize the storage resource name. The following placeholders are supported:
|
PVC namespace: namespace. PVC name: pvc-1. PVC UID: c2fd3f46-bf17-4a7d-b88e-2e3232bae434. volumeName is set to prefix-{{ .PVCNamespace }}_{{ .PVCName }}. The ultimate storage resource name is prefix-namespace_pvc-1-c2fd3f46bf174a7db88e2e3232bae434. | ||||
Type of the volume to be created. The following types are supported: | |||||
Allocation type of the volume to be created. The following types are supported: | If this parameter is set to thin, the required space is not allocated immediately when a volume is created. Instead, the space is dynamically allocated based on the usage. | ||||
IP address of the NFS client that can access the volume. This parameter is mandatory when the nfs or nfs+ protocol is used. You can enter the client host name (a full domain name is recommended), client IP address, or client IP address segment. | The asterisk (*) can be used to indicate any client. If you are not sure about the IP address of the access client, you are advised to use the asterisk (*) to prevent the client access from being rejected by the storage system. If the client host name is used, you are advised to use the full domain name. The IP addresses can be IPv4 addresses, IPv6 addresses, or a combination of IPv4 and IPv6 addresses. You can enter multiple host names, IP addresses, or IP address segments and separate them with semicolons (;). Example: 192.168.0.10;192.168.0.0/24;myserver1.test | ||||
DataTurbo user who can access the DataTurbo share. This parameter is mandatory when the DataTurbo(dtfs) protocol is used. | You can enter multiple DataTurbo users at a time and separate them with semicolons (;). Example: auth_user1;auth_user2;auth_user3 | ||||
Log in to DeviceManager and choose Services > File Service > File Systems > Create to obtain the application type name. | |||||
For details about the configuration format, refer to the Linux permission settings, for example, 777 and 755. | |||||
Controls the root permission of the client. | |||||
Whether to retain the user ID (UID) and group ID (GID) of a shared directory. | |||||
Whether to disable volume capacity verification. After this function is disabled, the system will not verify whether the volume capacity is an integer multiple of the sector size.
| |||||
Advanced volume creation parameters. The value of the parameter is JSON character strings in dictionary format. A character string is enclosed by single quotation marks and the dictionary key by double quotation marks. Example: '{"CAPACITYTHRESHOLD": 90}' | For details about the supported advanced parameters, see Table 3. |
Table 2 Common parameters in mountOptions
NFS mount option on the host. The following mount option is supported: nfsvers: protocol version for NFS mounting. The value can be 3, 4, 4.0, 4.1, or 4.2. | This parameter is optional after the -o parameter when the mount command is executed on the host. The value is in list format. If the NFS version is specified for mounting, NFS 3, 4.0, 4.1, and 4.2 protocols are supported (the protocol must be supported and enabled on storage devices). If nfsvers is set to 4, the latest protocol version NFS 4 may be used for mounting due to different OS configurations, for example, 4.2. If the 4.0 protocol is required, you are advised to set nfsvers to 4.0. | |||
Domain name of the logical port used for mounting when the DataTurbo(dtfs) protocol is used. | To mount the HyperScale cluster file system, enter the domain name of the HyperScale cluster. The description of the dn parameter is for reference only. For details about other mounting parameters of the DataTurbo protocol, see OceanStor DataTurbo DTFS User Guide. |
Table 3 Supported advanced volume creation parameters
For details about the default value and value range, see the corresponding storage product manual. |
2.1.3 - Mass Storage (FusionStorage Block/OceanStor Pacific Series)
2.1.3.1 - File System
Creating a StorageClass
Prepare a StorageClass configuration file, for example, msc .yaml. For details about the StorageClass configuration, see the following example.
Run the following command to create a StorageClass using the configuration file.
kubectl apply -f mysc.yamlRun the following command to view the information about the created StorageClass.
kubectl get sc myscThe following is an example of the command output.
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE mysc csi.huawei.com Delete Immediate true 8s
NFS Protocol Configuration Example
When a container uses the NFS protocol to connect to file system resources, refer to the following StorageClass configuration example. In this example, NFS version 4.1 is specified for mounting.
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: mysc
provisioner: csi.huawei.com
parameters:
backend: nfs-nas-181
pool: pool001
volumeType: fs
allocType: thin
authClient: "*"
mountOptions:
- nfsvers=4.1 # Specify the version 4.1 for NFS mounting.
DPC Protocol Configuration Example
When the storage supports access using the DPC protocol, you can configure the mount parameters for DPC access in the StorageClass. In this example, acl is used as the authentication parameter for mounting, and cnflush is used to set the asynchronous disk flushing mode.
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: mysc
provisioner: csi.huawei.com
parameters:
backend: nfs-dpc-101
pool: pool001
volumeType: fs
allocType: thin
mountOptions:
- acl # Set the authentication parameter.
- cnflush # Set the asynchronous disk flushing mode.
StorageClass Parameters Supported by File Systems
Table 1 StorageClass configuration parameters
Take Kubernetes v1.22.1 as an example. The value can contain digits, lowercase letters, hyphens (-), and periods (.), and must start and end with a letter or digit. | |||||
Set this parameter to the driver name set during Huawei CSI installation. The value is the same as that of driverName in the values.yaml file. | |||||
Reclamation policy. The following types are supported: | |||||
Whether to allow volume expansion. If this parameter is set to true, the capacity of the PV that uses the StorageClass can be expanded. | This function can only be used to expand PV capacity but cannot be used to reduce PV capacity. | ||||
List of mount parameters, which can be used to specify the parameters of the -o option when the mount command is executed on a host. | For details about common parameters in mountOptions, see Table 2. | ||||
Name of the backend where the resource to be created is located. This field must be set if parameters.pool is set. | If this parameter is not set, Huawei CSI will randomly select a backend that meets the capacity requirements to create resources. You are advised to specify a backend to ensure that the created resource is located on the expected backend. | ||||
Name of the storage resource pool where the resource to be created is located. | If this parameter is not set, Huawei CSI will randomly select a storage pool that meets the capacity requirements from the selected backend to create resources. You are advised to specify a storage pool to ensure that the created resource is located in the expected storage pool. | ||||
Type of the volume to be created. The following types are supported: | |||||
Allocation type of the volume to be created. The following types are supported: | If this parameter is set to thin, the required space is not allocated immediately when a volume is created. Instead, the space is dynamically allocated based on the usage. | ||||
IP address of the NFS client that can access the volume. This parameter is mandatory when the NFS protocol is used. You can enter the client host name (a full domain name is recommended), client IP address, or client IP address segment. | The asterisk (*) can be used to indicate any client. If you are not sure about the IP address of the access client, you are advised to use the asterisk (*) to prevent the client access from being rejected by the storage system. If the client host name is used, you are advised to use the full domain name. The IP addresses can be IPv4 addresses, IPv6 addresses, or a combination of IPv4 and IPv6 addresses. You can enter multiple host names, IP addresses, or IP address segments and separate them with semicolons (;). Example: 192.168.0.10;192.168.0.0/24;myserver1.test | ||||
The value of the parameter is JSON character strings in dictionary format. A character string is enclosed by single quotation marks and the dictionary key by double quotation marks. Example: '{"spaceQuota": "softQuota", "gracePeriod": 100}' | For details about the supported quota configurations, see Table 4. | ||||
QoS settings of the file system on the storage side of the PV. The value of the parameter is JSON character strings in dictionary format. A character string is enclosed by single quotation marks and the dictionary key by double quotation marks. Example: '{"maxMBPS": 999, "maxIOPS": 999}' | For details about the supported QoS configurations, see Table 3. | ||||
For details about the configuration format, refer to the Linux permission settings, for example, 777 and 755. | |||||
Controls the root permission of the client. | |||||
Whether to retain the user ID (UID) and group ID (GID) of a shared directory. | |||||
Whether the snapshot directory is visible. | |||||
Whether to disable volume capacity verification. After this function is disabled, the system will not verify whether the volume capacity is an integer multiple of the sector size.
|
Table 2 Common parameters in mountOptions
NFS mount option on the host. The following mount option is supported: nfsvers: protocol version for NFS mounting. The value can be 3, 4, 4.0, 4.1, or 4.2. | This parameter is optional after the -o parameter when the mount command is executed on the host. The value is in list format. If the NFS version is specified for mounting, NFS 3, 4.0, 4.1, and 4.2 protocols are supported (the protocol must be supported and enabled on storage devices). If nfsvers is set to 4, the latest protocol version NFS 4 may be used for mounting due to different OS configurations, for example, 4.2. If the 4.0 protocol is required, you are advised to set nfsvers to 4.0. | |||
If the transmission protocol is rdma, set this parameter to 20049. | ||||
The DPC namespace supports the ACL function. The DPC client supports POSIX ACL, NFSv4 ACL, and NT ACL authentication. | The descriptions of acl, aclonlyposix, cnflush, and cflush are for reference only. For details about the parameters, see OceanStor Pacific Series Product Documentation and choose Configuration > Basic Service Configuration Guide for File > Configuring Basic Services (DPC Scenario) > Accessing a DPC Share on a Client > Step 2. | |||
The DPC namespace supports POSIX ACL, and the DPC client supports POSIX ACL authentication. The following protocols support POSIX ACL: DPC, NFSv3, and HDFS. If NFSv4 ACL or NT ACL is used, the DPC client cannot identify the ACL of this type. As a result, the ACL of this type does not take effect. | If aclonlyposix and acl are used together, only acl takes effect. That is, the namespace supports the ACL function. | |||
Asynchronous disk flushing mode. That is, data is not flushed to disks immediately when files in the namespace are closed. | Asynchronous flushing mode: When a file is closed, data in the cache is not flushed to storage media in synchronous mode. Instead, data is written from the cache to the storage media in asynchronous flushing mode. After the write service is complete, data is flushed from the cache to disks periodically based on the flushing period. In a multi-client scenario, if concurrent operations are performed on the same file, the file size update is affected by the disk flushing period. That is, the file size is updated only after the disk flushing is complete. Generally, the update is completed within several seconds. Synchronous I/Os are not affected by the disk flushing period. | |||
Synchronous disk flushing mode. That is, data is flushed to disks immediately when files in the namespace are closed. |
Table 3 Supported QoS configurations
Table 4 Supported quota configurations
This parameter is mandatory. Only softQuota or hardQuota can be configured. | ||
This parameter is conditionally optional only when spaceQuota is set to softQuota. |
2.1.3.2 - Dtree
Creating a StorageClass
Prepare a StorageClass configuration file, for example, msc .yaml. For details about the StorageClass configuration, see the following example.
Run the following command to create a StorageClass using the configuration file.
kubectl apply -f mysc.yamlRun the following command to view the information about the created StorageClass.
kubectl get sc myscThe following is an example of the command output.
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE mysc csi.huawei.com Delete Immediate true 8s
Example of StorageClass Configuration Supported by the NFS Protocol
When a container uses the NFS protocol to connect to dtree resources, refer to the following StorageClass configuration example. In this example, NFS version 4.1 is specified for mounting.
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: mysc
provisioner: csi.huawei.com
parameters:
backend: nfs-dtree-181
parentname: parent-filesystem-name
volumeType: dtree
allocType: thin
authClient: "*"
mountOptions:
- nfsvers=4.1 # Specify the version 4.1 for NFS mounting.
Example of StorageClass Configuration Supported by the DPC Protocol
When a container uses the DPC protocol to connect to dtree resources, refer to the following StorageClass configuration example. In this example, acl is used as the authentication parameter for mounting, and cnflush is used to set the asynchronous disk flushing mode.
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: mysc
provisioner: csi.huawei.com
parameters:
backend: nfs-dtree-181
parentname: parent-filesystem-name
volumeType: dtree
allocType: thin
authClient: "*"
mountOptions:
- acl # Set the authentication parameter.
- cnflush # Set the asynchronous disk flushing mode.
StorageClass Parameters Supported by Dtrees
Table 1 StorageClass configuration parameters
Take Kubernetes v1.22.1 as an example. The value can contain digits, lowercase letters, hyphens (-), and periods (.), and must start and end with a letter or digit. | ||||
Set this parameter to the driver name set during Huawei CSI installation. The value is the same as that of driverName in the values.yaml file. | ||||
Reclamation policy. The following types are supported: | ||||
Whether to allow volume expansion. If this parameter is set to true, the capacity of the PV that uses the StorageClass can be expanded. | This function can only be used to expand PV capacity but cannot be used to reduce PV capacity. | |||
List of mount parameters, which can be used to specify the parameters of the -o option when the mount command is executed on a host. | For details about common parameters in mountOptions, see Table 2. | |||
Name of the backend where the resource to be created is located. | If this parameter is not set, Huawei CSI will randomly select a backend that meets the capacity requirements to create resources. You are advised to specify a backend to ensure that the created resource is located on the expected backend. This parameter is mandatory if parameters.parentname is set. | |||
Name of a file system on the current storage device. Dtree is created in the file system. | This parameter is mandatory when parentname is not set for the backend. If parentname is configured only in the StorageClass but not configured in the storage backend, set CSIDriverObject.attachRequired to true during CSI installation. | |||
Name of the storage resource created by dynamic volume provisioning. You can configure a placeholder to customize the storage resource name. The following placeholders are supported:
|
PVC namespace: namespace. PVC name: pvc-1. PVC UID: c2fd3f46-bf17-4a7d-b88e-2e3232bae434. volumeName is set to prefix-{{ .PVCNamespace }}_{{ .PVCName }}. The ultimate storage resource name is prefix-namespace_pvc-1-c2fd3f46bf174a7db88e2e3232bae434. | |||
Type of the volume to be created. The following types are supported: | ||||
IP address of the NFS client that can access the volume. You can enter the client host name (a full domain name is recommended), client IP address, or client IP address segment. | The asterisk (*) can be used to indicate any client. If you are not sure about the IP address of the access client, you are advised to use the asterisk (*) to prevent the client access from being rejected by the storage system. If the client host name is used, you are advised to use the full domain name. The IP addresses can be IPv4 addresses, IPv6 addresses, or a combination of IPv4 and IPv6 addresses. You can enter multiple host names, IP addresses, or IP address segments and separate them with semicolons (;). Example: 192.168.0.10;192.168.0.0/24;myserver1.test | |||
For details about the configuration format, refer to the Linux permission settings, for example, 777 and 755. | ||||
Controls the root permission of the client. | ||||
Whether to retain the user ID (UID) and group ID (GID) of a shared directory. | ||||
Whether to disable volume capacity verification. After this function is disabled, the system will not verify whether the volume capacity is an integer multiple of the sector size.
|
Table 2 Common parameters in mountOptions
NFS mount option on the host. The following mount option is supported: nfsvers: protocol version for NFS mounting. The value can be 3, 4, 4.0, 4.1, or 4.2. | This parameter is optional after the -o parameter when the mount command is executed on the host. The value is in list format. If the NFS version is specified for mounting, NFS 3, 4.0, 4.1, and 4.2 protocols are supported (the protocol must be supported and enabled on storage devices). If nfsvers is set to 4, the latest protocol version NFS 4 may be used for mounting due to different OS configurations, for example, 4.2. If the 4.0 protocol is required, you are advised to set nfsvers to 4.0. | |||
If the transmission protocol is rdma, set this parameter to 20049. | ||||
The DPC namespace supports the ACL function. The DPC client supports POSIX ACL, NFSv4 ACL, and NT ACL authentication. | The descriptions of acl, aclonlyposix, cnflush, and cflush are for reference only. For details about the parameters, see OceanStor Pacific Series Product Documentation and choose Configuration > Basic Service Configuration Guide for File > Configuring Basic Services (DPC Scenario) > Accessing a DPC Share on a Client > Step 2. | |||
The DPC namespace supports POSIX ACL, and the DPC client supports POSIX ACL authentication. The following protocols support POSIX ACL: DPC, NFSv3, and HDFS. If NFSv4 ACL or NT ACL is used, the DPC client cannot identify the ACL of this type. As a result, the ACL of this type does not take effect. | If aclonlyposix and acl are used together, only acl takes effect. That is, the namespace supports the ACL function. | |||
Asynchronous disk flushing mode. That is, data is not flushed to disks immediately when files in the namespace are closed. | Asynchronous flushing mode: When a file is closed, data in the cache is not flushed to storage media in synchronous mode. Instead, data is written from the cache to the storage media in asynchronous flushing mode. After the write service is complete, data is flushed from the cache to disks periodically based on the flushing period. In a multi-client scenario, if concurrent operations are performed on the same file, the file size update is affected by the disk flushing period. That is, the file size is updated only after the disk flushing is complete. Generally, the update is completed within several seconds. Synchronous I/Os are not affected by the disk flushing period. | |||
Synchronous disk flushing mode. That is, data is flushed to disks immediately when files in the namespace are closed. |
2.1.3.3 - Block Services
Creating a StorageClass
Prepare a StorageClass configuration file, for example, msc .yaml. For details about the StorageClass configuration, see the following example.
Run the following command to create a StorageClass using the configuration file.
kubectl apply -f mysc.yamlRun the following command to view the information about the created StorageClass.
kubectl get sc myscThe following is an example of the command output.
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE mysc csi.huawei.com Delete Immediate true 8s
Block StorageClass Configuration Example
If LUNs are used as storage resources and the file system needs to be formatted to a local file system, refer to the following example.
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: mysc
provisioner: csi.huawei.com
parameters:
backend: lun-181
pool: StoragePool001
volumeType: lun
allocType: thin
fsType: ext4
StorageClass Parameters Supported by Block Services
Table 1 StorageClass configuration parameters
Take Kubernetes v1.22.1 as an example. The value can contain digits, lowercase letters, hyphens (-), and periods (.), and must start and end with a letter or digit. | |||||
Set this parameter to the driver name set during Huawei CSI installation. The value is the same as that of driverName in the values.yaml file. | |||||
Reclamation policy. The following types are supported: | |||||
Whether to allow volume expansion. If this parameter is set to true, the capacity of the PV that uses the StorageClass can be expanded. | This function can only be used to expand PV capacity but cannot be used to reduce PV capacity. | ||||
List of mount parameters, which can be used to specify the parameters of the -o option when the mount command is executed on a host. | For details about common parameters in mountOptions, see Table 2. | ||||
Name of the backend where the resource to be created is located. This field must be set if parameters.pool is set. | If this parameter is not set, Huawei CSI will randomly select a backend that meets the capacity requirements to create resources. You are advised to specify a backend to ensure that the created resource is located on the expected backend. | ||||
Name of the storage resource pool where the resource to be created is located. | If this parameter is not set, Huawei CSI will randomly select a storage pool that meets the capacity requirements from the selected backend to create resources. You are advised to specify a storage pool to ensure that the created resource is located in the expected storage pool. | ||||
Type of the volume to be created. The following types are supported: | |||||
Allocation type of the volume to be created. The following types are supported: | If this parameter is set to thin, the required space is not allocated immediately when a volume is created. Instead, the space is dynamically allocated based on the usage. | ||||
Type of a host file system. The supported types are:
| This parameter is available only when volumeMode of the PVC is set to Filesystem. | ||||
LUN/NAS QoS settings of the PV on the storage side. The value of the parameter is JSON character strings in dictionary format. A character string is enclosed by single quotation marks and the dictionary key by double quotation marks. Example: '{"maxMBPS": 999, "maxIOPS": 999}' | For details about the supported QoS configurations, see Table 3. | ||||
For details about the configuration format, refer to the Linux permission settings, for example, 777 and 755. | |||||
Whether to disable volume capacity verification. After this function is disabled, the system will not verify whether the volume capacity is an integer multiple of the sector size.
|
Table 2 Common parameters in mountOptions
Automatically triggers the Trim or Discard operation when a file system is mounted. This operation instructs a block device to release unused blocks. |
Table 3 Supported QoS configurations
2.1.4 - Mass Storage (OceanDisk Series)
2.1.4.1 - File System
Creating a StorageClass
Prepare a StorageClass configuration file, for example, msc .yaml. For details about the StorageClass configuration, see the following example.
Run the following command to create a StorageClass using the configuration file.
kubectl apply -f mysc.yamlRun the following command to view the information about the created StorageClass.
kubectl get sc myscThe following is an example of the command output.
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE mysc csi.huawei.com Delete Immediate true 8s
NFS Protocol Configuration Example
When a container uses the NFS protocol to connect to file system resources, refer to the following StorageClass configuration example. In this example, NFS version 4.0 is specified for mounting.
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: mysc
provisioner: csi.huawei.com
parameters:
backend: nfs-nas-181
pool: StoragePool001
volumeType: fs
allocType: thin
authClient: "*"
mountOptions:
- nfsvers=4.0 # Specify the version 4.0 for NFS mounting.
StorageClass Parameters Supported by File Systems
Table 1 StorageClass configuration parameters
Take Kubernetes v1.22.1 as an example. The value can contain digits, lowercase letters, hyphens (-), and periods (.), and must start and end with a letter or digit. | |||||
Set this parameter to the driver name set during Huawei CSI installation. The value is the same as that of driverName in the values.yaml file. | |||||
Reclamation policy. The following types are supported: | |||||
Whether to allow volume expansion. If this parameter is set to true, the capacity of the PV that uses the StorageClass can be expanded. | This function can only be used to expand PV capacity but cannot be used to reduce PV capacity. | ||||
List of mount parameters, which can be used to specify the parameters of the -o option when the mount command is executed on a host. | For details about common parameters in mountOptions, see Table 2. | ||||
Name of the backend where the resource to be created is located. This field must be set if parameters.pool is set. | If this parameter is not set, Huawei CSI will randomly select a backend that meets the capacity requirements to create resources. You are advised to specify a backend to ensure that the created resource is located on the expected backend. | ||||
Name of the storage resource pool where the resource to be created is located. | If this parameter is not set, Huawei CSI will randomly select a storage pool that meets the capacity requirements from the selected backend to create resources. You are advised to specify a storage pool to ensure that the created resource is located in the expected storage pool. | ||||
Name of the storage resource created by dynamic volume provisioning. You can configure a placeholder to customize the storage resource name. The following placeholders are supported:
|
PVC namespace: namespace. PVC name: pvc-1. PVC UID: c2fd3f46-bf17-4a7d-b88e-2e3232bae434. volumeName is set to prefix-{{ .PVCNamespace }}_{{ .PVCName }}. The ultimate storage resource name is prefix-namespace_pvc-1-c2fd3f46bf174a7db88e2e3232bae434. | ||||
Type of the volume to be created. The following types are supported: | |||||
Allocation type of the volume to be created. The following types are supported: | If this parameter is set to thin, the required space is not allocated immediately when a volume is created. Instead, the space is dynamically allocated based on the usage. | ||||
IP address of the NFS client that can access the volume. You can enter the client host name (a full domain name is recommended), client IP address, or client IP address segment. | The asterisk (*) can be used to indicate any client. If you are not sure about the IP address of the access client, you are advised to use the asterisk (*) to prevent the client access from being rejected by the storage system. If the client host name is used, you are advised to use the full domain name. The IP addresses can be IPv4 addresses, IPv6 addresses, or a combination of IPv4 and IPv6 addresses. You can enter multiple host names, IP addresses, or IP address segments and separate them with semicolons (;). Example: 192.168.0.10;192.168.0.0/24;myserver1.test | ||||
4 indicates the highest speed. This parameter takes effect when a PV is cloned or a PV is created using a snapshot. | |||||
Log in to DeviceManager and choose Services > File Service > File Systems > Create to obtain the application type name. | |||||
QoS settings of the file system on the storage side of the PV. The value of the parameter is JSON character strings in dictionary format. A character string is enclosed by single quotation marks and the dictionary key by double quotation marks. Example: '{"maxMBPS": 999, "maxIOPS": 999}' | For details about the supported QoS configurations, see Table 3. | ||||
For details about the configuration format, refer to the Linux permission settings, for example, 777 and 755. | |||||
Controls the root permission of the client. | |||||
Whether to retain the user ID (UID) and group ID (GID) of a shared directory. | |||||
Configures the krb5 security protocol. | During mounting, you can specify the sec parameter in mountOptions. | ||||
Configures the krb5i security protocol. | During mounting, you can specify the sec parameter in mountOptions. | ||||
Configures the krb5p security protocol. | During mounting, you can specify the sec parameter in mountOptions. | ||||
Whether the snapshot directory is visible. | |||||
Whether to disable volume capacity verification. After this function is disabled, the system will not verify whether the volume capacity is an integer multiple of the sector size.
| |||||
Advanced volume creation parameters. The value of the parameter is JSON character strings in dictionary format. A character string is enclosed by single quotation marks and the dictionary key by double quotation marks. Example: '{"CAPACITYTHRESHOLD": 90}' | For details about the supported advanced parameters, see Table 4. |
Table 2 Common parameters in mountOptions
Table 3 Supported QoS configurations
Table 4 Supported advanced volume creation parameters
For details about the default value and value range, see the corresponding storage product manual. |
2.1.4.2 - Block Services
Creating a StorageClass
Prepare a StorageClass configuration file, for example, msc .yaml. For details about the StorageClass configuration, see the following example.
Run the following command to create a StorageClass using the configuration file.
kubectl apply -f mysc.yamlRun the following command to view the information about the created StorageClass.
kubectl get sc myscThe following is an example of the command output.
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE mysc csi.huawei.com Delete Immediate true 8s
Block StorageClass Configuration Example
If LUNs are used as storage resources and the file system needs to be formatted to a local file system, refer to the following example.
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: mysc
provisioner: csi.huawei.com
parameters:
backend: lun-181
pool: StoragePool001
volumeType: lun
allocType: thin
fsType: ext4
StorageClass Parameters Supported by Block Services
Table 1 StorageClass configuration parameters
Take Kubernetes v1.22.1 as an example. The value can contain digits, lowercase letters, hyphens (-), and periods (.), and must start and end with a letter or digit. | |||||
Set this parameter to the driver name set during Huawei CSI installation. The value is the same as that of driverName in the values.yaml file. | |||||
Reclamation policy. The following types are supported: | |||||
Whether to allow volume expansion. If this parameter is set to true, the capacity of the PV that uses the StorageClass can be expanded. | This function can only be used to expand PV capacity but cannot be used to reduce PV capacity. | ||||
List of mount parameters, which can be used to specify the parameters of the -o option when the mount command is executed on a host. | For details about common parameters in mountOptions, see Table 2. | ||||
Name of the backend where the resource to be created is located. This field must be set if parameters.pool is set. | If this parameter is not set, Huawei CSI will randomly select a backend that meets the capacity requirements to create resources. You are advised to specify a backend to ensure that the created resource is located on the expected backend. | ||||
Name of the storage resource pool where the resource to be created is located. | If this parameter is not set, Huawei CSI will randomly select a storage pool that meets the capacity requirements from the selected backend to create resources. You are advised to specify a storage pool to ensure that the created resource is located in the expected storage pool. | ||||
Type of the volume to be created. The following types are supported: | |||||
Allocation type of the volume to be created. The following types are supported: | If this parameter is set to thin, the required space is not allocated immediately when a volume is created. Instead, the space is dynamically allocated based on the usage. | ||||
Type of a host file system. The supported types are:
| This parameter is available only when volumeMode of the PVC is set to Filesystem. | ||||
4 indicates the highest speed. This parameter takes effect when you clone a PVC or create a PVC from a snapshot. | |||||
Log in to DeviceManager and choose Services > Block Service > LUN Groups (or Namespace Groups) > LUNs (or Namespaces) > Create to obtain the application type name. | |||||
LUN/NAS QoS settings of the PV on the storage side. The value of the parameter is JSON character strings in dictionary format. A character string is enclosed by single quotation marks and the dictionary key by double quotation marks. Example: '{"maxMBPS": 999, "maxIOPS": 999}' | For details about the supported QoS configurations, see Table 3. | ||||
For details about the configuration format, refer to the Linux permission settings, for example, 777 and 755. | |||||
Whether to disable volume capacity verification. After this function is disabled, the system will not verify whether the volume capacity is an integer multiple of the sector size.
| |||||
Table 2 Common parameters in mountOptions
Automatically triggers the Trim or Discard operation when a file system is mounted. This operation instructs a block device to release unused blocks. |
Table 3 Supported QoS configurations
The value is an integer ranging from 1 to 999999999, expressed in MB/s. | ||
The value is an integer ranging from 1 to 999999999, expressed in MB/s. | ||
2.2 - Managing a StorageClass
2.2.1 - Querying a StorageClass
Run the following command to view the information about the created StorageClass.
kubectl get sc myscThe following is an example of the command output.
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE mysc csi.huawei.com Delete Immediate true 8s
2.2.2 - Modifying a StorageClass
Kubernetes allows only the allowVolumeExpansion field of a StorageClass to be modified. The modification method is as follows:
Run the following command to check whether the StorageClass can be expanded:
kubectl get sc myscIf the command output is displayed as the following example, the StorageClass mysc cannot be expanded:
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE mysc csi.huawei.com Delete Immediate false 8sRun the following command to enable capacity expansion for the StorageClass:
kubectl patch sc mysc --patch '{"allowVolumeExpansion":true}'Check the StorageClass again and ensure that the modification is successful.
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE mysc csi.huawei.com Delete Immediate true 8s
2.2.3 - Deleting a StorageClass
Run the following command to view the StorageClass:
kubectl get sc myscThe following is an example of the command output.
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE mysc csi.huawei.com Delete Immediate false 8sRun the following command to delete the StorageClass:
kubectl delete sc myscIf the following information is displayed, the deletion is successful:
storageclass.storage.k8s.io "mysc" deleted
3 - Persistent Volume Management
Based on service requirements, files in containers need to be persistently stored on disks. When the containers are re-built or re-allocated to new nodes, the persistent data can still be used.
To persistently store data on storage devices, you need to use the PersistentVolume (PV) and PersistentVolumeClaim (PVC) when provisioning containers.
- PV: a piece of storage in the Kubernetes cluster that has been provisioned by an administrator or dynamically provisioned using a StorageClass .
- PVC: a request for storage by a user. A PVC consumes PV resources. A PVC can request specific size and access modes. For example, a PV can be mounted in ReadWriteOnce, ReadOnlyMany, or ReadWriteMany mode. For details, see Access Modes .
This section describes how to use Huawei CSI to create, clone, and expand the capacity of a PV and PVC.
3.1 - Configuring PVs
Huawei CSI allows storage resources (LUNs or file systems) to be created on Huawei storage and provided for containers based on user settings. For details about the supported features, see Compatibility and Features of the storage device.
PV configurations can be classified into configuring dynamic PVs or static PVs, and managing PVs.
- Configuring dynamic PV does not require a PV to be created in advance. Huawei CSI automatically creates resources required by a PV on storage devices based on a StorageClass. In addition, you can create a PV when creating a PVC.
- Configuring a static PV requires the administrator to create required resources on a storage device in advance and use existing resources by creating a PV. In addition, you can specify the associated PV when creating a PVC.
- Managing PVs does not require a PV to be created in advance. You can specify the StorageClass and resource information on the storage device in a PVC. Create the PVC and PV at the same time, and manage all existing storage resources in the cluster.
3.1.1 - Configuring Dynamic PVs
Dynamic volume provisioning allows storage volumes to be created on demand. Dynamic volume provisioning depends on the StorageClass objects. The cluster administrator can define multiple StorageClass objects as required and specify a StorageClass that meets service requirements when declaring a PV or PVC. When applying for resources from Huawei storage devices, Huawei CSI creates storage resources that meet service requirements based on the preset StorageClass.
Configuration Description
Perform the following steps to configure and use dynamic PVs:
Preparation
Before configuring dynamic PVs, configure StorageClass by referring to Configuring a StorageClass .
Configuring a PVC
Prepare the PVC configuration file mypv.yaml. The following is an example. For details about other parameters, see Table 1 .
kind: PersistentVolumeClaim apiVersion: v1 metadata: name: mypvc spec: accessModes: - ReadWriteOnce volumeMode: Filesystem storageClassName: mysc resources: requests: storage: 100GiRun the following command to create a PVC using the configuration file.
kubectl create -f mypvc.yamlAfter a period of time, run the following command to view the information about the created PVC.
kubectl get pvc mypvcThe following is an example of the command output. If the PVC status is Bound, the PVC has been created and can be used by a Pod.
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE mypvc Bound pvc-840054d3-1d5b-4153-b73f-826f980abf9e 100Gi RWO mysc 12s
- After the PVC is created, if the PVC is in the Pending state after a long time (for example, one minute), refer to When a PVC Is Created, the PVC Is in the Pending State .
- You are advised to create or delete a maximum of 100 PVCs in a batch.
Table 1 PVC parameters for configuring a dynamic PV
Take Kubernetes v1.22.1 as an example. The value can contain digits, lowercase letters, hyphens (-), and periods (.), and must start and end with a letter or digit. | ||||
Volume mode. This parameter is optional. When LUN volumes are used, the following types are supported: | This parameter takes effect when a PV is mounted. The default value is Filesystem. | |||
Size of the volume to be created. The format is ***Gi and the unit is GiB. | The PVC capacity depends on storage specifications and host specifications. For example, OceanStor Dorado 6.1.2 or OceanStor Pacific series 8.1.0 is connected to CentOS 7. If ext4 file systems are used, see Table 2. If XFS file systems are used, see Table 3. If NFS or raw devices are used, the capacity must meet the specifications of the used Huawei storage device model and version. If the PVC capacity does not meet the specifications, a PVC or Pod may fail to be created due to the limitations of storage specifications or host file system specifications. | |||
|
|
Table 2 ext4 capacity specifications
Table 3 XFS capacity specifications
Using a PVC
After a PVC is created, you can use the PVC to create a Pod. The following is a simple example of using a PVC. In this example, the created Pod uses the newly created mypvc.
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 2
template:
metadata:
labels:
app: nginx
spec:
containers:
- image: nginx:alpine
name: container-0
volumeMounts:
- mountPath: /tmp
name: pvc-mypvc
restartPolicy: Always
volumes:
- name: pvc-mypvc
persistentVolumeClaim:
claimName: mypvc # name of PVC
If Pods are batch created using PVCs, the Pods are in the ContainerCreating status for a long time, and the huawei-csi-node service is in the OOMKilled status, the memory of the huawei-csi-node service is insufficient. Increase the memory limit of huawei-csi-node by referring to Table 1 .
3.1.2 - Configuring a Static PV
Static volume provisioning allows administrators to use a resource created on the storage side as a PV for containers in the cluster.
Configuration Description
Perform the following steps to configure a static PV:
Preparation
A storage resource, such as a LUN or file system, required by the PV to be created exists on the storage device. If the storage resource is a file system, you also need to create the share and client information of the file system.
Configuring a PV
Prepare the PV configuration file mypv.yaml. The following is an example. For details about other parameters, see Table 1 .
kind: PersistentVolume apiVersion: v1 metadata: name: mypv spec: volumeMode: Filesystem storageClassName: "" # The value must be to "". accessModes: - ReadWriteOnce csi: driver: csi.huawei.com # Enter the CSI driver name. volumeHandle: iscsi-dorado-181.lun0001 # Enter the volume name. fsType: xfs # Set the file system type. capacity: storage: 100Gi
In the configuration file for static volume provisioning, storageClassName must be set to "". Otherwise, Kubernetes will use the default StorageClass.Run the following command to create a PV based on the prepared .yaml file.
kubectl create -f mypv.yamlAfter a period of time, run the following command to view the information about the created PV.
kubectl get pvThe following is an example of the command output. If the PV status is Available, the PV is successfully created.
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE mypv 100Gi RWO Retain Available 4s
Table 1 Parameters for configuring a static PV
Take Kubernetes v1.22.1 as an example. The value can contain digits, lowercase letters, hyphens (-), and periods (.), and must start and end with a letter or digit. | ||||
Volume mode. This parameter is optional. When LUN volumes are used, the following types are supported: | This parameter takes effect when a PV is mounted. The default value is Filesystem. | |||
Name of the StorageClass object. This parameter is mandatory. | ||||
|
| |||
Set this parameter to the driver name set during Huawei CSI installation. | ||||
Unique identifier of a storage resource. This parameter is mandatory. | The value of this parameter consists of the following parts: | |||
Type of a host file system. This parameter is optional. The supported types are:
| If this parameter is not set, the default value ext4 is used. This parameter is available only when volumeMode is set to Filesystem. | |||
Name of the parent file system when the volume resource type is dtree. | This parameter is mandatory when the managed object is a dtree resource and the parentname parameter is not configured in the storage backend. If dTreeParentName is configured only in the PV but parentname is not configured in the corresponding storage backend, set CSIDriverObject.attachRequired to true during CSI installation according to Table 5. | |||
Ensure that the size is the same as that of the corresponding resource on the storage. Kubernetes will not invoke CSI to check whether the value of this parameter is correct. Therefore, the PV can be successfully created even if its capacity is inconsistent with that of the corresponding resource on the storage. | ||||
NFS mount option on the host. The following mount option is supported: nfsvers: protocol version for NFS mounting. The value can be 3, 4, 4.0, 4.1, or 4.2. | This parameter is optional after the -o parameter when the mount command is executed on the host. The value is in list format. If the NFS version is specified for mounting, NFS 3, 4.0, 4.1, and 4.2 protocols are supported (the protocol must be supported and enabled on storage devices). If nfsvers is set to 4, the latest protocol version NFS 4 may be used for mounting due to different OS configurations, for example, 4.2. If the 4.0 protocol is required, you are advised to set nfsvers to 4.0. | |||
The DPC namespace supports the ACL function. The DPC client supports POSIX ACL, NFSv4 ACL, and NT ACL authentication. | The descriptions of acl, aclonlyposix, cnflush, and cflush are for reference only. For details about the parameters, see OceanStor Pacific Series Product Documentation and choose Configuration > Basic Service Configuration Guide for File > Configuring Basic Services (DPC Scenario) > Accessing a DPC Share on a Client > Step 2. | |||
The DPC namespace supports POSIX ACL, and the DPC client supports POSIX ACL authentication. The following protocols support POSIX ACL: DPC, NFSv3, and HDFS. If NFSv4 ACL or NT ACL is used, the DPC client cannot identify the ACL of this type. As a result, the ACL of this type does not take effect. | If aclonlyposix and acl are used together, only acl takes effect. That is, the namespace supports the ACL function. | |||
Asynchronous disk flushing mode. That is, data is not flushed to disks immediately when files in the namespace are closed. | Asynchronous flushing mode: When a file is closed, data in the cache is not flushed to storage media in synchronous mode. Instead, data is written from the cache to the storage media in asynchronous flushing mode. After the write service is complete, data is flushed from the cache to disks periodically based on the flushing period. In a multi-client scenario, if concurrent operations are performed on the same file, the file size update is affected by the disk flushing period. That is, the file size is updated only after the disk flushing is complete. Generally, the update is completed within several seconds. Synchronous I/Os are not affected by the disk flushing period. | |||
Synchronous disk flushing mode. That is, data is flushed to disks immediately when files in the namespace are closed. |
Configuring a PVC
After a PV is created in static volume provisioning mode, you can create a PVC based on the PV for containers.
Prepare the PVC configuration file mypv.yaml. The following is an example. For details about other parameters, see Table 2 .
kind: PersistentVolumeClaim apiVersion: v1 metadata: name: mypvc spec: storageClassName: "" accessModes: - ReadWriteOnce volumeMode: Filesystem resources: requests: storage: 100Gi volumeName: mypv # Enter the name of the corresponding PV.Run the following command to create a PVC based on the configured .yaml file.
kubectl create -f mypvc.yamlAfter a period of time, run the following command to view the information about the created PVC.
kubectl get pvcThe following is an example of the command output. If the PVC status is Bound, the PVC is successfully created.
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE mypvc Bound pvc-840054d3-1d5b-4153-b73f-826f980abf9e 100Gi RWO 12s
- After the PVC is created, if the PVC is in the Pending state after a long time, see When a PVC Is Created, the PVC Is in the Pending State .
- You are advised to create or delete a maximum of 100 PVCs in a batch.
Table 2 PVC parameters for configuring a static PV
Take Kubernetes v1.22.1 as an example. The value can contain digits, lowercase letters, hyphens (-), and periods (.), and must start and end with a letter or digit. | ||||
|
| |||
This parameter is optional. The value can be Filesystem or Block. The default value is Filesystem. This parameter takes effect when a Pod is created. Filesystem indicates that a file system is created on a PVC to access the storage. Block indicates that a raw volume is used to access the storage. | ||||
Size of the volume to be created. The format is ***Gi and the unit is GiB. The PVC capacity depends on storage specifications and host specifications. For example, OceanStor Dorado 6.1.2 or OceanStor Pacific series 8.1.0 is connected to CentOS 7. If ext4 file systems are used, see Table 2. If XFS file systems are used, see Table 3. If NFS or raw devices are used, the capacity must meet the specifications of the used Huawei storage device model and version. If the PVC capacity does not meet the specifications, a PVC or Pod may fail to be created due to the limitations of storage specifications or host file system specifications. When a PVC is created using a static PV and the PVC capacity is smaller than the capacity of the bound PV, the PVC capacity is set to the capacity of the bound PV. If the PVC capacity is greater than the capacity of the bound PV, the PVC cannot be created. | ||||
This parameter is mandatory when a PVC is created statically. | ||||
When a PVC is created, an empty character string is transferred. If this parameter is not set, the default StorageClass object name will be used. |
Using a PVC
The use method is the same as that for dynamic volume provisioning in Using a PVC .
3.1.3 - Managing PVs
Manage Volume Provisioning allows administrators to use resources created on storage as PVs and supports features of dynamic volumes, such as capacity expansion, snapshot, and clone. This is a custom capability of Huawei CSI. This feature applies to the following scenarios:
- In the reconstruction containerized applications, existing storage volumes need to be used.
- The Kubernetes cluster is rebuilt.
- Storage data is migrated in disaster recovery (DR) scenarios.
Manage Volume Provisioning allows existing storage resources to be managed by Kubernetes. You are not allowed to manage a storage resource for multiple times and concurrently delete or create a storage resource. When a storage resource is managed by multiple clusters, operations on the managed volume in a single cluster take effect only in the cluster and will not be synchronized to other clusters. Instead, you need to perform these operations on the managed volume in other clusters. For example, when you expand the capacity of a PVC in a cluster, the capacity of the corresponding PVC in other clusters will not be automatically expanded. In this case, you need to manually expand the capacity in other clusters by running the expansion commands in Expanding the Capacity of a PV .
Configuration Description
Perform the following steps to manage and use PVs:
Preparation
- You have registered the storage where the volume to be managed resides with CSI.
- You have logged in to the storage device to obtain the name and capacity of the volume to be managed.
- The StorageClass has been configured. For details, see Configuring a StorageClass (pay attention to the Whether the Volume Management Takes Effect field in the table).
Configuring a PVC
Prepare the PVC configuration file mypv.yaml. The following is an example. For details about other parameters, see Table 1 .
kind: PersistentVolumeClaim apiVersion: v1 metadata: name: mypvc annotations: csi.huawei.com/manageVolumeName: "*" # Enter the storage resource name. csi.huawei.com/manageBackendName: "*" # Enter the storage backend name. labels: provisioner: csi.huawei.com spec: accessModes: - ReadWriteOnce volumeMode: Filesystem storageClassName: mysc resources: requests: storage: 100GiRun the following command to create a PVC using the configuration file.
kubectl create -f mypvc.yamlAfter a period of time, run the following command to view the information about the created PVC.
kubectl get pvc mypvcThe following is an example of the command output. If the PVC status is Bound, the PVC has been created and can be used by a Pod.
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE mypvc Bound pvc-840054d3-1d5b-4153-b73f-826f980abf9e 100Gi RWO mysc 12s
- After the PVC is created, if the PVC is in the Pending state after a long time (for example, one minute), refer to When a PVC Is Created, the PVC Is in the Pending State .
- You are advised to create or delete a maximum of 100 PVCs in a batch.
Table 1 PVC parameters for managing PVs
PVC object annotations. Set the following parameters: | csi.huawei.com/manageVolumeName: * csi.huawei.com/manageBackendName: * |
You can run the oceanctl get backend -n huawei-csi command to obtain the backend name. | ||
Format: provisioner: Driver name specified during installation Example: provisioner: csi.huawei.com This parameter takes effect when a PVC is created. It is used to listen to PVC resources and obtain information about metadata.annotations. | ||||
Take Kubernetes v1.22.1 as an example. The value can contain digits, lowercase letters, hyphens (-), and periods (.), and must start and end with a letter or digit. | ||||
Volume mode. This parameter is optional. When LUN volumes are used, the following types are supported: NOTE: This parameter takes effect when a PV is mounted. The use method of this parameter must be the same as that of the managed volume.
| This parameter takes effect when a PV is mounted. | |||
The configuration of the StorageClass must be the same as that of the managed volume. | ||||
Size of the volume to be created. The format is ***Gi and the unit is GiB. | The PVC capacity depends on storage specifications and host specifications. For example, OceanStor Dorado 6.1.2 or OceanStor Pacific series 8.1.0 is connected to CentOS 7. If ext4 file systems are used, see Table 2. If XFS file systems are used, see Table 3. If NFS or raw devices are used, the capacity must meet the specifications of the used Huawei storage device model and version. If the PVC capacity does not meet the specifications, a PVC or Pod may fail to be created due to the limitations of storage specifications or host file system specifications. | |||
|
|
Using a PVC
The procedure is the same as that for Using a PVC for dynamic volume provisioning.
3.2 - Managing PVs
3.2.1 - Expanding the Capacity of a PV
For OceanStor V700R001C10 as well as OceanStor Dorado V700R001C10 and later versions, the minimum capacity of a file system after capacity expansion is limited. For details, see the product documentation of the corresponding storage device.
When the capacity of a PVC used by a container is insufficient, you need to expand the capacity of the PVC.
Prerequisites
A PVC has been created, the backend to which it resides exists and supports capacity expansion.
Compatibility and Features lists the storage that supports capacity expansion, and Kubernetes Feature Matrix lists the Kubernetes versions that support capacity expansion.
The csi-resizer service is enabled for huawei-csi-controller.
kubectl describe deploy huawei-csi-controller -n huawei-csi | grep csi-resizerIf the following information is displayed, the csi-resizer service is enabled.
csi-resizer: Image: k8s.gcr.io/sig-storage/csi-resizer:v1.9.0
Procedure
Run the following command to check whether the StorageClass supports capacity expansion. In the preceding command, mysc indicates the name of the StorageClass to be queried.
kubectl get sc myscThe following is an example of the command output.
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE mysc csi.huawei.com Delete Immediate true 172mIf the value of ALLOWVOLUMEEXPANSION is true, the current StorageClass supports capacity expansion. In this case, go to 3 .
Run the following command to change the value of allowVolumeExpansion to true. In the preceding command, mysc indicates the name of the StorageClass to be modified.
kubectl patch sc mysc --patch '{"allowVolumeExpansion":true}'Run the following command to query the StorageClass name of the PVC. In the preceding command, mypvc indicates the name of the PVC to be expanded.
kubectl get pvc mypvcThe following is an example of the command output.
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE mypvc Bound pvc-3383be36-537c-4cb1-8f32-a415fa6ba384 2Gi RW0 mysc 145mRun the following command to expand the capacity.
kubectl patch pvc mypvc -p '{"spec":{"resources":{"requests":{"storage":"120Gi"}}}}'In the preceding command, mypvc indicates the name of the PVC to be expanded, and 120Gi indicates the capacity after expansion. Change the values based on the site requirements.

- The PVC capacity depends on storage specifications and host specifications. For example, OceanStor Dorado 6.1.2 or OceanStor Pacific series 8.1.0 is connected to CentOS 7. If ext4 file systems are used, see Table 2 . If XFS file systems are used, see Table 3 . If NFS or raw devices are used, the capacity must meet the specifications of the used Huawei storage device model and version.
- If the PVC capacity does not meet the specifications, a PVC or Pod may fail to be created due to the limitations of storage specifications or host file system specifications.
- If the capacity expansion fails because the target capacity exceeds the storage pool capacity, see Failed to Expand the PVC Capacity Because the Target Capacity Exceeds the Storage Pool Capacity .
Run the following command to check whether the capacity modification takes effect.
kubectl get pvcThe following is an example of the command output. If the value of CAPACITY is changed to the specified capacity, the capacity expansion is successful.
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE mypvc Bound pvc-3383be36-537c-4cb1-8f32-a415fa6ba384 120Gi RWO mysc 24s
3.2.2 - Cloning a PV
This section describes how to clone a PVC.
When cloning a PVC, you need to specify the data source. The following is an example of cloning a PVC. In this example, mypvc is used as the data source and a PVC named myclone is created.
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: myclone
spec:
storageClassName: mysc
dataSource:
name: mypvc
kind: PersistentVolumeClaim
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
- The specified storageClassName must be the same as the StorageClass of the source volume in dataSource.
- The capacity of the clone volume must be greater than or equal to that of the source volume. Equal capacity is recommended.
Prerequisites
The source PVC already exists in the system, and the backend where the source PVC resides supports cloning. Compatibility and Features lists the storage that supports cloning, and Kubernetes Feature Matrix lists the Kubernetes versions that support cloning.
Procedure
Run the following command to create a PVC based on the configuration file of the clone volume.
kubectl create -f myclone.yaml
3.2.3 - Changing a PV
3.2.3.1 - Enabling the PVC Change Feature
The PVC change feature is disabled by default during Huawei CSI installation. To use this feature, perform the following steps.
3.2.3.1.1 - Enabling the PVC Change Feature Using Helm
Prerequisites
You have installed Huawei CSI using Helm.
Procedure
Use a remote access tool, such as PuTTY, to log in to any master node in the Kubernetes cluster through the management IP address.
Run the following command to check whether the PVC change feature is enabled.
helm-huawei-csi indicates the Helm chart name specified during installation, and huawei-csi indicates the Helm chart namespace specified during installation. For details about the component package path, see Table 1 .
helm get values helm-huawei-csi -n huawei-csi -a | grep volumeModify -A 1The following is an example of the command output.
- If enabled: true is displayed in the command output, the feature is enabled. In this case, skip the following steps.
- If enabled: false is displayed in the command output, perform the following steps to enable the PVC change feature.
volumeModify: enabled: falseGo to the /helm/esdk directory and run the following command to configure the volume change CRD.
# kubectl apply -f ./crds/volume-modify/ customresourcedefinition.apiextensions.k8s.io/volumemodifyclaims.xuanwu.huawei.io configured customresourcedefinition.apiextensions.k8s.io/volumemodifycontents.xuanwu.huawei.io configured
If the command output contains Warning: resource customresourcedefinitions/volumemodifycontents.xuanwu.huawei.io is missing the kubectl.kubernetes.io/last-applied-configuration…, you can ignore it. This message is displayed because the kubectl create command instead of the kubectl apply command is used for installation by Helm.Run the following command to obtain the original service configuration file.
helm get values helm-huawei-csi -n huawei-csi -a > ./update-values.yamlRun the vi update-values.yaml command to open the file obtained in 4 and modify the following configuration. After the modification is complete, press Esc and enter :wq! to save the modification.
csiExtender: volumeModify: enabled: trueRun the following command to update Huawei CSI services.
helm upgrade helm-huawei-csi ./ -n huawei-csi -f ./update-values.yamlRun the following command to check whether the services are started.
kubectl get pod -n huawei-csiThe following is an example of the command output. In the preceding command, huawei-csi indicates the namespace for deploying Huawei CSI.
NAME READY STATUS RESTARTS AGE huawei-csi-controller-6dfcc4b79f-9vjtq 10/10 Running 0 24m huawei-csi-node-tqs87 3/3 Running 0 20m
3.2.3.1.2 - Enabling the PVC Change Feature Manually
Prerequisites
Huawei CSI has been manually installed.
Procedure
Use a remote access tool, such as PuTTY, to log in to any master node in the Kubernetes cluster through the management IP address.
Go to the manual/esdk working directory and run the following command to configure the volume change CRD.
kubectl apply -f ./crds/volume-modify/Run the following command. For details about the component package path, see Table 1 .
kubectl apply -f ./deploy/huawei-csi-controller-extender.yamlRun the following command to check whether the services are started.
kubectl get pod -n huawei-csiThe following is an example of the command output. In the preceding command, huawei-csi indicates the namespace for deploying Huawei CSI.
NAME READY STATUS RESTARTS AGE huawei-csi-controller-6dfcc4b79f-9vjtq 10/10 Running 0 24m huawei-csi-node-tqs87 3/3 Running 0 24m
3.2.3.2 - Configuring PVC Changes
The PVC change feature is implemented using CRD. Related resources are described as follows.
Table 1 Resource description
- VolumeModifyClaim resources can be created, deleted, and queried, but cannot be updated.
- VolumeModifyContent resources can only be queried and are used to display the change details of a single PVC. Do not manually create, delete, or modify the resources.
- VolumeModifyContent resources are managed by VolumeModifyClaim. Do not manually manage VolumeModifyContent resources.
3.2.3.2.1 - Creating a PVC Change
Prerequisites
The storage backends associated with the PVC to be changed are HyperMetro storage backends. If they are not HyperMetro storage backends, configure them by following the instructions in Updating a Storage Backend .
PVC Change File Description
The sample template of the PVC change file is /examples/volumemodifyclaim.yaml. The following table lists the configuration items.
Table 1 Parameter description
Name of a cluster resource object, which is of the string type. | The name must comply with the naming rules of a DNS subdomain name. The value can contain a maximum of 63 characters, including digits, lowercase letters, hyphens (-), and periods (.). It must start and end with a lowercase letter or digit. Note: During a PVC change, the original StorageClass is backed up. The name of the backup StorageClass is <Original StorageClass name><VolumeModifyClaim name>, and must comply with the StorageClass naming rules. | |||
Whether to change a common volume to a HyperMetro volume. Currently, the value can only be "true". | Only common storage volumes at the primary site can be changed to HyperMetro storage volumes. | |||
Data synchronization speed of a HyperMetro pair. The value ranges from 1 to 4. | This parameter is available only when spec.parameters.hyperMetro is set to "true".
|
- The spec.source.kind and spec.source.name parameters are used to specify the volume change scope. For example, if they are set to a StorageClass and the corresponding name respectively, all PVCs in the Bound state provisioned using the target StorageClass will be changed.
- After all associated PVCs are changed, Huawei CSI will replace the original StorageClass and add the spec.parameters parameter of the VolumeModifyClaim so that the PVCs meet the StorageClass definition.
For details about the configuration in typical scenarios, see the following example:
Changing a Common Volume to a HyperMetro Volume
The following is an example of changing a common volume to a HyperMetro volume:
apiVersion: xuanwu.huawei.io/v1
kind: VolumeModifyClaim
metadata:
name: myvmc
spec:
source:
kind: StorageClass
name: mysc
parameters:
hyperMetro: "true"
Creating a PVC Change Resource
- The changed HyperMetro volumes must be in HyperMetro AA mode.
- When a common volume is changed to a HyperMetro volume, only the storage volume at the primary site can be changed.
- Do not use Huawei CSI to manage a PVC during PVC change resource creation.
- Multiple VolumeModifyClaim resources cannot be created for the same PVC. If the target PVC needs to be changed for multiple times, perform the changes one by one.
To create a PVC change resource using a PVC change file, perform the following steps:
Use a remote access tool, such as PuTTY, to log in to any master node in the Kubernetes cluster through the management IP address.
Run the following command to create a PVC change.
kubectl create -f volumemodifyclaim.yamlQuery the creation result by following the instructions in Querying a PVC Change .
3.2.3.2.2 - Querying a PVC Change
This section describes how to use Kubectl to query the PVC change status. Currently, Huawei CSI provides the following APIs through CRD.
Querying a VolumeModifyClaim
To query a VolumeModifyClaim using kubectl, perform the following steps.
Use a remote access tool, such as PuTTY, to log in to any master node in the Kubernetes cluster through the management IP address.
Run the following command to query a PVC change. In the command, vmc-name indicates the name of the VolumeModifyClaim resource.
kubectl get volumemodifyclaims <vmc-name> -owideThe following is an example of the command output.
NAME STATUS READY SOURCEKIND SOURCENAME STARTEDAT COMPLETEDAT AGE myvmc Completed 1/1 StorageClass mysc 2024-06-06T03:19:13Z 2024-06-06T03:19:16Z 2m2sTable 1 Command output description
You can use kubectl to view the Events information of a VolumeModifyClaim. If a VolumeModifyClaim cannot meet the creation requirements or an error occurs during the creation, the server will record the Events information. The following command is used as an example:kubectl describe volumemodifyclaims local-to-hypermetro
Querying a VolumeModifyContent
A VolumeModifyContent is created using a VolumeModifyClaim and records the change details of a single PVC. To query a VolumeModifyContent using kubectl, perform the following steps:
Use a remote access tool, such as PuTTY, to log in to any master node in the Kubernetes cluster through the management IP address.
Run the following command to query a PVC change. In the command, myvmc-uid indicates the VolumeModifyContent resource name.
kubectl get volumemodifycontents myvmc-uid -owideThe following is an example of the command output.
NAME STATUS MODIFYCLAIMNAME SOURCEVOLUME STARTEDAT COMPLETEDAT AGE myvmc-uid Completed myvmc default/mypvc 2024-06-06T03:19:07Z 2024-06-06T03:19:09Z 36mTable 2 Command output description
You can use kubectl to view the Events information of a VolumeModifyContent. If a VolumeModifyContent cannot meet the creation requirements or an error occurs during the PVC change, the server will record the Events information. The following command is used as an example:kubectl describe volumemodifycontents myvmc-uid
3.2.3.2.3 - Deleting a PVC Change
- If STATUS of a VolumeModifyClaim is Creating, deleting the VolumeModifyClaim resource will delete the created resource on the storage side and then remove the cluster resource. After the deletion, if you continue to use the original StorageClass for PVC management, you need to restore the associated storage backend to a non-HyperMetro storage backend.
- If STATUS of a VolumeModifyClaim is Pending or Completed, deleting the VolumeModifyClaim resource will only remove the cluster resource and will not delete the created resource on the storage side (that is, there is not interaction with the storage side).
- VolumeModifyContent resources are managed by VolumeModifyClaim. Do not manually manage VolumeModifyContent resources.
- If some PVCs among the PVCs to be changed meet the change requirements and the batch change fails, all PVC changes will be removed. As a result, the PVCs that meet the change requirements will not meet the change requirements.
- If a PVC to be changed has been manually managed on the storage side, the change may fail. Do not manually manage storage volumes when using the change feature.
This section describes how to use kubectl to delete a PVC change. The procedure is as follows.
Procedure
Use a remote access tool, such as PuTTY, to log in to any master node in the Kubernetes cluster through the management IP address.
Run the following command to delete a PVC change. In the command, vmc-name indicates the name of the VolumeModifyClaim resource.
kubectl delete volumemodifyclaims <vmc-name>Query the creation result by following the instructions in Querying a PVC Change .