It is currently Mon Jul 23, 2018 10:30 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 15 posts ] 
Author Message
PostPosted: Thu Mar 29, 2018 6:14 am 
Offline
User avatar

Joined: Thu Sep 07, 2006 1:08 pm
Posts: 568
Location: United States
Yesterday I plugged in my 2TB external HD into my laptop's USB 2.0 port only for it to hang and keep giving me the "This Device can perform faster" message. It completely lagged my computer to a halt. So I decided to do a full format. I made sure the power settings would always give power to the USB ports. But eventually my USB drive would get interrupted (lose power?)

I read it could take 26 hours to do a full format on a 2TB drive. So I gave up and did a quick format.

What do you suggest? This drive is for completely backing up my files, which sometimes gets interrupted while doing so.

_________________
Ruling the World One Bean™ at a Time...


Top
 Profile  
 
PostPosted: Thu Mar 29, 2018 8:21 am 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 4056
Get a better external enclosure. Some of them just suck, and should not be used at all. I've made the mistake of just buying the cheapest one.
And if the external hard drive does not have a reliable connection, you need to force Windows to NEVER try to defrag the drive, otherwise you can lose everything during a botched defrag.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Thu Mar 29, 2018 9:02 am 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3435
Location: Mountain View, CA
Dwedit's advice is correct -- nagging Customer Support of the product for help, or buying a different product is really all you can do.

There are still many problems with XHCI (USB 3.0) and EHCI (USB 2.0) compatibility between mainboard chipsets and device chipsets, causing a slower negotiated protocol to be chosen (ex. EHCI instead of XHCI, or OHCI/UHCI (USB 1.1/1.0) instead of EHCI). I have several PNY USB 3.0 flash drives which cause the same message, despite their USB descriptor data clearly showing they support SuperSpeed (USB 3.0). Other USB 3.0 flash drives (and MHDDs for that matter) work just fine. I even have a couple USB 3.0 devices which, if plugged into a USB 3.0 port, don't show up on the bus at all -- voltage and current get applied but that's it. Same devices work fine on a USB 2.0/1.1/1.0 port.


Top
 Profile  
 
PostPosted: Thu Mar 29, 2018 9:20 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20292
Location: NE Indiana, USA (NTSC)
When you went through support for a USB peripheral you purchased, did the PC maker and the peripheral maker end up pointing fingers at each other?


Top
 Profile  
 
PostPosted: Thu Mar 29, 2018 1:26 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 4056
Good idea, use a usb 2.0 hub to prevent the usb 3.0 nonsense that all the cheap adapters fail it.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Thu Mar 29, 2018 4:41 pm 
Offline
User avatar

Joined: Thu Sep 07, 2006 1:08 pm
Posts: 568
Location: United States
tepples wrote:
When you went through support for a USB peripheral you purchased, did the PC maker and the peripheral maker end up pointing fingers at each other?

Was this directed at me? I never contacted any customer support. I feel like I'll get connected to some poor schmuck who has no idea what he's talking about.

