Skip to main content
This page covers shared volumes: claims that Pods on several Nodes mount at the same time. LKS backs each one with a Latitude File Storage filesystem, mounted over NFSv4.1. For the model behind it, see Persistent storage. For volumes attached to one Node at a time, see Persistent volumes.

StorageClasses

Every Cluster with persistent storage has two StorageClasses for shared volumes. Both use the file.csi.latitude.sh provisioner. Both classes create the filesystem as soon as you create the claim (volumeBindingMode: Immediate) and allow expansion. Neither is the Cluster default, so set storageClassName in every claim that needs a shared volume. A claim that names no StorageClass gets a block volume from latitude-block. Don’t edit or delete the built-in classes. For other mount options, create your own StorageClass. See Mount options.

Create a shared volume

The filesystem is created with the claim, so the claim is Bound within seconds, before any Pod uses it:
Every Pod that uses the claim mounts the same filesystem, on whichever Node it runs. This Deployment runs two replicas on different Nodes, and each writes to the shared directory:
Both replicas see each other’s lines:
To keep the filesystem after its claim is deleted, set storageClassName: latitude-file-retain in the claim.

Read-only access

A new filesystem starts empty. To let some Pods read data that others write, use one ReadWriteMany claim and mount it read-only in the readers:
Writes from these Pods fail with Read-only file system, while the web Pods above keep writing.

Size and expansion

Filesystems are sized in whole GiB, rounded up. The default and minimum is 1 GiB, and the maximum is 20480 GiB. To grow a filesystem, increase the claim’s request:
The filesystem grows while Pods keep using it, and they see the new size within seconds. Filesystems can’t shrink.

Access modes

Raw block volumes (volumeMode: Block) aren’t supported for shared volumes. Use latitude-block for those.

File ownership

Shared volumes honor the Pod’s securityContext.fsGroup. When a Pod sets it, Kubernetes changes the group of the files on the volume when it mounts it, as it does for block volumes. On a filesystem with many files, set fsGroupChangePolicy: OnRootMismatch so later mounts skip the change when the top directory already matches.

Mount options

Shared volumes are mounted with nfsvers=4.1,hard,proto=tcp,retry=1. With hard, a process waits for the filesystem to answer instead of getting an I/O error. To add mount options, create a StorageClass that sets mountOptions. They’re added after the defaults, and win where they overlap. For example, nconnect=8 opens eight connections to the filesystem instead of one, which can raise throughput (see File Storage performance):
Then set storageClassName: latitude-file-nconnect in your claims. Filesystems are served over NFSv4 only, so don’t set nfsvers=3. StorageClass parameters aren’t supported: a claim against a class that sets one stays Pending.

Lifecycle

Each claim is its own filesystem. Filesystems appear in the dashboard under Storage > File storage, named lks-<cluster-id>-<hash>, where the hash comes from the claim’s PersistentVolume. Don’t rename or delete one there while its claim exists: a deleted filesystem is gone for the Pods using it, and a renamed one is no longer deleted with its claim. A kept filesystem stays in your project until you delete it there.
Deleting a claim that uses latitude-file, or deleting the Cluster, deletes those filesystems. There are no snapshots yet, so back up anything you need first.

The storage network

Nodes reach filesystems over your project’s private storage network, the same one block volumes use. The first shared volume mounted on a Node puts that Node on the storage network, which adds about 20 to 30 seconds to the first Pod’s start there. Later Pods on that Node mount at once. A Node stays on the storage network until it’s deleted. Nodes need no setup: the NFS client ships with the LKS storage driver. Access is limited to your project’s storage network. Any server on it, including every Node of every Cluster in the project, can mount any filesystem in the project with read and write access. A claim’s access mode controls how Kubernetes mounts it, not who can reach it. Treat the project as the security boundary for your filesystems.

Limits

  • Each claim is one filesystem, and filesystems count toward your team’s Latitude File Storage filesystem limit. To raise it, contact support.
  • A filesystem can be up to 20480 GiB.
  • Filesystems are created in the Cluster’s location only.

Pricing

Filesystems are billed as Latitude File Storage, on provisioned capacity while the filesystem exists. That includes filesystems kept by latitude-file-retain after their claim or Cluster is deleted. Delete them when you no longer need them. Traffic between your Nodes and filesystems is free.

Troubleshooting

The Cluster records what’s happening as events. Read them with kubectl describe pvc <name>, kubectl describe pod <name>, or kubectl get events. A shared claim is created right away, so a claim that stays Pending means the filesystem couldn’t be created. Its events give the reason.