I have read many questions and answers on SuperUser, ServerFault, and other websites about this topic, but I am still a little bit confused about S.M.A.R.T. and badblocks.
I saw that S.M.A.R.T. stores the information about bad sectors at a memory location that is only accessible by the firmware of the disk, not by the OS. When mke2fs uses the output of badblocks, where does it store the location of the bad sectors? Does it tell S.M.A.R.T. about those sectors?
I guess the practical questions I have are the following ones:
If I format a partition with
mkfs.ext4 -cc
and bad sectors are found, are those sectors still known if I reformat the same partition with onlymkfs.ext4
(without -c or -cc) after?If the answer to the first question is no, what would be the best way of making a drive aware of its bad sectors so that the next owner of the drive doesn't run into problems related to bad sectors if it is reformatted?
In practice, if I was given hard drives that were used in office desktops for about 8 to 10 years, should I be worried that there might be bad sectors on them and run diagnostic tests? Or should I not waste hours with this because it's so unlikely that it's not worth it?