Volume Resize
Extend the volume
Please navigate to Project > Volumes > Volumes, select the Extend Volume
from the Actions column
Linux
ext4
- check the new size.
- run command
sudo growpart /dev/sda 1
to extend the volume size. - run command
sudo resize2fs /dev/sda1
to extend the file system size.
$ df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 392M 1.2M 391M 1% /run
/dev/sda1 77G 76G 1.3G 99% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/sda16 881M 112M 707M 14% /boot
/dev/sda15 105M 6.1M 99M 6% /boot/efi
tmpfs 392M 12K 392M 1% /run/user/1000
$ sudo growpart /dev/sda 1
CHANGED: partition=1 start=2099200 old: size=165672927 end=167772126 new: size=207615967 end=209715166
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 100G 0 disk
├─sda1 8:1 0 99G 0 part /
├─sda14 8:14 0 4M 0 part
├─sda15 8:15 0 106M 0 part /boot/efi
└─sda16 259:0 0 913M 0 part /boot
$ sudo resize2fs /dev/sda1
resize2fs 1.47.0 (5-Feb-2023)
Filesystem at /dev/sda1 is mounted on /; on-line resizing required
old_desc_blocks = 10, new_desc_blocks = 13
The filesystem on /dev/sda1 is now 25951995 (4k) blocks long.
$ df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 392M 1.2M 391M 1% /run
/dev/sda1 96G 77G 20G 80% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/sda16 881M 112M 707M 14% /boot
/dev/sda15 105M 6.1M 99M 6% /boot/efi
tmpfs 392M 12K 392M 1% /run/user/1000
xfs
run command sudo xfs_growfs /dev/sda1
to extend the file system size.
$ sudo xfs_growfs /dev/sda1
meta-data=/dev/sda1 isize=512 agcount=4, agsize=524224 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0 spinodes=0
data = bsize=4096 blocks=2096896, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
$ df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
devtmpfs devtmpfs 223488 0 223488 0% /dev
tmpfs tmpfs 249192 0 249192 0% /dev/shm
tmpfs tmpfs 249192 8772 240420 4% /run
tmpfs tmpfs 249192 0 249192 0% /sys/fs/cgroup
/dev/sda1 xfs 20960236 900460 20059776 5% /
tmpfs tmpfs 49840 0 49840 0% /run/user/1000
Windows
check the new size by run command compmgmt.msc
to open the Disk Management