Bad HDD Blocks: Causes and Types

May 22, 2023 Author: korjeek

Source: http://www.3dnews.ru/storage/badblock

So, a bad block is usually understood as a specific section of the disk, normal operation with which is not guaranteed or impossible at all. Such areas may contain various information, it may be user data or service information (otherwise called servo (obviously from Latin servire or English serve – serve), in this case it is fraught with consequences, the severity of which varies over a very wide range), although, of course, the best option would be the absence of something in this area (although you will most likely not have to deal with bad things in such areas). The appearance of such sectors can be due to various reasons, in one case such sectors can be restored, in the other it is impossible, in one it is necessary to use some methods of treatment and reassignment in another. But first, let’s dispel a few fairly common myths.

Myth one: there are no bads on modern hard drives. It’s not true, it happens. By and large, the technology is the same as years ago, only improved and refined, but still not ideal (however, an ideal one is unlikely to be created on the basis of magnetic recording technologies).

Myth two: for hard drives equipped with SMART, this is not relevant (read, there cannot be bads). Also not so: relevant, no less than for hard drives without SMART (if any still exist). The concept of a bad sector is close and dear to her, it should have become clear from the relevant publications dedicated to this technology (links at the end). The only thing is that SMART has taken over most of the concerns about such sectors that were previously assigned to the user. And it can often happen that the user does not know anything at all and does not find out about the bads taking place on his screw, unless of course the situation is not pathological. I have heard from users that this is how sellers sometimes justify their refusal to guarantee the exchange of hard drives, in which the bads “surfaced” out. The seller, of course, is wrong. SMART is not omnipotent, and no one has canceled the bads yet.

In order to understand the bads and their varieties, let’s delve into the method of storing information on the hard drive, just a little bit. Let’s clarify two points.

1. The unit of which the hard drive operates at a low level is the sector. In the physical space on the disk corresponding to the sector, not only data is recorded directly, but also service information – identification fields and a checksum for it, data and a control code for them, an error recovery code, etc. (not standardized and depends on the manufacturer and models). According to the presence of identification fields, two types of records are distinguished – with and without identifier fields. The former is old and has lost ground in favor of the latter. Later it will become clear why I am celebrating this. It is also important that there are means of error control (which, as we will see, can become their sources).

2. When working with old hard drives, it was necessary to write in the BIOS their physical parameters, which were indicated on the label, and in order to uniquely address a data block, it was necessary to indicate the cylinder number, sector number on the track, head number. Such work with the disk was completely dependent on its physical parameters. It was not convenient, and tied the hands of developers in many matters. An exit was required and was found in address translation. The one that interests us – it was decided to address the data in the drive with one parameter, and assign the function of determining the actual physical address corresponding to this parameter to the hard disk controller. This gave terubema freedom and compatibility.

The actual physical data of the drive turned out to be unimportant. It is only important that the number of logical blocks specified by the BIOS does not exceed the actual number. The creation of such a translator is of great importance for the issues of bad sectors too. And that’s why. The processing of bad sectors on old hard drives was not perfect, it was carried out by means of the file system. The disk was delivered with a sticker on which the addresses of the defective blocks found by the manufacturer were indicated. The user himself manually entered this data into FAT, and thus excluded the access to them by the operating system.

The plate manufacturing technology was imperfect then, and imperfect now. There are no methods for creating an ideal surface that does not contain a single bad block, contrary to the common opinion that a hard drive is shipped from the factory without them. With the growth of the volume of disks, the number of bad sectors grew when leaving the factory, and, it is clear that only up to a certain point the procedure for registering them in FAT could be performed manually, it was necessary to find a way to mark bads, even though it is not known which file system will be used. The invention of the translator made it possible to solve these problems. A special protected area was allocated on the hard drive, where a translator was written, in which a correspondence was established between each logical block of a continuous chain and a real physical address.

If suddenly a bad block was found on the surface, then it was simply skipped, and the address of the next physical available block was assigned to this logical block. The translator was read from the disk when it was turned on. Its creation was (and is) carried out at the factory, and it is precisely for this reason, and not because the manufacturer uses some kind of super technology, that the new disks do not seem to contain bad blocks. The physical parameters were hidden (and they varied too much, since the firms had a free hand in the production of their own low-level formats, and the user did not care), defects were marked at the factory, versatility increased. Good as in a fairy tale.

Now back to the bads and their varieties. Depending on the nature of the origin of all of them, they can be divided into two large groups: logical and physical.

Physical and logical defects

Surface defects can be associated with the gradual wear of the magnetic coating of the disks, the smallest dust particles that seeped through the filter, the kinetic energy of which, accelerated inside the drive to colossal speeds, turns out to be sufficient to damage the surface of the disks (however, they are most likely to roll off the disk under the action of centrifugal forces and will be delayed by the internal filter, but they may have time to mess up), the result of mechanical damage upon impact, in which small particles can be knocked out of the surface, which then, in turn, will also knock out other particles, and the process will go like an avalanche (such particles will also roll off the plates under the action of centrifugal forces, but much longer and heavier, as they will be held by magnetic forces.This is also fraught with the fact that they will collide with the head hovering at a very low height, which will cause it to heat up and degrade performance – distortion will occur signal, the result is reading errors), I have heard (I don’t have such statistics) that smoking at a computer can do the same thing, since tobacco tars can penetrate the hard drive air filter (which have it), leading to sticking of the heads there to the plates (damage to the surface and heads), simply settling on the surface, and thereby changing the performance, etc.

