External USB HDD fails to mount with Manjaro 6.1 and 5.x kernels, works fine in Manjaro 4.19 kernel

Hi,

I’m having trouble getting an old external USB drive to work in Manjaro. It works just fine in Windows 10 and Linux Mint, so I suspect some kernel / driver problem maybe?

edit: Tested with Manjaro 6.1, 5.x and 4.19 -kernels. Works fine in 4.19 but not in the others!

When connecting the disk, dmesg shows:

[  232.906701] usb 3-5: new high-speed USB device number 3 using xhci_hcd
[  233.049541] usb 3-5: New USB device found, idVendor=14cd, idProduct=6116, bcdDevice= 1.50
[  233.049547] usb 3-5: New USB device strings: Mfr=1, Product=3, SerialNumber=2
[  233.049550] usb 3-5: Product: Mobile HDD
[  233.049551] usb 3-5: Manufacturer: Super Top   
[  233.049553] usb 3-5: SerialNumber: M6116018VE15
[  233.587841] usb-storage 3-5:1.0: USB Mass Storage device detected
[  233.587911] scsi host10: usb-storage 3-5:1.0
[  233.587965] usbcore: registered new interface driver usb-storage
[  233.590151] usbcore: registered new interface driver uas
[  234.590650] scsi 10:0:0:0: Direct-Access     Mobile   HDD                   PQ: 0 ANSI: 0
[  234.591349] sd 10:0:0:0: [sdf] 312581808 512-byte logical blocks: (160 GB/149 GiB)
[  234.591462] sd 10:0:0:0: [sdf] Write Protect is off
[  234.591464] sd 10:0:0:0: [sdf] Mode Sense: 03 00 00 00
[  234.591578] sd 10:0:0:0: [sdf] No Caching mode page found
[  234.591579] sd 10:0:0:0: [sdf] Assuming drive cache: write through
[  234.614606]  sdf: sdf1
[  234.614685] sd 10:0:0:0: [sdf] Attached SCSI disk
[  247.181598] sd 10:0:0:0: [sdf] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=11s
[  247.181604] sd 10:0:0:0: [sdf] tag#0 Sense Key : Illegal Request [current] 
[  247.181607] sd 10:0:0:0: [sdf] tag#0 Add. Sense: Invalid command operation code
[  247.181609] sd 10:0:0:0: [sdf] tag#0 CDB: Read(6) 08 00 00 3f 08 00
[  247.181611] critical target error, dev sdf, sector 63 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
[  247.182059] sd 10:0:0:0: [sdf] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
[  247.182061] sd 10:0:0:0: [sdf] tag#0 Sense Key : Illegal Request [current] 
[  247.182063] sd 10:0:0:0: [sdf] tag#0 Add. Sense: Invalid command operation code
[  247.182064] sd 10:0:0:0: [sdf] tag#0 CDB: Read(6) 08 00 00 3f 08 00
[  247.182065] critical target error, dev sdf, sector 63 op 0x0:(READ) flags 0x0 phys_seg 4 prio class 2
[  247.182068] Buffer I/O error on dev sdf1, logical block 0, async page read
[  247.182071] Buffer I/O error on dev sdf1, logical block 1, async page read
[  247.182072] Buffer I/O error on dev sdf1, logical block 2, async page read
[  247.182074] Buffer I/O error on dev sdf1, logical block 3, async page read

smartctl -a /dev/sdf also fails without an explicit device type:

Read Device Identity failed: scsi error medium or hardware error (serious)

But works when -d usbcypress is specified:

$ sudo smartctl -a /dev/sdf -d usbcypress
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.1.55-1-MANJARO] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Scorpio Blue Serial ATA
Device Model:     WDC WD1600BEVT-00A23T0
Serial Number:    WD-WX21A30W4141
LU WWN Device Id: 5 0014ee 2aeef9e4c
Firmware Version: 01.01A01
User Capacity:    160 041 885 696 bytes [160 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    5400 rpm
Device is:        In smartctl database 7.3/5528
ATA Version is:   ATA8-ACS (minor revision not indicated)
SATA Version is:  SATA 2.6, 3.0 Gb/s
Local Time is:    Sun Oct 22 12:20:04 2023 EEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00)	Offline data collection activity
					was never started.
					Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0)	The previous self-test routine completed
					without error or no self-test has ever 
					been run.
