All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Hdd and badblock
PostPosted: September 15th, 2020, 5:41 
Offline

Joined: September 14th, 2020, 20:07
Posts: 122
Location: london
If my HDD has bad blocks and reallocated sectors count, if I download files or transfer them from any media to the HDD will these files be saved in defective sectors of the HDD?


Top
 Profile  
 
 Post subject: Re: Hdd and badblock
PostPosted: September 15th, 2020, 6:20 
Offline
User avatar

Joined: May 13th, 2019, 7:50
Posts: 913
Location: Nederland
No.

Reallocated sectors are not in say user addressable LBA.

If you save something TO a bad sector this is actually an event that will get the sector reallocated and swapped for a spare. This is something you should not even notice unless you take a look at SMART data before and after copying the file.

_________________
Joep - http://www.disktuna.com - video & photo repair & recovery service


Top
 Profile  
 
 Post subject: Re: Hdd and badblock
PostPosted: September 15th, 2020, 6:24 
Offline

Joined: September 14th, 2020, 20:07
Posts: 122
Location: london
I have some HDDs with badblocks, if I download files they can be recorded in these badblocks (bad sectors) or there is some technology that does not allow this and what is the name of this technology and if it works automatically


Top
 Profile  
 
 Post subject: Re: Hdd and badblock
PostPosted: September 15th, 2020, 17:40 
Offline
User avatar

Joined: May 13th, 2019, 7:50
Posts: 913
Location: Nederland
I just explained that .. No you can not save data to bad blocks. Once you write to it the drive will detect the block can not be used and reallocate it. That is, the bad block is 'removed' and a spare block takes it's place.

In general I'd advise you to examine these drives first before continued use. Bad blocks may be a symptom of a more serious issue. That being said, I remember having used a 40 GB Maxtor that had 4 bad blocks all of a sudden. I have used the drive for many more years for all kinds of odd jobs and the number of reallocated sectors has always stayed the same.

_________________
Joep - http://www.disktuna.com - video & photo repair & recovery service


Top
 Profile  
 
 Post subject: Re: Hdd and badblock
PostPosted: September 15th, 2020, 18:52 
Offline

Joined: October 3rd, 2005, 0:40
Posts: 4332
Location: Hungary
In fact, uppon a read error the sector is first marked as pending. If the contents can be recovered using internal read retry algorythm, the drive tries to rewrite the weak sector (refresh). If that's successful, ie the contents can be read without excessive efforts, the sector is unmarked and removed from the AltList. If this is unsuccessful, the recovered data is saved to the spare area and sector is permanently remapped. Same happens if you try to write a pending sector, it tries writing it and verifies if it was successful, if yes, all happy, remove from pending, if not, mark it permanently and save user data to the spare area. Subsequent writes to that sector will go to the spare area.
The whole process is transparent, but takes time, so the user may notice some speed drop.
pepe

_________________
Adatmentés - Data recovery


Top
 Profile  
 
 Post subject: Re: Hdd and badblock
PostPosted: September 15th, 2020, 19:00 
Offline
User avatar

Joined: May 13th, 2019, 7:50
Posts: 913
Location: Nederland
Yeah but he's writing, so that was my starting point. If can't be written to at all, wouldn't become pending, no? Would immediately be reallocated/remapped whatever you want to call it.

_________________
Joep - http://www.disktuna.com - video & photo repair & recovery service


Top
 Profile  
 
 Post subject: Re: Hdd and badblock
PostPosted: September 15th, 2020, 20:01 
Offline

Joined: September 14th, 2020, 20:07
Posts: 122
Location: london
What is the name of this technology that performs these processes of allocating and isolating defective sectors in the HDD?


Top
 Profile  
 
 Post subject: Re: Hdd and badblock
PostPosted: September 15th, 2020, 20:21 
Offline