Such sectors turn out to be unsuitable for circulation and should be excluded from circulation. Their restoration is not possible either at home or in service centers. It will be good if one of them manages to at least recover the information. The speed of the process of this type of surface destruction is individual. If the number of bads does not grow or grows very slightly, then you can not be seriously afraid (although it is still worth doing a backup) if the growth is fast, then the disk will have to be replaced, and, moreover, in a hurry. With this type of bads, you can reassign blocks to a backup surface: it makes sense in the absence of progression. But this is not about now. It if to speak about area of the data. As already noted, service information is also stored on the plates. In the process of use, it can also be destroyed. This can be much more painful than a normal user interface.

The fact is that servo information is actively used in the process of work: servo marks stabilize the speed of disk rotation, hold the head over a given cylinder, regardless of external influences. Minor disruptions to servo information can go unnoticed. Severe damage to the servo format can make some part of the disk or the entire disk inaccessible. Since servo information is used by the drive program and is critical to ensure normal operation and in general due to its specifics, things are much more complicated with it. Some hard drives allow you to disable failing servo tracks. Restoring them is possible only at the factory using special expensive and complex equipment (we will estimate approximately the costs of such a repair of a non-warranty hard drive and understand that it would be correct to call this type of bads incorrigible).

Physical bads can also include bad sectors, the appearance of which is caused by malfunctions of the electronic or mechanical part of the drive, for example, broken heads, serious mechanical damage as a result of an impact – jamming of the positioner coil or disks, displacement of disks. The actions here can be different and depend on the specific situation, if, for example, a head break (such bads appear because an attempt is made to access a surface that cannot be accessed (which does not mean at all that something is wrong with surface)), then, for example, it can often be turned off (or it can be changed in the conditions of specialized service centers, but the cost of the operation makes you seriously think about its expediency (in most cases the answer is negative), unless, of course, we are talking about the need to restore extremely valuable information (but that’s another conversation)).

In general, this type of damage is characterized by a catastrophic character. Those. as we can see, physical bads are not treated, only some kind of “mitigation” of their presence is possible. With logical bad sectors, the situation is simpler. Some of them are curable. In most cases, due to recording errors. The following categories can be distinguished:

1. The simplest case: file system errors. The sector is marked in FAT as bad, but in fact it is not. Previously, some viruses used this technique, when on a small volume of a hard drive it was necessary to find a secluded place that was not accessible by simple means. Now this technique is not relevant, since it is not difficult to hide a couple of megabytes (or even a couple of tens of megabytes) in the depths of Windows. In addition, someone could just play a joke on an unlucky user (there were such programs). And in general, the file system is a fragile thing, it is treated very easily and absolutely without consequences.

2. Unrecoverable logical bads – typical for old hard drives using a record with identifier fields. If you have such a disk, then you may well encounter them. Due to the incorrect format of the physical address recorded for this sector, a checksum error for it, etc. Accordingly, it is impossible to address him. In fact, they are recoverable, but at the factory. Since I have already said that the technology of recording without identifier fields is now used, this variety can be considered irrelevant.

3. Correctable logical bads. Not so rare, especially on some types of drives, the type of bad blocks. The origin is mainly due to disk write errors. Reading from such a sector fails, since the ECC code in it usually does not match the data, and writing is usually impossible, since the writeable space is pre-checked before writing, and since problems have already been found with it, writing to this area is rejected. Those. it turns out that the block cannot be used, although physically the surface it occupies is in perfect order. Defects of this kind can sometimes be caused by errors in the firmware of the hard drive, they can be provoked by software or technical reasons (for example, a power failure and its fluctuation, the head goes to an unacceptable height during recording, etc.). But if it is possible to match the contents of the sector and its ECC code, then such blocks pass without a trace. Moreover, this procedure is not complicated, and the means for its implementation are widely available, and, in general, harmless.

4. The appearance of bad blocks of this type on hard drives is due to the peculiarities of the production technology: there are never two absolutely identical devices, some of their parameters will certainly differ. When preparing hard drives at the factory, a set of parameters is determined for each that ensures the best functioning of this particular instance, the so-called adaptives. These parameters are saved, and if they somehow mysteriously turn out to be damaged, the result may be a complete inoperability of the disk, its unstable operation, or a large number of bad sectors appearing and disappearing in one place or another. At home, nothing can be done about this, but everything can be configured at the factory or at a service center.

As you can see, only two types of logical bad blocks are actually treated at home. Others, if necessary, you can try to replace with backup, but not cure. Nothing can be done with the third houses. We will talk about how and what to do in the first two cases next time.

Leave a Reply

Your email address will not be published. Required fields are marked *

Begin work on your project today
Contact us on Telegram. Ask a question and get a quick response.
or
Message
in Telegram
By clicking the button, you give your consent to the processing of personal data and agree to the privacy policy.