Help Center/ Cloud Container Engine/ User Guide/ Storage/ EVS/ Configuring EVS Mount Options
Updated on 2025-07-17 GMT+08:00

Configuring EVS Mount Options

Mount options are parameters passed to the kernel during file system mounting. They control the access mode, performance optimization, and security policies of storage devices (such as EVS, SFS, and OBS). CCE allows you to configure mount options in PVs and StorageClasses.

  • Configuring mount options in a PV applies only to that specific PV. This method is used when custom mount parameters are needed for a particular storage volume.
  • Configuring mount options in a StorageClass applies to all PVs created using that StorageClass. This method is used for centrally configuring mount options for EVS disks.

Prerequisites

The CCE Container Storage (Everest) version must be 2.4.153 or later. This add-on identifies the mount options and transfers them to the underlying storage resources. The parameter settings take effect only if the underlying storage resources support the specified options.

Notes and Constraints

  • Mount options cannot be configured for secure containers.
  • EVS mount options cannot be configured for workloads running on Huawei Cloud EulerOS 1.1 or CentOS 7.6 nodes.

EVS Mount Options

CCE supports the mount options listed in the following table.

Table 1 Mount options

Parameter

Value

Description

noatime/strictatime/relatime

Blank

Specify how file access time (atime) is updated. You can choose one of the following options:

  • noatime: atime is not updated. This option provides the highest performance but completely loses atime information. It is suitable for high-concurrency read scenarios, such as databases and static file services.
  • relatime (default): atime is updated only if it is earlier than mtime or if it has not been updated for more than 24 hours. This option has low overhead.
  • strictatime: atime is updated every time a file is read. This option is the most accurate but has the worst performance. It is suitable for scenarios where access time needs to be strictly recorded.

Configuring Mount Options

You can configure mount options using one of the following methods.

You can use mountOptions to configure mount options in a PV. This configuration applies only to that specific PV. For details about mountOptions, see EVS Mount Options.

  1. Use kubectl to access the cluster. For details, see Accessing a Cluster Using kubectl.
  2. Configure mount options in a PV. Example:

    apiVersion: v1
    kind: PersistentVolume
    metadata:
      annotations:
        pv.kubernetes.io/provisioned-by: everest-csi-provisioner
      name: pv-disk  # PV name
      labels:
        failure-domain.beta.kubernetes.io/region: cn-north-7
        failure-domain.beta.kubernetes.io/zone: cn-north-7c
    spec:
      accessModes:
        - ReadWriteOnce
      capacity:
        storage: 10Gi # Storage capacity
      csi:
        driver: disk.csi.everest.io
        fsType: ext4
        volumeHandle: {your_volume_id}   # EVS volume ID
        volumeAttributes:
          storage.kubernetes.io/csiProvisionerIdentity: everest-csi-provisioner
          everest.io/disk-mode: SCSI
          everest.io/disk-volume-type: SATA
          everest.io/enterprise-project-id: '0'
      persistentVolumeReclaimPolicy: Retain
      storageClassName: csi-disk
      mountOptions: # Mount options
        - strictatime

  3. After creating a PV, you can create a PVC, bind it to the PV, and mount the PV to the containers in the workload. For details, see Using an Existing EVS Disk Through a Static PV.
  4. Check whether the mount options are effective. In this example, the PVC is mounted to a workload using the nginx:latest image, with the mount path /testdir in the container. To verify the settings, do as follows:

    1. Check the name of the pod to which the PVC has been mounted. In this example, the workload name is web-disk.
      kubectl get pod | grep web-disk

      Information similar to the following is displayed:

      web-disk-xxx     1/1     Running   0             23m
    2. Run the following command to access the pod:
      kubectl exec -it web-disk-xxx -- bash
    3. Run the following command to access the mount path and obtain a test file:
      cd /testdir
      echo 'ok' > testfile
    4. Run the command repeatedly and check the Access value in the output. If the Access value changes, the strictatime mount option is effective.
      stat testfile && cat testfile > /dev/null

You can also use mountOptions to configure mount options in a StorageClass. This configuration applies to all PVs created using this StorageClass. For details about mountOptions, see EVS Mount Options.

  1. Use kubectl to access the cluster. For details, see Accessing a Cluster Using kubectl.
  2. Create a custom StorageClass. Example:

    allowVolumeExpansion: true
    apiVersion: storage.k8s.io/v1
    kind: StorageClass 
    metadata:
      name: csi-disk # The StorageClass name
    mountOptions: # Mount options
    - strictatime
    parameters:
      csi.storage.k8s.io/csi-driver-name: disk.csi.everest.io
      csi.storage.k8s.io/fstype: ext4
      everest.io/disk-volume-type: SAS
      everest.io/passthrough: "true"
    provisioner: everest-csi-provisioner
    reclaimPolicy: Delete
    volumeBindingMode: Immediate

  3. After the StorageClass is configured, you can use it to create a PVC. By default, dynamically created PVs inherit the mount options configured in the StorageClass. For details, see Using an EVS Disk Through a Dynamic PV.
  4. Check whether the mount options are effective. In this example, the PVC is mounted to a workload using the nginx:latest image, with the mount path /testdir in the container. To verify the settings, do as follows:

    1. Check the name of the pod to which the PVC has been mounted. In this example, the workload name is web-disk.
      kubectl get pod | grep web-disk

      Information similar to the following is displayed:

      web-disk-xxx     1/1     Running   0             23m
    2. Run the following command to access the pod:
      kubectl exec -it web-disk-xxx -- bash
    3. Run the following command to access the mount path and obtain a test file:
      cd /testdir
      echo 'ok' > testfile
    4. Run the command repeatedly and check the Access value in the output. If the Access value changes, the strictatime mount option is effective.
      stat testfile && cat testfile > /dev/null