Netgear R8000 not mounting USB hard drive - drive worked on other firmware

I'm running OpenWRT 18.06.2. The hard drive in question is a Seagate Portable 2TB External Hard Drive USB 3.0 (STGX2000400). I've previously run Advanced Tomato on this same router and this same drive auto-mounted and I could read/write to it from network clients.

There's no /dev/sd* devices

Installed packages:
root@OpenWrt:~# opkg list-installed | grep usb
brcmfmac-firmware-usb - 2017-09-06-a61ac5cf-1
kmod-phy-bcm-ns-usb2 - 4.14.95-1
kmod-phy-bcm-ns-usb3 - 4.14.95-1
kmod-usb-bcma - 4.14.95-1
kmod-usb-core - 4.14.95-1
kmod-usb-ehci - 4.14.95-1
kmod-usb-ledtrig-usbport - 4.14.95-1
kmod-usb-ohci - 4.14.95-1
kmod-usb-storage - 4.14.95-1
kmod-usb-storage-uas - 4.14.95-1
kmod-usb2 - 4.14.95-1
kmod-usb3 - 4.14.95-1
libusb-1.0 - 1.0.22-1
usbutils - 007-9

lsusb output:
root@OpenWrt:~# lsusb
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 0bc2:2343 Seagate RSS LLC
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@OpenWrt:~# lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/0p, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/2p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/2p, 480

If I understand the output above it seems there isn't an appropriate driver loaded for this drive.

I unplugged and then plugged back in the drive and dmesg shows the following:

[ 2487.910738] usb 4-1: USB disconnect, device number 2
[ 2504.100681] usb 4-1: new SuperSpeed USB device number 3 using xhci-hcd
[ 2504.133006] xhci-hcd 18023000.xhci: ERROR: unexpected command completion code 0x11.
[ 2504.180742] uas: probe of 4-1:1.0 failed with error -12

I have confirmed the drive still mounts properly on my linux box.

Any ideas?

#define ENOMEM 12 /* Out of memory */

Router has 256 MB, currently 81% free. Which header file were you looking at?

There is kmod-scsi something which reads the partition table and creates the /dev/sdXn devices. Then you also need the kmod-fs- matching the filesystem on the partition you want to use.

You could also try it in USB2 mode, either plug into the other port that is USB2 only, or plug in a USB2 hub then plug drive into the hub.

When I move drive to USB2 port here's what I get. Closer but still issues

root@OpenWrt:~# lsusb
Bus 001 Device 003: ID 0bc2:2343 Seagate RSS LLC
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@OpenWrt:~# lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/0p, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/2p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/2p, 480M
    |__ Port 2: Dev 3, If 0, Class=Mass Storage, Driver=uas, 480M

root@OpenWrt:~# ls -l /dev/sd*
brw-------    1 root     root        8,   0 Apr  3 18:37 /dev/sda
brw-------    1 root     root        8,   1 Apr  3 18:37 /dev/sda1

[ 9537.902052] usb 1-2: new high-speed USB device number 3 using ehci-platform
[ 9538.105139] scsi host0: uas
[ 9538.109509] scsi 0:0:0:0: Direct-Access     Seagate  Portable         9300 PQ: 0 ANSI: 6
[ 9538.120167] sd 0:0:0:0: [sda] Spinning up disk...
[ 9539.192147] .
[ 9540.234366] .
[ 9541.274365] .
[ 9542.314364] .
[ 9542.316231] ready
[ 9542.321115] sd 0:0:0:0: [sda] 3907029167 512-byte logical blocks: (2.00 TB/1.82 TiB)
[ 9542.365119] sd 0:0:0:0: [sda] Write Protect is off
[ 9542.369927] sd 0:0:0:0: [sda] Mode Sense: 4f 00 00 00
[ 9542.375858] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 9542.420003]  sda: sda1
[ 9542.427502] sd 0:0:0:0: [sda] Attached SCSI disk
[ 9568.113509] print_req_error: I/O error, dev mtdblock16, sector 161536
[ 9568.120705] print_req_error: I/O error, dev mtdblock16, sector 161536
[ 9568.127170] Buffer I/O error on dev mtdblock16, logical block 20192, async page read

An MTD error is most likely due to flash problems, not directly with the drive you've inserted.

Do you have swap on flash enabled or anything like that?

I do not. I have a fairly vanilla install. Only added Adblock, a guest WLAN, and split off two of the four wired ports to their own VLAN. It took me a lot of RTFM to get that far.

I still think it's a driver issue since this drive works on this router using different firmware.

Did some searching, somebody else on the forum reported this problem last year: Xhci error when mounting usb drive on Netgear r8000

And others reported similar problems during 18.06 testing: bugs.openwrt - FS#1637

If anybody has a USB3 hard drive hanging off the USB3 port on a Netgear R8000 I'd appreciate hearing more about your setup.

For the sake of testing if it's the USB 3.0 river, could you use a SB 2.0 cable and see?

I'm not sure I'm following you. In a previous post I showed what happened when I attached to the USB2 port on the router. I don't know what you mean by USB 2.0 cable.

My apologies. For some reason when I posted my message I haven't seen @mk24's or your posts about USB 2.0. so forget what I said!

It's not an NTFS disk by chance, is it?

I forget how it came from Seagate but I reformatted it as ext4.

root@OpenWrt:~# opkg list-installed | grep fs
e2fsprogs - 1.44.1-1
fstools - 2018-12-28-af93f4b8-3
kmod-fs-ext4 - 4.14.95-1
libext2fs - 1.44.1-1

1 Like

If you have /dev/sda1 try mount /dev/sda1 /mnt. Automatically mounting takes another package.

Thanks mk24. Mounting manually works when drive is on USB2 port. I can create, copy, delete files. This could be a temporary work-around while I continue to research the USB3 issue.

1 Like

You don't have to manually type it after every reboot. You could have it in rc.local.

Or use package block-mount, which brings fstab-like functionality to OpenWrt.

2 Likes

I had block-mount loaded. Still something weird going on here but at least mounting manually from the USB2 port gives me access. Been RTFM more... :grinning: I used uci to update fstab, then the drive showed up under System->Mount Points->Mount Points. I updated enabled and fs type and seem to have a usable, if somewhat slow, NAS drive now.

I've successfully setup Samba and have both my and my wife's work computers connecting properly. The primary function of this drive is to receive automatic backups from both work computers, we work from home. Additionally our main home/play computers are linux based so I also want to setup NFS so I can auto-backup pictures and videos from them. I've done quite a bit of searching and reading and haven't come up with anything promising on the USB3 front. Kind of frustrating having a fast drive that I can't get out of 1st gear with. Keeping my fingers crossed that the next stable release has some fixes that solve my USB3 problem.

I appreciate all of the comments and suggestions above.

Samba is quite resource hungry file transfer protocol. If you see the CPU utilized highly during transfers consider using another protocol, like ftp.

Or, for the transfer of large amount of data (e.g. hundred of GBs), you could unmount the disk, connect it directly to the PC, do the copy then plug again.

Make sure to unmount properly to avoid data loss

service samba stop
service minidlna stop
umount /dev/sda1

To eliminate some things;

Do a test with a usb3 thumb.... several.....
Do a test with wifi disabled

I have had some errors but used and external usb3>ssd in a similar device.....

1 Like

The 2.4 GHz band in particular

Hopefully, it won't be an issue. I'm using rsync (cygwin) to backup certain directories on our work laptops between 4 and 5 am.