Opened 2 weeks ago
Last modified 6 days ago
#1886 new defect
[QNAP TR-002] usb reset SuperSpeed device when using -x flag
Reported by: | lemonuk | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | undecided |
Component: | all | Version: | |
Keywords: | sat | Cc: |
Description
The spinning drive is connected to QNAP TR-002.
Using the flag -x
causes the data read/write transmission to freeze temporarily while the smart test is being performed, then just keeps running normally:
# time smartctl -x -d sat /dev/sdc | grep -i temperature 194 Temperature_Celsius -O---K 100 100 000 - 35 (Min/Max 14/52) real 1m1.655s user 0m0.041s sys 0m0.004s
dmesg complains about it every time the command is run:
[ 1462.569558] usb 2-5: reset SuperSpeed USB device number 3 using xhci_hcd
Using the -a
flag does not cause that issue and is much faster:
# time smartctl -a -d sat /dev/sdc | grep -i temperature 194 Temperature_Celsius 0x0022 100 100 000 Old_age Always - 38 (Min/Max 14/52) real 0m0.113s user 0m0.026s sys 0m0.005s
Connecting the drive to StarTech.com SDOCKU33EF is much faster and does not raise any dmesg log even with -x
flag:
# time smartctl -x -d sat /dev/sdc | grep -i temperature 194 Temperature_Celsius -O---K 100 100 000 - 40 (Min/Max 14/52) Current Temperature: 40 Celsius Power Cycle Min/Max Temperature: 35/40 Celsius Lifetime Min/Max Temperature: 14/52 Celsius Specified Max Operating Temperature: 55 Celsius Under/Over Temperature Limit Count: 0/0 SCT Temperature History Version: 2 Temperature Sampling Period: 1 minute Temperature Logging Interval: 1 minute Min/Max recommended Temperature: 5/55 Celsius Min/Max Temperature Limit: -40/70 Celsius Temperature History Size (Index): 478 (107) Index Estimated Time Temperature Celsius 0x05 ===== = = === == Temperature Statistics (rev 1) == 0x05 0x008 1 40 --- Current Temperature 0x05 0x010 1 36 N-- Average Short Term Temperature 0x05 0x018 1 - N-- Average Long Term Temperature 0x05 0x020 1 52 --- Highest Temperature 0x05 0x028 1 14 --- Lowest Temperature 0x05 0x030 1 46 N-- Highest Average Short Term Temperature 0x05 0x038 1 34 N-- Lowest Average Short Term Temperature 0x05 0x040 1 - N-- Highest Average Long Term Temperature 0x05 0x048 1 - N-- Lowest Average Long Term Temperature 0x05 0x050 4 0 --- Time in Over-Temperature 0x05 0x058 1 55 --- Specified Maximum Operating Temperature 0x05 0x060 4 0 --- Time in Under-Temperature 0x05 0x068 1 5 --- Specified Minimum Operating Temperature real 0m1.323s user 0m0.061s sys 0m0.004s
Change History (4)
comment:2 by , 2 weeks ago
Happens also on Ubuntu 24.04 with kernel 6.8.0-45-generic x86_64:
time smartctl -x -d sat /dev/sdc | grep -i temperature 194 Temperature_Celsius -O---K 100 100 000 - 33 (Min/Max 14/52) real 1m1,728s user 0m0,033s sys 0m0,009s
comment:3 by , 11 days ago
Keywords: | sat added |
---|---|
Milestone: | → undecided |
-x
is the same as:
-H -i -g all -g wcreorder -c -A -f brief -l xerror,error -l xselftest,selftest -l selective -l directory -l scttemp -l scterc -l devstat -l defects -l sataphy
Please try which of the options trigger the problem. The usual suspects are the commands using SCT protocol which requires WRITE SMART LOG: -g wcreorder -l scttemp -l scterc
.
comment:4 by , 6 days ago
I've found that it's not even necessary to have any file transfer, the command just locks the terminal until the operation is performed, and can't be cancelled with control+c.
The culprit is only -l devstat
:
[root@linux ~]# time smartctl -x -d sat /dev/sdc | grep -i temperature 194 Temperature_Celsius -O---K 100 100 000 - 22 (Min/Max 14/52) ^C^C^C real 1m0.480s user 0m0.018s sys 0m0.009s [root@linux ~]# time smartctl --H -d sat /dev/sdc | grep -i temperature real 0m0.004s user 0m0.007s sys 0m0.000s [root@linux ~]# time smartctl -H -d sat /dev/sdc | grep -i temperature real 0m0.028s user 0m0.026s sys 0m0.000s [root@linux ~]# time smartctl -i -d sat /dev/sdc | grep -i temperature real 0m0.027s user 0m0.025s sys 0m0.003s [root@linux ~]# time smartctl -g all -d sat /dev/sdc | grep -i temperature real 0m0.028s user 0m0.022s sys 0m0.006s [root@linux ~]# time smartctl -g wcreorder -d sat /dev/sdc | grep -i temperature real 0m0.032s user 0m0.030s sys 0m0.003s [root@linux ~]# time smartctl -c -d sat /dev/sdc | grep -i temperature real 0m0.032s user 0m0.026s sys 0m0.004s [root@linux ~]# time smartctl -A -d sat /dev/sdc | grep -i temperature 194 Temperature_Celsius 0x0022 100 100 000 Old_age Always - 24 (Min/Max 14/52) real 0m0.030s user 0m0.027s sys 0m0.002s [root@linux ~]# time smartctl -f brief -d sat /dev/sdc | grep -i temperature real 0m0.020s user 0m0.021s sys 0m0.001s [root@linux ~]# time smartctl -l xerror,error -d sat /dev/sdc | grep -i temperature real 0m0.031s user 0m0.029s sys 0m0.000s [root@linux ~]# time smartctl -l xselftest,selftest -d sat /dev/sdc | grep -i temperature real 0m0.032s user 0m0.026s sys 0m0.004s [root@linux ~]# time smartctl -l selective -d sat /dev/sdc | grep -i temperature real 0m0.031s user 0m0.020s sys 0m0.008s [root@linux ~]# time smartctl -l directory -d sat /dev/sdc | grep -i temperature real 0m0.028s user 0m0.029s sys 0m0.001s [root@linux ~]# time smartctl -l scttemp -d sat /dev/sdc | grep -i temperature real 0m0.028s user 0m0.026s sys 0m0.003s [root@linux ~]# time smartctl -l scterc -d sat /dev/sdc | grep -i temperature real 0m0.028s user 0m0.023s sys 0m0.006s [root@linux ~]# time smartctl -l devstat -d sat /dev/sdc | grep -i temperature real 1m1.522s user 0m0.028s sys 0m0.003s [root@linux ~]# time smartctl -l defects -d sat /dev/sdc | grep -i temperature real 0m0.032s user 0m0.027s sys 0m0.008s [root@linux ~]# time smartctl -l sataphy -d sat /dev/sdc | grep -i temperature real 0m0.031s user 0m0.029s sys 0m0.003s
OS is Arch with kernel is
Linux arch 6.6.51-1-lts #1 SMP PREEMPT_DYNAMIC x86_64 GNU/Linux
smartmontools
7.4-2
.