Author Topic: HDDs and badblocks corrupt downloaded files?  (Read 18341 times)

0 Members and 1 Guest are viewing this topic.

Offline classicsamus87Topic starter

  • Regular Contributor
  • *
  • !
  • Posts: 97
  • Country: br
HDDs and badblocks corrupt downloaded files?
« on: October 01, 2020, 04:30:07 pm »
What is the name of the function present in HDDS that automatically allocates, isolates and prevents downloaded and transferred files from being saved in bad sectors (badblock) of HDDs? is this function present in year 2000 HDDs?
« Last Edit: October 01, 2020, 04:36:48 pm by classicsamus87 »
 

Offline classicsamus87Topic starter

  • Regular Contributor
  • *
  • !
  • Posts: 97
  • Country: br
Re: HDDs and badblocks corrupt downloaded files?
« Reply #1 on: October 01, 2020, 07:39:48 pm »

I have an HDD from the year 2000-2003 and this HDD has some badblock, so I downloaded some important files on that HDD and copied it to the DVD so I thought these files were saved and corrupted in these defective sectors of the HDD then copied to the DVD so I wanted to find out the name of this function, where this function is located
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3043
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: HDDs and badblocks corrupt downloaded files?
« Reply #2 on: October 01, 2020, 10:38:21 pm »
Both the OS and drive's firmware may flag sectors on the disk as bad, or rather in the case of the firmware remap them to spare sectors transparently to the OS.

S.M.A.R.T may expose the sector reallocation count from the firmware, S.M.A.R.T was developed in the late 90s, so your year 2000 drive may well have it.

If what you are asking is "can I scan this drive, find bad sectors, mark them as bad, and use the good sectors only", then, yes but don't bother, your drive is failing, replace it.



~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline classicsamus87Topic starter

  • Regular Contributor
  • *
  • !
  • Posts: 97
  • Country: br
Re: HDDs and badblocks corrupt downloaded files?
« Reply #3 on: October 02, 2020, 12:38:37 am »

I thought that SMART was only diagnostic and did not relocate and block bad sectors from being used to receive files downloaded from the internet
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3043
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: HDDs and badblocks corrupt downloaded files?
« Reply #4 on: October 02, 2020, 01:44:42 am »
You are correct that S.M.A.R.T is diagnostic.

"Relocating" is done in the firmware.  You can't access the firmware.
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline classicsamus87Topic starter

  • Regular Contributor
  • *
  • !
  • Posts: 97
  • Country: br
Re: HDDs and badblocks corrupt downloaded files?
« Reply #5 on: October 02, 2020, 09:34:36 am »
does this firmware relocation technology have a name? is it embedded in SMART?
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10226
  • Country: nz
Re: HDDs and badblocks corrupt downloaded files?
« Reply #6 on: October 02, 2020, 10:39:26 am »
I've seen it called a few things

"Sector reallocation"
"Reserved sectors"
"Reserved sector pooling"



Basically how it works is, it marks a sector as "pending" reallocation whenever it has trouble reading that sector.
You can see the number of sectors in this state in SMART, it's called Pending Reallocation Count.

If it ever gets a successful read of data at a sector that is marked "pending" (or your overwrite the sector) then it completes the reallocation and stores that data in a new sector that has been allocated to replace the bad one.

If you have a drive that has pending sectors and want to force them all to reallocate you can completely erase the drive with zeros. That will allow it to reallocate them.
If the drive has pending sectors that keep giving errors when you try access those files then drive will keep trying to read them over and over again hoping that one attempt will succeed so it can do the reallocation.
« Last Edit: October 02, 2020, 10:53:28 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7549
  • Country: 00
  • +++ ATH1
Re: HDDs and badblocks corrupt downloaded files?
« Reply #7 on: October 02, 2020, 11:00:42 am »
What ever the name you're looking for, point is, no, you can not access those function as you wanted as its hidden from user, period.
« Last Edit: October 02, 2020, 11:09:38 am by BravoV »
 
The following users thanked this post: Ysjoelfir

Offline classicsamus87Topic starter

  • Regular Contributor
  • *
  • !
  • Posts: 97
  • Country: br
