1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

AC66u B1 NTFS problem

Discussion in 'ASUS AC Routers & Adapters' started by Asus___User, May 15, 2018.

  1. Asus___User

    Asus___User New Around Here

    Joined:
    May 15, 2018
    Messages:
    8
    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!
     
  2. Please support SNBForums! Just click on this link before you buy something from Amazon and we'll get a small commission on anything you buy. Thanks!
  3. RMerlin

    RMerlin Super Moderator

    Joined:
    Apr 14, 2012
    Messages:
    26,927
    Location:
    Canada
    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.
     
  4. Asus___User

    Asus___User New Around Here

    Joined:
    May 15, 2018
    Messages:
    8
    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?
     
  5. Asus___User

    Asus___User New Around Here

    Joined:
    May 15, 2018
    Messages:
    8
    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.
     
  6. RMerlin

    RMerlin Super Moderator

    Joined:
    Apr 14, 2012
    Messages:
    26,927
    Location:
    Canada
    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.
     
  7. RMerlin

    RMerlin Super Moderator

    Joined:
    Apr 14, 2012
    Messages:
    26,927
    Location:
    Canada
    Since it's a MyPassport, ny guess is it doesn't get enough power through the router's USB port.
     
  8. Asus___User

    Asus___User New Around Here

    Joined:
    May 15, 2018
    Messages:
    8
    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: May 15, 2018
  9. Asus___User

    Asus___User New Around Here

    Joined:
    May 15, 2018
    Messages:
    8
    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.
     
  10. bbunge

    bbunge Senior Member

    Joined:
    Aug 11, 2014
    Messages:
    433
    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
     
  11. Asus___User

    Asus___User New Around Here

    Joined:
    May 15, 2018
    Messages:
    8
    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.
     
  12. RMerlin

    RMerlin Super Moderator

    Joined:
    Apr 14, 2012
    Messages:
    26,927
    Location:
    Canada
    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.
     
  13. Asus___User

    Asus___User New Around Here

    Joined:
    May 15, 2018
    Messages:
    8
    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?
     
  14. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    5,162
    Location:
    UK
    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: May 16, 2018
  15. Asus___User

    Asus___User New Around Here

    Joined:
    May 15, 2018
    Messages:
    8
    Thanks a lot! It works.
    Is there some analog of /etc/init.d where I can put my script for autostart?
     
Please support SNBForums! Just click on this link before you buy something from Amazon and we'll get a small commission on anything you buy. Thanks!