When you use CSI to mount Object Storage Service (OSS) volumes, the csi-plugin component launches the ossfs process to mount objects on the OSS server to the specified path in a container. You can use POSIX to read or write objects on the OSS server in the same way as reading or writing regular files. This facilitates resource access and management in the cloud. The ossfs version is iterated together with the CSI component. This topic describes the ossfs versions and describes how to view and change the ossfs version.
How ossfs works
ossfs is a user space file system used to mount OSS buckets to local file systems in Linux. ossfs allows you to access and manage OSS objects in the same way as you manage local files. You can manage and share OSS objects seamlessly. ossfs provides the following features:
Supports most features described in POSIX standards, such as file and directory uploads and downloads, and user permission management.
Uses multipart upload and resumable upload to upload OSS objects by default.
Supports MD5 verification to ensure data integrity.
Supports all S3FS features because ossfs is developed based on S3FS.
For more information about ossfs, see ossfs.
ossfs versions
ossfs versions are displayed in the x.yy.z format.
x.yy indicates a version developed based on open source s3fs. You can configure CSI environment variables to roll back to a historical x.yy version.
z indicates an iterated version of ossfs. The version may involve optimizations to the OSS and ACK environments. For example, the version may introduce new monitoring, authentication, and encryption features. For more information, see csi-plugin.
To distinguish between open source ossfs versions and ACK ossfs versions, the .ack.1 prefix is appended to ACK ossfs versions, such as 1.80.6.ack.1.
ossfs major version release notes
If you have high requirements on file systems, we recommend that you update ossfs to 1.91 or later. For more information about the applicable scenarios of ossfs 1.91 and later, see Best practices for ossfs 1.91 and later. For more information about how to change the ossfs version, see Change the ossfs version to 1.91 or later.
Architecture | ossfs version | CSI version |
ARM64 | 1.91 and later |
|
1.80.x | v1.20.5-ff6490f-aliyun (the first CSI version that supports ARM64) | |
AMD64 | 1.91 and later |
|
1.88.x | v1.22.14-820d8870-aliyun | |
1.86.x | v1.16.9.43-f36bb540-aliyun | |
1.80.x | Initial version |
View the ossfs version
In CSI versions that are not containerized (CSI versions earlier than 1.28, excluding 1.26.6), ossfs runs on nodes. You can log on to any ossfs node and run the following command to query the ossfs version:
/usr/local/bin/ossfs --version
In containerized CSI versions (1.26.6, 1.28.1, and later), ossfs runs in containers. After OSS volumes are mounted, the CSI component automatically creates pods in the kube-system namespace (CSI versions earlier than 1.30.4) or ack-csi-fuse namespace (CSI versions 1.30.4 and later). You can use the following method to query the ossfs version.
Run the following command to query pods that are running.
If the CSI version is earlier than 1.30.4:
kubectl -n kube-system get pod | grep csi-fuse-ossfs
If the CSI version is 1.30.4 or later:
kubectl -n ack-csi-fuse get pod | grep csi-fuse-ossfs
Run the following command to query the ossfs version.
If the CSI version is earlier than 1.30.4:
kubectl -n kube-system exec -it <csi-fuse-ossfs-xxxx> -- ossfs --version
If the CSI version is 1.30.4 or later:
kubectl -n ack-csi-fuse exec -it <csi-fuse-ossfs-xxxx> -- ossfs --version
Switch to ossfs 1.91 or later
Method 1: Update the CSI version
In CSI versions 1.30.4 and later, by default, ossfs uses version 1.91 and later. You can change the ossfs version by upgrading CSI.
Method 2: Enable the feature gate
To switch to ossfs 1.91 or later, you must enable the UpdatedOssfsVersion
feature gate. To do this, perform the following steps:
By default, pods that are deployed on the same node and share the same OSS volume also share the same ossfs process. The ossfs process runs in a pod named csi-fuse-ossfs-***
. After the UpdatedOssfsVersion
feature gate is enabled, newly created ossfs containers all use an ossfs image whose version is 1.91 or later. The existing businesses that use the OSS volumes are not affected. To manually update the ossfs version, see How do I restart ossfs pods when the mount target is shared by multiple pods?
Make sure that the version of csi-plugin is 1.30.1 or later.
Log on to the ACK console. In the left-side navigation pane, click Clusters.
On the Clusters page, find the cluster that you want to manage and click its name. In the left-side navigation pane, choose .
On the Add-ons page, find csi-plugin and view its version.
If the csi-plugin version is earlier than 1.30.1, click Upgrade in the lower-right corner to update the component to the latest version.
Use the console or kubectl to enable the
UpdatedOssfsVersion
feature gate.NoteIf you use the console to enable the feature gate, the FeatureGate parameters overwrite the existing settings. If you cannot confirm whether kubectl is already used to enable other feature gates, we recommend that you use kubectl to enable the preceding feature gate.
Use the console
After the csi-plugin component is updated, click Configuration in the lower-right corner of the card.
On the csi-plugin Parameters page, set the FeatureGate parameter UpdatedOssfsVersion=true and click OK.
If other feature gates are enabled before you add the parameter, set the parameter in the xxxxxx=true,yyyyyy=false,UpdatedOssfsVersion=true format.
Use kubectl
Run the following command to modify the DaemonSet file of csi-plugin:
Add
--feature-gates=UpdatedOssfsVersion=true
to theargs
filed of the csi-plugin containers (not init containers). The modified args field:
kubectl -n kube-system edit ds csi-plugin
NoteIf other feature gates are enabled before you add the parameter, set the parameter in the
--feature-gates=xxxxxx=true,yyyyyy=false,UpdatedOssfsVersion=true
format.- args: - --endpoint=$(CSI_ENDPOINT) - --v=2 - --driver=oss,nas,disk - --feature-gates=UpdatedOssfsVersion=true
References
For more information about the new features in ossfs 1.91 and later and stress tests, see New features in ossfs 1.91 and later and stress tests.