Re: HDDs and badblocks corrupt downloaded files?
« Reply #8 on: October 02, 2020, 03:34:46 pm »

Is this function present in SMART or in the HDD firmware?
 

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 8051
  • Country: gb
Re: HDDs and badblocks corrupt downloaded files?
« Reply #9 on: October 02, 2020, 03:54:59 pm »

Is this function present in SMART or in the HDD firmware?

As was already explicitly stated, in the firmware. .. which is where SMART is, too - it's just a semi-standardised interface.

It's a fundamental, unalterable component of how modern (read: since the mid 1980s) drives work, there's no reversing it or interfering with it.
 
The following users thanked this post: Ysjoelfir

Offline classicsamus87Topic starter

  • Regular Contributor
  • *
  • !
  • Posts: 97
  • Country: br
Re: HDDs and badblocks corrupt downloaded files?
« Reply #10 on: October 02, 2020, 04:13:59 pm »

I will not change anything in the firmware I just want to understand if this function has a name or is it just SMART
 

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 8051
  • Country: gb
Re: HDDs and badblocks corrupt downloaded files?
« Reply #11 on: October 02, 2020, 04:16:35 pm »

I will not change anything in the firmware I just want to understand if this function has a name or is it just SMART

Again, SMART is a diagnostics interface.

The function is simply called 'error handling' - block reallocation is just one outcome of a read or write error.
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7549
  • Country: 00
  • +++ ATH1
Re: HDDs and badblocks corrupt downloaded files?
« Reply #12 on: October 02, 2020, 05:04:07 pm »

I will not change anything in the firmware I just want to understand if this function has a name or is it just SMART

You can NOT change the firmware, even if you want to, except you're working at the HD manufacturer at the technical department that have the knowledge specific in that area.

What ever function that you're looking for like sector error, reallocation and etc, is just the generic terms in magnetic disk storage technology.

SMART is just a reporting, see it as like your car's dashboard, it tells you your fuel level, engine temperature, speed and etc.

What are you asking is like how the gear change and drive the wheels, or what the route of the fuel pipe from the tank to the engine, your dashboard (SMART) does NOT show you that information.

Even you know how the gear changes or how the fuel pipe route to engine, it does NOT mean you can access/repair that, unless you are QUALIFIED car technician specifically for that car model, in this case the HD manufacturer's technical staff only.

And again, NO ... you can not easily find that information on Google, that you think once you found it, you can do/fix/change the fuel routing yourself in your car, forget it.

I guess you have trouble understanding English ?

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 8051
  • Country: gb
Re: HDDs and badblocks corrupt downloaded files?
« Reply #13 on: October 02, 2020, 05:18:24 pm »
Even you know how the gear changes or how the fuel pipe route to engine, it does NOT mean you can access/repair that, unless you are QUALIFIED car technician specifically for that car model

 :-DD
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17134
  • Country: us
  • DavidH
Re: HDDs and badblocks corrupt downloaded files?
« Reply #14 on: October 03, 2020, 04:28:09 am »
The way it currently works is that when the hard drive finds an unrecoverable bad sector, it tells the OS and internally flags that sector for "pending reallocation", but it does *not* reallocate that sector until it is written.  So to clear the bad sectors from a drive, you need to write to them which tells the drive that the data they contain is no longer required and a spare sector can be substituted.

If you were running RAID, then the RAID controller would recover the data from the other disks and then write that data back to the bad sector causing the drive to remap it.
 

Offline helius

  • Super Contributor
  • ***
  • Posts: 3675
  • Country: us
Re: HDDs and badblocks corrupt downloaded files?
« Reply #15 on: October 03, 2020, 07:31:24 am »
There are different policies: Reallocate On Write, Reallocate on Read, and options like Error Read Retries and Transfer Data On Error. The SCSI-3 standard specifies which parameter bits affect those policies (which applies to SAS drives).
P-ATA/S-ATA are simpler and tend to have fewer user-facing options. As a rule, they don't even have a write-protect capability, which is always annoying for data recovery.
 

