Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Detach the volume from the instance so that is becomes available
  2. Extend the volume and save after specifying the desired size
  3. Re-attach the volume to the instance
  4. Connect to the instance and perform a resize so the the device show the entire disk size:

    Code Block
    languagebash
    titleresize mounted filesystemcheck data
    collapsetrue
    root@minio-iotwins:~# df -h
    Filesystem      Size  Used Avail Use% Mounted on
    udev            3.9G     0  3.9G   0% /dev
    tmpfs           798M  844K  798M   1% /run
    /dev/vda1        78G  2.3G   76G   3% /
    tmpfs           3.9G     0  3.9G   0% /dev/shm
    tmpfs           5.0M     0  5.0M   0% /run/lock
    tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
    /dev/vda15      105M  3.6M  101M   4% /boot/efi
    overlay          78G  2.3G   76G   3% /var/lib/docker/overlay2/9984becaaa691c6aa6842273a6f2e137e1fa0737bbca94dec1554caeee021f44/merged
    overlay          78G  2.3G   76G   3% /var/lib/docker/overlay2/ca67048011fc1a9e67ecf4ebad11aa2f210cac4336ef9683ccd6005251d4e69e/merged
    shm              64M     0   64M   0% /var/lib/docker/containers/fa9ae914556ca58893dd248939e8132710f672289b0baa35d8fb43d790c1deb9/mounts/shm
    shm              64M     0   64M   0% /var/lib/docker/containers/8cab3616d80fa0f136447f301ab699c5d3e2abb88f6a23b914dd34f7cb3dbf7d/mounts/shm
    tmpfs           798M     0  798M   0% /run/user/1000
    /dev/vdc         45G   53M   42G   1% /data
    
    root@minio-iotwins:~# grep vdc /proc/partitions
     252       32   49283072 vdc
    
    root@minio-iotwins:~# resize2fs /dev/vdc
    resize2fs 1.44.1 (24-Mar-2018)
    Filesystem at /dev/vdc is mounted on /data; on-line resizing required
    old_desc_blocks = 6, new_desc_blocks = 6
    The filesystem on /dev/vdc is now 12320768 (4k) blocks long.
    
    root@minio-iotwins:~# df -h
    Filesystem      Size  Used Avail Use% Mounted on
    udev            3.9G     0  3.9G   0% /dev
    tmpfs           798M  844K  798M   1% /run
    /dev/vda1        78G  2.3G   76G   3% /
    tmpfs           3.9G     0  3.9G   0% /dev/shm
    tmpfs           5.0M     0  5.0M   0% /run/lock
    tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
    /dev/vda15      105M  3.6M  101M   4% /boot/efi
    overlay          78G  2.3G   76G   3% /var/lib/docker/overlay2/9984becaaa691c6aa6842273a6f2e137e1fa0737bbca94dec1554caeee021f44/merged
    overlay          78G  2.3G   76G   3% /var/lib/docker/overlay2/ca67048011fc1a9e67ecf4ebad11aa2f210cac4336ef9683ccd6005251d4e69e/merged
    shm              64M     0   64M   0% /var/lib/docker/containers/fa9ae914556ca58893dd248939e8132710f672289b0baa35d8fb43d790c1deb9/mounts/shm
    shm              64M     0   64M   0% /var/lib/docker/containers/8cab3616d80fa0f136447f301ab699c5d3e2abb88f6a23b914dd34f7cb3dbf7d/mounts/shm
    tmpfs           798M     0  798M   0% /run/user/1000
    /dev/vdc         47G   53M   44G   1% /data


  5. Check data is still present on the

    Code Block
    languagebash
    titleresize mounted filesystemcheck data
    collapsetrue
    root@minio-iotwins:~# ll /data/
    total 40
    drwxr-xr-x  7 root root  4096 Dec 18 16:03 ./
    drwxr-xr-x 24 root root  4096 Dec 18 06:17 ../
    drwxr-xr-x  6 root root  4096 Dec 18 15:00 .minio.sys/
    drwxr-xr-x  2 root root  4096 Dec 18 15:47 cduma/
    drwx------  2 root root 16384 Dec 17 16:28 lost+found/
    drwxr-xr-x  3 root root  4096 Dec 18 16:05 rossitisbeni/
    drwxr-xr-x  4 root root  4096 Dec 18 16:02 scratch/
    
    root@minio-iotwins:~# ll /data/scratch/
    total 16
    drwxr-xr-x 4 root root 4096 Dec 18 16:02 ./
    drwxr-xr-x 7 root root 4096 Dec 18 16:03 ../
    drwxr-xr-x 2 root root 4096 Dec 18 16:01 pippo/
    drwxr-xr-x 2 root root 4096 Dec 18 16:02 rossitisbeni/
    root@minio-iotwins:~# ll /data/scratch/pippo/
    total 32
    drwxr-xr-x 2 root root  4096 Dec 18 16:01  ./
    drwxr-xr-x 4 root root  4096 Dec 18 16:02  ../
    -rw-r--r-- 1 root root 23407 Dec 18 16:01 'Screenshot 2020-12-18 at 10.50.50.png'