<h3>Scenario</h3>
<p>I have a PersistentVolume with <code>volumeMode</code>as <code>Block</code>. It is defined as:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: PersistentVolume
metadata:
  name: block-vol
spec:
  accessModes:
  - ReadWriteOnce
  capacity:
    storage: 1Gi
  local:
    path: /dev/sdb # this path on the host specified below is used as a device mount
  nodeAffinity:
    required:
      nodeSelectorTerms:
      - matchExpressions:
        - key: kubernetes.io/hostname
          operator: In
          values:
          - &lt;my-host&gt;
  persistentVolumeReclaimPolicy: Retain
  storageClassName: block-storage
  volumeMode: Block
</code></pre>
<p>When I mount this on a <code>statefulset</code> with a <code>VolumeClaimTemplate</code>, I specify it's <code>storage</code> field as <code>1Gi</code>. However, when exec'd in to the deployed pod, I see that the block size more than <code>1Gi</code> (It is the actual size of that device on physical machine)</p>
<p><code>StatefulSet</code> YAML:</p>
<pre class="lang-yaml prettyprint-override"><code>
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: nginx
spec:
  selector:
    matchLabels:
      app: nginx
  serviceName: &quot;nginx&quot;
  replicas: 1
  template:
    metadata:
      labels:
        app: nginx
    spec:
      terminationGracePeriodSeconds: 10
      containers:
      - name: nginx
        image: k8s.gcr.io/nginx-slim:0.8
        ports:
        - containerPort: 80
          name: web
        volumeDevices:
        - name: rawdev0
          devicePath: /dev/kdb0
  volumeClaimTemplates:
  - metadata:
      name: rawdev0
    spec:
      accessModes: [ &quot;ReadWriteOnce&quot; ]
      storageClassName: block-storage
      volumeMode: Block
      resources:
        requests:
          storage: 1Gi
</code></pre>
<p>I have used <code>blockdev</code> to find the size of block in bytes:</p>
<pre><code>root@nginx-0:/# ls -lhrt /dev/kdb0 
brw-rw----. 1 root disk 8, 16 Jan 13 19:49 /dev/kdb0

root@nginx-0:/# blockdev --getsize64 /dev/kdb0 
536870912000 #size of block in bytes

</code></pre>
<h3>Question</h3>
<p>What does the <code>storage</code> field signify in this case?</p>

S.Au.Ra.B.H
<p>Kubernetes can't do much about the storage size for <a href="https://kubernetes.io/docs/concepts/storage/volumes/#local" rel="nofollow noreferrer">local volumes</a>. The admin that created the <code>PersistentVolume</code> must set a proper size, for granular sizing he/she should probably create its own partition instead of mapping the local volume to a directory.</p>
<p>The storage size in the <code>PersistentVolumeClaim</code> is a <em>request</em> so that the app at least get a volume of that size.</p>