Total time to complete Offline 
data collection: 		( 5580) seconds.
Offline data collection
capabilities: 			 (0x7b) SMART execute Offline immediate.
					Auto Offline data collection on/off support.
					Suspend Offline collection upon new
					command.
					Offline surface scan supported.
					Self-test supported.
					Conveyance Self-test supported.
					Selective Self-test supported.
SMART capabilities:            (0x0003)	Saves SMART data before entering
					power-saving mode.
					Supports SMART auto save timer.
Error logging capability:        (0x01)	Error logging supported.
					General Purpose Logging supported.
Short self-test routine 
recommended polling time: 	 (   2) minutes.
Extended self-test routine
recommended polling time: 	 (  68) minutes.
Conveyance self-test routine
recommended polling time: 	 (   5) minutes.
SCT capabilities: 	       (0x7037)	SCT Status supported.
					SCT Feature Control supported.
					SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   153   152   021    Pre-fail  Always       -       1316
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       178
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       62
 10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       106
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       60
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       396
194 Temperature_Celsius     0x0022   115   093   000    Old_age   Always       -       28
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   253   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   100   253   000    Old_age   Offline      -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

The above only provides legacy SMART information - try 'smartctl -x' for mor

edit: also tried adding amd_iommu=on iommu=pt to kernel cmdline, no effect…

Any ideas please?

My 2c,

…says it all, really.

echo 'blacklist ntfs3' | sudo tee /etc/modprobe.d/disable-ntfs3.conf

and reboot.

1 Like

It doesn’t seem to say much else besides that smartctl is unable to autodetect the device type. I tested in Linux Mint and the error message is the same. If I explicitly specify -d usbcypress as the device type, smartctl output is as expected.

As I said in the beginning, it works just fine in Windows 10 and Linux Mint. I am able to write data and read it back without errors.

Thank you for the suggestion, unfortunately no improvement :thinking:

How did you check? You sure you just couldn’t see the errors? Linux is much more verbose than Windows, so that you can actually know what’s going on without having to guess.

I compared the files to the originals with diff, cmp and md5sum

OK, so there were no resulting errors. AFAIK that still doesn’t mean the drive itself had no problems.

But anyway, please provide he output of:

sudo inxi --admin --verbosity=7 --filter --no-host --width

Edit:

Also, have you tried what @Wollie suggested:

1 Like

I guess it would be useful to know what exactly is happening here:

[  247.181598] sd 10:0:0:0: [sdf] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=11s
[  247.181604] sd 10:0:0:0: [sdf] tag#0 Sense Key : Illegal Request [current] 
[  247.181607] sd 10:0:0:0: [sdf] tag#0 Add. Sense: Invalid command operation code
[  247.181609] sd 10:0:0:0: [sdf] tag#0 CDB: Read(6) 08 00 00 3f 08 00
[  247.181611] critical target error, dev sdf, sector 63 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2

What is the “Illegal Request” / “Invalid command operation code” it’s trying to send; what’s the difference between 6.1.55-1-MANJARO and Linux Mint kernel 5.15.0-87 which apparently does not send such invalid commands? → In Linux Mint it works with no problems

OK, here are the relevant parts

  Kernel: 6.1.55-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc available: hpet,acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1-x86_64
    root=UUID=ad7ac688-5202-46f0-8b37-c45faf3452dd rw amd_iommu=on iommu=pt
    clearcpuid=514 apparmor=1 security=apparmor udev.log_priority=3

[...]

  ID-8: /dev/sdf maj-min: 8:80 vendor: Western Digital
    model: WD1600BEVT-00A23T0 size: 149.05 GiB block-size: physical: 512 B
    logical: 512 B type: USB rev: 2.0 spd: 480 Mb/s lanes: 1 mode: 2.0
    tech: HDD rpm: 5400 serial: <filter> scheme: MBR
  SMART Message: A mandatory SMART command failed. Various possible causes.

[...]

Thank you, just making sure. I really don’t know anymore, so all I can do is suggest that you run a SMART check on it:

sudo smartctl --test=short

…and when the test is finished provide the complete output of:

sudo smartctl --all /dev/sdf

…not just what’s in your opinion the relevant parts.

OK, here’s the full output

$ sudo smartctl --all /dev/sdf -d usbcypress
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.1.55-1-MANJARO] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Scorpio Blue Serial ATA
Device Model:     WDC WD1600BEVT-00A23T0
Serial Number:    WD-WX21A30W4141
LU WWN Device Id: 5 0014ee 2aeef9e4c
Firmware Version: 01.01A01
User Capacity:    160 041 885 696 bytes [160 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    5400 rpm
Device is:        In smartctl database 7.3/5528
ATA Version is:   ATA8-ACS (minor revision not indicated)
SATA Version is:  SATA 2.6, 3.0 Gb/s
Local Time is:    Sun Oct 22 13:39:06 2023 EEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00)	Offline data collection activity
					was never started.
					Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0)	The previous self-test routine completed
					without error or no self-test has ever 
					been run.
