From cea23069c281a5676b94384a2b4108da8ba00e2e Mon Sep 17 00:00:00 2001 From: Hemant Kumar Date: Wed, 8 Mar 2017 21:06:47 -0500 Subject: [PATCH 1/2] Add documentation for mount option --- docs/user-guide/persistent-volumes/index.md | 45 +++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/docs/user-guide/persistent-volumes/index.md b/docs/user-guide/persistent-volumes/index.md index e2d2661d13..8357f727e7 100644 --- a/docs/user-guide/persistent-volumes/index.md +++ b/docs/user-guide/persistent-volumes/index.md @@ -222,6 +222,51 @@ A volume will be in one of the following phases: The CLI will show the name of the PVC bound to the PV. +### Mount Options + +Kubernetes administrator can specify additional mount option to be used when a Persistent Volume is +being mounted on a node. + +Mount option can be specified via an annotation on PV - `volume.beta.kubernetes.io/mount-options`. +For example: + +```yaml +apiVersion: "v1" +kind: "PersistentVolume" +metadata: + name: gce-disk-1 + annotations: + volume.beta.kubernetes.io/mount-options: "discard" +spec: + capacity: + storage: "10Gi" + accessModes: + - "ReadWriteOnce" + gcePersistentDisk: + fsType: "ext4" + pdName: "gce-disk-1 +``` + +A mount option can be a string which will be cumulatively joined and used while mounting volume to the disk. + +Having said that, not all Persistent volume types support mount options. As of this writing - volume types that +support mount options are: + +* GCEPersistentDisk +* AWSElasticBlockStore +* AzureFile +* AzureDisk +* NFS +* iSCSI +* RBD (Ceph Block Device) +* CephFS +* Cinder (OpenStack block storage) +* Glusterfs +* VsphereVolume +* Quobyte Volumes +* VMware Photon + + ## PersistentVolumeClaims Each PVC contains a spec and status, which is the specification and status of the claim. From 5bfd2929d1619213dbe4f3b0c22fdbaa167372c1 Mon Sep 17 00:00:00 2001 From: Hemant Kumar Date: Thu, 16 Mar 2017 16:54:54 -0400 Subject: [PATCH 2/2] Fix language in docs --- docs/user-guide/persistent-volumes/index.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/user-guide/persistent-volumes/index.md b/docs/user-guide/persistent-volumes/index.md index 8357f727e7..73ceb2223c 100644 --- a/docs/user-guide/persistent-volumes/index.md +++ b/docs/user-guide/persistent-volumes/index.md @@ -224,10 +224,11 @@ The CLI will show the name of the PVC bound to the PV. ### Mount Options -Kubernetes administrator can specify additional mount option to be used when a Persistent Volume is -being mounted on a node. +A Kubernetes administrator can specify additional mount options for when a Persistent Volume is being mounted on a node. + +You can specify a mount option by using the annotation `volume.beta.kubernetes.io/mount-options` on +your Persistent Volume. -Mount option can be specified via an annotation on PV - `volume.beta.kubernetes.io/mount-options`. For example: ```yaml @@ -247,10 +248,10 @@ spec: pdName: "gce-disk-1 ``` -A mount option can be a string which will be cumulatively joined and used while mounting volume to the disk. +A mount option is a string which will be cumulatively joined and used while mounting volume to the disk. -Having said that, not all Persistent volume types support mount options. As of this writing - volume types that -support mount options are: +Note that not all Persistent volume types support mount options. In Kubernetes version 1.6, the following +volume types support mount options. * GCEPersistentDisk * AWSElasticBlockStore