[CentOS] [Q} how can O.S. predicate a disk going to failure??

Tue Aug 4 13:42:56 UTC 2009
John Doe <jdmls at yahoo.com>

From: mcclnx mcc <mcclnx at yahoo.com.tw>
> 2. how O.S. can predicate disk going to failure?

As I understand it, disks can handle a certain amount of bad 'sectors', thanks to some hidden extra space.
When a 'sector' fails, the disk marks it as 'bad' and then map it to a 'sector' from the hidden space.
As this extra space is not infinite, after a few months/years, there won't be any spare 'sector' left.
So, the disk says to the OS: "I will soon fail!"; as in "I am running out of spare 'sectors' so I won't be able to cope with bad 'sectors'".
Not sure if it is the case for all vendors...

JD