Joined: October 3rd, 2005, 0:40
Posts: 4332
Location: Hungary
'can't be writtten to at all' is a bit ambiguous. It can only happen when there is some serious positioning problem like servo sectors erased, offtrack error, which do not happen during normal operation. If the surface is damaged at that spot it won't be revealed during the write i think, only at the next read. Normal writes are not verified, it would take a high penalty on performance. So if one wants to get all bads marked he has to run some surface scan during which the unreadable ones get marked as pending. Drive will decide if it gets permanently reallocated or removed from pending uppon the next write operation.
Perhaps SMART long test does this too, i never used that.
pepe

_________________
Adatmentés - Data recovery


Top
 Profile  
 
 Post subject: Re: Hdd and badblock
PostPosted: September 15th, 2020, 20:24 
Offline
User avatar

Joined: May 13th, 2019, 7:50
Posts: 913
Location: Nederland
Quote:
If the surface is damaged at that spot it won't be revealed during the write i think, only at the next read.


I have a hard time believing it would work like that, it would allow for data to be written to a bad sector?! So for guaranteed loss of data.

_________________
Joep - http://www.disktuna.com - video & photo repair & recovery service


Top
 Profile  
 
 Post subject: Re: Hdd and badblock
PostPosted: September 15th, 2020, 20:29 
Offline

Joined: October 3rd, 2005, 0:40
Posts: 4332
Location: Hungary
yes. drive does not read back what it wrote on its own. So how would it detect the fault?
Perhaps it can detect TA during write from preamp fault signal but TA is not a tiny defect...

pepe

_________________
Adatmentés - Data recovery


Top
 Profile  
 
 Post subject: Re: Hdd and badblock
PostPosted: September 15th, 2020, 20:43 
Offline
User avatar

Joined: May 13th, 2019, 7:50
Posts: 913
Location: Nederland
Quote:
yes. drive does not read back what it wrote on its own. So how would it detect the fault?


I don't know but it has to. Allowing data to be written to sectors that will immediately 'lose' the data would be unacceptable of course, it's common sense it does not allow that.

_________________
Joep - http://www.disktuna.com - video & photo repair & recovery service


Top
 Profile  
 
 Post subject: Re: Hdd and badblock
PostPosted: September 15th, 2020, 20:44 
Offline

Joined: September 14th, 2020, 20:07
Posts: 122
Location: london
What is the name of the technology that automatically allocates and isolates defective sectors of the HDD?


Top
 Profile  
 
 Post subject: Re: Hdd and badblock
PostPosted: September 15th, 2020, 20:48 
Offline

Joined: October 3rd, 2005, 0:40
Posts: 4332
Location: Hungary
i guess you can perform a test on some defective drive that has some radial scratches

_________________
Adatmentés - Data recovery


Top
 Profile  
 
 Post subject: Re: Hdd and badblock
PostPosted: September 15th, 2020, 20:51 
Offline
User avatar

Joined: May 13th, 2019, 7:50
Posts: 913
Location: Nederland
No, I will look it up. Should be in ATA specs.

BTW, 20 years ago or so even a floppy could detect write errors and it didn't keep a pending list. That I did try because it's easy enough to damage a floppy disk.

I never wrote any code to read/write using ATA commands but plenty of extended int13h read/writes and that also set status flag to error and gave error code on write.

Even SMART reports write error rate.

_________________
Joep - http://www.disktuna.com - video & photo repair & recovery service


Top
 Profile  
 
 Post subject: Re: Hdd and badblock
PostPosted: September 15th, 2020, 21:07 
Offline
User avatar

Joined: May 13th, 2019, 7:50
Posts: 913
Location: Nederland
sonicmario wrote:
What is the name of the technology that automatically allocates and isolates defective sectors of the HDD?


It's an integral part of how a hard drive works. Technique is called sector reallocation I guess. Simplified a hard drive keeps an address list of all sectors, in addition to a list of spare sectors and list of defects. Defects are subdivided in defects that were established during manufacturing and defects that have grown over time. If a sector is bad it's added to grown defect list. I don't know how this exactly works, this defect list could point to a spare or say main address table points to spare, dunno.

