Setting Mount Options for a Parallel File System Volume
This section describes how to configure mount options for a parallel file system volume. You can set mount options for a PV and then bind the PV to a PVC.
Mount Options for a Parallel File System Volume
When you mount a parallel file system volume, CCI 2.0 sets the parameters in Table 1 and Table 2 by default. The parameters in Table 1 cannot be canceled. You can configure other mount options if needed. For details, see Mounting a Parallel File System.
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
use_ino |
Yes |
No parameter value is required. |
Description: inode numbers allocated by obsfs. This option is enabled by default in read/write mode. |
big_writes |
Yes |
No parameter value is required. |
Description: If this parameter is configured, the maximum size of the write cache can be changed. |
nonempty |
Yes |
No parameter value is required. |
Description: The mount directory can contain files. |
allow_other |
Yes |
No parameter value is required. |
Description: Other users can access the mount point. |
no_check_certificate |
Yes |
No parameter value is required. |
Description: The server certificate is not verified. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
max_write |
No |
Integer |
Description: This parameter is only valid when big_writes is configured. The recommended value is 128 KB. Default value: 131072 |
ssl_verify_hostname |
No |
Integer |
Description: Do not verify the SSL certificate using the host name. Default value: 0 |
max_background |
No |
Integer |
Description: The maximum number of requests that can be waited in the backend. The value is automatically used by the parallel file system volume. Default value: 100 |
umask |
No |
Integer |
Description: File permission umask. For example, if the umask value is 022, the directory permission (the maximum permission is 777) is 755 (777 – 022 = 755, rwxr-xr-x). Default value: 0 |
Configuring Mount Options in a PV
You can use the mountOptions field to configure mount options in a PV. The options you can configure in mountOptions are listed in Mount Options for a Parallel File System Volume.
- Use ccictl to connect to CCI 2.0.
- Configure mount options in a PV. The following is an example:
apiVersion: cci/v2 kind: PersistentVolume metadata: name: pv-obs # PV name. spec: accessModes: - ReadWriteMany # The access mode must be ReadWriteMany for parallel file system volumes. capacity: storage: 1Gi # Storage capacity. This parameter is only for verification. Its value cannot be empty or 0, and any value you set does not take effect for parallel file systems. csi: driver: obs.csi.everest.io # Storage driver that the volume depends on. fsType: obsfs # Instance type. volumeHandle: <your_file_system_name> # Name of the parallel file system. nodePublishSecretRef: # Secret for the parallel file system volume. name: <your_secret_name> # Secret name. namespace: <your_namespace> # Name of the secret. persistentVolumeReclaimPolicy: Retain # Reclaim policy. storageClassName: csi-obs # Storage class name. mountOptions: # Mount options. - umask=027
- Create a PVC, bind the created PV to it, and mount the PV to the containers in the workload. For details, see Creating a Volume from an Existing Parallel File System.
- Check whether the mount options are effective.
In this example, the PVC is mounted to the workload that uses the nginx:latest image. You can log in to the node where the pod with the mounted parallel file system volume is located and run the following command to view the process details:
ps -ef | grep obsfs
Information similar to the following is displayed:root 1470 1 0 Jul03 ? 00:01:23 /bin/obsfs {your_obs_name} /mnt/paas/kubernetes/kubelet/pods/{pod_uid}/volumes/kubernetes.io~csi/{your_pv_name}/mount -o url=https://{endpoint}:443 -o endpoint={region} -o passwd_file=/opt/everest-host-connector/obstmpcred/{pod_uid}/{your_obs_name} -o allow_other -o nonempty -o big_writes -o use_ino -o no_check_certificate -o ssl_verify_hostname=0 -o max_background=100 -o umask=027 -o max_write=131072
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot