Posted: Thu Dec 30, 2021 3:21 Post subject: Can a usb drive with data be safely transferred
If replacing a primary router on latest firmware that has smb enabled on a usb hard disk with data, can that drive be safely transferred without data loss. destination would be a new router running a similar or later version of dd-wrt.
if there is a specific procedure, what should that be.
I've done it twice. So surprised it works. Saves a lot of work. Keep in mind, USB devices don't get unmounted with a power cycle. Had problems with e2fsck on ddwrt. Linux works great. I now manually [u]mount (using LABELS) in order to check the filesystems at boot. If problems arise, I know what works best.
Depending on the router it may have a button to unmount the USB drive.
On the R7000 I recently discovered pressing and holding the WPS/SES button for a few seconds will turn the power light orange and a few moments later the webui shows the drive is unmounted.
Enable "Use SES Button to remove drives" under Services -> USB.
Really neat!
Unfortunately SES isn't available without automount. The random drive sda/sdb discovery messes with samba shares. Was fine with only two. My P9000 with internal jffs (now 3 partitions) forced a new plan.
Although I might rethink my current approach.
Update: Setting usb_ses_umount=1 restores functionally however it needs to be pressed twice (once for each device).
Last edited by MesMurized on Sun Jan 09, 2022 17:57; edited 2 times in total
Joined: 26 Mar 2013 Posts: 1858 Location: Hung Hom, Hong Kong
Posted: Sat Jan 08, 2022 11:25 Post subject: Re: Can a usb drive with data be safely transferred
nyddwrtuser330 wrote:
If replacing a primary router on latest firmware that has smb enabled on a usb hard disk with data, can that drive be safely transferred without data loss. destination would be a new router running a similar or later version of dd-wrt.
if there is a specific procedure, what should that be.
In the old Linux days, there is the "sync" command, and DD-WRT had it (/usr/sync)! Run it at least 3 times times before un-mounting the drive using /bin/umount.
That's why I hate USB drives without activity LEDs. Unfortunately, it's a trend now, to cut costs I guess.
Looking to do the same thing, but wanting to test things before.
Is there a command to image the usb drive that is current plugged in? I was going to just copy files over ftp or ssh, but with thousands of small files it was going to take forever.
I use tar, ie: ' tar -cvf tarfile /jffs ' is fast and preserves all attributes.
The tarfile it can be saved anywhere even piped to remote storage _________________ Current: Netgear R9000 DD-WRT v3.0-r55460 std (03/25/24)
Retired: Linksys WRT32X r39296, TP-Link Archer C7 v2, LinkSys WRT54G v5
Last edited by MesMurized on Mon Jan 17, 2022 22:17; edited 1 time in total