Basically it's lists of good bad and spare sectors. So if LBA 10000 goes bad drive will update it's internal bookkeeping so it will not use it anymore and looks up which spare was assigned to it so when you read or write to LBA 10000 you get to deal with the spare. You as an end user never get to see this other than the statistics in form of SMART data.

A PC3000 will probably get you access to those lists I assume, don't know for certain because I don't have one.

SSD takes this to the extreme as any LBA could be anywhere in the NAND, and once you edit a file it could be in a totally different block of NAND memory.

_________________
Joep - http://www.disktuna.com - video & photo repair & recovery service


Top
 Profile  
 
 Post subject: Re: Hdd and badblock
PostPosted: September 16th, 2020, 16:33 
Offline

Joined: September 30th, 2005, 7:33
Posts: 849
Arch Stanton wrote:
Quote:
yes. drive does not read back what it wrote on its own. So how would it detect the fault?


I don't know but it has to. Allowing data to be written to sectors that will immediately 'lose' the data would be unacceptable of course, it's common sense it does not allow that.

During the PST all unreliable sectors are deallocated (put in P-List). The newly grown defect sectors are reallocated (put in G-list). So all allocated sectors are considered reliable. During the backstage activity the drive check randomly all sectors.


Top
 Profile  
 
 Post subject: Re: Hdd and badblock
PostPosted: September 16th, 2020, 16:44 
Offline
User avatar

Joined: May 13th, 2019, 7:50
Posts: 913
Location: Nederland
BGman wrote:
Arch Stanton wrote:
Quote:
yes. drive does not read back what it wrote on its own. So how would it detect the fault?


I don't know but it has to. Allowing data to be written to sectors that will immediately 'lose' the data would be unacceptable of course, it's common sense it does not allow that.

During the PST all unreliable sectors are deallocated (put in P-List). The newly grown defect sectors are reallocated (put in G-list). So all allocated sectors are considered reliable. During the backstage activity the drive check randomly all sectors.


What is PST please?

yeah I know about G list and all that. Yes I do know about back ground maintenance. My question is, and basically what I do not believe to be true is that only pending sectors are reallocated. So IOW, sector first needs to be detected as unreliable or bad by read, then becomes pending and only then is reallocated. I am sure that when an error on write occurs the drive can decide to reallocate it straight away even if the sector isn't in pending list.

The whole logic to not reallocate on read is because you basically give up on the data. So you explicitly have to write to it to signal drive, "I'm okay with reallocation". There is no logic in not reallocating a bad sector on write because we can save data to spare immediately. Well, let me rephrase that, I don't see the logic of that.

_________________
Joep - http://www.disktuna.com - video & photo repair & recovery service


Top
 Profile  
 
 Post subject: Re: Hdd and badblock
PostPosted: September 16th, 2020, 18:12 
Offline

Joined: October 3rd, 2005, 0:40
Posts: 4332
Location: Hungary
yes, if a write error occurs and is detected, it is logical to reallocate it straight away, but it is not always detected.

pepe

_________________
Adatmentés - Data recovery


Top
 Profile  
 
 Post subject: Re: Hdd and badblock
PostPosted: September 17th, 2020, 9:59 
Offline

Joined: September 30th, 2005, 7:33
Posts: 849
Arch Stanton wrote:
yeah I know about G list and all that.


You think you know it.

:D :D :D


Top
 Profile  
 
 Post subject: Re: Hdd and badblock
PostPosted: September 17th, 2020, 11:23 
Offline
User avatar

Joined: May 13th, 2019, 7:50
Posts: 913
Location: Nederland
BGman wrote:
Arch Stanton wrote:
yeah I know about G list and all that.


You think you know it.

:D :D :D


Indeed. But not PST. What is PST?

_________________
Joep - http://www.disktuna.com - video & photo repair & recovery service


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Google Adsense [Bot] and 37 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 © 2000, 2002, 2005, 2007 phpBB Group