If it is true why do we see Offline_uncorrectable_sectors that need software intervention to map out?
First of all, the well-known SMART attributes are only conventional and don't follow any documented interface specification. Any attribute may be differently interpreted and implemented by each drive firmware, even from the same vendor. Even the format of the vendor-specific data in which they are returned has not been standardised since 1998.
With that caveat, consider what happens when a potentially bad sector is found.
If it's a write, the bad sector is going to be trashed anyway, so it can be remapped directly. This is how
hdparm --repair-sector
forces a remap, by writing zeroes to the sector.
If it's a read, the firmware can retry several times with these possible results:
- the sector data is returned with a valid CRC, in which case the firmware can either deem it good or remap it, or
- the read never succeeds, and it becomes a "Pending" sector; maybe a subsequent attempt to read the sector will have better luck, or it will be overwritten, as above.
A read may be triggered through the OS, or by the internal "Offline" testing function of the firmware. Hence, perhaps, the use of "Offline_uncorrectable_sectors". The disk firmware can't generally know whether the sector being read contains valid current data. In fact, if the read comes through the OS, the only safe assumption is that it does, or it wouldn't be being read. The firmware can only remap an unreadable sector under the conditions above.
Hence
fixdisk spends a lot of effort working out if a sector reported bad by SMART testing belongs to an actual file or directory.
All this depends on the pre-allocated spare sectors not having been exhausted. Once that happens, a bad sector that can't be remapped becomes a permanently bad sector that the OS has to work around, as if it was still 1990. But such a disk would have been so unreliable by that point that only extreme circumstances would have prevented its replacement.
As a security note, if a remapped sector happened to contain a temporary unencrypted copy of somethinng like your password file or world domination plans, the "right" tools could potentially recover that data from the original sector even after wiping the disk at the OS level.