What's new

Entware Usb storage for asusmirlin ?

  • 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!

Shams7861

New Around Here
Hi all,

Quick few questions regarding the external storage requirements when using asusmirlin and it's add-ons.

Setup is 2 xt8s running in aimesh mode.

1. Do I need usb flash drive for each node? Or just in the primary router?
2. What is the recommended GB size to buy and any recommendation on brands?
3. Optimal swap space to allocate or is swap per add-on.
4. Best backup method

Many thanks for your help
 
Hi all,

Quick few questions regarding the external storage requirements when using asusmirlin and it's add-ons.

Setup is 2 xt8s running in aimesh mode.

1. Do I need usb flash drive for each node? Or just in the primary router?
2. What is the recommended GB size to buy and any recommendation on brands?
3. Optimal swap space to allocate or is swap per add-on.
4. Best backup method

Many thanks for your help

Since a lot of the add-ons require at least one Entware package, you will need a USB key (drive) on each router and node that you plan on running any add-ons. So, for the Router, you will need a USB key for most add-ons. For the nodes, unless you are planning on using the nodes to run extra processes or add-on, then no USB/Entware is required.

For the size and brand. You don't need a pile of space. Even a small 8Gb is likely more than enough. USB keys are cheap, so go for a 32 or 64. For the brand, that is hit and miss in my opinion. Use a decent, reliable brand. Then again, I am using a 64Gb no-name key that I got from Amazon four years ago (I think it was a package of 5 for 20 bucks). I have three of those keys in service now and have not had a single glitch. You can always go with a SSD drive, but for just simple Entware packages, I think it is overkill.

For the swap space, just use the standard 2GB size. I think Diversion is the only script that insists on a swap space. I have a 2G swap set up and use Diversion and have never yet seen the space used (mind you, I do not watch my router 24/7).

Best backup method. Well, that is subjective. I personally mount a remote Samba NAS folder and use rsync to run a nightly backup using a 31 day rolling backup. I build a nightly tar of both my USB key and the JFFS space. I also backup a few key stat files 5 times a day that are stored in jffs partition to the USB key.

Hope that helps
 
I personally mount a remote Samba NAS folder and use rsync to run a nightly backup using a 31 day rolling backup. I build a nightly tar of both my USB key and the JFFS space. I also backup a few key stat files 5 times a day that are stored in jffs partition to the USB key.

@Jeffrey Young, I (and I’m guessing many others) would be most appreciative if you explained your method and shared your scripts. Whilst I probably don’t need nightlys and 31 days of rolling backups, if it was easy to setup, why not I guess? :)

And then do you have a corresponding “restore” script on the router or do you do that to a backup stick on another device in case of “disaster”

By chance I’ve been pondering this very topic and started a thread at:-

AMTM / Entware USB Backup?

Don’t know if you wanted to chime in there?
 
I'm trying one of these, uses MLC memory so hopefully will be pretty reliable.
sandisk industrial.jpg
 
Not sure where the Sandisk Industrial variant falls on the reliability/cost hierarchy but I’ve been using a rotating pair of Sandisk 64GB “Max Endurance” versions in Sandisk ‘s own-branded uSD-to-USB 3.0 “reader” dongle for about 12 months with so far (touch wood) good results … not sure what kind of NAND they use compared to yours?

Edit:- Not sure where I’d track down the Industrial grade in Australia even if I wanted to try them, seem to be a specialist business product here maybe from a quick Google?
 
Last edited:
@Jeffrey Young, I (and I’m guessing many others) would be most appreciative if you explained your method and shared your scripts. Whilst I probably don’t need nightlys and 31 days of rolling backups, if it was easy to setup, why not I guess? :)

And then do you have a corresponding “restore” script on the router or do you do that to a backup stick on another device in case of “disaster”

By chance I’ve been pondering this very topic and started a thread at:-

AMTM / Entware USB Backup?

Don’t know if you wanted to chime in there?

Yeah, the 31 day rolling backup was just laziness on my side. It was just easy to make a directory name according to the day of month :) I suppose I could just delete everything in the backup directory that is older than 10 days.

Here is my script. I don't have a restore script. My backups are just tar balls, so if I need to restore anything, I just use 7Zip to get the files I need.

Code:
#!/bin/sh

USERNAME=**************
PASSWORD=**************
UNC="\\\\192.168.189.5\\users"
EXTDRIVE="/tmp/mnt/WDCloud"
BKDIR="/router/86UBackup"
DAY="$(date +%d)"
USBDRIVE="/tmp/mnt/$(nvram get usb_path_sda1_label)"

if ! [ -d $EXTDRIVE ]; then
    mkdir -p $EXTDRIVE
    chmod 777 $EXTDRIVE
fi

if ! mount | grep $EXTDRIVE > /dev/null 2>&1; then
    mount -t cifs $UNC $EXTDRIVE -o "vers=2.1,username=${USERNAME},password=${PASSWORD}"
    sleep 5
