What's new
  • 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!

AX86U Pro as NAS

ApexRon

Very Senior Member
Background:
I had two drives attached to a Raspberry Pi that I used as a NAS. NAS usage is low as it is for archives. The first drive was the active archive and the second as backup to the first. At oh dark thirty every night an automated script would perform the backup. It worked. Alas, the Raspberry Pi died. RiP

Project:
I have relocated drives to AX86U Pro and turned on SMB. Work great. Now I seek your direction for the following:
1. Where can I find a list of commands for the OS?
2. Where can I find information on scripting?
3. Where can I find information for a cron job?
4. I only want one drive visible to a user (admin to see both). How?

Thank you
 
1. There are hundreds. You really need to be more specific. SSH into the router and press TAB twice.
2. Any online shell scripting guide as well as the Merlin wiki. https://github.com/RMerl/asuswrt-merlin.ng/wiki
3. See the cru command. https://github.com/RMerl/asuswrt-merlin.ng/wiki/Scheduled-tasks-(cron-jobs)
4. The simplest approach would be to use the provided webUI controls to give "No" rights to the specified user. It won't actually hide the top level directory but it will make it inaccessible.

If you're just trying to migrate your backup script it might be quicker if you just post it here for us to look at. I suspect all you need to do is run a cp -a source destination command.
 
Last edited:
1. There are hundreds. You really need to be more specific. SSH into the router and press TAB twice.
2. Any online shell scripting guide as well as the Merlin wiki. https://github.com/RMerl/asuswrt-merlin.ng/wiki
3. See the cru command. https://github.com/RMerl/asuswrt-merlin.ng/wiki/Scheduled-tasks-(cron-jobs)
4. The simplest approach would be to use the provided webUI controls to give "No" rights to the specified user. It won't actually hide the top level directory but it will make it inaccessible.

If you're just trying to migrate your backup script it might be quicker if you just post it here for us to look at. I suspect all you need to do is run a cp -a source destination command.
Just what I wanted. Thank you so much.
 
I have relocated drives to AX86U Pro and turned on SMB.
Standard warning. The router is not an NAS. A router, with its low end processor and limited RAM, is not designed to be an NAS. The USB port and SMB function are addon features mainly to sell routers. I would strongly suggest, if you haven't done so already, to search the subforums to see what issues you potentially may run into if you use the external USB drives for heavy SMB read/write. At the very least you will likely see the RAM spike to 95% to 97% and stay there due to SMB read/write. There are several past thread discussions on high RAM usage with SMB. That excessive RAM usage with SMB is a very common issue with Asus routers and it may cause problems with other services on the router. It may even eventually cause the router to lockup requiring a reboot.

While one can attempt to deal with the SMB high RAM usage by clearing the router's cache, one will find the RAM jumps right back up after a short period of SMB read/write usage. Some have even gone so far as to create a CRON job to clear the cache at scheduled times.
 
I can't speak to the experiences of others, but I've been using both the Samba and media server functionality for years without issue. I've never seen a RAM spike or high CPU usage. RAM usage is about 40% and stable. CPU usage only runs high when the media server is indexing after a reboot. My RT-AX86U has never utilized the attached swap file. I've never had to manually manage the cache. I have 0.5TB attached storage for archiving/file sharing across PCs and a couple of TB media spread across 3 storage devices (all SSD). I have a number of scripts and 15 CRON jobs that run at various frequencies to manage it (mostly related to system backups and media management) and all of those run with no issues.

As to a couple of OP's questions:
#3, google "Bash Script" for scripting guidance. The full set of commands is not available, but many are. Trial and error.
#4, Samba allows multiple user accounts. Each account can be configured to allow access (R or RW) to only the specified high level directories.
 
Last edited:
RAM usage is about 40% and stable.

Good for you. Most users end up with 97% RAM used and issues. Underpowered hardware for this purpose with check box USB share feature used for marketing. Not recommended for network storage unless the user doesn't care about the data.
 
Some past issues some have had with USB and RAM (there are only a few of the past discussions on the issue)...
PS: Here is a link to my post (with screenshots) of an example showing high RAM usage on a RT-AX86U Pro from a few years so when using a USB drive.
 
To summarise the posts linked to above, seeing the RAM usage at ~95% is not a problem in itself. It is also not caused by Samba per se, but is the normal operation of the Linux memory management system. There is no particular reason to assume what the OP wants to do will be a problem, but as always YMMV.
 

Similar 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!
Back
Top