USB-SSD not waking (spinning) up quick enough, causing read/write-errors

That would be difficult to remember in a few months or years.
It would be good to have a complete backup of the system but I guess thats not really possible.
One Idea would be to create a complete firmware-image which can be imported via firmware upload and contains all I have setup and installed and changed. I'm a little afraid what would happen if I needed to do all that again :frowning:

yeah I can see your post history from your profile, I'll have a look.

Write it on a piece of paper and attach it under the router.

It shouldn't take years to get a fix in, but it may still take a few months.

That not what I meant, I meant if I do an update in a few months or years I would not remember all the things I did change. I am writing it down in a computer file (I would lose the paper for sure or the router would not stay anymore on a stack of papers). its just difficult that way. I am usually not that linux type, I'm used to backup the config file of my router (worked fine for all my D-Link Routers), but its not working on a Fritzbox or openwrt system.

This is a common problem with USB enclosures or drives. Good ones use the hard drive sleep function and let you communicate with the hard drive with hdparm so you can change that.

Bad ones use their own timeout and shut down the drive inside on their own. There isn't much you can do to fix this properly.

The only workaround for the bad enclosures is to have a Scheduled Task (also called "chron job") that reads a few KB from the drive every 20-30 seconds. This will effectively prevent the sleep function as the drive is never idle for long enough time, but it is too little to have any performance impact.

But it is really best to just throw away the bad enclosure and get a good one.

Openwrt has a centralized configuration storage, it allows configuration backup and restore for all settings you changed with uci commandline tool and through Luci web interface, and it will ask you if you want to keep the config when you install a firmware upgrade.

You just need to remember what applications you installed, as that is not preserved on upgrade. For minidlna for example there is uci configuration, so it will keep the config file with your custom settings, you only need to install minidlna application again after you upgrade OpenWrt.
See here:
https://openwrt.org/docs/guide-user/troubleshooting/backup_restore

If this does not work, then it's very bad. For me it worked for a long time.
You can also add files and folders to the backup, but that's better used for custom config files and VPN keys, not whole application packages.

Well thats not so simple.
Because the SSD-Drives do not support any power saving functions.
I tried. With a real HDD it worked, with a SSD nothing happend.
Therefore its not possible to save power with a SSD Drive.
A good real HDD might need less power because it has such functions.

Yes it is, let me explain better.
The enclosure is a smart device. It has a controller (a little CPU) and its own firmware. It can act on its own, like an Arduino.

Hard drives have power saving and can turn themselves mostly off. You can control that with hdparm, or CrystalDiskInfo (or others) on Windows. The feature is called Advanced Power Management or APM.


Good enclosures are only bridges. You are controlling the power function of the hard drive. If the drive has no power saving, it will never sleep. The enclosure does not care.

Bad enclosures are "smart" and will turn off the drive on their own. They don't care of what you put inside. They don't care if it is a SSD (that does not need to be turned off), or if you try to configure the hard drive's own power saving parameters. After their set idle time they will turn off the drive, period.

It is theoretically possible to disable this "smart" functionality in the bad enclosures because this happens in the enclosure's firmware. If the firmware is changed to remove this function, the enclosure will not shut down the drive anymore. But it is rarely possible to update the firmware in the enclosure as it is a very cheap device.

It is possible to copy the firmware from a known working enclosure to another identical one, but you need flash chip reading tools (and you need to desolder the flash chip too in many cases). This is a complex task.

I did something like that in the past for more expensive devices (a bunch of RAID enclosures), when a firmware update bricked them and the owner was very upset about buying many new enclosures for 200$ apiece.

1 Like

Thats all correct and not new to me.

My SSD (Kingston) supports APM, according to the SMART Report.
But it does not do anything. The HDD stopped spinning, the SSD just did nothing. So not possible to save power on the SSD using APM.
This is only possible by using what you call the "Bad enclosures".
If it works good it no problem to use them. I did for years.

I did some usb power consumption measuring (with a little lcd that you put between the host and the usb enclosure).
It showed this:

good enclosure
SSD about 0,3A (idle), about 0,4A (reading / writing)

bad enclosure
SSD about 0,2A (idle), about 0,4A (reading / writing)
but reduced to 0,05A when power cut off

1 Like

how about TRIM?

It supports Trim but I don't need that.
I have SSDs from Kingston like SH100S3, SH103S3 or SKC600