fi

if [ -n "`mount | grep $EXTDRIVE`" ]; then
    
    if ! [ -d "${EXTDRIVE}${BKDIR}" ]; then mkdir -p "${EXTDRIVE}${BKDIR}"; fi
    if ! [ -d "${EXTDRIVE}${BKDIR}/${DAY}" ]; then mkdir -p "${EXTDRIVE}${BKDIR}/${DAY}"; fi

    [ -f ${EXTDRIVE}${BKDIR}/${DAY}/jffs.tar ] && rm ${EXTDRIVE}${BKDIR}/${DAY}/jffs.tar
    [ -f ${EXTDRIVE}${BKDIR}/${DAY}/USBDrive.tar ] && rm ${EXTDRIVE}${BKDIR}/${DAY}/USBDrive.tar
    
    tar -cf ${EXTDRIVE}${BKDIR}/${DAY}/jffs.tar -C /jffs . >/dev/null 2>&1
    logger "Script ImageUSB: Finished backing up jffs to ${EXTDRIVE}${BKDIR}/${DAY}/jffs.tar"
    
    tar -zcf ${EXTDRIVE}${BKDIR}/${DAY}/USBDrive.tar -C $USBDRIVE . >/dev/null 2>&1
    logger "Script ImageUSB: Finished backing up USB Key to ${EXTDRIVE}${BKDIR}/${DAY}/USBDrive.tar"
    
    umount $EXTDRIVE
else
    echo "Failed to run ImageUSB script as mount failed"
fi
 
For the swap space, just use the standard 2GB size.

By the way, I am just installing a new usb flash drive for my Entware because my old flash drive died.

Anyway, with a 64 GB usb stick of mine I have plenty of "extra" gigabytes for my purposes and I decided to choose option 6. (10 GB) for the swap.

Code:
Select a Swap file size

 1. 250 MB
 2. 500 MB
 3.   1 GB
 4.   2 GB (recommended, required for Skynet)
 5.   5 GB
 6.  10 GB


Creating the Swap file,
this will take some time...

Seems that it really takes some time. I have been creating the 10 GB swap file for two (2) hours now and the process has not finished yet.

I wonder how long this will take...

Or is the process hanging and I should terminate it?
 
Be patient. Wait.
 
Be patient. Wait.

Must be a REALLY slow stick if it’s taking more than 2 hours …
Would you want to use it anyway if it’s taking that long?
Just curious … my 2GB swap files only took less than 30 secs to create from memory, but it has been a while …
 
Yes, some sticks are that slow, really. :)
 
Yes, some sticks are that slow, really. :)
I think that would be all the warning I’d need to “bin it” and go find something better … but each to his own I guess?

:p
 
Be patient. Wait.

Three (3) hours and counting...

It is 64 GB SandDisk UltraFit. When it comes to write/read speeds, not great not terrible. And it is connected to usb 2.0 hub (which is connected to usb 3.0 connector of the router).
 
Just curious … my 2GB swap files only took less than 30 secs to create from memory, but it has been a while …

Normally with sticks of size 8 GB or 16 GB I have used 2 GB swap file. And creating the swap has taken a couple of minutes max. I think. But not HOURS.

Maybe the processa has crashed? CPU Core 1 and Core 2 of the router are pretty much 100 % most of the time. Something is definitely going on. Is it a hanging swap file creation process?
 
And creating the swap has taken a couple of minutes max. I think. But not HOURS.
Well something ain’t right. And even if it DOES complete, would you want your swap file and Entware and databases on something that slow anyway?
Might a cheap USB 3.0 hub help things along a bit?
 
I terminated the process, rebooted the router and successfully created the normal 2 GB Swap file.

Because of some other projects I was not able to monitor how many minutes exactly it took, but at least Swap file was created and activated.
 
at least Swap file was created and activated.

No it was not. Just noticed that the stick is "read-only". Cannot install anything even though amtm said the Swap file was created and activated. But Merlin GUI did not see any Swap File. And when I tried to format it with Windows it is impossible because it is "write-protected".

Did the terminated swap file creation destroy the stick? :mad:

Is there anything I can do?
 
Is there anything I can do?

Seems that the stick is dead now.

Diskpart cannot fix it.

Code:
DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          238 GB      0 B        *
  Disk 1    Online           57 GB      0 B

DISKPART> sel disk 1

Disk 1 is now the selected disk.

DISKPART> attributes disk clear readonly

Disk attributes cleared successfully.

DISKPART> clean

DiskPart has encountered an error: The request could not be performed because of an I/O device error.
See the System Event Log for more information.

DISKPART>

Tested the format disk of amtm, format of Merlin GUI, Ubuntu, Windows 10. Stick is read-only/write-protected. Nothing I can do.
 

Latest threads

Sign Up For SNBForums Daily Digest

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