What's new

Is using a USB stick a bad idea?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

My intention is not to hijack the thread, but to continue an interesting discussion.

Can someone suggest a partition scheme in percentage and a suitable filesystem for said usb drive? And if/how journaling and swap impacts longevity and to what extent? Or does the benefit of those two features outweigh a reduced longevity?

How about an mSATA SSD drive in a USB enclosure?
https://www.amazon.com/s?k=msata+ssd+drive&crid=2VDCAEUU19HCG&sprefix=mSATA+ssd+Drive,aps,254&ref=nb_sb_ss_i_1_15
https://www.amazon.com/s?k=mSATA+USB+Drive+Enclosure&ref=nb_sb_noss

In that case, maybe an all metal enclosure is preferred based on Grisus observation regarding 2.4 GHz interference in USB 3.0 mode?

How about trim?
A few of us use the UGREEN enclosure (https://www.amazon.com/gp/product/B06XWRRMYX/?tag=snbforums-20) and an SSD. Plastic, sits right behind my AC86U, and no interference. I think the interference is caused with (cheap) USB sticks because the electronics are right next to the connector ... anything that gets the electronics away from the router probably eliminates the problem.

Partitioning depends on what you want to use it for. I made my whole 120 Gb SSD one partition, but if your intent is to also use it as a file server, it's probably useful to make 2, one for Entware and one for files to serve. I have a 512 Mb swap file, I run a lot of scripts, I have installed a fair amount of Entware tools, and I back up my /jffs to the SSD nightly with a cron script, and I'm using just under a gig. So 4 Gb ought to be plenty. I only used the 120 because I took it out of a dying laptop. I share the entire thing to my network and use rsnapshot on my (FreeBSD) fileserver to back up the SSD.

My SSD is formatted Ext4 (with journaling). I never gave trim a thought, so I haven't tried it. Pretty sure all SSDs incorporate wear leveling so nothing is going to be banging on "one spot", and SSDs have firmware to spot bad spots and mark them unusable. I suppose I should look into trim ...
 
So you don't see an advantage/disadvantage, technical or otherwise, to partiton a device in like; "files/tools/jjfs/swap" for instance?
 
So you don't see an advantage/disadvantage, technical or otherwise, to partition a device in like; "files/tools/jjfs/swap" for instance?
/jffs is the nand inside the router, so unless you're meaning a partition for jffs backup, you don't need the jffs partition. The /jffs directory has to be in the router because the scripts that mount the external USB live there. :)

As far as I've been able to figure out from people smarter than me, there is no advantage (and there may be a disadvantage but I can't remember) to having a dedicated swap partition anymore - just use a swap file. There may be other practical limits on having many partitions, keep in mind the router's kernel is not a full-fledged linux kernel, it is stripped down to reduce the firmware size. Also I think amtm does not support creating a swap partition (but will acknowledge one if it's there), so for ease of use, it's easier just to let amtm create a swap file.

To each his own, but I struggle to see an advantage to doing more than just having tools (including Entware and your swap file) and files (which would include a jffs backup so that you could back that up elsewhere on your network) partitions.
 
Yep, share the USB-drive with Samba in your network and copy/paste the content (scripts are small) to a Windows PC (regulatory with keeping a history).
I have tried this earlier. No success. That's why I asked originally.

If I try to copy for example just the (contents of) Entware directory to my computer, I keep getting endless amounts of "File Access Denied" etc. nags with several files even if my Windows 10 user has R/W permits granted (Samba Share) to Entware directory and I can go and view the contents of the directories...

Maybe I cannot access some files because they are currently in use and active?
 
Maybe I cannot access some files because they are currently in use and active?
The Linux command 'chmod -R +x *' is your friend - Samba needs exection right to access the directoies and files... :cool:
 
What happens when a USB stick dies? Does the router crash? Shutdown?

I've got a USB stick in my AC86U and installed Entware, YazFi, made a swap file, and I plan to install Skynet in the future.

But I'm afraid the USB stick will die soon (it's not a brand new one), and I was wondering if I'd notice it when the USB dies without logging in to the router.

Are there any methods to get a notification as soon as the USB stick dies? Maybe a script that runs every hour, reading a file known to be on the USB stick and sends an email warning when the file can't be read?