As said by others, there are multiple things that could have gone wrong.

I hope you can fix this by changing the value in /sys/module/usb_storage/parameters/delay_use

It is a number in seconds. By default it is 1 (one second). This may be too little for the SSD to fully restart.

by writing echo 10 > /sys/module/usb_storage/parameters/delay_use you should be able to increase the timeout to 10 seconds. You can increase this to a higher number, like 20 or 60 too, or decrease it to 5 seconds, if that is enough for you.

You can see the current value by writing
cat /sys/module/usb_storage/parameters/delay_use

This value is reset to 1 when the device reboots.

To set it on device reboot, write the same command in the page you find in Luci Web interface by clicking on System-> Startup -> Local Startup tab, before the "end 0" line.
What you write here is saved in the default config backups too, btw, so it's not lost if you restore a config backup.

I really hope it is not something hard-coded that cannot be changed like this 800ms timeout I see in the source code in Linux upstream project. https://github.com/torvalds/linux/commit/77c7f072c87fa951e9a74805febf26466f31170c

and I see that you tracked down the error messages to see that you start getting errors at 0.8 seconds USB-SSD not waking (spinning) up quick enough, causing read/write-errors

@tmomas can you or a forum admin split off the posts about his USB SSD issues and move them into the old thread here USB-SSD not waking (spinning) up quick enough, causing read/write-errors
(and also reopen it)

This looks exactly like what I would need.
I will try as soon as possible and let you know.

Greetings
Nico

Posts moved and topic reopened.

1 Like

@nicommander the posts were moved here by a mod, let's continue with the SSD issues here and not in the other thread (that was about another issue)

I tried this but it was not working as it should.
The Drive responded after about 1sec (like usual) and sometimes it did not. Then the log was full of errors. However it is possible that the errors were differend depending on the delay value (I tried 1+10+20sec).
Sometimes the errors showed even though the drive responded in time. I do not understand that at all.

Here is the log:

