question

wilm avatar image
wilm asked

Root Filesystem 100% full. How to use resize2fs

My filesystem on my Multiplus II GX is in the root entirely full.

Filesystem Size Used Available Use% Mounted on
/dev/root 958.2M 942.2M 0 100% /
devtmpfs 216.6M 4.0K 216.6M 0% /dev
tmpfs 249.1M 908.0K 248.2M 0% /run
tmpfs 249.1M 472.0K 248.7M 0% /var/volatile
/dev/mmcblk1p5 3.2G 285.8M 2.7G 9% /data
tmpfs 249.1M 908.0K 248.2M 0% /service
root@nanopi:/#


How can I resolve this?

Listing the root only gives this:


root@nanopi:/# ls -lisa
2 4 drwxr-xr-x 20 root root 4096 Sep 12 09:16 .
2 4 drwxr-xr-x 20 root root 4096 Sep 12 09:16 ..
64005 4 drwxr-xr-x 2 root root 4096 Jul 31 12:03 Settings
12 4 drwxr-xr-x 2 root root 4096 Jul 17 18:36 bin
100 4 drwxr-xr-x 2 root root 4096 Jul 17 18:31 boot
2 4 drwxr-xr-x 15 root root 4096 Sep 12 09:24 data
1 0 drwxr-xr-x 14 root root 2820 Sep 11 14:53 dev
125 4 drwxr-xr-x 48 root root 4096 Jul 31 12:02 etc
939 4 drwxr-xr-x 3 root root 4096 Jul 17 18:32 home
944 4 drwxr-xr-x 7 root root 4096 Jul 17 18:36 lib
11 16 drwx------ 2 root root 16384 Jul 17 18:36 lost+found
1422 0 lrwxrwxrwx 1 root root 10 Jul 17 18:26 media -> /run/media
1423 4 drwxr-xr-x 2 root root 4096 Jul 17 18:26 mnt
1424 4 drwxr-xr-x 3 root root 4096 Jul 17 18:29 opt
1 0 dr-xr-xr-x 344 root root 0 Sep 11 14:53 proc
1 0 drwxr-xr-x 21 root root 1000 Sep 12 09:46 run
3037 4 drwxr-xr-x 2 root root 4096 Jul 17 18:36 sbin
228 0 drwxr-xr-x 32 root root 1000 Sep 11 14:53 service
1 0 dr-xr-xr-x 12 root root 0 Sep 11 14:53 sys
3148 0 lrwxrwxrwx 1 root root 8 Jul 17 18:33 tmp -> /var/tmp
3149 4 drwxr-xr-x 12 root root 4096 Jul 17 18:31 usr
63636 4 drwxr-xr-x 10 root root 4096 Jul 17 18:33 var
root@nanopi:/#


Thanks in advance for any help

Best,
Wilm



gx device
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

3 Answers
bathnm avatar image
bathnm answered ·

@Wilm Take a look at this guide.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

wilm avatar image
wilm answered ·

Thanks @Bathnm

/opt/victronenergy/swupdate-scripts/resize2fs.sh
made the trick!

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

alex-jimenez avatar image
alex-jimenez answered ·

this worked great!! wish it just ran after an update instead of having to do it manually. Mine went from 100% to 11%


root@raspberrypi4:/# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 1.0G    976.6M         0 100% /
devtmpfs                  3.8G      4.0K      3.8G   0% /dev
tmpfs                     3.9G    832.0K      3.9G   0% /run
tmpfs                     3.9G    500.0K      3.9G   0% /var/volatile
/dev/mmcblk0p1           41.2M     21.8M     19.4M  53% /u-boot
/dev/mmcblk0p4            9.9G     67.9M      9.3G   1% /data
tmpfs                     3.9G    832.0K      3.9G   0% /service
overlay                   3.9G    500.0K      3.9G   0% /var/lib
root@raspberrypi4:/# /opt/victronenergy/swupdate-scripts/resize2fs.sh
resizing /dev/mmcblk0p2
resize2fs 1.45.7 (28-Jan-2021)
Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 2
The filesystem on /dev/mmcblk0p2 is now 2558987 (4k) blocks long.

root@raspberrypi4:/# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 9.1G    978.7M      7.8G  11% /
devtmpfs                  3.8G      4.0K      3.8G   0% /dev
tmpfs                     3.9G    832.0K      3.9G   0% /run
tmpfs                     3.9G    500.0K      3.9G   0% /var/volatile
/dev/mmcblk0p1           41.2M     21.8M     19.4M  53% /u-boot
/dev/mmcblk0p4            9.9G     67.9M      9.3G   1% /data
tmpfs                     3.9G    832.0K      3.9G   0% /service
overlay                   3.9G    500.0K      3.9G   0% /var/lib
root@raspberrypi4:/# 


2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.