PVC Parameters for Manage Volume Provisioning

After configuring a StorageClass, you can use the StorageClass to configure a PVC. For details about the PVC configuration template, see example file pvc-manager.yaml in the examples directory in Huawei CSI software package.

Table 1 Parameters in the pvc-manager.yaml file

Parameter

Description

Mandatory

Default Value

Remarks

metadata.annotations

PVC object annotations. Set the following parameters:

  • Driver name/manageVolumeName: volume name on the storage.
  • Driver name/manageBackendName: name of the backend to which the volume belongs.

Yes

csi.huawei.com/manageVolumeName: * csi.huawei.com/manageBackendName: *

  • For details about how to obtain Driver name, see Table 4.
  • Driver name/manageVolumeName: name of an existing volume on the storage. Only English characters are supported.
  • Driver name/manageBackendName: name of the storage backend in CSI.

You can run the oceanctl get backend -n huawei-csi command to obtain the backend name.

metadata.labels

PVC object labels.

No

-

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.

metadata.name

User-defined name of a PVC object.

Yes

-

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.

spec.volumeMode

Volume mode. This parameter is optional. When LUN volumes are used, the following types are supported:

  • Filesystem: local file system.
  • Block: raw device.
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.

  • If a volume is used as a raw volume before being managed, volumeMode must be set to Block.
  • If a volume is used in ext2, ext3, or ext4 mode before being managed, volumeMode must be set to Filesystem and fsType in the StorageClass must be set to ext2, ext3, or ext4.
  • If a volume is used in XFS mode before being managed, volumeMode must be set to Filesystem and fsType in the StorageClass must be set to xfs.

No

Filesystem

This parameter takes effect when a PV is mounted.

  • Filesystem indicates that a container accesses a PV using a local file system. The local file system type is specified by the fsType field in the specified StorageClass.
  • Block indicates that a PV is accessed in raw volume mode.

spec.storageClassName

Name of the StorageClass object.

Yes

-

The configuration of the StorageClass must be the same as that of the managed volume.

spec.resources.requests.storage

Size of the volume to be created. The format is ***Gi and the unit is GiB. The size must be an integer multiple of 512 bytes.

Yes

-

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.

spec.accessModes

Access mode of the volume.

  • RWO (ReadWriteOnce): A volume can be mounted to a node in read/write mode. This mode also allows multiple Pods running on the same node to access the volume.
  • ROX (ReadOnlyMany): A volume can be mounted to multiple nodes in read-only mode.
  • RWX (ReadWriteMany): A volume can be mounted to multiple nodes in read/write mode.
  • RWOP (ReadWriteOncePod): A volume can only be mounted to a single Pod in read/write mode. Kubernetes 1.22 and later versions support this feature.

Yes

ReadWriteOnce

  • RWO/ROX/RWOP: supported by all types of volumes. RWOP is supported only by Kubernetes 1.22 and later versions. Check whether this feature is enabled for your Kubernetes cluster by referring to Enabling the ReadWriteOncePod Feature Gate.
  • The support for RWX is as follows:

Table 2 ext4 capacity specifications

Storage Type

Storage Specifications

ext4 Specifications

CSI Specifications

OceanStor Dorado 6.1.2

512 Ki to 256 Ti

50 Ti

512 Ki to 50 Ti

OceanStor Pacific series 8.1.0

64 Mi to 512 Ti

50 Ti

64 Mi to 50 Ti

Table 3 XFS capacity specifications

Storage Type

Storage Specifications

XFS Specifications

CSI Specifications

OceanStor Dorado 6.1.2

512 Ki to 256 Ti

500 Ti

512 Ki to 500 Ti

OceanStor Pacific series 8.1.0

64 Mi to 512 Ti

500 Ti

64 Mi to 500 Ti