StorageOS Feature labels

Feature labels are a powerful and flexible way to control storage features.

Labels can be applied to various StorageOS artefacts. Applying specific feature labels triggers compression, replication and other storage features. No feature labels are present by default.

StorageOS Node labels

Nodes do not have any feature labels present by default. When StorageOS is run within Kubernetes, the Cluster Operator syncs any node labels set on Kubernetes nodes within StorageOS. Node labels may also be set with the CLI or UI.

Feature Label Values Description
Compute only true / false Specifies whether a node should be computeonly where it only acts as a client and does not host volume data locally, otherwise the node is hyperconverged (the default), where the node can operate in both client and server modes.

You can set the computeonly label on the Kubernetes node and the label will be sync’d to the StorageOS node (labels take an eventual consistency reconciliation time of ~1min).

kubectl label node $NODE

StorageOS Volume labels

The caching and compression labels can only apply during provision time, they can’t be changed during execution

Feature Label Values Description
Caching true / false Switches off caching. (default: true)
Compression true / false Switches off compression of data at rest and in transit. (default: true)
Replication integers [0, 5] Replicates entire volume across nodes. Typically 1 replica is sufficient (2 copies of the data); more than 2 replicas is not recommended. (default: 0)

To create a volume with a feature label:

  • Option 1: PVC Label

    Add the label in the PVC definition, for instance:

    apiVersion: v1
    kind: PersistentVolumeClaim
      name: pvc-3
      labels: "1" # Label <-----
      storageClassName: "fast"
        - ReadWriteOnce
          storage: 1G
  • Option 2: Set label in the StorageClass

    Any PVC using the StorageClass inherits the label. The PVC label takes precedence over the StorageClass parameters.

    kind: StorageClass
      name: storageos-replicated
      fsType: ext4
      pool: default "1" # Label   <--------
    provisioner: storageos # CSI driver (recommended) 
  • Option 3:

    Once a PVC is created, you can update the Labels in StorageOS both in the UI or CLI. Those labels are going to be visible only for StorageOS and will not be synced to the Kubernetes resource.