Okay, what do you all use? Mine's a WD Elements. I admit, it was a good price compared to others. I'll bust out my old HP Personal Media Drive (but it's only 500GB). This one's a much bigger enclosure and requires external power, which brings me to my next question:

Are drives that require external power more secure? I would assume so because if it keep disconnecting and the USB is its power source I'd imagine it's more likely to get corrupted.

By the way, just found out it's called a portable hard drive if it's USB-powered, and that it's external hard drive if it requires external power. :?

Edit: "USB Device Not Recognized" :(

_________________
Ruling the World One Bean™ at a Time...


Top
 Profile  
 
PostPosted: Thu Mar 29, 2018 5:31 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3435
Location: Mountain View, CA
Jedi QuestMaster wrote:
Okay, what do you all use? Mine's a WD Elements. I admit, it was a good price compared to others.

I've had generally good success with WD Passport drives, specifically the 1TB models, using the included/provided USB 3.0 cable (which is quite short, and for a damn good reason -- longer cable tends to result in less current, which means the drive may have problems spinning up or operating). These drives also support proper SMART passthrough via SAT, which means you can do analysis of them similar to a SATA-connected hard disk without too much trouble. It's convenient for folks like myself. Not all SATA/USB bridge chipsets support this (in fact, many of them don't, others do so badly (semi-implemented), and others have been known to botch/corrupt CDB payload).

Additional reasons I like these drives: small, lightweight, contain a single platter (thus one pair of heads; read: fewer moving parts), are generally quiet and run tolerably cool, and finally, get really good throughput. They even implement SES, if you care about that sort of thing. I use mine as a workstation backup drive.

The reason I dislike these drives: they're native USB 3.0 -- there is no native SATA interface inside of the drive (there are some solder points which you can supposedly use to wire this up, but you have to de-solder some other traces to some chips and other nonsense), and are SED (i.e. use proprietary hardware-based AES encryption), which means data recovery on them is extremely difficult. For some, the latter is a pro, for others it's a con. And yes, before some sperglord mentions it, I'm quite familiar with this paper.

Off-topic: I did data recovery for a friend of GideonZhi's who had two different 2TB WD Passport drives -- one black/ultra, one silver -- and was able to recover all of his data on the silver but not the black. I semi-documented what all I did to achieve the recovery on the latter, and even did a little Twitch stream for it (which is where I figured out a workaround allowing me to fix the problem the drive was encountering). Had I not found that workaround + had some people on the HDDOracle forum and HDDGuru forum informing me of the mod32 patch, I wouldn't have been able to fix it. BTW: the HDDGuru forum is filled with actual data recovery professionals who intentionally try and sabotage independent recovery efforts (because it "infringes" on their business/impacts their ability to make money), so you will find in that thread people saying disparaging junk. HDDOracle was created by technically-competent recovery folks who enjoy helping, and who also keep the jerks away.

If you're using a USB/SATA enclosure of your choice + SATA MHDD of your choice, rule out MHDD problems by taking it out + hooking it up to a PC via native SATA. I've had very limited success with USB/SATA enclosures, but the few I've had success with I hold dear to me -- and all of them are enclosures which are USB 2.0 + companies have since gone out of business. There's one present-day exception though: I'm particularly fond of enclosures using ASMedia 1053E or 1153E chips (these don't use encryption and support proper SAT and SMART passthrough), such as those in the Plugable USB3-SATA-UASP1 dock -- note that Plugable seems to understand the importance of this, and in turn even lets you download alternate firmwares that have chipset-level features like auto-spindown removed entirely. Most enclosure vendors are just shipping repacked/rebadged Chinese junk with whatever chipset was available for cheapest on the market that day -- bleh.

I think Tepples (?) has asked me in the past for some kind of "authoritative list" of what enclosures are good. Yeah, not going to happen, for the reason I just mentioned. Literally impossible to track reliably. Plugable's USB3-SATA-UASP1 is the only product I've bought over the years (on multiple occasions) and got the same quality of product, though you can see even they changed chipsets at one point (from 1053E to 1153E).

Jedi QuestMaster wrote:
Are drives that require external power more secure? I would assume so because if it keep disconnecting and the USB is its power source I'd imagine it's more likely to get corrupted.

More current (power) has nothing to do with security. Did you mean "more reliable"? The answer is: sort of. You definitely don't want your HDD falling off the bus due to voltage ripple or (more common) variable current. This is why you should always hook your USB HDDs up to a USB port on the back of the computer if at all possible (these are guaranteed high-power ports), otherwise use an AC-powered hub. Or if the drive/enclosure offers a native AC power connection, use that. I talk about low-power vs. high-power ports here: viewtopic.php?p=215531#p215531

I know -- front-panel USB connectors are convenient and you want to plug your stuff in there for that reason. But more often than not they're low-power, or worse, "almost high-power" (they might provide enough to spin up, but heavy I/O might cause bus droppage). I've seen all sorts of madness over the years.

Jedi QuestMaster wrote:
By the way, just found out it's called a portable hard drive if it's USB-powered, and that it's external hard drive if it requires external power. :?

The terms are interchangeable. Whoever insisted upon that is pedantic in terminology and is focused on something that doesn't really matter. Sounds almost like a "gamer forum" type of point/argument. Ignore that nonsense.


Top
 Profile  
 
PostPosted: Thu Mar 29, 2018 7:47 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20292
Location: NE Indiana, USA (NTSC)
Jedi QuestMaster wrote:
tepples wrote:
When you went through support for a USB peripheral you purchased, did the PC maker and the peripheral maker end up pointing fingers at each other?

Was this directed at me? I never contacted any customer support.

That was toward koitsu's experience with support.


Top
 Profile  
 
PostPosted: Thu Mar 29, 2018 9:11 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3435
Location: Mountain View, CA
tepples wrote:
That was toward koitsu's experience with support.

It's not an experience I've actually had myself because I don't call support lines for consumer-grade storage products. That's because I'm also not like other people given my technical background and familiarity with storage.

But I have called support/filed support tickets before with consumer product vendors and gotten *amazing* support, so I always recommend people do it. Plus, if there's a ticket logged, usually that gets analysed later by management/analytics and "Hey, a lot of people called us about our Turdmaster 6000-24T since we made that one change to it 3 months ago... maybe we should look into it" conversations can/do happen.


Top
 Profile  
 
PostPosted: Thu Mar 29, 2018 9:36 pm 
Offline
User avatar

Joined: Thu Sep 07, 2006 1:08 pm
Posts: 568
Location: United States
koitsu wrote:
If you're using a USB/SATA enclosure of your choice + SATA MHDD of your choice, rule out MHDD problems by taking it out + hooking it up to a PC via native SATA.

I'll try that with my HP drive; if it still works. :?

koitsu wrote:
More current (power) has nothing to do with security. Did you mean "more reliable"? The answer is: sort of. You definitely don't want your HDD falling off the bus due to voltage ripple or (more common) variable current.

I think the term I meant was safety. Like am I safer living in Southern California or Bangladesh... where natural disasters happen every year? Is my data safer powered externally? Isn't prematurely disconnecting a USB-powered drive more prone to bad sectors than an AC-powered unit?

koitsu wrote:
I know -- front-panel USB connectors are convenient and you want to plug your stuff in there for that reason.

I only have side USB ports--two on the left, one on the right for my mouse. (this is a laptop) Are these not that good?

Edit: By the way, I do have a SATA port. :mrgreen:

_________________
Ruling the World One Bean™ at a Time...


Top
 Profile  
 
PostPosted: Thu Mar 29, 2018 10:44 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3435
Location: Mountain View, CA
Jedi QuestMaster wrote:
I think the term I meant was safety. Like am I safer living in Southern California or Bangladesh... where natural disasters happen every year? Is my data safer powered externally? Isn't prematurely disconnecting a USB-powered drive more prone to bad sectors than an AC-powered unit?

To answer both questions directly: no, and no.

Can I ask what is making you think there's a relationship between unreadable LBAs ("bad sectors") and power/current source (AC vs. USB bus)? Maybe there's something about general HDD technology I can clear up for you.

One thing you should be doing universally, to guarantee filesystem integrity (has nothing to do with unreadable LBAs though) + all data cached by the kernel has been fully flushed to the USB HDD, is (speaking of Windows here -- Linux, FreeBSD, OS X, etc. all have some equivalent of this) use the systray icon that lets you "Safely Eject" the device. Do not just pull the USB cord out of the port when done with the drive. This has nothing to do with HDD technology (it applies to anything; SD cards, CF cards, SSDs, flash drives, whatever) but more to do with how filesystems and block devices work overall (there are always layers of caching involved, both in the OS in several ways/layers, as well as on the HDD itself). If you fail to do this, you risk filesystem corruption and/or lost data.

Edit: additional point I want to make: in general -- and I classify this under section "being nice to your hardware" -- I recommend doing "Safely Eject" and then waiting a full ~10 seconds to give the device a chance to fully shut down (think about device/drive firmware and what it's doing independent of the system OS). I do this with MHDDs particularly, since it gives them time to spin down; my WD Passport drive actually slowly/steadily blinks its white I/O access LED when it's truly/safely ready to be unplugged. But the same could apply to an SSD or flash drive, for example, if it hasn't completed writing all data in its cache (on the PCB) to the physical media; SSDs for example tend to retain power for several seconds even after they're physically unplugged (this is by design, BTW -- ask if you want details). ATA and SCSI protocol actually has commands that are supposed to guarantee this (ATA = FLUSH CACHE and FLUSH CACHE EXT, SCSI = SYNCHRONIZE CACHE), and most OSes submit those commands to a device prior to indicating it can be removed, but believe it or not, some controllers (hardware RAID controllers are particularly bad about this) and devices themselves (e.g. device firmware) don't fully complete doing that for several seconds. You can read about that here: https://en.wikipedia.org/wiki/Disk_buffer .

Another reason to let things "settle" for several seconds, particularly for MHDDs, is to give the spindle motor a chance to fully stop before physically transporting/moving the drive (this could cause "bad sectors" if the heads were to physically touch the platters). By waiting several seconds, the actuator arm, thus drive heads, should already be placed in the landing zone so they won't hit the platters if the drive is jostled. So especially with MHDDs: be patient! With laptops, it's pretty amazing how often people toss them around while powered on, as well as immediately after being powered off (before the arm has a chance to be positioned over the LZ) (e.g. power down the system, screen goes blank, person immediately tosses laptop into a backpack -- an MHDD almost certainly has not fully stopped yet!). G-shock sensors in 2.5" MHDDs are incredibly sensitive for this exact reason.

Jedi QuestMaster wrote:
I only have side USB ports--two on the left, one on the right for my mouse. (this is a laptop) Are these not that good?

It depends on how the motherboard manufacturer/vendor decided to implement things. It may be that one connector is high-power while the other is low-power. 99% of the time user manuals don't disclose this. So how do you figure it out?

Windows Device Manager can actually show you this when doing a Properties on some types of USB root hubs, showing you how much power draw there was via the device itself. But it depends on USB drivers (i.e. chipset drivers) for example, it usually looks like this, but on my current Windows 7 workstation with a Z270 Express chipset using Intel's own drivers, I do not get this tab (Power tab != Power Management tab). Anyway, as you can see in the screenshot, "Total power available" would essentially answer your question (100mA = low power, 500mA = high power, and 900mA would be high power but USB 3.0). You had to go digging around to get this info though (lots of clicking), rather than just in one convenient place...

If the USB drivers don't provide this natively, then the only solution you have is to use a third-party utility from NirSoft called USBDeview which will disclose power draw amount in a column called "Power" (gotta scroll pretty far horizontally to find it, or toggle off a ton of columns like I did). This addresses the above convenience "issue" too. However, be sure to read the "Known Issues" section of that web page. I've also read that some devices can draw more than they claim, which is somewhat true on some level, but it just depends on the device. USB 3.0 high power devices are supposed to pull up to 900mA at maximum, though there are some chipset vendors who advertise being able to draw more than that (the spec, AFAIK, doesn't allow for it though). Specification details (see chart): https://en.wikipedia.org/wiki/USB#Power

Here is a screenshot demonstrating the different devices I have attached to my workstation on different USB ports, and using different USB protocol versions: https://imgur.com/a/4oWob -- I even attached my WD Passport 1TB drive to demonstrate (it's connected to a front-panel USB 3.0 port on my desktop -- it just so happens the front/top panel USB 3.0 ports are high power. The USB 2.0/1.1/1.0 ports, however, probably aren't -- I have nothing attached to them right now).

I should be clear about these values shown: they do not represent the "active power draw" (as in, some kind of dynamically changing value like you would expect for, say, temperature or voltage) -- they represent what has been negotiated per USB protocol at the time based on USB class and USB protocol standards. There is an actual descriptor field in the USB protocol that refers to maximum power draw. As you can see, some devices advertise 98mA (rather than 100mA) and so on. My reaction to that (deviations of 2mA etc.): "uh, okay, whatever".

Laptops are also somewhat special because they may actually drop their maximum current capability down to something lower (500mA --> 100mA) based on battery life, as well as if the laptop is actively powered via AC or not -- same goes for if it's attached to a dock, and if the dock is AC powered or not. I really don't care to deal with laptops for this reason amongst a billion others. Everyone's use cases + needs + environments + finances are different though.


Top
 Profile  
 
PostPosted: Fri Mar 30, 2018 9:08 pm 
Offline
User avatar

Joined: Thu Sep 07, 2006 1:08 pm
Posts: 568
Location: United States
Damn, this enclosure was not meant to be opened! Ever. :x https://www.ifixit.com/Answers/View/400 ... +enclosure

Anyway, under Device Manager, I see 8 USB Root Hubs. Under Properties, they all say "The hub is self-powered." "Total power available: 500 mA per port"

first one: USB composite device, 5 ports available
second: 2 ports available
third: 2 ports available
fourth: USB composite device, 1 port available
fifth: HID-compliant mouse 100mA, 1 port available
sixth: 2 ports available
seventh: 2 ports available
eighth: 6 ports available

Besides the mouse taking up 100 milliamps, what does this all mean?

Also, thanks for all the help!

_________________
Ruling the World One Bean™ at a Time...


Top
 Profile  
 
PostPosted: Fri Mar 30, 2018 9:38 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3435
Location: Mountain View, CA
It means they're all USB root devices that support up to 500mA of power draw (for USB 2.0/1.1/1.0). So, if your USB MHDD when attached draws 500mA or thereabouts, then it should ideally work fine. If the enclosure uses AC power (via an AC adapter), then use that, because it certainly provides more than 500mA and the drive may need >500mA -- in this scenario, it doesn't matter what the current/power draw at the USB layer is because for the MHDD itself it's all being provided via the AC adapter.

Regarding disassembling the enclosure: remember what I said about SEDs above. I hope the enclosure doesn't use encryption, otherwise you won't be able to access any of the data on the drive. If Windows at any time gives you a message like "You need to format the disk in drive Z: before you can use it. Format it?", OBVIOUSLY DO NOT. SEDs are encrypted and thus direct I/O to the drive will return jibberish for all LBAs, so the OS has no way of knowing how to decrypt it, thus to it the partition table looks corrupted; there's little you can do about this (sadly forced to use the enclosure that it was in). Sometimes you can buy another identical device/enclosure and put the disk into it and bam, you're good. It has to be the same model and revision though! Else if the SATA/USB bridge chip changed, then you risk losing all the data on the drive. I can talk more about why this happens if asked -- it has to do with how SEDs work (the Wikipedia article goes into the details).

I don't usually use Windows much for this type of troubleshooting, because the OS tends to issue all sorts of I/O to a drive upon attachment. FreeBSD, Linux, etc. tend to not do this -- for ATA they tend to issue IDENTIFY to get details of the drive, then do what's called "tasting" (reading MBR and/or GPT; LBA 0 (MBR) or LBAs 0-34 (GPT primary) or the last 34 LBAs of the disk (GPT backup) for partition table data), but that's about it. Windows on the other hand tries to do all sorts of madness including mounting filesystems and so on, so if there's an unreadable LBA -- especially one which causes the device to lock up/stall indefinitely, or maybe even tickle a firmware-level bug (similar to what I dealt with for GideonZhi's friend) -- then there's not much you can do about it. This is why I tend to use non-Windows OSes for this type of work.

But, if it **is** readable/usable via native SATA, and you can access data on it, then I can suggest issuing a SMART selective scan of all LBAs on the drive to see if they're all readable. This is done by the drive firmware itself, not by the OS (the command is issued by the OS though), and progress monitoring/etc. varies per drive model. I don't have much experience with HP drives. If the selective scan fails, it'll abort and usually give an indicator in the SMART error log of what LBA failed to be read. But there's no sense in me going into great lengths talking about data recovery this early.

P.S. -- I didn't get an answer to my earlier question, so I'll repeat it: Can I ask what is making you think there's a relationship between unreadable LBAs ("bad sectors") and power/current source (AC vs. USB bus)? Maybe there's something about general HDD technology I can clear up for you.


Top
 Profile  
 
PostPosted: Fri Mar 30, 2018 10:28 pm 
Offline
User avatar

Joined: Thu Sep 07, 2006 1:08 pm
Posts: 568
Location: United States
koitsu wrote:
P.S. -- I didn't get an answer to my earlier question, so I'll repeat it: Can I ask what is making you think there's a relationship between unreadable LBAs ("bad sectors") and power/current source (AC vs. USB bus)? Maybe there's something about general HDD technology I can clear up for you.

Because you're so insistent:

Quote:
Causes of Soft Bad Sectors

Soft bad sectors are caused by software issues. For example, if your computer suddenly shuts off due to a power outage or a pulled power cable, it’s possible that the hard drive may have shut off in the middle of writing to a sector. In some cases, it’s possible for sectors on the hard drive to contain data that doesn’t match their error-correction code — this would be marked as a bad sector. Viruses and other malware that messes with your computer could also cause such system issues and cause soft bad sectors to develop.

https://www.howtogeek.com/173463/bad-se ... -about-it/

_________________
Ruling the World One Bean™ at a Time...


Top
 Profile  
 
PostPosted: Sat Mar 31, 2018 2:37 am 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3435
Location: Mountain View, CA
Jedi QuestMaster wrote:
https://www.howtogeek.com/173463/bad-sectors-explained-why-hard-drives-get-bad-sectors-and-what-you-can-do-about-it/

Thanks! Whoever wrote that is out of their mind; there is no such thing as a "soft" bad sector, and it certainly has no correlation to power loss. They're using "soft" and "hard" terms because those actually come from memory (RAM), where there really are "soft" and "hard" errors (soft = temporary, where subsequent attempts work fine, i.e. a flaky bit; hard = permanent, where all attempts fail, i.e. reliably busted). But based on their weird description, I think they're trying to describe what I call "suspect" LBAs/sectors. I'll try to explain, with some background.

The data contained in an actual sector (either 512 bytes or 4KBytes) -- which an LBA correlates with, just not always 1:1 due to remapping that can happen -- does contain ECC data alongside the raw data written. The ECC implementations tend to be of varying algorithms (depends on vendor, drive age, blah blah), usually Hamming type or Solomon-Reed. Going off of memory here, but there's something like 64 bytes of ECC used data per 512-byte sector, and 128 for 4K sectors. Someone much smarter than me and more familiar with math can probably figure out the exact amounts, but again going off of memory, I think with 512-byte sectors ECC can correct up to something like 24 bits of data, and with 4K it can correct twice that amount. Correlating ECC values are written at the same time as raw data. I think there's a paper released by Toshiba somewhere with details; Google around a bit.

Is it possible that one could end up writing only a portion of raw data and/or ECC, thus in effect, having a "partially written" sector? Sure. ECC is used on an LBA read operation (and there are some vendor-specific ATA commands that can actually do a read that bypasses the ECC region). If the (effective) checksum calculation doesn't match what's in the ECC region, depending on the number of bit errors, the drive can auto-correct this. I can't speak for all drives, but this is tracked in SMART attribute 1 (Raw_Read_Error_Rate).

Is it possible there are too many errors thus ECC cannot correct it? Again, sure. However, in this case, the sector *is not* marked as "bad" -- in the fashion that you think -- but rather is marked (what I call) "suspect". Drive firmwares have all sorts of retry algorithms and heuristics to minimise this situation because what it ultimately means is data loss. Once a sector is marked "suspect" the data there can't normally be obtained. Anyway, the algorithms and heuristics vary TREMENDOUSLY across vendors, drive models, and firmware versions. It's the most common variance point there is.

Anyway, in this situation, the LBA that maps to that physical sector, when read, will return an I/O error. These types of LBAs are tracked in SMART attribute 197 (Current_Pending_Sectors). The drive will re-evaluate if the physical sector is usable (i.e. was this some sporadic error or is it reproducible?) when the LBA is written to. I've heard rumours that some MHDDs actually do this in the background when the drive is idle for long periods of time, but I've never actually seen such in practise -- I've only seen it happen when the OS issues a write command to said LBA. If the re-evaluation done during a write fails, the drive then marks that physical sector as bad (SMART attribute 5 and 196 get incremented), and the LBA is mapped to a spare sector from that point onward, and the drive writes the data there from then on. If the re-evaluation done during a write is *successful*, the sector is marked usable -- i.e. no remapping happens -- and attribute 197 is decremented.

SMART attribute 198 (Offline_Uncorrectable) is also sometimes involved in severe outcome situations like the above -- but for both reads and writes -- but this more commonly indicates an actual mechanical problem with the drive and not "a problem with a sector" per se.

Also: there's also a lot of stuff that goes on under the hood too, such as some drives storing a kind of "sector history" in general-purpose log regions on the drive (space dedicated for these purposes is limited, but can vary from anywhere between 1 and 100 sectors or so). This helps with analysis decisions by the firmware. MHDD firmware today is *INSANELY* complicated -- sadly, long gone are the days of the "do what the OS says and stay out of the way" approach, instead vendors keep adding all this extra stuff. Sometimes that stuff is great and increases reliability, other times the stuff is a huge problem and gets in the way of what should be a pretty obvious true bad sector situation. Tricky ones are ones like what I dealt with, where a drive was functional for 6-7 seconds after powering on, but then went totally catatonic; all those brains in the firmware certainly can have or result in bugs, case in point. :P

BTW: don't confuse the above type of ECC with that used in RAM (i.e. cache) -- which some MHDDs and SSDs use (many do not however) -- or with some ECC algorithms used by certain manufacturers that allow for auto-detection and correction of certain kinds of data "local" to the drive (i.e. data written to the cache by the OS was fine, but when read from the cache to write to a physical sector, the data was corrupt -- this is usually the sign of bad cache/RAM on the MHDD itself). One company that has historically done this is, believe it or not, HP -- at least in their "enterprise" drives, dunno about consumer stuff. This is tracked in SMART attribute 184 (End-to-End_Error). HP published a paper on it at one point -- they call it "SMART IV" (again, Google around to find the paper).

So, there is no such thing as a "soft bad sector". Whoever wrote that article tried to explain the above probably without having familiarity with actual MHDD operation. This type of crap has become commonplace on the Internet these days. I rant about it here (bottom of page, "An opinionated footnote" -- the rest of the article has nothing to do with what we're discussing here).

I swear, I've done write-ups like this one/this post so many times in my life that I feel like I'm a broken record. What I can never get, however, is confirmation of behaviour from actual MHDD engineers/vendors -- nobody talks about this stuff because NDAs, intellectual property, blah blah blah. Some of the people who know for sure work in the data recovery industry (and were previously employees at MHDD vendor companies). It's really too bad, because there's a lot of bullshit information out there these days. Sigh, "enthusiasts" and gamers... :/ So how do I know it? Working with drives and ATA protocol for a while, combined with doing freelance/amateur data recovery (and no, I don't do hardware-level stuff, i.e. I don't work in clean rooms).

smartmontools' Wiki page actually has a write-up on how some of this works in one fashion or another if you're interested. Most of the information though comes from circa 2003-2005, so things today are more complicated. However, the document quickly crosses into the filesystem arena, which is obviously relevant but makes understanding drive behaviour more complicated. And remember: SCSI is *completely* different from ATA in several regards (especially bad sector management), everything above is in regards to ATA drives. https://www.smartmontools.org/wiki/BadBlockHowto


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group