0

Occasionally a drive sector is so corrupted that even the controller cannot fix it, and the data is lost. It may then be marked as a bad sector.

Does Linux make a log of such lost data in journald or dmesg or somewhere else?

I'm not interested in running badblocks or some scanning program. I'm asking if there is any realtime logging system of when unrecoverable sectors are discovered through normal drive operation.

0

1 Answer 1

2

Unrecoverable sectors can be identified through regular system use, or through drive scanning. The kernel is aware of the former, and this shows up as I/O errors and is typically logged at least in the kernel logs. The latter happens in the drive itself and may be logged by the drive (see smartctl -x, but such error logs are unusual now), but the kernel isn’t aware of it.

Sectors are typically not discarded on read errors, only when written. This means that some failed sectors may be remapped invisibly: if the drive identifies an unrecoverable sector during a scan, and that sector is subsequently written to without being read, it will be remapped without ever causing a visible I/O error. As a result, there can’t be a complete log of remapping events (at least, not outside the drive).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .