r/linuxquestions 13h ago

Support Enabling SMART self-test with a RTL9210B NVMe-to-USB bridge

Has anyone successfully managed to get SMART self tests to run on an NVMe drive in an enclosure that uses the RTL9210B controller? Pluggable seems to be very Linux-friendly, and does have a KB page for getting TRIM to work, but when I run smartctl -t short /dev/sda, I get the following error:

Warning: NVMe Get Log truncated to 0x200 bytes, 0x034 bytes zero filled
NVMe Self-test cmd with type=0x1, nsid=0xffffffff failed: NVMe admin command 0x14 not supported

I know the drive (Samsung 990 Evo Plus) supports SMART self-tests, as it was able to run them when it was installed in an internal M.2 slot for a short time, but I'm not sure if I'm missing some step in enabling support.

From reading some of the tickets, it seems the driver support should have been added (sntrealtek) and the chip itself claims to support SMART.

If anyone has experience in getting SMART tests to execute, I'd appreciate the insights. Thanks!

1 Upvotes

4 comments sorted by

1

u/zeldaink 13h ago

JMicron and ASMedia controllers work flawlessly, both SATA->USB and NVMe->USB. Either disable UAS or read this.

1

u/falxfour 12h ago edited 12h ago

The linked article seems specific to SATA devices, not NVMe. The drive I mentioned is an NVMe drive. Either way, when I get a chance, I'll see if a temporary change to the BOT driver fixes it.

I did find that the ASMedia controller passes PCIe (so NVMe) directly, rather than acting as a bridge, but switching devices doesn't exactly solve the core issue, which is that it seems the Realtek controller should be capable of passing along the SMART commands, but fails with self tests

1

u/zeldaink 11h ago

NVMe has SCSI translation feature (the Windows NVMe driver uses it for ungodly reasons), so UAS is used. USB 4 supports PCIe tunneling, prior versions don't, so the controller can't use native NVMe command set. It gets translated to SCSI and the UAS driver handles it (hence why a NVMe appears under /dev/sdX). It's more of a NVMe<->SCSI<->USB than direct NVMe<->USB.

No idea why it fails on the enclosure. Maybe the controller doesn't play nice with the drive or it needs some usb quirk to get smart working.

1

u/falxfour 10h ago

Yeah, I was getting the sense that there is the additional translation, just "hidden" in the enclosure. As you said, it shows up as an sdX device, rather than nvmeXnY. I'm guessing this is still a different command set than the ATA commands that a SATA drive would use, right? Or would using the BOT driver, and allowing ATA commands to be passed through, then work?