<p>I've a AKS cluster and I'm trying to resize the PVC used. Actually the PVC has a capacity of 5Gi and I already resized it to 25Gi:</p>
<pre><code>&gt; kubectl describe pv

Name:              mypv
Labels:            failure-domain.beta.kubernetes.io/region=northeurope
Annotations:       pv.kubernetes.io/bound-by-controller: yes
                   pv.kubernetes.io/provisioned-by: kubernetes.io/azure-disk
                   volumehelper.VolumeDynamicallyCreatedByKey: azure-disk-dynamic-provisioner
Finalizers:        [kubernetes.io/pv-protection]
StorageClass:      default
Status:            Bound
Claim:             default/test-pvc
Reclaim Policy:    Delete
Access Modes:      RWO
VolumeMode:        Filesystem
Capacity:          25Gi
...

&gt; kubectl describe pvc

Name:          test-pvc
Namespace:     default
StorageClass:  default
Status:        Bound
Volume:        mypv
Labels:        &lt;none&gt;
Annotations:   pv.kubernetes.io/bind-completed: yes
               pv.kubernetes.io/bound-by-controller: yes
               volume.beta.kubernetes.io/storage-provisioner: kubernetes.io/azure-disk
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      25Gi
Access Modes:  RWO
VolumeMode:    Filesystem
Mounted By:    mypod
Events:        &lt;none&gt;
</code></pre>
<p>But when I call &quot;df -h&quot; in mypod, it still shows me 5Gi (see /dev/sdc):</p>
<pre><code>/ # df -h
Filesystem                Size      Used Available Use% Mounted on
overlay                 123.9G     22.3G    101.6G  18% /
tmpfs                    64.0M         0     64.0M   0% /dev
tmpfs                     1.9G         0      1.9G   0% /sys/fs/cgroup
/dev/sdb1               123.9G     22.3G    101.6G  18% /dev/termination-log
shm                      64.0M         0     64.0M   0% /dev/shm
/dev/sdb1               123.9G     22.3G    101.6G  18% /etc/resolv.conf
/dev/sdb1               123.9G     22.3G    101.6G  18% /etc/hostname
/dev/sdb1               123.9G     22.3G    101.6G  18% /etc/hosts
/dev/sdc                  4.9G      4.4G    448.1M  91% /var/lib/mydb
tmpfs                     1.9G     12.0K      1.9G   0% /run/secrets/kubernetes.io/serviceaccount
tmpfs                     1.9G         0      1.9G   0% /proc/acpi
tmpfs                    64.0M         0     64.0M   0% /proc/kcore
tmpfs                    64.0M         0     64.0M   0% /proc/keys
tmpfs                    64.0M         0     64.0M   0% /proc/timer_list
tmpfs                    64.0M         0     64.0M   0% /proc/sched_debug
tmpfs                     1.9G         0      1.9G   0% /proc/scsi
tmpfs                     1.9G         0      1.9G   0% /sys/firmware
</code></pre>
<p>I already destroyed my pod and even my deployment but it still show 5Gi. Any idea how I can use the entire 25Gi in my pod?</p>
<p><strong>SOLUTION</strong></p>
<p>Thank you mario for the long response. Unfortunately the aks dasboard already showed me that the disk has 25GB. But calling the following returned 5GB:</p>
<p><code>az disk show --ids /subscriptions/&lt;doesn't matter :-)&gt;/resourceGroups/&lt;doesn't matter :-)&gt;/providers/Microsoft.Compute/disks/kubernetes-dynamic-pvc-27ee71a5-&lt;doesn't matter&gt; --query &quot;diskSizeGb&quot;</code></p>
<p>So I finally called <code>az disk update --ids &lt;disk-id&gt; --size-gb 25</code>. Now, the command above returned 25 and I started my pod again. Since my pod uses Alpine Linux, it's not resizing the disk automatically and I had to do it manually:</p>
<pre><code>/ # apk add e2fsprogs-extra
(1/6) Installing libblkid (2.34-r1)
(2/6) Installing libcom_err (1.45.5-r0)
(3/6) Installing e2fsprogs-libs (1.45.5-r0)
(4/6) Installing libuuid (2.34-r1)
(5/6) Installing e2fsprogs (1.45.5-r0)
(6/6) Installing e2fsprogs-extra (1.45.5-r0)
Executing busybox-1.31.1-r9.trigger
OK: 48 MiB in 31 packages
/ # resize2fs /dev/sdc
resize2fs 1.45.5 (07-Jan-2020)
Filesystem at /dev/sdc is mounted on /var/lib/&lt;something :-)&gt;; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 4
The filesystem on /dev/sdc is now 6553600 (4k) blocks long.
</code></pre>
<p>Note: In my pod I set the privileged-mode temporarely to true:</p>
<pre><code>...
spec:
  containers:
  - name: mypod
    image: the-image:version
    securityContext:
      privileged: true
    ports:
    ...
</code></pre>
<p>Otherwise resize2fs failed and say's something like &quot;no such device or similar&quot; (sorry, don't know the exact error message anymore - forgot to copy).</p>

<p>I think <a href="https://github.com/kubernetes/kubernetes/issues/68427" rel="nofollow noreferrer">this</a> GitHub thread should answer your question.</p>
<p>As you can read there:</p>
<blockquote>
<p>... <em>I've tried resizing the persistent volume by adding allowVolumeExpansion: true for the storage class and editing the pvc
to the desired size.</em></p>
</blockquote>
<p>I assume that you've already done the above steps as well.</p>
<p>Reading on, the issue looks exactly as yours:</p>
<blockquote>
<p>After restarting the pod the size of the pvc has changed to the
desired size i.e from 2Ti -&gt; 3Ti</p>
<pre><code>kubectl get pvc
mongo-0     Bound     pvc-xxxx   3Ti        RWO            managed-premium   1h
</code></pre>
<p>but when i login to the pod and do a df -h the disk size still remains
at 2Ti.</p>
<pre><code>kubetl exec -it mongo-0 bash
root@mongo-0:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdc        2.0T  372M  2.0T   1% /mongodb
</code></pre>
</blockquote>
<p>Now let's take a look at <a href="https://github.com/kubernetes/kubernetes/issues/68427#issuecomment-422547344" rel="nofollow noreferrer">the possible solution</a>:</p>
<blockquote>
<p>I couldn't see any changes in the portal when i update the pvc. I had
to update the disk size in portal first - edit the pvc accordingly and
then deleting the pod made it to work. Thanks</p>
</blockquote>
<p>So please check the size of the disk in <strong>Azure portal</strong> and if you see its size unchanged, this might be the case.</p>
<p>Otherwise make sure you followed the steps mentioned in this <a href="https://github.com/kubernetes/kubernetes/issues/68427#issuecomment-451742005" rel="nofollow noreferrer">comment</a> however you don't get any error message when describing your <code>PVC</code> like <code>VolumeResizeFailed</code> so I believe this is not your case and before resizing it was properly <code>detached</code> from node. So first of all make sure there is no discrepancy between volume size in portal and information that you can see by describing your <code>PVC</code>.</p>
