I have met the space limitations of my router, so I thought I should extend it.
I have bought an usb pendrive, and I did a little research. Luckily OpenWrt supports space extension of the router. There are many ways of doing that. There is an overlay directory on the router, which can be used for extending the filesystem.
After all, I chose my own way and mounted manually to overlay. I think it is a better way because you can’t brick the router in this way even tough there is an automatic way for that, but my problem was, first this way didn’t work (maybe I misunderstood something), it seemed you can easily brick your router this way (it is only my opinion, I was lazy to do further research).
Here are the steps what I did:
1. I had a 8GB pendrive, so I formatted it to 6 GB with ext2, and the rest with swap.
2. I installed the following packages:
Depending on your medium (USB-Device, IDE-Device, SATA-Device or SD/MMC device) you need:
kmod-usb-core Kernel support for USB
kmod-usb2 Kernel support for USB2 (EHCI) controllers
kmod-usb-ohci Kernel support for USB OHCI controllers
kmod-usb-storage Kernel support for USB Mass Storage devices
For more info.
3. I copied the overlay directory to the pendrive.
mount /dev/sda1 /mnt/pend1 #my pendrive is sda1, it can be different in your system.
df -h # only for testing the mounting is worked
cd /mnt/pend1 # another way
The instructions of copying:
tar -C /overlay -cvf - . | tar -C /mnt/pend1 -xf -
#Also, you can create your on file on the pendrive, for the testing, but there is an other way, that will be mentioned later.
I didn’t need all the packages, because the busybox already provided on of the necessary things(swap-utils). I already formatted the FS for the swap as it mentioned above. The only thing is left to do this:
You can check it by the command:
For more information: link.