Offline classicsamus87Topic starter

  • Regular Contributor
  • *
  • !
  • Posts: 97
  • Country: br
Re: HDDs and badblocks corrupt downloaded files?
« Reply #16 on: October 03, 2020, 09:44:54 am »

It is very bad HDD manufacturers do not show more information do not say the name of this function present in the firmware
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8766
  • Country: fi
Re: HDDs and badblocks corrupt downloaded files?
« Reply #17 on: October 03, 2020, 09:55:31 am »

It is very bad HDD manufacturers do not show more information do not say the name of this function present in the firmware

Seems like a completely random fixation for you.

They don't publish names of any other internal implementation details either. That can be anything on their internal documentation and codebase, like Bob The Reallocator, a.k.a. The Good Ol' Robert, who knows, and why does it matter?
« Last Edit: October 03, 2020, 09:57:24 am by Siwastaja »
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7549
  • Country: 00
  • +++ ATH1
Re: HDDs and badblocks corrupt downloaded files?
« Reply #18 on: October 03, 2020, 10:47:57 am »
It is very bad HDD manufacturers do not show more information do not say the name of this function present in the firmware

Agree, and remember that, do NOT buy any HDD from the manufacturer that does not provide that.  :-DD

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3043
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: HDDs and badblocks corrupt downloaded files?
« Reply #19 on: October 03, 2020, 12:45:02 pm »

It is very bad HDD manufacturers do not show more information do not say the name of this function present in the firmware

I really don't understand your question.

I think there must be some sort of X-Y problem here ( https://en.m.wikipedia.org/wiki/XY_problem ).

What exactly do you want to achieve with such information?  You can't access the firmware, even if you could it's not like knowing 'the name of the function' would be of any use to you.   If you are trying to recover data maybe google bad sector data recovery software.  Ultimately bad sectors are bad, if you manage to get data off it at all, it's not going to be in good shape.

For all you know the sectors went bad after the data was written,  it's a 20 year old hard drive which you knew already had badblocks, it was in it's death throes.
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17134
  • Country: us
  • DavidH
Re: HDDs and badblocks corrupt downloaded files?
« Reply #20 on: October 03, 2020, 02:03:46 pm »
It is very bad HDD manufacturers do not show more information do not say the name of this function present in the firmware

I have not had any problems finding that data in drives which support SMART.
 

Offline classicsamus87Topic starter

  • Regular Contributor
  • *
  • !
  • Posts: 97
  • Country: br
Re: HDDs and badblocks corrupt downloaded files?
« Reply #21 on: October 03, 2020, 03:03:01 pm »

For HDD firmware to relocate and isolate defective sectors from receiving files, is it enough to have SMART? this function is inside SMART and SMART inside the firmware?
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7549
  • Country: 00
  • +++ ATH1
Re: HDDs and badblocks corrupt downloaded files?
« Reply #22 on: October 03, 2020, 04:00:35 pm »
Pick one ... troll or thick ?  :-DD
 
The following users thanked this post: tooki

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8766
  • Country: fi
Re: HDDs and badblocks corrupt downloaded files?
« Reply #23 on: October 03, 2020, 04:27:37 pm »
SMART is the standardized interface for querying statistics etc. across disks of different manufacturers. The firmware implements SMART messaging functionality as one of the features. It also implements everything else to make the hard disk work, including sector relocation; this is all manufacturer-specific. Like if you want to build a car, you are going to decide what kind of materials you use to build the body with, make your drawings, and so on. But the steering wheel (SMART) is something every manufacturer does the same way so you know how to use it.
 

Offline classicsamus87Topic starter

  • Regular Contributor
  • *
  • !
  • Posts: 97
  • Country: br
Re: HDDs and badblocks corrupt downloaded files?
« Reply #24 on: October 03, 2020, 04:34:57 pm »
Do not all manufacturers have automatic relocation and isolation of defective sectors? SMART is separate from this relocation function
I am doing a study on HDD and I take notes but this automatic relocation function does not have a technology name because I did not find it in research I find out if this technology has HDD in the year 2000 I searched in manual but it has no name
« Last Edit: October 03, 2020, 04:37:18 pm by classicsamus87 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf