What's new

AC66u B1 NTFS problem

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

Asus___User

Occasional Visitor
Hello.

I've read a lot about ntfs vs ext in linux. I have a brand new WD MyPassport Ultra 4TB which is used with Windows PCs and laptops. So ntfs is the only choise. Now I want to use it with my AC66u B1 router (Firmware Version:3.0.0.4.384_20648). When I plug it into USB3 (or USB2) interface kernel generates log with errors:
scsi 1:0:0:0: Direct-Access WD My Passport 25EA 4005 PQ: 0 ANSI: 6
May 11 13:42:43 kernel: sd 1:0:0:0: Attached scsi generic sg0 type 0
May 11 13:42:43 kernel: scsi 1:0:0:1: Enclosure WD SES Device 4005 PQ: 0 ANSI: 6
May 11 13:42:43 kernel: scsi 1:0:0:1: Attached scsi generic sg1 type 13
May 11 13:42:43 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:50 kernel: sd 1:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
May 11 13:42:50 kernel: sd 1:0:0:0: [sda] 7813969920 512-byte logical blocks: (4.00 TB/3.63 TiB)
May 11 13:42:50 kernel: sd 1:0:0:0: [sda] 4096-byte physical blocks
May 11 13:42:50 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:56 kernel: end_request: I/O error, dev sda, sector 34198288
May 11 13:42:56 kernel: end_request: I/O error, dev sda, sector 34198288
May 11 13:42:57 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:57 kernel: end_request: I/O error, dev sda, sector 981760488
May 11 13:42:57 kernel: end_request: I/O error, dev sda, sector 981760488

Every file I have written to external HDD generates errors: kernel: end_request: I/O error, dev sda, sector ...
It seems by default router mounts external hdd with tuxera ntfs driver which is fast but very unstable in my situtation. It is stable with usb3 kingston 32gb flash drive, but with extarnal hdd of such capacity it can even unmount the drive. The performance of writing to external HDD is nearly 40MB/s which is great. However, when I write a lot of small files kernel generates error for each file end_request: I/O error, dev sda, sector ... For some reason external drive can be even unmounted by kernel.

I tried to use HFS+ with tuxera driver. The performance is the same and everything is stable. But this filesystem is not friendly to Windows OS.

When I use ntfs-3g version 2010 (it is included in router's firmware): ntfs-3g /dev/sda2 /tmp/mnt/MyPassport everything seems ok. External HDD can be writable and readable without errors or forced unmounting. However, USB performance downgrades signifficantly (W: 6.5 MB/s, R: 22MB/s). Moreover, if I unplug my external hdd and plug it again it will be mounted with tntfs (which is unstable).

Conclusion: could you please suggest me a firmware version with stable tuxera ntfs for big external hdds or maybe an update of ntfs-3g with greatly improved performance.
Thanks!
 
Considering they are IO error, this means the cause is not the NTFS driver, but the hardware itself - those error are at a lower level.
 
Thank you for your reply.

Let me provide some additional information. HDD's smart is perfect. I've got stable 145 MB/s write speed with Windows (NTFS) connected via USB3. I formated HDD with HFS+ using router's GUI. Everything was stable (without I/O errors) and performance was nearly 40MB/s. ntfs-3g gives me stable 5.5-8.5 MB/s write speed which is decreased over time when copying large file. It is very slow :(

Let me assume the cause is the NTFS driver. I was thinking about using HFS+ and leaving HDD connected with router, but I would like to have a possibility to connect HDD to Windows PC. There is no free and stable tool to mount HFS+ in Windows, so I decided to stay with NTFS. Will the newer version of ntfs-3g increase write speed? is there a possibility to update the tuxera ntfs driver?
 
Let me show you a full relevant log:
kernel: xhci_hcd 0000:00:0c.0: WARN: short transfer on control ep
May 11 13:42:42 kernel: xhci_hcd 0000:00:0c.0: WARN: short transfer on control ep
May 11 13:42:42 kernel: xhci_hcd 0000:00:0c.0: WARN: short transfer on control ep
May 11 13:42:42 kernel: xhci_hcd 0000:00:0c.0: WARN: short transfer on control ep
May 11 13:42:42 kernel: xhci_hcd 0000:00:0c.0: disable burst on ep 2
May 11 13:42:42 kernel: xhci_hcd 0000:00:0c.0: WARN no SS endpoint bMaxBurst
May 11 13:42:43 kernel: scsi 1:0:0:0: Direct-Access WD My Passport 25EA 4005 PQ: 0 ANSI: 6
May 11 13:42:43 kernel: sd 1:0:0:0: Attached scsi generic sg0 type 0
May 11 13:42:43 kernel: scsi 1:0:0:1: Enclosure WD SES Device 4005 PQ: 0 ANSI: 6
May 11 13:42:43 kernel: scsi 1:0:0:1: Attached scsi generic sg1 type 13
May 11 13:42:43 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:43 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:43 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:44 kernel: sd 1:0:0:0: [sda] Spinning up disk....
May 11 13:42:44 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:44 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:44 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:45 kernel: .
May 11 13:42:45 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:45 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:45 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:46 kernel: .
May 11 13:42:46 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:46 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:46 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:47 kernel: .
May 11 13:42:47 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:47 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:47 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:48 kernel: .
May 11 13:42:48 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:48 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:48 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:49 kernel: .
May 11 13:42:49 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:49 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:49 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:50 kernel: .ready
May 11 13:42:50 kernel: sd 1:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
May 11 13:42:50 kernel: sd 1:0:0:0: [sda] 7813969920 512-byte logical blocks: (4.00 TB/3.63 TiB)
May 11 13:42:50 kernel: sd 1:0:0:0: [sda] 4096-byte physical blocks
May 11 13:42:50 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:50 kernel: sd 1:0:0:0: [sda] Write Protect is off
May 11 13:42:50 kernel: sd 1:0:0:0: [sda] Assuming drive cache: write through
May 11 13:42:50 kernel: sd 1:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
May 11 13:42:50 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:50 kernel: sd 1:0:0:0: [sda] Assuming drive cache: write through
May 11 13:42:51 kernel: sd 1:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
May 11 13:42:51 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:51 kernel: sd 1:0:0:0: [sda] Assuming drive cache: write through
May 11 13:42:51 kernel: sd 1:0:0:0: [sda] Attached SCSI disk
May 11 13:42:52 usb: USB /dev/sda1(unknown) failed to mount At the first try!
May 11 13:42:52 usb: USB /dev/sda2(ntfs) failed to mount At the first try!
May 11 13:42:55 usb: USB ntfs fs at /dev/sda2 mounted on /tmp/mnt/MyPassport.
May 11 13:42:56 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:56 kernel: end_request: I/O error, dev sda, sector 34198288
May 11 13:42:56 kernel: end_request: I/O error, dev sda, sector 34198288
May 11 13:42:57 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:42:57 kernel: end_request: I/O error, dev sda, sector 981760488
May 11 13:42:57 kernel: end_request: I/O error, dev sda, sector 981760488
May 11 13:42:57 rc_service: hotplug 10639:notify_rc restart_nasapps
May 11 13:42:57 iTunes: daemon is stoped
May 11 13:42:57 FTP Server: daemon is stoped
May 11 13:42:57 Samba Server: smb daemon is stoped
May 11 13:42:57 kernel: gro disabled
May 11 13:42:58 Timemachine: daemon is stoped
May 11 13:42:58 miniupnpd[1439]: shutting down MiniUPnPd
May 11 13:42:58 kernel: gro enabled with interval 2
May 11 13:42:59 Samba Server: daemon is started
May 11 13:42:59 miniupnpd[10714]: version 1.9 started
May 11 13:42:59 miniupnpd[10714]: HTTP listening on port 44830
May 11 13:42:59 miniupnpd[10714]: Listening for NAT-PMP/PCP traffic on port 5351
May 11 13:43:07 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:43:07 kernel: end_request: I/O error, dev sda, sector 981760768
May 11 13:43:07 kernel: end_request: I/O error, dev sda, sector 981760768

Here I connected via ssh and used ntfs-3g:

May 11 13:43:08 dropbear[10715]: Password auth succeeded for 'admin' from 192.168.1.11:65260
May 11 13:44:35 rc_service: httpd 290:notify_rc restart_media
May 11 13:44:35 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
May 11 13:44:35 kernel: end_request: I/O error, dev sda, sector 981760984
May 11 13:44:35 kernel: end_request: I/O error, dev sda, sector 981760984
May 11 13:44:36 iTunes: daemon is stoped
May 11 13:44:47 rc_service: httpd 290:notify_rc stop_samba
May 11 13:44:47 Samba Server: smb daemon is stoped
May 11 13:44:47 kernel: gro disabled
May 11 13:45:28 ntfs-3g[10863]: Version 2010.10.2 integrated FUSE 27
May 11 13:45:28 ntfs-3g[10863]: Mounted /dev/sda2 (Read-Write, label "MyPassport", NTFS 3.1)
May 11 13:45:28 ntfs-3g[10863]: Cmdline options:
May 11 13:45:28 ntfs-3g[10863]: Mount options: allow_other,nonempty,relatime,fsname=/dev/sda2,blkdev,blksize=4096
May 11 13:45:28 ntfs-3g[10863]: Ownership and permissions disabled, configuration type 1
May 11 13:46:03 rc_service: httpd 290:notify_rc restart_media
May 11 13:46:03 iTunes: daemon is stoped
May 11 13:46:15 rc_service: httpd 290:notify_rc restart_samba
May 11 13:46:16 Samba Server: smb daemon is stoped
May 11 13:46:16 kernel: gro disabled
May 11 13:46:16 dnsmasq[10927]: warning: no upstream servers configured
May 11 13:46:16 kernel: gro enabled with interval 2
May 11 13:46:17 Samba Server: daemon is started


Besides, reading from HDD mounted with tuxera ntfs driver do not generate any errors, but writing - does.
 
May 11 13:42:48 kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint

Definitely has nothing to do with the filesystem used, this is a USB issue. Can be a cable issue, can be the hard disk doesn't get enough power (USB-powered HDD might have problems with a router), or can be a hardware compatibility issue with the Broadcom USB controller on the router.
 
Since it's a MyPassport, ny guess is it doesn't get enough power through the router's USB port.
 
Thank you.
But why does ntfs-3g or HFS+ solve i/o problems? The cable is brand new and provided with the HDD.
 
Last edited:
I enabled USB3 Reducing USB 3.0 interference. Write speed of HDD increased to 28 MB/s. HDD was remounted with tntfs.
I checked the filesystem on hdd via router's web interface. The log is
ntfsck 3014.5.21
Checking NTFS Superblock ...
Device name : /dev/sda2
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 4000616280576 bytes (4000617 MB)
Current device size: 4000616284160 bytes (4000617 MB)
Checking for bad sectors ...
Scanning $MFT ...
Actual VCN (0x0) of index buffer is different from expected VCN (0xb) in inode 0xb75e.
Checking directory structure ...
Corrupt directory found, inode=46942 (0xb75e)
Repairing corrupt directories started.
0.00 percent completed
...
100.00 percent completed
Actual VCN (0x0) of index buffer is different from expected VCN (0xa3) in inode 0xc29c.
Actual VCN (0x0) of index buffer is different from expected VCN (0x9) in inode 0xc711.
Repairing corrupt directories completed.
Corrupt directory found, inode=49820 (0xc29c)
Corrupt directory found, inode=50961 (0xc711)
Repairing corrupt directories started.
0.00 percent completed
...
100.00 percent completed
Repairing corrupt directories completed.
Repairing corrupt directories started.
this seems to be endless.
Repairing corrupt directories completed.
Checking for orphaned files ...
0.00 percent completed
100.00 percent completed
Scanning orphaned files completed.
Checking attributes ...
0.00 percent completed
100.00 percent completed
Failed to calloc 122089120 bytes: Cannot allocate memory
Checking cluster allocation ...
ERROR(12): Failed to setup allocation bitmap: Cannot allocate memory
Syncing device ...

After this HDD pictogram on router's GUI was rounded with red circle. I checked the HDD's filesystem in Windows. chkdsk found no problems. Than I mounted HDD with ntfs-3g and checked it via router's web interface. No problems were found.


Sorry for your time spent for this question. If you don't see the solution maybe you can advice me how to stop samba daemon and miniupnp daemon via ssh without restarting the router?
nvram set enable_samba=0
nvram set dms_enable=0
nvram commit
reboot
This is very slow solution, it reboots the router.
 
Just checked my My Passport 1 TB and it does not have an external power port. Therefore I would never use it on my RT-AC66U_B1. Laptop yes, desktop yes, router no!

Sent from my P01M using Tapatalk
 
MyPassport USB3.0 is backward compatible with USB2.0. I think 500 mA is not a problem for router's USB interface. Additionally, it is a 2.5 inch HDD and does not require external power supply.
 
MyPassport USB3.0 is backward compatible with USB2.0. I think 500 mA is not a problem for router's USB interface. Additionally, it is a 2.5 inch HDD and does not require external power supply.

Not so sure about the 500 mA capability, as we don't have the actual specs sheet for Broadcom's implementation.

I've had plenty of problems with USB-powered HDDs over the years that couldn't get enough power to run stable, sometimes even with PCs (lots of issues with Seagate products specifically there). Plenty of reports over the years of similar issues with routers as well, in many case resolved when the user switched to an external power supply when their enclosure support them.

With such a high capacity (4 TB), this is definitely pushing the power boundaries.
 
Thank you for your answer. Probably ntfs-3g requires less power than tntfs which explains stability with ntfs-3g.
I want to write a script which remounts HDD with ntfs-3g in case of router reboot (without GUI):

stop samba daemon
stop miniupnp daemon
umount /tmp/mnt/MyPassport
ntfs-3g /dev/sda2 /tmp/mnt/MyPassport
start samba daemon
start miniupnp daemon

Could you help me to get correct commands how to stop/start sambad and miniupnpd?
 
Try:
service stop_nasapps
and
service start_nasapps

Remember to wait a suitable amount of time after each command for it to complete in the background.
 
Last edited:
Is there really no way to put the script on autostart? I mean router reboots, executes its routines and then performs my script.
 
Last edited:
Here is something that may work for you.
1. create a file in /jffs called post-mount
2. add this content (based on prior recommendations in this thread)

#!/bin/sh
service stop_nasapps
sleep 5
umount /tmp/mnt/MyPassport
sleep 5
ntfs-3g /dev/sda2 /tmp/mnt/MyPassport
sleep 5
service start_nasapps

3. chmod 755 /jffs/post-mount
4. nvram set script_usbmount="/jffs/post-mount"
5. nvram commit
6. reboot the router

What this will do is run the script when a USB drive is plugged into the router. It will work on stock Asus firmware (I'm starting a swap file on my AC66U_B1). The script will also run when the router is rebooted.
Disclaimer: I have not tried this on my router as I'm pleased with the stock read/write performance of my 1 TB external drive.
I have found that adding a swap file to a thumb drive helps with the read/write of my NTFS formatted USB drive. After several days of monitoring memory usage with Samba reads/writes and the use of Download Master the system is using between 8 to 15 MEG of swap with no apparent errors and no router crashes on firmware 384-21045.
 
Since it's a MyPassport, ny guess is it doesn't get enough power through the router's USB port.

Advice is don't use the router's USB port for Bus Power - better to use an external PSU for any device attached to a router in general. I've seen more than a few Pi's corrupted there...
 
Here is something that may work for you.
1. create a file in /jffs called post-mount
2. add this content (based on prior recommendations in this thread)

#!/bin/sh
service stop_nasapps
sleep 5
umount /tmp/mnt/MyPassport
sleep 5
ntfs-3g /dev/sda2 /tmp/mnt/MyPassport
sleep 5
service start_nasapps

3. chmod 755 /jffs/post-mount
4. nvram set script_usbmount="/jffs/post-mount"
5. nvram commit
6. reboot the router

What this will do is run the script when a USB drive is plugged into the router. It will work on stock Asus firmware (I'm starting a swap file on my AC66U_B1). The script will also run when the router is rebooted.
Disclaimer: I have not tried this on my router as I'm pleased with the stock read/write performance of my 1 TB external drive.
I have found that adding a swap file to a thumb drive helps with the read/write of my NTFS formatted USB drive. After several days of monitoring memory usage with Samba reads/writes and the use of Download Master the system is using between 8 to 15 MEG of swap with no apparent errors and no router crashes on firmware 384-21045.

Thank you. That helps.
Could you please tell how to undo nvram set script_usbmount ?
just in case :)

By the way which is the model of your external HDD? Does it have an external power supply?
 
Last edited:
Am using a WD green drive in a powered drive enclosure. Not sure of the brand but it is a USB2.
Factory reset works to get rid of custom settings after you delete the script.

Sent from my P01M using Tapatalk
 

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