Rootfs full - Resize off line with gparted?


My WD MyBook / OpenWRT 21.02.02 installation has run out of rootfs space.
Obviously because, being a hard drive install, I have added/been able to add a number of packages than make OpenWRT more useful/flexible (to me, YMMV).

Now I need to go about adding some space but I do not want to do it on-line as Murphy is always around to help muck things up.

Even if I wanted to, it would not be possible as no more packages can be installed due to the lack of space and there are a couple of packages I would need to install.

This is the gparted screenshot of the present situation:

Note the rootfs with only 2.07MiB left.

Should I just resize+move sda3 to resize the unallocated 1.40GiB and then resize the rootfs?

Or can I just resize the rootfs to take up part of the unallocated 1.40GiB?
ie: is the unallocated 1.40GiB critical/needed?

Thanks in advance.


yes, this should be doable.

not for openwrt.

1 Like


Thanks for the prompt reply.
Right, worked as I intended.
Just expanded rootfs to ~2X original size at the expense of the unallocated 1.40GiB.
Should be more than enough.

~$ df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root               200.7M    100.3M     96.3M  51% /
tmpfs                   123.0M    888.0K    122.1M   1% /tmp
/dev/sda1                 8.0M      4.0M      3.6M  53% /boot
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/sda3               914.4G    524.4G    343.5G  60% /mnt/sda3

Thanks for your input.


I know this comment is beyond the scope of your question and is also for others reading this thread.

Don't assume that the change to the partition size and filesystem size will survive a system upgrade as may be expected in other linux distros. There are many posts about lost files due to initialization of the partitions and filesystems during upgrades. There may be some devices/platforms that are ok but many are definitely not.

Be sure to have a good backup of your system and an up to date list of installed packages and all related configs for any state you want to restore to.