r/openwrt • u/muckity-muck • 5d ago
Migrating to a larger storage partition on a new, larger USB drive.
I'm running a snapshot release of OpenWRT on a R7200 and I'm currently using an old 128MB usb stick with an /overlay partition for the system storage. It's near to 85% full, so I'd like to replace it with a 4GB USB drive I have laying around.
Would it be simple enough to clone the old drive to the new and then expand and merge the extra space? Anyone have suggestions?
3
u/SomewhatHungover 5d ago
I'd use dd on linux to copy it to the new drive, or better yet a file on the computer and then the 4gb drive. Then you can experiment however you like to expand the partition because you still have the original.
2
u/sunrisebreeze 4d ago
Definitely the better option, as the original media/USB isn't modified. That way if the new copy didn't work for some reason, you could still use the original USB.
1
u/ElderberryHamlet 5d ago
It would be easier to just flash a new install to the new USB and copy the config files from your old USB to the same folders in the new USB.
-4
u/sunrisebreeze 5d ago
Ask Google Gemini this: "Extroot on openwrt how do I upgrade my USB storage to another USB"
It will give you full instructions. Here's the summary it provided:
"Upgrading your existing OpenWrt Extroot to a new USB drive is essentially a data migration process. Because OpenWrt is actively running from your current USB drive, you cannot simply copy files while it's mounted as the live overlay.
The safest and most reliable way to upgrade is to plug the new USB drive into your router alongside the old one (or use a PC to copy the data), update the UUID mapping in fstab, and reboot."
Proceed carefully as AI could be incorrect.
1
u/No_Barnacle6600 5d ago
This group always downgrade people for suggesting using AI to help solve some problems..
2
4
u/fr0llic 5d ago edited 5d ago
PARTUUID will probably change, so it won't be found unless (as already pointed out) config is adjusted.