Hi!
I am looking for new ieas on this problem, thanks in advance for feedbacks! In a process to consolidate all my home lan services (samba + ovpn) into a single openwrt sub-router (behind my ISP router) I installed ntfs-3g & samba 4 on my gl.inet-ar750s and successfully shared a portable Toshiba 4TB HD.... but not for long!
First, the initial server discovery from a windoze computer stalls for a good 20 secs but then the list goes fast. Doing random reads on about 5-6 video files goes very well but then performance decreases dramatically for each addtional file up to the point where it stops working completely. The drive either shuts down or goes into "error flashing mode". I said to myself: it must be the power supply so I went in my spare parts collection and found a good replacement. But things barely changed!
Was it the drive itself? I connected it to my computer: no problem at all. So I tried again in my old ASUS rt-n66u (running Merlin) that I currently use for Samba sharing: no problem at all there and performance is A1 like it has been for the last 2 years. I said to myself: why not flash openwrt on the asus router? I looked into the docs and saw this warnings: wifi is crippled and only 1/2 of memory. No problem: I use the sub-router only as a server with connections. So I flashed openwrt on asus, installed ntfs-3g and Samba4 and reinstalled the same shared drive as I did on the other router. Guess what: same problems as with the other router but after more time and more files! I did try a few tweaks here and there for Samba/Ntfs-3g but without noticable improvements.
I am wondering why this is happening on two very different routers and especially why the performance/stability is so different on rt-n66u with 2 differents OS?
p.s. the toshiba drive take its power from the USB port itself.
Have you tried a powered USB hub between the ar750s and the drive? I would also suspect a power issue, but it could be that the router's internal power circuitry is not sufficient to provide enough power to the toshiba drive.
I tried that too of course but I couldn't get the hub to be recognized properly by the ar750 and the disk did not register on the logs. That's where I got the idea to flash openwrt on the Asus router where the USB circuitry supported that charge for months. I could then run my VPN server from that router instead but the results were almost the same. Unfortunately, it seems that openwrt doesn't run sufficiently well on this Broadcom chipset to have a stable USB connection contrary to Merlin OS. Are there special USB drivers that I may have missed?
Here are the USB modules installed (ar750s)
Maybe try another powered hub? The key thing is that you want to ensure that the ar750 isn't responsible for powering the Toshiba drive... it should only be making a data connection, and the power for the drive itself should be coming from another source (i.e. another powered usb hub).
Also, this thread may be of interest to you... another GL-inet user who had USB issues with some of his routers but not all. Turned out to be a problem related to manufacturing of the gl-inet devices as well as design limitations with respect to the power that can be delivered via USB.
I dug in my archives and found the previous external drive I used to share on the Asus router: the controller is powered from an external 12v supply not from USB. Once shared on the ar750s, it took about 30 sec to be granted initial access to the drive but after that everything seemed to work well. I tested by fast forwarding through a few video files (about 1gb each) . At the 5th one the video reader stalled for about 1 minute but then the movie started. At the 6th one, I killed the video reader after 5min being stalled.
After that, reading relatively small files like photos seems to work almost normally altough getting directory listings is not as fast as it used to be on this shared drive. It seems to be choking on large files only once this "slow equilibrium 6th file" is reached and stays like that thereafter.
nb: the windows computer I use for access the files is connected through 1gbi ethernet.
To be clear, the AR50S is an okay device, but not particularly speedy when it comes to serving as a NAS. Further, it's using a USB 2.0 port which means that it is going to be bandwidth limited from the start.
If you're setting up a NAS, you should seriously consider a more capable device -- possibly a purpose built NAS instead of an older travel router.
I am pretty sure I could optimize the Samba service. So far USB2.0 has and not issue for home use since the Asus router is also USB2.0 but with much better performance if running on Merlin OS. When I tried Openwrt on asus, I had a very similar behavior to this last test with a self-powered drive on the ar-750s. I am wondering what is the source of the degrading performance on both routers running openwrt.
Well, samba4 is really big and not considered to be efficient.
You could try ksmbd instead -- this is another samba package that has a much smaller footprint and may work better.
oh! intersting to know because Merlin is using Samba 2. That may explain a few of the problems. I'll definitely try ksmd and let you know the results.
UPDATE: I installed luci-app-ksmbd. Holy cow!!!!!!! MAJOR difference! The performance is now comparable if not better to what I am used to with the rt-n66u. I just need to make sure the Toshiba drive receives enough juice but that's just a detail. Thanks for the suggestion!
I've used ksmb in the past, the performance is good, but it's lacking some of the features of samba.
Coming to samba 3 after using ksmb for a long time, there was a huge difference. While ksmb is stable at 40-70, samba3 is stable at 100Mb (1043nd v4), possibility maxes out the device potential while keeping stability and lower cpu usage.
(perhaps it's only with my device that ksmb transfers always fluctuates between 40-70Mb and never really stable like samba3)
Samba4 is a little fast, but even if one manages to install it after setting up extroot, it's too huge a burden on device cpu. Your device needs to be powerful enough to handle that.
You may try samba3.6 server, and see if it's any good.
But as the other user said, if NAS is your choice of device usage, then consider investing in some device that offers usb3.0 port.
Thanks for sharing your experience! The target usage for this improvised NAS is light SOHO usage with 2-3 users at most for storing projects to aleviate pure dependency on cloud storage. In that perspective, ksmb, even with its limited features, looks like the right choice altough I might give a try to samba3.6 eventually. Also the current "NAS" router (rt-n66u) is running Samba2 with engouh performance/festures for our needs. Once the transfer is completed, this rt-n66u will be reused as an AP at some other house.
p.s. you mentionned Samba4 after setting up extroot: this is new vocabulary to me, what is it exactly?
Samba4 files are very large when compared to small router storage. So extroot or external root is a method to increase router storage by making USB drive, pen drive , SD card act as internal storage device, this way, space is increased for packages and stuff.
Just for sake of documentation, the gl.inet ar750s does provide enough power for a USB powered HD. The stock power block is supposed to provice 2 amps but I replaced it with one that I know can sustain this charge. As of this writing, the samba server has been running stable for a week with this drive.