Replacing external Hard disk

Hi Everyone, I am pretty new to OpenWRT please forgive my ignorance.

I have an old external physical hard disk attached to my router, and I have followed this guide to allow the router to use the disk as part of the root file system.

I also have NFS and TFTP set up, and used the space to install large packages such as go-lang.

I would now like to replace the hard disk with an SSD and I am wondering what the procedure should be. Would it be enough to simply plug the new SSD into another machine and rsync the files across so the directory structure looks the same, then swap the disks over and update the UUID in fstab? Or will there be more to it than that, and if so what?

Thank you for your guidance.

Yep, that should work in general.
Make sure to update fstab on rootfs_data and remove .extroot-uuid.
Also preserve ownership/permissions/etc. when transferring the data.
If you have problems, follow the troubleshooting section.


Using external HDDs as extroot is not necessarily a good idea. Many USB2SATA bridges employ rather aggressive powersaving, spinning down the integrated HDD very quickly - which is not exactly great for a rootfs overlay.

Thanks slh,

My router supports USB3, and as I stated in my original post I am swapping to an SSD, which doesn't spin at all. And to be fair, the HDD was fine until I tried to boot 5 other machines from it!

Thank you vgaetera,

You were spot on. I have just done the operation and it worked first time. For anyone who finds this in a search:

connect the new SSD to your PC and rsync the data over

sudo rsync -xahzz --info=progress2 --no-i-r /mnt/new-vol/

Then on the new disk whilst still attached to your PC, update the fstab file in /mnt/new-vol/upper/etc/config/fstab and replace the UUID for the overlay mount.

config mount 'overlay'
        option uuid '26d42ceb-d5d0-48bf-aed0-666bc86a0d01'  <<<---Here
        option target '/overlay'

You can get the new UUID for your disk with

sudo blkid

then remove the file /mnt/new-vol/etc/.extroot-uuid

rm -f /mnt/new-vol/etc/.extroot-uuid

Next log into the router and make the same fstab update as above in /rwm/upper/etc/config/fstab
Then turn off the router, swap the disks over, turn router back on, and you are done.


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.