NFS operator module (shturval-nfs-csi)

About the service

ParameterDescription
GUI nameNFS Operator Module
System name (identifier)shturval-nfs-csi
Cluster AssignmentDynamic creation of PersistentVolume from NFS shares upon request (PersistentVolumeClaim); NFS Provisioner.
CriticalNo
Public repositoryNFS subdir external provisioner
Dependenciesshturval-networking
Namespacenfs

Purpose

shturval-nfs-csi - NFS CSI (NFS Provisioner) driver. Provides static and dynamic NFS-based PersistentVolume provisioning and data sharing across multiple applications.

By default, the module is installed in a disabled state in the management cluster; is not installed on client clusters. To install in a client cluster: Available charts → chart shturval-nfs-csi → Install (recommended namespace is nfs).

Note: an NFS client must be installed on the cluster nodes (nfs-utils for RPM, nfs-common for DEB).

Astra Linux up to 1.7.6 (inclusive): Memory leak and OOM may occur when using NFS Provisioner. Options:

  1. Set customvalues to mount with NFSv3 (nfsvers=3 in mountOptions StorageClass) - see example below.
  2. Update the OS on the nodes to 1.7.7 and later according to Astra Linux documentation.

NFSv4.1 also experienced increased overhead in some builds; for stability problems, nfsvers=3 is preferable, if this is acceptable for your infrastructure.

After updating the OS on the host templates, update the virtual machine templates in the infrastructure provider you are using (vSphere, oVirt, OpenStack, etc.) so that the new hosts receive the latest images.

Debian: after rebooting the worker node, PVC on NFS may not be mounted: the rpc.statd service is not running, and when mounting with remote file locking (typical for NFSv3), it is required.

  1. In customvalues of the shturval-nfs-csi service, add the nolock option to mountOptions StorageClass - it disables remote file locking (locks remain local on the node). See example below.
  2. Volumes created before the StorageClass change receive mountOptions from PersistentVolume rather than from StorageClass. Edit the appropriate PV and manually add nolock to spec.mountOptions (for example, kubectl edit pv <pv-name>).
An example of a mount error after a node reboot
Warning FailedMount ... kubelet MountVolume.SetUp failed for volume "pvc-..." :
rpc error: code = Internal desc = mount failed: exit status 32
...
Output: mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.

Where to configure

Services and Repositories → Installed Services → find NFS Operator Module (shturval-nfs-csi) → Manage. In the Service Specification block, set parameters for creating a StorageClass with provisioner nfs.csi.k8s.io or add a StorageClass after enabling the module. For the module to work correctly, the Cluster Network Management Module (shturval-networking) must be enabled.

Setting up storage classes: StorageClasses.

Custom settings (customvalues)

Example customvalues for shturval-nfs-csi
storageClass:
  create: true
  name: nfs-csi
  parameters:
    server: 10.11.12.13
    share: /exported/path
  mountOptions:
    - nfsvers=3
    - nolock # for Debian: after rebooting a node without nolock, FailedMount is possible
  reclaim Policy: Delete
  volumeBindingMode: Immediate

How to deploy this service - How to deploy a new service.