Total time to complete Offline 
data collection: 		( 5580) seconds.
Offline data collection
capabilities: 			 (0x7b) SMART execute Offline immediate.
					Auto Offline data collection on/off support.
					Suspend Offline collection upon new
					command.
					Offline surface scan supported.
					Self-test supported.
					Conveyance Self-test supported.
					Selective Self-test supported.
SMART capabilities:            (0x0003)	Saves SMART data before entering
					power-saving mode.
					Supports SMART auto save timer.
Error logging capability:        (0x01)	Error logging supported.
					General Purpose Logging supported.
Short self-test routine 
recommended polling time: 	 (   2) minutes.
Extended self-test routine
recommended polling time: 	 (  68) minutes.
Conveyance self-test routine
recommended polling time: 	 (   5) minutes.
SCT capabilities: 	       (0x7037)	SCT Status supported.
					SCT Feature Control supported.
					SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   153   152   021    Pre-fail  Always       -       1325
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       182
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       63
 10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       109
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       62
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       404
194 Temperature_Celsius     0x0022   114   093   000    Old_age   Always       -       29
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   253   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   100   253   000    Old_age   Offline      -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%        63         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

The above only provides legacy SMART information - try 'smartctl -x' for more

The only relevant difference compared to the output I posted at the beginning seems to be

82c81,82
< No self-tests have been logged.  [To run self-tests, use: smartctl -t]
---
> Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
> # 1  Short offline       Completed without error       00%        63         -

Well, I honestly don’t know anymore. Sorry.

:sob:

Perhaps someone else does

Thank you for trying, I appreciate it :pray:

Perhaps the older kernel in Linux Mint knows automatically to use some older usbcypress compatibility when connecting the device, which the newer kernel doesn’t provide anymore?

Even on Linux Mint, smartctl needs the argument -d usbcypress given explicitly for the command to finish, it doesn’t detect the type automatically. Could this be a clue?

You could just install an older kernel to test…:man_shrugging:

It might. However, to what…

:man_shrugging:

Is this recent issue Changes to default password hashing algorithm and umask settings possibly related?

Good idea :+1:

It works great with the linux419 -kernel (Linux 4.19.295-1)! The disk is mounted and everything is fine.

In addition to linux419, I tested these:

  • linux54 Linux 5.4.257-1 → only blank screen right after grub, doesn’t boot
  • linux510 Linux 5.10.197-1 → similar problems as with linux61 (Sense Key : Illegal Request [current])
  • linux515 Linux 5.15.133-1 → similar problems as with linux61

So now the problem seems to be… how to make linux61 connect it like linux419?

:man_shrugging:

I suspect this is related to the recent issue with NTFS/FAT/EXFAT external drives not being mounted; the in-kernel driver ntfs3 wasn’t working as expected in recent kernel versions.

The workaround was to reinstall ntfs-3g and blacklist the ntfs3 driver:

sudo pacman -S ntfs-3g
sudo bash -c 'echo "blacklist ntfs3" > /etc/modprobe.d/disable-ntfs3.conf'
# or, if you prefer:
echo 'blacklist ntfs3' | sudo tee /etc/modprobe.d/disable-ntfs3.conf

Thanks, I tried, but unfortunately no change after these (and reboot) - still the same errors in dmesg

[   42.346861] sd 10:0:0:0: [sdf] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
[   42.346863] sd 10:0:0:0: [sdf] tag#0 Sense Key : Illegal Request [current] 
[   42.346864] sd 10:0:0:0: [sdf] tag#0 Add. Sense: Invalid command operation code
[   42.346866] sd 10:0:0:0: [sdf] tag#0 CDB: Read(6) 08 00 00 3f 08 00
[   42.346867] critical target error, dev sdf, sector 63 op 0x0:(READ) flags 0x0 phys_seg 4 prio class 2
[   42.346870] Buffer I/O error on dev sdf1, logical block 0, async page read
[   42.346873] Buffer I/O error on dev sdf1, logical block 1, async page read
[   42.346874] Buffer I/O error on dev sdf1, logical block 2, async page read
[   42.346875] Buffer I/O error on dev sdf1, logical block 3, async page read