It would not be so great if the USB stick dies and next reboot Skynet won't load...
 
What happens when a USB stick dies? Does the router crash? Shutdown?

I've got a USB stick in my AC86U and installed Entware, YazFi, made a swap file, and I plan to install Skynet in the future.

But I'm afraid the USB stick will die soon (it's not a brand new one), and I was wondering if I'd notice it when the USB dies without logging in to the router.

Are there any methods to get a notification as soon as the USB stick dies? Maybe a script that runs every hour, reading a file known to be on the USB stick and sends an email warning when the file can't be read?

It would not be so great if the USB stick dies and next reboot Skynet won't load...

I had my first stick die a couple months ago, the Router doesn't crash and continued to operate like normal. Only noticed when some sites I visit on a regular had slight delays while opening. Which told me I should double check Diversion and pixelserv to make sure everything was ok. I couldn't get the pixel serv stats to show and amtm wouldn't open and that is when I knew something was up with drive.

I have since moved away from using thumb drives and now have my scripts on an a SSD attached to the router should last much much longer.
 
Last edited:
I have since moved away from using thumb drives and now have my scripts on an a SSD attached to the router should last much much longer.

And you have more real and usable swap file, not just available and barely usable one as with USB sticks.
 
My $0.02 on the various replies and the OP......

USB sticks don't really "wear out", but they are definitely more susceptible to corruption which may or may not render them unusable.

From personal experience, I found running them on my router resulted in them getting quite warm. Not saying this is bad, or that the use of the stick itself was the cause vs it acting like a heatsink, so it could actually be a good thing.

On the positive side, USB sticks (thumb drives or whatever the phrase of the month is) are pretty cheap these days. I bought a box of 64GB sticks for under $10 each to basically have as giveaway media to transfer stuff to friends. This makes it easy to have spares and "clones" ready to swap in if there is a failure.

On the negative side, performance is often not great. Particularly if you have many files or lots of small files. It really depends on what you are running and using it for. There are a number of posts about router CPU pegging at a high rate, that was attributed to the USB usage, indexing, error recovery, slow speed etc.

There are MANY free utilities to read and write USB sticks to / from image files so it is easy to create backups, although as mentioned already, it is usually just as easy to copy the files to another location, preferably using rsync (or similar) or as a cron task, etc

There are many people running heavy duty functions all day every day and never see issues.

Personally, I wouldn't run anything beyond some simple scripting from a stick. Although at first I thought it was amazing to be able to run all this "stuff" off my router was great (diversion, samba, and many others) I found I was loading the router, the key single point of connectivity (and potential failure) with things that really had no need to run on the router.

My AX88U runs typically with less than 10% utilization on a single core and that's the way I want it to stay. For me it made sense to put the VPN services on there, but nothing else. Raspberry Pis (or similar super cheap devices) make great DNS servers, Pi-Hole servers, web servers, etc. I like them in particular as I can run them multi-homed, with multiple network interfaces, each on a different network. If you want NAS functionality, get (or build) a "real" NAS, unless your requirements are minimal.

Ultimately, the choice is yours, and it really is a choice. There are risks and rewards to the various hardware options and it pays to be flexible in what services run on which devices, and their placement in a network infrastructure.

Having single purpose (or at least limited purpose) devices also can mitigate issues with updates, compatibility, performance, reliability, etc. I have a 15 year old NAS that performs just as well today as it did when I bought it. This type of setup also can introduce more headaches, power requirements, physical space, wiring, etc.
 
I found I was loading the router, the key single point of connectivity (and potential failure) with things that really had no need to run on the router.

Exactly. Let the router do the routing, this is what it was designed to do best.
 
I had my first stick die a couple months ago, the Router doesn't crash and continued to operate like normal. Only noticed when some sites I visit on a regular had slight delays while opening. Which told me I should double check Diversion and pixelserv to make sure everything was ok. I couldn't get the pixel serv stats to show and amtm wouldn't open and that is when I knew something was up with drive.

I have since moved away from using thumb drives and now have my scripts on an a SSD attached to the router should last much much longer.

Interesting. Were you using a swap file when the usb stick died? I think I'd crash if I were a router and suddenly part of my ram was lost XD

