From 718fcf0acf578240b1470cabd66ca0640bb489ce Mon Sep 17 00:00:00 2001 From: James Munson Date: Tue, 28 Jan 2025 15:38:24 -0700 Subject: [PATCH] docs: add note about storage class defaults Signed-off-by: James Munson --- .../volumes/create-volumes.md | 7 ++-- content/docs/1.6.0/references/examples.md | 34 +++++++++++-------- .../volumes/create-volumes.md | 7 ++-- content/docs/1.6.1/references/examples.md | 21 ++++++++++++ .../volumes/create-volumes.md | 7 ++-- content/docs/1.6.2/references/examples.md | 21 ++++++++++++ .../volumes/create-volumes.md | 7 ++-- content/docs/1.6.3/references/examples.md | 21 ++++++++++++ .../volumes/create-volumes.md | 7 ++-- content/docs/1.6.4/references/examples.md | 21 ++++++++++++ .../volumes/create-volumes.md | 7 ++-- content/docs/1.6.5/references/examples.md | 21 ++++++++++++ .../volumes/create-volumes.md | 7 ++-- content/docs/1.7.0/references/examples.md | 21 ++++++++++++ .../volumes/create-volumes.md | 7 ++-- content/docs/1.7.1/references/examples.md | 21 ++++++++++++ .../volumes/create-volumes.md | 7 ++-- content/docs/1.7.2/references/examples.md | 21 ++++++++++++ .../volumes/create-volumes.md | 7 ++-- content/docs/1.7.3/references/examples.md | 21 ++++++++++++ .../volumes/create-volumes.md | 9 ++--- content/docs/1.8.0/references/examples.md | 21 ++++++++++++ .../volumes/create-volumes.md | 9 ++--- content/docs/1.8.1/references/examples.md | 21 ++++++++++++ .../volumes/create-volumes.md | 9 ++--- content/docs/1.9.0/references/examples.md | 21 ++++++++++++ 26 files changed, 326 insertions(+), 57 deletions(-) diff --git a/content/docs/1.6.0/nodes-and-volumes/volumes/create-volumes.md b/content/docs/1.6.0/nodes-and-volumes/volumes/create-volumes.md index 49c231337..121034cf5 100644 --- a/content/docs/1.6.0/nodes-and-volumes/volumes/create-volumes.md +++ b/content/docs/1.6.0/nodes-and-volumes/volumes/create-volumes.md @@ -50,7 +50,8 @@ When the Pod is deployed, the Kubernetes master will check the PersistentVolumeC # ]' ``` - In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. + In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. + Parameters may be omitted from the StorageClass specification. When the storage class is used to create a PV and a volume, parameters that are not specified will generally be set using a default value taken from the global settings. See [here](../../../references/storage-class-parameters) for the list of storage class parameters, and [here](../../../references/settings) for the full list of global settings. 2. Create a Pod that uses Longhorn volumes by running this command: @@ -114,7 +115,7 @@ If the PVC names a StorageClass, Kubernetes will: ### Creating Longhorn Volumes with the Longhorn UI -Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC bounding purpose. And it's unnecessary for users to create the related StorageClass object. +Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC binding purpose. It's unnecessary for users to create the related StorageClass object. By default the StorageClass for Longhorn created PV/PVC is `longhorn-static`. Users can modify it in `Setting - General - Default Longhorn Static StorageClass Name` as they need. @@ -162,4 +163,4 @@ Annotations: longhorn.io/volume-scheduling-error: insufficient storage ... -``` \ No newline at end of file +``` diff --git a/content/docs/1.6.0/references/examples.md b/content/docs/1.6.0/references/examples.md index 3be5143b0..28228b3fc 100644 --- a/content/docs/1.6.0/references/examples.md +++ b/content/docs/1.6.0/references/examples.md @@ -17,7 +17,7 @@ For reference, this page provides examples of Kubernetes resources that use Long ### Block Volume - +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -50,11 +50,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: block-vol persistentVolumeClaim: claimName: longhorn-block-vol - - +``` ### CSI Persistent Volume +```yaml apiVersion: v1 kind: PersistentVolume metadata: @@ -115,11 +115,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: vol persistentVolumeClaim: claimName: longhorn-vol-pvc - +``` ### Deployment - +```yaml apiVersion: v1 kind: Service metadata: @@ -186,11 +186,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: mysql-volume persistentVolumeClaim: claimName: mysql-pvc - +``` ### Pod with PersistentVolumeClaim - +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -230,11 +230,13 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: volv persistentVolumeClaim: claimName: longhorn-volv-pvc +``` ### Restore to File For more information about restoring to file, refer to [this section.](../../advanced-resources/data-recovery/recover-without-system) +```yaml apiVersion: v1 kind: Pod metadata: @@ -283,11 +285,11 @@ For more information about restoring to file, refer to [this section.](../../adv hostPath: path: /tmp/restore restartPolicy: Never - +``` ### Simple Pod - +```yaml apiVersion: v1 kind: Pod metadata: @@ -315,12 +317,11 @@ For more information about restoring to file, refer to [this section.](../../adv - name: volv persistentVolumeClaim: claimName: longhorn-simple-pvc - - +``` ### Simple PersistentVolumeClaim - +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -332,12 +333,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi - - +``` ### StatefulSet - +```yaml apiVersion: v1 kind: Service metadata: @@ -394,9 +394,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StorageClass +```yaml kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: @@ -428,5 +430,7 @@ For more information about restoring to file, refer to [this section.](../../adv # } # ]' +``` + Note that Longhorn supports automatic remount only for the workload pod that is managed by a controller (e.g. deployment, statefulset, daemonset, etc...). See [here](../../high-availability/recover-volume/) for details. diff --git a/content/docs/1.6.1/nodes-and-volumes/volumes/create-volumes.md b/content/docs/1.6.1/nodes-and-volumes/volumes/create-volumes.md index 49c231337..121034cf5 100644 --- a/content/docs/1.6.1/nodes-and-volumes/volumes/create-volumes.md +++ b/content/docs/1.6.1/nodes-and-volumes/volumes/create-volumes.md @@ -50,7 +50,8 @@ When the Pod is deployed, the Kubernetes master will check the PersistentVolumeC # ]' ``` - In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. + In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. + Parameters may be omitted from the StorageClass specification. When the storage class is used to create a PV and a volume, parameters that are not specified will generally be set using a default value taken from the global settings. See [here](../../../references/storage-class-parameters) for the list of storage class parameters, and [here](../../../references/settings) for the full list of global settings. 2. Create a Pod that uses Longhorn volumes by running this command: @@ -114,7 +115,7 @@ If the PVC names a StorageClass, Kubernetes will: ### Creating Longhorn Volumes with the Longhorn UI -Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC bounding purpose. And it's unnecessary for users to create the related StorageClass object. +Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC binding purpose. It's unnecessary for users to create the related StorageClass object. By default the StorageClass for Longhorn created PV/PVC is `longhorn-static`. Users can modify it in `Setting - General - Default Longhorn Static StorageClass Name` as they need. @@ -162,4 +163,4 @@ Annotations: longhorn.io/volume-scheduling-error: insufficient storage ... -``` \ No newline at end of file +``` diff --git a/content/docs/1.6.1/references/examples.md b/content/docs/1.6.1/references/examples.md index 4f3dbfb67..6871d7bef 100644 --- a/content/docs/1.6.1/references/examples.md +++ b/content/docs/1.6.1/references/examples.md @@ -18,6 +18,7 @@ For reference, this page provides examples of Kubernetes resources that use Long ### Block Volume +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -50,9 +51,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: block-vol persistentVolumeClaim: claimName: longhorn-block-vol +``` ### CSI Persistent Volume +```yaml apiVersion: v1 kind: PersistentVolume metadata: @@ -113,9 +116,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: vol persistentVolumeClaim: claimName: longhorn-vol-pvc +``` ### Deployment +```yaml apiVersion: v1 kind: Service metadata: @@ -182,9 +187,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: mysql-volume persistentVolumeClaim: claimName: mysql-pvc +``` ### Pod with PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -224,12 +231,14 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: volv persistentVolumeClaim: claimName: longhorn-volv-pvc +``` ### Pod with Generic Ephemeral Volume For more information about generic ephemeral volumes, refer to the [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes). +```yaml apiVersion: v1 kind: Pod metadata: @@ -264,11 +273,13 @@ For more information about generic ephemeral volumes, refer to the resources: requests: storage: 2Gi +``` ### Restore to File For more information about restoring to file, refer to [this section.](../../advanced-resources/data-recovery/recover-without-system) +```yaml apiVersion: v1 kind: Pod metadata: @@ -317,9 +328,11 @@ For more information about restoring to file, refer to [this section.](../../adv hostPath: path: /tmp/restore restartPolicy: Never +``` ### Simple Pod +```yaml apiVersion: v1 kind: Pod metadata: @@ -347,9 +360,11 @@ For more information about restoring to file, refer to [this section.](../../adv - name: volv persistentVolumeClaim: claimName: longhorn-simple-pvc +``` ### Simple PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -361,9 +376,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StatefulSet +```yaml apiVersion: v1 kind: Service metadata: @@ -420,9 +437,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StorageClass +```yaml kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: @@ -454,5 +473,7 @@ For more information about restoring to file, refer to [this section.](../../adv # } # ]' +``` + Note that Longhorn supports automatic remount only for the workload pod that is managed by a controller (e.g. deployment, statefulset, daemonset, etc...). See [here](../../high-availability/recover-volume/) for details. diff --git a/content/docs/1.6.2/nodes-and-volumes/volumes/create-volumes.md b/content/docs/1.6.2/nodes-and-volumes/volumes/create-volumes.md index 49c231337..121034cf5 100644 --- a/content/docs/1.6.2/nodes-and-volumes/volumes/create-volumes.md +++ b/content/docs/1.6.2/nodes-and-volumes/volumes/create-volumes.md @@ -50,7 +50,8 @@ When the Pod is deployed, the Kubernetes master will check the PersistentVolumeC # ]' ``` - In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. + In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. + Parameters may be omitted from the StorageClass specification. When the storage class is used to create a PV and a volume, parameters that are not specified will generally be set using a default value taken from the global settings. See [here](../../../references/storage-class-parameters) for the list of storage class parameters, and [here](../../../references/settings) for the full list of global settings. 2. Create a Pod that uses Longhorn volumes by running this command: @@ -114,7 +115,7 @@ If the PVC names a StorageClass, Kubernetes will: ### Creating Longhorn Volumes with the Longhorn UI -Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC bounding purpose. And it's unnecessary for users to create the related StorageClass object. +Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC binding purpose. It's unnecessary for users to create the related StorageClass object. By default the StorageClass for Longhorn created PV/PVC is `longhorn-static`. Users can modify it in `Setting - General - Default Longhorn Static StorageClass Name` as they need. @@ -162,4 +163,4 @@ Annotations: longhorn.io/volume-scheduling-error: insufficient storage ... -``` \ No newline at end of file +``` diff --git a/content/docs/1.6.2/references/examples.md b/content/docs/1.6.2/references/examples.md index 4f3dbfb67..6871d7bef 100644 --- a/content/docs/1.6.2/references/examples.md +++ b/content/docs/1.6.2/references/examples.md @@ -18,6 +18,7 @@ For reference, this page provides examples of Kubernetes resources that use Long ### Block Volume +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -50,9 +51,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: block-vol persistentVolumeClaim: claimName: longhorn-block-vol +``` ### CSI Persistent Volume +```yaml apiVersion: v1 kind: PersistentVolume metadata: @@ -113,9 +116,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: vol persistentVolumeClaim: claimName: longhorn-vol-pvc +``` ### Deployment +```yaml apiVersion: v1 kind: Service metadata: @@ -182,9 +187,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: mysql-volume persistentVolumeClaim: claimName: mysql-pvc +``` ### Pod with PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -224,12 +231,14 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: volv persistentVolumeClaim: claimName: longhorn-volv-pvc +``` ### Pod with Generic Ephemeral Volume For more information about generic ephemeral volumes, refer to the [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes). +```yaml apiVersion: v1 kind: Pod metadata: @@ -264,11 +273,13 @@ For more information about generic ephemeral volumes, refer to the resources: requests: storage: 2Gi +``` ### Restore to File For more information about restoring to file, refer to [this section.](../../advanced-resources/data-recovery/recover-without-system) +```yaml apiVersion: v1 kind: Pod metadata: @@ -317,9 +328,11 @@ For more information about restoring to file, refer to [this section.](../../adv hostPath: path: /tmp/restore restartPolicy: Never +``` ### Simple Pod +```yaml apiVersion: v1 kind: Pod metadata: @@ -347,9 +360,11 @@ For more information about restoring to file, refer to [this section.](../../adv - name: volv persistentVolumeClaim: claimName: longhorn-simple-pvc +``` ### Simple PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -361,9 +376,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StatefulSet +```yaml apiVersion: v1 kind: Service metadata: @@ -420,9 +437,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StorageClass +```yaml kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: @@ -454,5 +473,7 @@ For more information about restoring to file, refer to [this section.](../../adv # } # ]' +``` + Note that Longhorn supports automatic remount only for the workload pod that is managed by a controller (e.g. deployment, statefulset, daemonset, etc...). See [here](../../high-availability/recover-volume/) for details. diff --git a/content/docs/1.6.3/nodes-and-volumes/volumes/create-volumes.md b/content/docs/1.6.3/nodes-and-volumes/volumes/create-volumes.md index 49c231337..121034cf5 100644 --- a/content/docs/1.6.3/nodes-and-volumes/volumes/create-volumes.md +++ b/content/docs/1.6.3/nodes-and-volumes/volumes/create-volumes.md @@ -50,7 +50,8 @@ When the Pod is deployed, the Kubernetes master will check the PersistentVolumeC # ]' ``` - In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. + In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. + Parameters may be omitted from the StorageClass specification. When the storage class is used to create a PV and a volume, parameters that are not specified will generally be set using a default value taken from the global settings. See [here](../../../references/storage-class-parameters) for the list of storage class parameters, and [here](../../../references/settings) for the full list of global settings. 2. Create a Pod that uses Longhorn volumes by running this command: @@ -114,7 +115,7 @@ If the PVC names a StorageClass, Kubernetes will: ### Creating Longhorn Volumes with the Longhorn UI -Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC bounding purpose. And it's unnecessary for users to create the related StorageClass object. +Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC binding purpose. It's unnecessary for users to create the related StorageClass object. By default the StorageClass for Longhorn created PV/PVC is `longhorn-static`. Users can modify it in `Setting - General - Default Longhorn Static StorageClass Name` as they need. @@ -162,4 +163,4 @@ Annotations: longhorn.io/volume-scheduling-error: insufficient storage ... -``` \ No newline at end of file +``` diff --git a/content/docs/1.6.3/references/examples.md b/content/docs/1.6.3/references/examples.md index 4f3dbfb67..6871d7bef 100644 --- a/content/docs/1.6.3/references/examples.md +++ b/content/docs/1.6.3/references/examples.md @@ -18,6 +18,7 @@ For reference, this page provides examples of Kubernetes resources that use Long ### Block Volume +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -50,9 +51,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: block-vol persistentVolumeClaim: claimName: longhorn-block-vol +``` ### CSI Persistent Volume +```yaml apiVersion: v1 kind: PersistentVolume metadata: @@ -113,9 +116,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: vol persistentVolumeClaim: claimName: longhorn-vol-pvc +``` ### Deployment +```yaml apiVersion: v1 kind: Service metadata: @@ -182,9 +187,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: mysql-volume persistentVolumeClaim: claimName: mysql-pvc +``` ### Pod with PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -224,12 +231,14 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: volv persistentVolumeClaim: claimName: longhorn-volv-pvc +``` ### Pod with Generic Ephemeral Volume For more information about generic ephemeral volumes, refer to the [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes). +```yaml apiVersion: v1 kind: Pod metadata: @@ -264,11 +273,13 @@ For more information about generic ephemeral volumes, refer to the resources: requests: storage: 2Gi +``` ### Restore to File For more information about restoring to file, refer to [this section.](../../advanced-resources/data-recovery/recover-without-system) +```yaml apiVersion: v1 kind: Pod metadata: @@ -317,9 +328,11 @@ For more information about restoring to file, refer to [this section.](../../adv hostPath: path: /tmp/restore restartPolicy: Never +``` ### Simple Pod +```yaml apiVersion: v1 kind: Pod metadata: @@ -347,9 +360,11 @@ For more information about restoring to file, refer to [this section.](../../adv - name: volv persistentVolumeClaim: claimName: longhorn-simple-pvc +``` ### Simple PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -361,9 +376,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StatefulSet +```yaml apiVersion: v1 kind: Service metadata: @@ -420,9 +437,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StorageClass +```yaml kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: @@ -454,5 +473,7 @@ For more information about restoring to file, refer to [this section.](../../adv # } # ]' +``` + Note that Longhorn supports automatic remount only for the workload pod that is managed by a controller (e.g. deployment, statefulset, daemonset, etc...). See [here](../../high-availability/recover-volume/) for details. diff --git a/content/docs/1.6.4/nodes-and-volumes/volumes/create-volumes.md b/content/docs/1.6.4/nodes-and-volumes/volumes/create-volumes.md index 49c231337..121034cf5 100644 --- a/content/docs/1.6.4/nodes-and-volumes/volumes/create-volumes.md +++ b/content/docs/1.6.4/nodes-and-volumes/volumes/create-volumes.md @@ -50,7 +50,8 @@ When the Pod is deployed, the Kubernetes master will check the PersistentVolumeC # ]' ``` - In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. + In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. + Parameters may be omitted from the StorageClass specification. When the storage class is used to create a PV and a volume, parameters that are not specified will generally be set using a default value taken from the global settings. See [here](../../../references/storage-class-parameters) for the list of storage class parameters, and [here](../../../references/settings) for the full list of global settings. 2. Create a Pod that uses Longhorn volumes by running this command: @@ -114,7 +115,7 @@ If the PVC names a StorageClass, Kubernetes will: ### Creating Longhorn Volumes with the Longhorn UI -Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC bounding purpose. And it's unnecessary for users to create the related StorageClass object. +Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC binding purpose. It's unnecessary for users to create the related StorageClass object. By default the StorageClass for Longhorn created PV/PVC is `longhorn-static`. Users can modify it in `Setting - General - Default Longhorn Static StorageClass Name` as they need. @@ -162,4 +163,4 @@ Annotations: longhorn.io/volume-scheduling-error: insufficient storage ... -``` \ No newline at end of file +``` diff --git a/content/docs/1.6.4/references/examples.md b/content/docs/1.6.4/references/examples.md index 4f3dbfb67..6871d7bef 100644 --- a/content/docs/1.6.4/references/examples.md +++ b/content/docs/1.6.4/references/examples.md @@ -18,6 +18,7 @@ For reference, this page provides examples of Kubernetes resources that use Long ### Block Volume +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -50,9 +51,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: block-vol persistentVolumeClaim: claimName: longhorn-block-vol +``` ### CSI Persistent Volume +```yaml apiVersion: v1 kind: PersistentVolume metadata: @@ -113,9 +116,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: vol persistentVolumeClaim: claimName: longhorn-vol-pvc +``` ### Deployment +```yaml apiVersion: v1 kind: Service metadata: @@ -182,9 +187,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: mysql-volume persistentVolumeClaim: claimName: mysql-pvc +``` ### Pod with PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -224,12 +231,14 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: volv persistentVolumeClaim: claimName: longhorn-volv-pvc +``` ### Pod with Generic Ephemeral Volume For more information about generic ephemeral volumes, refer to the [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes). +```yaml apiVersion: v1 kind: Pod metadata: @@ -264,11 +273,13 @@ For more information about generic ephemeral volumes, refer to the resources: requests: storage: 2Gi +``` ### Restore to File For more information about restoring to file, refer to [this section.](../../advanced-resources/data-recovery/recover-without-system) +```yaml apiVersion: v1 kind: Pod metadata: @@ -317,9 +328,11 @@ For more information about restoring to file, refer to [this section.](../../adv hostPath: path: /tmp/restore restartPolicy: Never +``` ### Simple Pod +```yaml apiVersion: v1 kind: Pod metadata: @@ -347,9 +360,11 @@ For more information about restoring to file, refer to [this section.](../../adv - name: volv persistentVolumeClaim: claimName: longhorn-simple-pvc +``` ### Simple PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -361,9 +376,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StatefulSet +```yaml apiVersion: v1 kind: Service metadata: @@ -420,9 +437,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StorageClass +```yaml kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: @@ -454,5 +473,7 @@ For more information about restoring to file, refer to [this section.](../../adv # } # ]' +``` + Note that Longhorn supports automatic remount only for the workload pod that is managed by a controller (e.g. deployment, statefulset, daemonset, etc...). See [here](../../high-availability/recover-volume/) for details. diff --git a/content/docs/1.6.5/nodes-and-volumes/volumes/create-volumes.md b/content/docs/1.6.5/nodes-and-volumes/volumes/create-volumes.md index 49c231337..121034cf5 100644 --- a/content/docs/1.6.5/nodes-and-volumes/volumes/create-volumes.md +++ b/content/docs/1.6.5/nodes-and-volumes/volumes/create-volumes.md @@ -50,7 +50,8 @@ When the Pod is deployed, the Kubernetes master will check the PersistentVolumeC # ]' ``` - In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. + In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. + Parameters may be omitted from the StorageClass specification. When the storage class is used to create a PV and a volume, parameters that are not specified will generally be set using a default value taken from the global settings. See [here](../../../references/storage-class-parameters) for the list of storage class parameters, and [here](../../../references/settings) for the full list of global settings. 2. Create a Pod that uses Longhorn volumes by running this command: @@ -114,7 +115,7 @@ If the PVC names a StorageClass, Kubernetes will: ### Creating Longhorn Volumes with the Longhorn UI -Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC bounding purpose. And it's unnecessary for users to create the related StorageClass object. +Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC binding purpose. It's unnecessary for users to create the related StorageClass object. By default the StorageClass for Longhorn created PV/PVC is `longhorn-static`. Users can modify it in `Setting - General - Default Longhorn Static StorageClass Name` as they need. @@ -162,4 +163,4 @@ Annotations: longhorn.io/volume-scheduling-error: insufficient storage ... -``` \ No newline at end of file +``` diff --git a/content/docs/1.6.5/references/examples.md b/content/docs/1.6.5/references/examples.md index 4f3dbfb67..6871d7bef 100644 --- a/content/docs/1.6.5/references/examples.md +++ b/content/docs/1.6.5/references/examples.md @@ -18,6 +18,7 @@ For reference, this page provides examples of Kubernetes resources that use Long ### Block Volume +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -50,9 +51,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: block-vol persistentVolumeClaim: claimName: longhorn-block-vol +``` ### CSI Persistent Volume +```yaml apiVersion: v1 kind: PersistentVolume metadata: @@ -113,9 +116,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: vol persistentVolumeClaim: claimName: longhorn-vol-pvc +``` ### Deployment +```yaml apiVersion: v1 kind: Service metadata: @@ -182,9 +187,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: mysql-volume persistentVolumeClaim: claimName: mysql-pvc +``` ### Pod with PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -224,12 +231,14 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: volv persistentVolumeClaim: claimName: longhorn-volv-pvc +``` ### Pod with Generic Ephemeral Volume For more information about generic ephemeral volumes, refer to the [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes). +```yaml apiVersion: v1 kind: Pod metadata: @@ -264,11 +273,13 @@ For more information about generic ephemeral volumes, refer to the resources: requests: storage: 2Gi +``` ### Restore to File For more information about restoring to file, refer to [this section.](../../advanced-resources/data-recovery/recover-without-system) +```yaml apiVersion: v1 kind: Pod metadata: @@ -317,9 +328,11 @@ For more information about restoring to file, refer to [this section.](../../adv hostPath: path: /tmp/restore restartPolicy: Never +``` ### Simple Pod +```yaml apiVersion: v1 kind: Pod metadata: @@ -347,9 +360,11 @@ For more information about restoring to file, refer to [this section.](../../adv - name: volv persistentVolumeClaim: claimName: longhorn-simple-pvc +``` ### Simple PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -361,9 +376,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StatefulSet +```yaml apiVersion: v1 kind: Service metadata: @@ -420,9 +437,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StorageClass +```yaml kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: @@ -454,5 +473,7 @@ For more information about restoring to file, refer to [this section.](../../adv # } # ]' +``` + Note that Longhorn supports automatic remount only for the workload pod that is managed by a controller (e.g. deployment, statefulset, daemonset, etc...). See [here](../../high-availability/recover-volume/) for details. diff --git a/content/docs/1.7.0/nodes-and-volumes/volumes/create-volumes.md b/content/docs/1.7.0/nodes-and-volumes/volumes/create-volumes.md index 49c231337..121034cf5 100644 --- a/content/docs/1.7.0/nodes-and-volumes/volumes/create-volumes.md +++ b/content/docs/1.7.0/nodes-and-volumes/volumes/create-volumes.md @@ -50,7 +50,8 @@ When the Pod is deployed, the Kubernetes master will check the PersistentVolumeC # ]' ``` - In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. + In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. + Parameters may be omitted from the StorageClass specification. When the storage class is used to create a PV and a volume, parameters that are not specified will generally be set using a default value taken from the global settings. See [here](../../../references/storage-class-parameters) for the list of storage class parameters, and [here](../../../references/settings) for the full list of global settings. 2. Create a Pod that uses Longhorn volumes by running this command: @@ -114,7 +115,7 @@ If the PVC names a StorageClass, Kubernetes will: ### Creating Longhorn Volumes with the Longhorn UI -Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC bounding purpose. And it's unnecessary for users to create the related StorageClass object. +Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC binding purpose. It's unnecessary for users to create the related StorageClass object. By default the StorageClass for Longhorn created PV/PVC is `longhorn-static`. Users can modify it in `Setting - General - Default Longhorn Static StorageClass Name` as they need. @@ -162,4 +163,4 @@ Annotations: longhorn.io/volume-scheduling-error: insufficient storage ... -``` \ No newline at end of file +``` diff --git a/content/docs/1.7.0/references/examples.md b/content/docs/1.7.0/references/examples.md index 4f3dbfb67..6871d7bef 100644 --- a/content/docs/1.7.0/references/examples.md +++ b/content/docs/1.7.0/references/examples.md @@ -18,6 +18,7 @@ For reference, this page provides examples of Kubernetes resources that use Long ### Block Volume +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -50,9 +51,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: block-vol persistentVolumeClaim: claimName: longhorn-block-vol +``` ### CSI Persistent Volume +```yaml apiVersion: v1 kind: PersistentVolume metadata: @@ -113,9 +116,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: vol persistentVolumeClaim: claimName: longhorn-vol-pvc +``` ### Deployment +```yaml apiVersion: v1 kind: Service metadata: @@ -182,9 +187,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: mysql-volume persistentVolumeClaim: claimName: mysql-pvc +``` ### Pod with PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -224,12 +231,14 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: volv persistentVolumeClaim: claimName: longhorn-volv-pvc +``` ### Pod with Generic Ephemeral Volume For more information about generic ephemeral volumes, refer to the [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes). +```yaml apiVersion: v1 kind: Pod metadata: @@ -264,11 +273,13 @@ For more information about generic ephemeral volumes, refer to the resources: requests: storage: 2Gi +``` ### Restore to File For more information about restoring to file, refer to [this section.](../../advanced-resources/data-recovery/recover-without-system) +```yaml apiVersion: v1 kind: Pod metadata: @@ -317,9 +328,11 @@ For more information about restoring to file, refer to [this section.](../../adv hostPath: path: /tmp/restore restartPolicy: Never +``` ### Simple Pod +```yaml apiVersion: v1 kind: Pod metadata: @@ -347,9 +360,11 @@ For more information about restoring to file, refer to [this section.](../../adv - name: volv persistentVolumeClaim: claimName: longhorn-simple-pvc +``` ### Simple PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -361,9 +376,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StatefulSet +```yaml apiVersion: v1 kind: Service metadata: @@ -420,9 +437,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StorageClass +```yaml kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: @@ -454,5 +473,7 @@ For more information about restoring to file, refer to [this section.](../../adv # } # ]' +``` + Note that Longhorn supports automatic remount only for the workload pod that is managed by a controller (e.g. deployment, statefulset, daemonset, etc...). See [here](../../high-availability/recover-volume/) for details. diff --git a/content/docs/1.7.1/nodes-and-volumes/volumes/create-volumes.md b/content/docs/1.7.1/nodes-and-volumes/volumes/create-volumes.md index 49c231337..121034cf5 100644 --- a/content/docs/1.7.1/nodes-and-volumes/volumes/create-volumes.md +++ b/content/docs/1.7.1/nodes-and-volumes/volumes/create-volumes.md @@ -50,7 +50,8 @@ When the Pod is deployed, the Kubernetes master will check the PersistentVolumeC # ]' ``` - In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. + In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. + Parameters may be omitted from the StorageClass specification. When the storage class is used to create a PV and a volume, parameters that are not specified will generally be set using a default value taken from the global settings. See [here](../../../references/storage-class-parameters) for the list of storage class parameters, and [here](../../../references/settings) for the full list of global settings. 2. Create a Pod that uses Longhorn volumes by running this command: @@ -114,7 +115,7 @@ If the PVC names a StorageClass, Kubernetes will: ### Creating Longhorn Volumes with the Longhorn UI -Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC bounding purpose. And it's unnecessary for users to create the related StorageClass object. +Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC binding purpose. It's unnecessary for users to create the related StorageClass object. By default the StorageClass for Longhorn created PV/PVC is `longhorn-static`. Users can modify it in `Setting - General - Default Longhorn Static StorageClass Name` as they need. @@ -162,4 +163,4 @@ Annotations: longhorn.io/volume-scheduling-error: insufficient storage ... -``` \ No newline at end of file +``` diff --git a/content/docs/1.7.1/references/examples.md b/content/docs/1.7.1/references/examples.md index 4f3dbfb67..6871d7bef 100644 --- a/content/docs/1.7.1/references/examples.md +++ b/content/docs/1.7.1/references/examples.md @@ -18,6 +18,7 @@ For reference, this page provides examples of Kubernetes resources that use Long ### Block Volume +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -50,9 +51,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: block-vol persistentVolumeClaim: claimName: longhorn-block-vol +``` ### CSI Persistent Volume +```yaml apiVersion: v1 kind: PersistentVolume metadata: @@ -113,9 +116,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: vol persistentVolumeClaim: claimName: longhorn-vol-pvc +``` ### Deployment +```yaml apiVersion: v1 kind: Service metadata: @@ -182,9 +187,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: mysql-volume persistentVolumeClaim: claimName: mysql-pvc +``` ### Pod with PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -224,12 +231,14 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: volv persistentVolumeClaim: claimName: longhorn-volv-pvc +``` ### Pod with Generic Ephemeral Volume For more information about generic ephemeral volumes, refer to the [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes). +```yaml apiVersion: v1 kind: Pod metadata: @@ -264,11 +273,13 @@ For more information about generic ephemeral volumes, refer to the resources: requests: storage: 2Gi +``` ### Restore to File For more information about restoring to file, refer to [this section.](../../advanced-resources/data-recovery/recover-without-system) +```yaml apiVersion: v1 kind: Pod metadata: @@ -317,9 +328,11 @@ For more information about restoring to file, refer to [this section.](../../adv hostPath: path: /tmp/restore restartPolicy: Never +``` ### Simple Pod +```yaml apiVersion: v1 kind: Pod metadata: @@ -347,9 +360,11 @@ For more information about restoring to file, refer to [this section.](../../adv - name: volv persistentVolumeClaim: claimName: longhorn-simple-pvc +``` ### Simple PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -361,9 +376,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StatefulSet +```yaml apiVersion: v1 kind: Service metadata: @@ -420,9 +437,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StorageClass +```yaml kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: @@ -454,5 +473,7 @@ For more information about restoring to file, refer to [this section.](../../adv # } # ]' +``` + Note that Longhorn supports automatic remount only for the workload pod that is managed by a controller (e.g. deployment, statefulset, daemonset, etc...). See [here](../../high-availability/recover-volume/) for details. diff --git a/content/docs/1.7.2/nodes-and-volumes/volumes/create-volumes.md b/content/docs/1.7.2/nodes-and-volumes/volumes/create-volumes.md index 49c231337..121034cf5 100644 --- a/content/docs/1.7.2/nodes-and-volumes/volumes/create-volumes.md +++ b/content/docs/1.7.2/nodes-and-volumes/volumes/create-volumes.md @@ -50,7 +50,8 @@ When the Pod is deployed, the Kubernetes master will check the PersistentVolumeC # ]' ``` - In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. + In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. + Parameters may be omitted from the StorageClass specification. When the storage class is used to create a PV and a volume, parameters that are not specified will generally be set using a default value taken from the global settings. See [here](../../../references/storage-class-parameters) for the list of storage class parameters, and [here](../../../references/settings) for the full list of global settings. 2. Create a Pod that uses Longhorn volumes by running this command: @@ -114,7 +115,7 @@ If the PVC names a StorageClass, Kubernetes will: ### Creating Longhorn Volumes with the Longhorn UI -Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC bounding purpose. And it's unnecessary for users to create the related StorageClass object. +Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC binding purpose. It's unnecessary for users to create the related StorageClass object. By default the StorageClass for Longhorn created PV/PVC is `longhorn-static`. Users can modify it in `Setting - General - Default Longhorn Static StorageClass Name` as they need. @@ -162,4 +163,4 @@ Annotations: longhorn.io/volume-scheduling-error: insufficient storage ... -``` \ No newline at end of file +``` diff --git a/content/docs/1.7.2/references/examples.md b/content/docs/1.7.2/references/examples.md index 4f3dbfb67..6871d7bef 100644 --- a/content/docs/1.7.2/references/examples.md +++ b/content/docs/1.7.2/references/examples.md @@ -18,6 +18,7 @@ For reference, this page provides examples of Kubernetes resources that use Long ### Block Volume +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -50,9 +51,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: block-vol persistentVolumeClaim: claimName: longhorn-block-vol +``` ### CSI Persistent Volume +```yaml apiVersion: v1 kind: PersistentVolume metadata: @@ -113,9 +116,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: vol persistentVolumeClaim: claimName: longhorn-vol-pvc +``` ### Deployment +```yaml apiVersion: v1 kind: Service metadata: @@ -182,9 +187,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: mysql-volume persistentVolumeClaim: claimName: mysql-pvc +``` ### Pod with PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -224,12 +231,14 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: volv persistentVolumeClaim: claimName: longhorn-volv-pvc +``` ### Pod with Generic Ephemeral Volume For more information about generic ephemeral volumes, refer to the [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes). +```yaml apiVersion: v1 kind: Pod metadata: @@ -264,11 +273,13 @@ For more information about generic ephemeral volumes, refer to the resources: requests: storage: 2Gi +``` ### Restore to File For more information about restoring to file, refer to [this section.](../../advanced-resources/data-recovery/recover-without-system) +```yaml apiVersion: v1 kind: Pod metadata: @@ -317,9 +328,11 @@ For more information about restoring to file, refer to [this section.](../../adv hostPath: path: /tmp/restore restartPolicy: Never +``` ### Simple Pod +```yaml apiVersion: v1 kind: Pod metadata: @@ -347,9 +360,11 @@ For more information about restoring to file, refer to [this section.](../../adv - name: volv persistentVolumeClaim: claimName: longhorn-simple-pvc +``` ### Simple PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -361,9 +376,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StatefulSet +```yaml apiVersion: v1 kind: Service metadata: @@ -420,9 +437,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StorageClass +```yaml kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: @@ -454,5 +473,7 @@ For more information about restoring to file, refer to [this section.](../../adv # } # ]' +``` + Note that Longhorn supports automatic remount only for the workload pod that is managed by a controller (e.g. deployment, statefulset, daemonset, etc...). See [here](../../high-availability/recover-volume/) for details. diff --git a/content/docs/1.7.3/nodes-and-volumes/volumes/create-volumes.md b/content/docs/1.7.3/nodes-and-volumes/volumes/create-volumes.md index 49c231337..121034cf5 100644 --- a/content/docs/1.7.3/nodes-and-volumes/volumes/create-volumes.md +++ b/content/docs/1.7.3/nodes-and-volumes/volumes/create-volumes.md @@ -50,7 +50,8 @@ When the Pod is deployed, the Kubernetes master will check the PersistentVolumeC # ]' ``` - In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. + In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. + Parameters may be omitted from the StorageClass specification. When the storage class is used to create a PV and a volume, parameters that are not specified will generally be set using a default value taken from the global settings. See [here](../../../references/storage-class-parameters) for the list of storage class parameters, and [here](../../../references/settings) for the full list of global settings. 2. Create a Pod that uses Longhorn volumes by running this command: @@ -114,7 +115,7 @@ If the PVC names a StorageClass, Kubernetes will: ### Creating Longhorn Volumes with the Longhorn UI -Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC bounding purpose. And it's unnecessary for users to create the related StorageClass object. +Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC binding purpose. It's unnecessary for users to create the related StorageClass object. By default the StorageClass for Longhorn created PV/PVC is `longhorn-static`. Users can modify it in `Setting - General - Default Longhorn Static StorageClass Name` as they need. @@ -162,4 +163,4 @@ Annotations: longhorn.io/volume-scheduling-error: insufficient storage ... -``` \ No newline at end of file +``` diff --git a/content/docs/1.7.3/references/examples.md b/content/docs/1.7.3/references/examples.md index 4f3dbfb67..6871d7bef 100644 --- a/content/docs/1.7.3/references/examples.md +++ b/content/docs/1.7.3/references/examples.md @@ -18,6 +18,7 @@ For reference, this page provides examples of Kubernetes resources that use Long ### Block Volume +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -50,9 +51,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: block-vol persistentVolumeClaim: claimName: longhorn-block-vol +``` ### CSI Persistent Volume +```yaml apiVersion: v1 kind: PersistentVolume metadata: @@ -113,9 +116,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: vol persistentVolumeClaim: claimName: longhorn-vol-pvc +``` ### Deployment +```yaml apiVersion: v1 kind: Service metadata: @@ -182,9 +187,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: mysql-volume persistentVolumeClaim: claimName: mysql-pvc +``` ### Pod with PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -224,12 +231,14 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: volv persistentVolumeClaim: claimName: longhorn-volv-pvc +``` ### Pod with Generic Ephemeral Volume For more information about generic ephemeral volumes, refer to the [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes). +```yaml apiVersion: v1 kind: Pod metadata: @@ -264,11 +273,13 @@ For more information about generic ephemeral volumes, refer to the resources: requests: storage: 2Gi +``` ### Restore to File For more information about restoring to file, refer to [this section.](../../advanced-resources/data-recovery/recover-without-system) +```yaml apiVersion: v1 kind: Pod metadata: @@ -317,9 +328,11 @@ For more information about restoring to file, refer to [this section.](../../adv hostPath: path: /tmp/restore restartPolicy: Never +``` ### Simple Pod +```yaml apiVersion: v1 kind: Pod metadata: @@ -347,9 +360,11 @@ For more information about restoring to file, refer to [this section.](../../adv - name: volv persistentVolumeClaim: claimName: longhorn-simple-pvc +``` ### Simple PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -361,9 +376,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StatefulSet +```yaml apiVersion: v1 kind: Service metadata: @@ -420,9 +437,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StorageClass +```yaml kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: @@ -454,5 +473,7 @@ For more information about restoring to file, refer to [this section.](../../adv # } # ]' +``` + Note that Longhorn supports automatic remount only for the workload pod that is managed by a controller (e.g. deployment, statefulset, daemonset, etc...). See [here](../../high-availability/recover-volume/) for details. diff --git a/content/docs/1.8.0/nodes-and-volumes/volumes/create-volumes.md b/content/docs/1.8.0/nodes-and-volumes/volumes/create-volumes.md index 827eeb1ce..892d01c42 100644 --- a/content/docs/1.8.0/nodes-and-volumes/volumes/create-volumes.md +++ b/content/docs/1.8.0/nodes-and-volumes/volumes/create-volumes.md @@ -51,8 +51,9 @@ When the Pod is deployed, the Kubernetes master will check the PersistentVolumeC # ]' ``` - In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. - Starting with v1.8.0, the parameter `backupTargetName` can be used to specify the backup target. The name of the default backup target (`default`) is used if `backupTargetName` is not specified. + In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. + Starting with v1.8.0, the parameter `backupTargetName` can be used to specify the backup target. The name of the default backup target (`default`) is used if `backupTargetName` is not specified. + Parameters may be omitted from the StorageClass specification. When the storage class is used to create a PV and a volume, parameters that are not specified will generally be set using a default value taken from the global settings. See [here](../../../references/storage-class-parameters) for the list of storage class parameters, and [here](../../../references/settings) for the full list of global settings. 2. Create a Pod that uses Longhorn volumes by running this command: @@ -116,7 +117,7 @@ If the PVC names a StorageClass, Kubernetes will: ### Creating Longhorn Volumes with the Longhorn UI -Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC bounding purpose. And it's unnecessary for users to create the related StorageClass object. +Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC binding purpose. It's unnecessary for users to create the related StorageClass object. By default the StorageClass for Longhorn created PV/PVC is `longhorn-static`. Users can modify it in `Setting - General - Default Longhorn Static StorageClass Name` as they need. @@ -164,4 +165,4 @@ Annotations: longhorn.io/volume-scheduling-error: insufficient storage ... -``` \ No newline at end of file +``` diff --git a/content/docs/1.8.0/references/examples.md b/content/docs/1.8.0/references/examples.md index 4f3dbfb67..6871d7bef 100644 --- a/content/docs/1.8.0/references/examples.md +++ b/content/docs/1.8.0/references/examples.md @@ -18,6 +18,7 @@ For reference, this page provides examples of Kubernetes resources that use Long ### Block Volume +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -50,9 +51,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: block-vol persistentVolumeClaim: claimName: longhorn-block-vol +``` ### CSI Persistent Volume +```yaml apiVersion: v1 kind: PersistentVolume metadata: @@ -113,9 +116,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: vol persistentVolumeClaim: claimName: longhorn-vol-pvc +``` ### Deployment +```yaml apiVersion: v1 kind: Service metadata: @@ -182,9 +187,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: mysql-volume persistentVolumeClaim: claimName: mysql-pvc +``` ### Pod with PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -224,12 +231,14 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: volv persistentVolumeClaim: claimName: longhorn-volv-pvc +``` ### Pod with Generic Ephemeral Volume For more information about generic ephemeral volumes, refer to the [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes). +```yaml apiVersion: v1 kind: Pod metadata: @@ -264,11 +273,13 @@ For more information about generic ephemeral volumes, refer to the resources: requests: storage: 2Gi +``` ### Restore to File For more information about restoring to file, refer to [this section.](../../advanced-resources/data-recovery/recover-without-system) +```yaml apiVersion: v1 kind: Pod metadata: @@ -317,9 +328,11 @@ For more information about restoring to file, refer to [this section.](../../adv hostPath: path: /tmp/restore restartPolicy: Never +``` ### Simple Pod +```yaml apiVersion: v1 kind: Pod metadata: @@ -347,9 +360,11 @@ For more information about restoring to file, refer to [this section.](../../adv - name: volv persistentVolumeClaim: claimName: longhorn-simple-pvc +``` ### Simple PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -361,9 +376,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StatefulSet +```yaml apiVersion: v1 kind: Service metadata: @@ -420,9 +437,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StorageClass +```yaml kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: @@ -454,5 +473,7 @@ For more information about restoring to file, refer to [this section.](../../adv # } # ]' +``` + Note that Longhorn supports automatic remount only for the workload pod that is managed by a controller (e.g. deployment, statefulset, daemonset, etc...). See [here](../../high-availability/recover-volume/) for details. diff --git a/content/docs/1.8.1/nodes-and-volumes/volumes/create-volumes.md b/content/docs/1.8.1/nodes-and-volumes/volumes/create-volumes.md index 827eeb1ce..892d01c42 100644 --- a/content/docs/1.8.1/nodes-and-volumes/volumes/create-volumes.md +++ b/content/docs/1.8.1/nodes-and-volumes/volumes/create-volumes.md @@ -51,8 +51,9 @@ When the Pod is deployed, the Kubernetes master will check the PersistentVolumeC # ]' ``` - In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. - Starting with v1.8.0, the parameter `backupTargetName` can be used to specify the backup target. The name of the default backup target (`default`) is used if `backupTargetName` is not specified. + In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. + Starting with v1.8.0, the parameter `backupTargetName` can be used to specify the backup target. The name of the default backup target (`default`) is used if `backupTargetName` is not specified. + Parameters may be omitted from the StorageClass specification. When the storage class is used to create a PV and a volume, parameters that are not specified will generally be set using a default value taken from the global settings. See [here](../../../references/storage-class-parameters) for the list of storage class parameters, and [here](../../../references/settings) for the full list of global settings. 2. Create a Pod that uses Longhorn volumes by running this command: @@ -116,7 +117,7 @@ If the PVC names a StorageClass, Kubernetes will: ### Creating Longhorn Volumes with the Longhorn UI -Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC bounding purpose. And it's unnecessary for users to create the related StorageClass object. +Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC binding purpose. It's unnecessary for users to create the related StorageClass object. By default the StorageClass for Longhorn created PV/PVC is `longhorn-static`. Users can modify it in `Setting - General - Default Longhorn Static StorageClass Name` as they need. @@ -164,4 +165,4 @@ Annotations: longhorn.io/volume-scheduling-error: insufficient storage ... -``` \ No newline at end of file +``` diff --git a/content/docs/1.8.1/references/examples.md b/content/docs/1.8.1/references/examples.md index 4f3dbfb67..6871d7bef 100644 --- a/content/docs/1.8.1/references/examples.md +++ b/content/docs/1.8.1/references/examples.md @@ -18,6 +18,7 @@ For reference, this page provides examples of Kubernetes resources that use Long ### Block Volume +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -50,9 +51,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: block-vol persistentVolumeClaim: claimName: longhorn-block-vol +``` ### CSI Persistent Volume +```yaml apiVersion: v1 kind: PersistentVolume metadata: @@ -113,9 +116,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: vol persistentVolumeClaim: claimName: longhorn-vol-pvc +``` ### Deployment +```yaml apiVersion: v1 kind: Service metadata: @@ -182,9 +187,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: mysql-volume persistentVolumeClaim: claimName: mysql-pvc +``` ### Pod with PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -224,12 +231,14 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: volv persistentVolumeClaim: claimName: longhorn-volv-pvc +``` ### Pod with Generic Ephemeral Volume For more information about generic ephemeral volumes, refer to the [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes). +```yaml apiVersion: v1 kind: Pod metadata: @@ -264,11 +273,13 @@ For more information about generic ephemeral volumes, refer to the resources: requests: storage: 2Gi +``` ### Restore to File For more information about restoring to file, refer to [this section.](../../advanced-resources/data-recovery/recover-without-system) +```yaml apiVersion: v1 kind: Pod metadata: @@ -317,9 +328,11 @@ For more information about restoring to file, refer to [this section.](../../adv hostPath: path: /tmp/restore restartPolicy: Never +``` ### Simple Pod +```yaml apiVersion: v1 kind: Pod metadata: @@ -347,9 +360,11 @@ For more information about restoring to file, refer to [this section.](../../adv - name: volv persistentVolumeClaim: claimName: longhorn-simple-pvc +``` ### Simple PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -361,9 +376,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StatefulSet +```yaml apiVersion: v1 kind: Service metadata: @@ -420,9 +437,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StorageClass +```yaml kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: @@ -454,5 +473,7 @@ For more information about restoring to file, refer to [this section.](../../adv # } # ]' +``` + Note that Longhorn supports automatic remount only for the workload pod that is managed by a controller (e.g. deployment, statefulset, daemonset, etc...). See [here](../../high-availability/recover-volume/) for details. diff --git a/content/docs/1.9.0/nodes-and-volumes/volumes/create-volumes.md b/content/docs/1.9.0/nodes-and-volumes/volumes/create-volumes.md index 827eeb1ce..892d01c42 100644 --- a/content/docs/1.9.0/nodes-and-volumes/volumes/create-volumes.md +++ b/content/docs/1.9.0/nodes-and-volumes/volumes/create-volumes.md @@ -51,8 +51,9 @@ When the Pod is deployed, the Kubernetes master will check the PersistentVolumeC # ]' ``` - In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. - Starting with v1.8.0, the parameter `backupTargetName` can be used to specify the backup target. The name of the default backup target (`default`) is used if `backupTargetName` is not specified. + In particular, starting with v1.4.0, the parameter `mkfsParams` can be used to specify filesystem format options for each StorageClass. + Starting with v1.8.0, the parameter `backupTargetName` can be used to specify the backup target. The name of the default backup target (`default`) is used if `backupTargetName` is not specified. + Parameters may be omitted from the StorageClass specification. When the storage class is used to create a PV and a volume, parameters that are not specified will generally be set using a default value taken from the global settings. See [here](../../../references/storage-class-parameters) for the list of storage class parameters, and [here](../../../references/settings) for the full list of global settings. 2. Create a Pod that uses Longhorn volumes by running this command: @@ -116,7 +117,7 @@ If the PVC names a StorageClass, Kubernetes will: ### Creating Longhorn Volumes with the Longhorn UI -Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC bounding purpose. And it's unnecessary for users to create the related StorageClass object. +Since the Longhorn volume already exists while creating PV/PVC, a StorageClass is not needed for dynamically provisioning Longhorn volume. However, the field `storageClassName` should be set in PVC/PV, to be used for PVC binding purpose. It's unnecessary for users to create the related StorageClass object. By default the StorageClass for Longhorn created PV/PVC is `longhorn-static`. Users can modify it in `Setting - General - Default Longhorn Static StorageClass Name` as they need. @@ -164,4 +165,4 @@ Annotations: longhorn.io/volume-scheduling-error: insufficient storage ... -``` \ No newline at end of file +``` diff --git a/content/docs/1.9.0/references/examples.md b/content/docs/1.9.0/references/examples.md index 4f3dbfb67..6871d7bef 100644 --- a/content/docs/1.9.0/references/examples.md +++ b/content/docs/1.9.0/references/examples.md @@ -18,6 +18,7 @@ For reference, this page provides examples of Kubernetes resources that use Long ### Block Volume +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -50,9 +51,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: block-vol persistentVolumeClaim: claimName: longhorn-block-vol +``` ### CSI Persistent Volume +```yaml apiVersion: v1 kind: PersistentVolume metadata: @@ -113,9 +116,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: vol persistentVolumeClaim: claimName: longhorn-vol-pvc +``` ### Deployment +```yaml apiVersion: v1 kind: Service metadata: @@ -182,9 +187,11 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: mysql-volume persistentVolumeClaim: claimName: mysql-pvc +``` ### Pod with PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -224,12 +231,14 @@ For reference, this page provides examples of Kubernetes resources that use Long - name: volv persistentVolumeClaim: claimName: longhorn-volv-pvc +``` ### Pod with Generic Ephemeral Volume For more information about generic ephemeral volumes, refer to the [Kubernetes documentation](https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes). +```yaml apiVersion: v1 kind: Pod metadata: @@ -264,11 +273,13 @@ For more information about generic ephemeral volumes, refer to the resources: requests: storage: 2Gi +``` ### Restore to File For more information about restoring to file, refer to [this section.](../../advanced-resources/data-recovery/recover-without-system) +```yaml apiVersion: v1 kind: Pod metadata: @@ -317,9 +328,11 @@ For more information about restoring to file, refer to [this section.](../../adv hostPath: path: /tmp/restore restartPolicy: Never +``` ### Simple Pod +```yaml apiVersion: v1 kind: Pod metadata: @@ -347,9 +360,11 @@ For more information about restoring to file, refer to [this section.](../../adv - name: volv persistentVolumeClaim: claimName: longhorn-simple-pvc +``` ### Simple PersistentVolumeClaim +```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -361,9 +376,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StatefulSet +```yaml apiVersion: v1 kind: Service metadata: @@ -420,9 +437,11 @@ For more information about restoring to file, refer to [this section.](../../adv resources: requests: storage: 1Gi +``` ### StorageClass +```yaml kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: @@ -454,5 +473,7 @@ For more information about restoring to file, refer to [this section.](../../adv # } # ]' +``` + Note that Longhorn supports automatic remount only for the workload pod that is managed by a controller (e.g. deployment, statefulset, daemonset, etc...). See [here](../../high-availability/recover-volume/) for details.