<p>Storage size which I specified in the persistent volume claim ignores with using nfs as a storage backend.</p>

<p>I want to attach persistent volume to container with specified volume size.
The following is the yaml file which I used to create pvc.</p>

<pre><code>kind: PersistentVolumeClaim 
apiVersion: v1
metadata:  
　name: test-claim  
　annotations:
　　volume.beta.kubernetes.io/storage-class: "managed-nfs-storage" 
spec:
  accessModes:
  　- ReadWriteMany
  resources:
　　requests:
  　　storage: 1Mi
</code></pre>

<p>The following is the result of created pvc.<br></p>

<pre><code>NAME   STATUS    VOLUME   CAPACITY   ACCESS MODES   STORAGECLASS      AGE
test-claim   Bound     pvc-bd0fdb84-f73c-11e7-bdd5-0050569b0869   1Mi        RWX            managed-nfs-storage   6m
</code></pre>

<p>Finally, I attached created volume to container and see the size of mounted file system, it shows the total amount of disk size which I export using NFS.</p>

<p>Does anybody know how to enable request storage size parameter? 
In other words, Is there any way to specify the size of volumes when using NSF as a backend storage?</p>

<p>Simply put, no, it's not possible.</p>

<p>The storage parameter is used for matching PVC to a PV, and for autoprovisioning PVs when supported (ie. adding an EBS on AWS). Kubernetes it self has no means of managing filesystem quota whatsoever.</p>

<p>One thing that could help is if you'd automaticaly provision NFS to share a particular mount point on the server that is created with this limit (ie. as separate LVM LV, btrfs or zfs). You can also think about switching to something like GlusterFS with its provisioning API <a href="https://github.com/heketi/heketi" rel="nofollow noreferrer">heketi</a></p>
