Expand the Filesystem¶
The full image was created for the smallest 8GB storage space EMMC.
If you flashed it to a larger storage device (eg. 32GB EMMC or USB stick) you can't use the whole space out of the box.
To use the whole space availaible you have to expand the file system.
This can be done in different ways:
option 1: using armbian-resize-filesystem (recommended)
Enable the automatic resizing of the filesystem on boot:
sudo systemctl enable armbian-resize-filesystem
sudo reboot
Please allow some time for the system to boot and to resize the file system. This process needs some time and will be done while the system is running (I have not measured it but I estimate something around 15-20min after booting).
option 2: using fdisk
First, use fdisk to delete the existing partition and recreate it to use the full size of the disk without formatting:
fdisk /dev/mmcblk1
resize2fs /dev/mmcblk1p2
option 3: using parted
You can use parted as an alternative to fdisk for resizing the partition: Resize the second partition on the device /dev/mmcblk1 to use 100% of the available space:
parted /dev/mmcblk1 resizepart 2 100%
resize2fs /dev/mmcblk1p2
option 4: using growpart
Download the growpart utility:
wget https://raw.githubusercontent.com/canonical/cloud-utils/main/bin/growpart -P /usr/local/bin/`
chmod +x /usr/local/bin/growpart
growpart /dev/mmcblk1 2
resize2fs /dev/mmcblk1p2`