NanoPi R4S-RK3399 is a great new OpenWrt device

You can easily resize your root partition, use resize2fs and tune2fs on OpenWrt itself.

  1. Install the required tools
opkg update
opkg install parted tune2fs resize2fs
  1. Start the parted utility
# parted
(parted) print                        //note the root parition number
(parted) resizepart 2 11000           //this will set the 2nd partition(root) end to 11GB
(parted) print                        //verify new partition end and size
(parted) q                            //exit parted
  1. remount root as RO (if fails, reboot and remount as ro)
mount -o remount,ro /
  1. Remove reserved GDT blocks (workaround as online resizing of root partition fails)
tune2fs -O^resize_inode /dev/mmcblk0p2        #verify your root parition
fsck.ext4 /dev/mmcblk0p2                      #answer y to all
  1. Reboot and
resize2fs /dev/mmcblk0p2
  1. Check new root partition size with:
df -h