[    0.000000] Linux version 4.14.131 (buildbot@188e96c27177) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7808-ef686b7292)) #0 SMP Thu Jun 27 12:18:52 2019
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is D-Link DIR-860L B1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] VPE topology {2,2} total 4
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat 80554120, node_mem_map 81003000
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] random: get_random_bytes called from 0x80557744 with crng_init=0
[    0.000000] percpu: Embedded 14 pages/cpu s26256 r8192 d22896 u57344
[    0.000000] pcpu-alloc: s26256 r8192 d22896 u57344 alloc=14*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=0000a15a
[    0.000000] Readback ErrCtl register=0000a15a
[    0.000000] Memory: 123668K/131072K available (4647K kernel code, 236K rwdata, 572K rodata, 228K init, 254K bss, 7404K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS: 256
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[    0.000009] sched_clock: 32 bits at 440MHz, resolution 2ns, wraps every 4880645118ns
[    0.015497] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[    0.087821] pid_max: default: 32768 minimum: 301
[    0.097134] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.110155] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.125873] Hierarchical SRCU implementation.
[    0.135324] smp: Bringing up secondary CPUs ...
[    3.994270] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    3.994279] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    3.994290] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    3.994421] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.204721] Synchronize counters for CPU 1: done.
[    4.122531] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    4.122539] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    4.122547] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    4.122616] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.325470] Synchronize counters for CPU 2: done.
[    4.235013] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    4.235021] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    4.235029] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    4.235109] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.445034] Synchronize counters for CPU 3: done.
[    0.504629] smp: Brought up 1 node, 4 CPUs
[    0.516078] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.535539] futex hash table entries: 1024 (order: 3, 32768 bytes)
[    0.547981] pinctrl core: initialized pinctrl subsystem
[    0.558882] NET: Registered protocol family 16
[    0.573185] FPU Affinity set after 11720 emulations
[    0.573904] pull PCIe RST: RALINK_RSTCTRL = 0
[    0.882823] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.892888] ***** Xtal 40MHz *****
[    0.899621] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.909824] Port 0 N_FTS = 1b102800
[    0.916722] Port 1 N_FTS = 1b102800
[    0.923652] Port 2 N_FTS = 1b102800
[    2.082029] PCIE2 no card, disable it(RST&CLK)
[    2.090718]  -> 21007f2
[    2.095540] PCIE0 enabled
[    2.100735] PCIE1 enabled
[    2.105919] PCI host bridge /pcie@1e140000 ranges:
[    2.115441]  MEM 0x0000000060000000..0x000000006fffffff
[    2.125808]   IO 0x000000001e160000..0x000000001e16ffff
[    2.136165] PCI coherence region base: 0xbfbf8000, mask/settings: 0x60000000
[    2.159159] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.170428] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.181631] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.193981] PCI host bridge to bus 0000:00
[    2.201997] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    2.215656] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    2.227403] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    2.240877] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    2.256652] pci 0000:00:00.0: [0e8d:0801] type 01 class 0x060400
[    2.256690] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    2.256702] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[    2.256773] pci 0000:00:00.0: supports D1
[    2.256783] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    2.257031] pci 0000:00:01.0: [0e8d:0801] type 01 class 0x060400
[    2.257066] pci 0000:00:01.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    2.257084] pci 0000:00:01.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[    2.257147] pci 0000:00:01.0: supports D1
[    2.257157] pci 0000:00:01.0: PME# supported from D0 D1 D3hot
[    2.257415] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.273211] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.289294] pci 0000:01:00.0: [14c3:7662] type 00 class 0x028000
[    2.289360] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit]
[    2.289409] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    2.289504] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    2.289711] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    2.289948] pci 0000:02:00.0: [14c3:7662] type 00 class 0x028000
[    2.290011] pci 0000:02:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit]
[    2.290057] pci 0000:02:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    2.290151] pci 0000:02:00.0: PME# supported from D0 D3hot D3cold
[    2.290365] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    2.290392] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 02
[    2.290470] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    2.303491] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    2.317316] pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000]
[    2.330445] pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000]
[    2.344270] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    2.357750] pci 0000:00:00.0: BAR 9: assigned [mem 0x60100000-0x601fffff pref]
[    2.372095] pci 0000:00:01.0: BAR 8: assigned [mem 0x60200000-0x602fffff]
[    2.385582] pci 0000:00:01.0: BAR 9: assigned [mem 0x60300000-0x603fffff pref]
[    2.399911] pci 0000:00:00.0: BAR 1: assigned [mem 0x60400000-0x6040ffff]
[    2.413398] pci 0000:00:01.0: BAR 1: assigned [mem 0x60410000-0x6041ffff]
[    2.426882] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[    2.441393] pci 0000:01:00.0: BAR 6: assigned [mem 0x60100000-0x6010ffff pref]
[    2.455727] pci 0000:00:00.0: PCI bridge to [bus 01]
[    2.465562] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    2.479053] pci 0000:00:00.0:   bridge window [mem 0x60100000-0x601fffff pref]
[    2.493406] pci 0000:02:00.0: BAR 0: assigned [mem 0x60200000-0x602fffff 64bit]
[    2.507926] pci 0000:02:00.0: BAR 6: assigned [mem 0x60300000-0x6030ffff pref]
[    2.522255] pci 0000:00:01.0: PCI bridge to [bus 02]
[    2.532090] pci 0000:00:01.0:   bridge window [mem 0x60200000-0x602fffff]
[    2.545579] pci 0000:00:01.0:   bridge window [mem 0x60300000-0x603fffff pref]
[    2.561272] clocksource: Switched to clocksource GIC
[    2.572624] NET: Registered protocol family 2
[    2.582032] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    2.595768] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    2.608368] TCP: Hash tables configured (established 1024 bind 1024)
[    2.621105] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    2.632606] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    2.645226] NET: Registered protocol family 1
[    2.653828] PCI: CLS 0 bytes, default 32
[    2.891220] 4 CPUs re-calibrate udelay(lpj = 2924544)
[    2.902669] Crashlog allocated RAM at address 0x3f00000
[    2.913200] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    2.933256] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.944755] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.966435] random: fast init done
[    2.973931] io scheduler noop registered
[    2.981622] io scheduler deadline registered (default)
[    2.992849] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    3.008238] console [ttyS0] disabled
[    3.015343] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 18, base_baud = 3125000) is a 16550A
[    3.033231] console [ttyS0] enabled
[    3.047024] bootconsole [early0] disabled
[    3.063607] cacheinfo: Failed to find cpu0 device node
[    3.073883] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    3.086709] MediaTek Nand driver init, version v2.1 Fix AHB virt2phys error
[    3.100945] spi-mt7621 1e000b00.spi: sys_freq: 50000000
[    3.112225] m25p80 spi0.0: mx25l12805d (16384 Kbytes)
[    3.122373] 6 fixed-partitions partitions found on MTD device spi0.0
[    3.135019] Creating 6 MTD partitions on "spi0.0":
[    3.144566] 0x000000000000-0x000000030000 : "u-boot"
[    3.155350] 0x000000030000-0x000000034000 : "u-boot-env"
[    3.166777] 0x000000034000-0x000000038000 : "radio"
[    3.177331] 0x000000038000-0x000000040000 : "factory"
[    3.188232] 0x000000040000-0x000000050000 : "defaults"
[    3.199317] 0x000000050000-0x000001000000 : "firmware"
[    3.249474] 2 seama-fw partitions found on MTD device firmware
[    3.261111] 0x000000050040-0x000000210000 : "kernel"
[    3.271890] 0x000000210000-0x000001000000 : "rootfs"
[    3.282575] mtd: device 7 (rootfs) set to be root filesystem
[    3.293940] 1 squashfs-split partitions found on MTD device rootfs
[    3.306283] 0x000000470000-0x000001000000 : "rootfs_data"
[    3.318465] libphy: Fixed MDIO Bus: probed
[    3.393044] mtk_soc_eth 1e100000.ethernet: generated random MAC address 1e:6d:10:6f:46:cd
[    3.409501] libphy: mdio: probed
[    4.815453] mtk_soc_eth 1e100000.ethernet: loaded mt7530 driver
[    4.827874] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 20
[    4.846564] NET: Registered protocol family 10
[    4.856934] Segment Routing with IPv6
[    4.864341] NET: Registered protocol family 17
[    4.873255] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    4.899037] 8021q: 802.1Q VLAN Support v1.8
[    4.909609] hctosys: unable to open rtc device (rtc0)
[    4.925959] VFS: Mounted root (squashfs filesystem) readonly on device 31:7.
[    4.940564] Freeing unused kernel memory: 228K
[    4.949508] This architecture does not have kernel memory protection.
[    4.975756] mtk_soc_eth 1e100000.ethernet eth0: port 2 link up
[    5.125708] mtk_soc_eth 1e100000.ethernet eth0: port 1 link up
[    5.322788] random: crng init done
[    5.651613] init: Console is alive
[    5.658613] init: - watchdog -
[    6.062554] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
[    6.536121] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.611305] usbcore: registered new interface driver usbfs
[    6.622390] usbcore: registered new interface driver hub
[    6.633112] usbcore: registered new device driver usb
[    6.651613] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    6.662259] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 1
[    6.681414] xhci-mtk 1e1c0000.xhci: hcc params 0x01401198 hci version 0x96 quirks 0x0000000000210010
[    6.699693] xhci-mtk 1e1c0000.xhci: irq 19, io mem 0x1e1c0000
[    6.712151] hub 1-0:1.0: USB hub found
[    6.719682] hub 1-0:1.0: 2 ports detected
[    6.728226] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    6.738851] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 2
[    6.753771] xhci-mtk 1e1c0000.xhci: Host supports USB 3.0  SuperSpeed
[    6.766809] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    6.783731] hub 2-0:1.0: USB hub found
[    6.791345] hub 2-0:1.0: 1 port detected
[    6.801814] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    6.821606] init: - preinit -
[    7.585331] mtk_soc_eth 1e100000.ethernet: PPE started
[    8.242636] usb 2-1: new SuperSpeed USB device number 2 using xhci-mtk
[   11.031723] jffs2: notice: (473) jffs2_build_xattr_subsystem: complete building xattr subsystem, 43 of xdatum (3 unchecked, 40 orphan) and 102 of xref (51 dead, 0 orphan) found.
[   11.068396] mount_root: switching to jffs2 overlay
[   11.094356] overlayfs: upper fs does not support tmpfile.
[   11.112497] urandom-seed: Seeding with /etc/urandom.seed
[   11.237006] mtk_soc_eth 1e100000.ethernet: 0x100 = 0x6060000c, 0x10c = 0x80818
[   11.268030] procd: - early -
[   11.273891] procd: - watchdog -
[   11.931435] procd: - watchdog -
[   11.937998] procd: - ubus -
[   12.133566] procd: - init -
[   13.009131] kmodloader: loading kernel modules from /etc/modules.d/*
[   13.501029] SCSI subsystem initialized
[   13.527917] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   13.592727] fuse init (API version 7.26)
[   13.604029] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[   13.620016] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[   13.635246] ip_tables: (C) 2000-2006 Netfilter Core Team
[   13.652746] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[   13.713049] usb-storage 2-1:1.0: USB Mass Storage device detected
[   13.725722] scsi host0: usb-storage 2-1:1.0
[   13.734656] usbcore: registered new interface driver usb-storage
[   13.758122] xt_time: kernel timezone is -0000
[   13.812774] bus=0x1, slot = 0x0, irq=0xff
[   13.820789] PCI: Enabling device 0000:00:00.0 (0004 -> 0006)
[   13.832284] mt76x2e 0000:01:00.0: ASIC revision: 76120044
[   14.502194] mt76x2e 0000:01:00.0: ROM patch build: 20141115060606a
[   14.518009] mt76x2e 0000:01:00.0: Firmware Version: 0.0.00
[   14.528979] mt76x2e 0000:01:00.0: Build: 1
[   14.537165] mt76x2e 0000:01:00.0: Build Time: 201507311614____
[   14.571287] mt76x2e 0000:01:00.0: Firmware running!
[   14.582500] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   14.586608] bus=0x2, slot = 0x1, irq=0xff
[   14.594725] PCI: Enabling device 0000:00:01.0 (0004 -> 0006)
[   14.606237] mt76x2e 0000:02:00.0: ASIC revision: 76020044
[   14.774959] scsi 0:0:0:0: Direct-Access     KINGSTON  SKC6001024G     TB08 PQ: 0 ANSI: 6
[   14.793872] sd 0:0:0:0: [sda] 2000409248 512-byte logical blocks: (1.02 TB/954 GiB)
[   14.810997] sd 0:0:0:0: [sda] Write Protect is off
[   14.820650] sd 0:0:0:0: [sda] Mode Sense: 5f 00 10 08
[   14.821750] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
[   14.843336]  sda: sda1
[   14.851703] sd 0:0:0:0: [sda] Attached SCSI disk
[   15.251337] mt76x2e 0000:02:00.0: ROM patch already applied
[   15.263407] mt76x2e 0000:02:00.0: Firmware Version: 0.0.00
[   15.274393] mt76x2e 0000:02:00.0: Build: 1
[   15.282605] mt76x2e 0000:02:00.0: Build Time: 201507311614____
[   15.311281] mt76x2e 0000:02:00.0: Firmware running!
[   15.322212] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[   15.330517] PPP generic driver version 2.4.2
[   15.340687] NET: Registered protocol family 24
[   15.352521] kmodloader: done loading kernel modules from /etc/modules.d/*
[   21.565090] mtk_soc_eth 1e100000.ethernet: PPE started
[   21.579583] device eth0 entered promiscuous mode
[   21.590891] br-lan: port 1(eth0.1) entered blocking state
[   21.601903] br-lan: port 1(eth0.1) entered disabled state
[   21.613223] device eth0.1 entered promiscuous mode
[   21.625969] br-lan: port 1(eth0.1) entered blocking state
[   21.636769] br-lan: port 1(eth0.1) entered forwarding state
[   21.648285] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   22.591661] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   24.324397] EXT4-fs (sda1): recovery complete
[   24.333699] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
**[  256.351596] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk**
**[  388.591604] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk**
**[  489.961601] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk**
**[  491.488660] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk**
**[  493.018160] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk**
**[  494.551142] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk**
**[  496.075213] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk**
**[  497.594417] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk**
[  497.633938] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[  497.650225] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 10 81 02 48 00 00 20 00
[  497.665304] print_req_error: I/O error, dev sda, sector 276890184
[  499.117210] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[  500.640555] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[  502.165255] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[  503.683605] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[  505.207362] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[  506.726663] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[  506.764035] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[  506.780322] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 10 81 02 68 00 00 10 00
[  506.795400] print_req_error: I/O error, dev sda, sector 276890216
[  508.244908] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[  509.764590] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[  511.291027] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[  512.817101] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[  514.334338] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[  515.854723] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[  515.894005] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[  515.910290] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 10 81 02 78 00 00 10 00
[  515.925373] print_req_error: I/O error, dev sda, sector 276890232
[  581.331594] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[  775.691668] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1033.521698] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1035.052980] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1036.576839] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1038.100851] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1039.633477] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1041.162721] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1041.204074] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[ 1041.220364] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 10 81 02 48 00 00 20 00
[ 1041.235460] print_req_error: I/O error, dev sda, sector 276890184
[ 1042.691236] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1044.217493] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1045.743024] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1047.277195] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1048.796550] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1050.316888] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1050.353948] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[ 1050.370233] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 10 81 02 68 00 00 10 00
[ 1050.385313] print_req_error: I/O error, dev sda, sector 276890216
[ 1051.846778] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1053.369202] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1054.897529] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1056.421106] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1057.953668] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1059.482628] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1059.524059] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[ 1059.540348] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 10 81 02 78 00 00 10 00
[ 1059.555439] print_req_error: I/O error, dev sda, sector 276890232
[ 1147.711716] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1264.431708] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1386.411704] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1490.761742] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1492.299223] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1493.833178] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1495.359663] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1496.896157] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1498.429007] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1498.474112] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[ 1498.490411] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 36 cb c1 00 00 01 00 00
[ 1498.505520] print_req_error: I/O error, dev sda, sector 919322880
[ 1499.959164] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1501.489862] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1503.030059] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1504.565590] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1506.088950] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1507.624367] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1507.664019] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[ 1507.680313] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 36 cb c1 00 00 00 08 00
[ 1507.695415] print_req_error: I/O error, dev sda, sector 919322880
[ 1509.155065] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1510.681282] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1512.214150] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1513.738844] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1515.272604] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1516.809373] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1516.853957] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[ 1516.870241] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 36 cb c1 00 00 00 08 00
[ 1516.885319] print_req_error: I/O error, dev sda, sector 919322880
[ 1518.339302] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1519.869926] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1521.409932] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1522.942325] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1524.469649] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1526.004590] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1526.044176] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[ 1526.060474] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 00 3b 84 12 e8 00 00 10 00
[ 1526.075581] print_req_error: I/O error, dev sda, sector 998511336
[ 1526.090074] Aborting journal on device sda1-8.
[ 1527.531574] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1529.065317] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1530.592553] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1532.119234] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1533.652520] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1535.189253] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1535.234255] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[ 1535.250553] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 08 3b 84 01 00 00 00 08 00
[ 1535.265634] print_req_error: I/O error, dev sda, sector 998506752
[ 1535.277778] Buffer I/O error on dev sda1, logical block 124813312, lost sync page write
[ 1535.293805] JBD2: Error -5 detected when updating journal superblock for sda1-8.
[ 1536.719961] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1538.250023] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1539.790123] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1541.325749] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1542.849098] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1544.384788] usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
[ 1544.424138] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[ 1544.440422] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 36 cb c1 00 00 00 08 00
[ 1544.455499] print_req_error: I/O error, dev sda, sector 919322880
[ 1544.611873] EXT4-fs error (device sda1): ext4_journal_check_start:61: Detected aborted journal
[ 1544.629025] EXT4-fs (sda1): Remounting filesystem read-only

The bold marked line is the line that usually apears when the drive is woken. But it seems strange that 2 of these lines are less than 60sec apart, because then the drive is not sleeping.

That behavior has been seen before for other drives on different devices running OpenWrt https://dev.archive.openwrt.org/ticket/21526.html

but it was never solved.

This is a problem in the Linux USB subsystem (drivers and whatnot), I can't help much here, the only solution remains "buy another enclosure that does not do this"

2 Likes

I understand. I was hoping it could be solved but I'm also ok with knowing that I don't need to search anymore and that its not my fault.
Thank you very much for all your help so far.

If I may I would like to ask one more question:
I'm not that good with Linux so I just don't know.
I was wondering if it would be possible to create a Firmware-Image from the System as it currently is ?
Most other devices have such an option, you backup all there is and in case of a failure you restore the backup and everything is as it was before (everything).
Thats the way the openwrt was installed on my DIR-860L in the first place (a complete Firmware-Image). So the Restore-thing is possible already. The "only" thing I need would be a way to create my own Firmware-Image of just my system in its current state.
Is there a way to do that ?

Greetings
Nico