If it crashes then it would be hard to send a notification that the usb died, I suppose. Then I'd have to look for an external monitoring solution...

SSD's can die too, so it doesn't address my concern that the router may continue to operate in a half broken state. I wouldn't want Skynet to stop working and only find out a month later.

How to tackle this scenario in a neat way?
 
Interesting. Were you using a swap file when the usb stick died? I think I'd crash if I were a router and suddenly part of my ram was lost XD

If it crashes then it would be hard to send a notification that the usb died, I suppose. Then I'd have to look for an external monitoring solution...

SSD's can die too, so it doesn't address my concern that the router may continue to operate in a half broken state. I wouldn't want Skynet to stop working and only find out a month later.

How to tackle this scenario in a neat way?

Yes there was swap file.

What you think and what actually happened are two different things, don't make assumptions :)

Everything script related was down it however didn't take the router down it continued to operate.

And yes an SSD can die but it uses much higher quality memory than flash drives.

I still have two Intel 160GB G2 drives in Raid 0 in my current desktop that has been running for about 7 years now. I'm not worried about the SSD dying, granted those are MLC drives I still don't see an issue if you use TLC SSD. I may be alittle more concerned with the QLC stuff but it should still destroy a flash drive for longevity.

And even if skynet goes down the router goes back to its default firewall state. You grab another drive and set it backup and you are up and running in 10 mins. I think you are making a bigger deal than necessary here.
 
Last edited:
Yes there was swap file.

What you think and what actually happened are two different things, don't make assumptions :)

Everything script related was down it however didn't take the router down it continued to operate.

And yes an SSD can die but it uses much higher quality memory than flash drives.

I still have two Intel 160GB G2 drives in Raid 0 in my current desktop that has been running for about 7 years now. I'm not worried about the SSD dying, granted those are MLC drives I still don't see an issue if you use TLC SSD. I may be alittle more concerned with the QLC stuff but it should still destroy a flash drive for longevity.

And even if skynet goes down the router goes back to its default firewall state. You grab another drive and set it backup and you are up and running in 10 mins. I think you are making a bigger deal than necessary here.

Thanks for replying! Good to know router continued to operate. Yeah maybe I'm making it into a big deal :p but I'd prefer not to buy SSD drives for this purpose at the moment, more bulky and expensive then the cheap usb drive I use now. I can make a backup and replace the usb drive in 10 minutes and be up and running again. But then I'd have to know when the stick died :p If my internet connection doesn't go down, then I might find out months later the drive died and Skynet hasn't been blocking the countries I chose etc. I'd like to fix this somehow :p
 
Easy fix: put a reminder on your phone or another device to check the health of the router more often than every few months. :)

Thanks for replying! Good to know router continued to operate. Yeah maybe I'm making it into a big deal :p but I'd prefer not to buy SSD drives for this purpose at the moment, more bulky and expensive then the cheap usb drive I use now. I can make a backup and replace the usb drive in 10 minutes and be up and running again. But then I'd have to know when the stick died :p If my internet connection doesn't go down, then I might find out months later the drive died and Skynet hasn't been blocking the countries I chose etc. I'd like to fix this somehow :p
 
From personal experience, I found running them on my router resulted in them getting quite warm.

I found that attaching the USB stick to the router with a 15cm (6 inch) USB extension cable resulted in the stick running a lot cooler - more so than I expected.

Most of the heat seemed to come from the router itself (RT-AC66U at that time) rather than bering generated in the stick itself.
 
put a reminder on your phone or another device to check the health of the router more often than every few months. :)

If the router is an early RT-AC86U, or there is a new ASUS firmware update, then you'll have to do this quite often anyway. :D
 
Sorry to barge in, but my question is:
"Is using a USB stick and a 2TB HDD at the same time a bad idea?"
Entware, Diversion, pixelserv, swap file on the USB stick and lots of media files on the HDD.
When I try to boot the router with both attached (Merlin 384.13) I can not connect to the network or internet.
When I try to connect either after one of them are already connected whilst the router is booted up, it will crash.
The RT-AC86U is set up as a media server with Samba and NFS shares selected.
NOOB here, any ideas appreciated.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top