Can the SATA-to-USB adapter affect the result of the bad sectors scan? ( lemmy.world )

Hi, I am planning to purchase a 2.5-inch HDD. If I connect it to my computer using a SATA to USB adapter instead of directly to the computer's SATA, can it somehow affect the result of this scan?

I apologize for my ignorance but I couldn't find an answer to this question anywhere

hendrik ,

Not under normal circumstances. I had some issues recovering damaged harddisks that had lots of errors and retries and sometimes either the USB adapter or the mainboard SATA would crap out or handle it better. But for normal copying of HDDs, both should copy the exact same data.

Cooljimy84 ,
@Cooljimy84@lemmy.world avatar

I second this, when a drive shits the bed a sata controller handles it better, some times with a USB adapter you mess the whole bus up and need a reboot of the machine (from using them on windows experience)

just_another_person ,

What you're describing is data TRANSFER. Bad sector detection and management is done by the drive controller firmware.

lemann ,

Probably not.

However, not all USB to SATA adapters support SMART, so even if there is a bad sector that gets remapped by the HDD on-the-fly (and thus does not show up in the software scan), you may not find out easily

Longpork3 ,

smartmontools has some good functionality for interfacing with SMART via usb bridges that do not provide native functionality.

remotelove ,

Maybe? Bad cables are a thing, so it's something to be aware of. USB latency, in rare cases, can cause problems but not so much in this application.

I haven't looked into the exact ways that bad sectors are detected, but it probably hasn't changed too much over the years. Needless to say, info here is just approximate.

However, marking a sector as bad generally happens at the firmware/controller level. I am guessing that a write is quickly followed by a verification, and if the controller sees an error, it will just remap that particular sector. If HDDs use any kind of parity checks per sector, a write test may not be needed.

Tools like CHKDSK likely step through each sector manually and perform read tests, or just tells the controller to perform whatever test it does on each sector.

OS level interference or bad cables are unlikely to cause the controller to mark a sector as bad, is my point. Now, if bad data gets written to disk because of a bad cable, the controller shouldn't care. It just sees data and writes data. (That would be rare as well, but possible.)

What you will see is latency. USB can be magnitudes slower than SATA. Buffers and wait states are causing this because of the speed differences. This latency isn't going to cause physical problems though.

My overall point is that there are several independent software and firmware layers that need to be completely broken for a SATA drive to erroneously mark a sector as bad due to a slow conversion cable. Sure, it could happen and that is why we have software that can attempt to repair bad sectors.

Mountain_Mike_420 ,

Should be fine. Think of all the usb storage devices like senate and western digital. They all operate with a very similar adapter. The firmware on the drive should mark bad sectors not the interface that connects it.

bruhbeans ,

Well, as I'm coming in here, I see two "no's," a "maybe" and I came to say "absolutely fucking yes" because I've lost hours to a couple cheap shitty usb-sata cables that did all kinds of weird stupid shit that immediately disappeared after I replaced the cables. So, "maybe" but "absolutely fucking yes."

remotelove ,

Did you get bad sectors? Weird things can absolutely happen but having sectors marked as bad is on the exceptional side of weird.

richmondez ,

That won't cause bad sectors though, that just means the data you were writing was bad.

possiblylinux127 ,
@possiblylinux127@lemmy.zip avatar

Not to my knowledge

tal ,
@tal@lemmy.today avatar

Yes. I wouldn't be preemptively worried about it, though.

Your scan is going to try to read and maybe write each sector and see if the drive returns an error for that operation. In theory, the adapter could respond with a read or write error even if a read or write worked or even return some kind of bogus data instead of an error.

But I wouldn't expect this to likely actually arise or be particularly worried about the prospect. It's sort of a "could my grocery store checkout counter person murder me" thing. Theoretically yes, but I wouldn't worry about it unless I had some reason to believe that that was the case.

catloaf ,

If you're buying used and want to check the health of the drive, you should run a SMART test and check the current SMART data. Most USB controllers do not support that.

cm0002 ,

A simple scan is fine, but to actually image a dying drive for recovery purposes, you should absolutely be doing a direct connection

Ptsf ,

Any poor quality connector can affect a sector scan and drive performance. Doesn't matter if it's connected to a corroded usb port or a bent internal sata, at the end of the day if you're getting disk errors it's best to measure using two methodologies/data pathways.

brickfrog ,

Should be fine, just don't cheap out on the external drive / cable you will be using. And when you're using something like smartctl you'll know right away if SMART info is passing through your USB for proper testing.

I've done a lot of these type of scans via USB drives, honestly the more annoying part is that some USB drives do wonky things like go into sleep mode within 1-5 minutes which will disrupt any sort of scanning you had going. So with USB drive scanning I usually implement something to keep the drive alive and awake e.g. a simple infinite loop script to write a file every x seconds, or if you're on windows you can also use KeepAliveHD.

sarkxy ,

If the USB port doesn't provide enough power constantly it might have an influence. If you are on a desktop type computer use the ports on the back that are directly connected to the main board.

MonkderDritte , (edited )

I don't think it does. Though my udev rules don't work on it, since only the adapter controller is exposed to udev. But smartctl works fine. smartctl-detect script as a workaround, if the controller shows up.

About power, the HDD either gets enough or it doesn't spin at all, makes clicking noises. I have the same adapter and it's only good for SATA-SSDs (they draw less), normal slim 2,5" HDD need additional power.

In short, no, get an adapter with two cables or power plug. Or maybe, if something like this exists, one with USB-C, that should pull enough (but read the specs).

Btw, mine has now >100 "time in under-temperature" warnings, because it isn't in warm case on spin-up i guess. But it doesn't do any damage in this case.

jabjoe ,
@jabjoe@feddit.uk avatar

I can only speak of on Linux. If you know the disk is bad, clone it, with ddrescue, and fix the clone. But in future RAID and backup remotely. Also, next gen filesystems like ZFS and Btrfs for check sums and self healing and subvolumes with send/receive deltas between them.

Decronym Bot , (edited )

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
NAS Network-Attached Storage
RAID Redundant Array of Independent Disks for mass storage
SATA Serial AT Attachment interface for mass storage
SSD Solid State Drive mass storage
ZFS Solaris/Linux filesystem focusing on data integrity

5 acronyms in this thread; the most compressed thread commented on today has 8 acronyms.

[Thread for this sub, first seen 29th Jun 2024, 09:15]
[FAQ] [Full list] [Contact] [Source code]

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • kbinchat
  • All magazines