I want to know if I have badblocks on my sdb5 HDD.

Fred Schaer fred.schaer at wanadoo.fr
Mon Nov 24 19:26:17 UTC 2008



Steven Vollom a écrit :
> Frederic Schaer wrote:
>   
>> Steven Vollom a écrit :
>>   
>>     
>>> Frederic Schaer wrote:
>>>   
>>>     
>>>       
>>>> Hi,
>>>>
>>>> I'm coming after the battle, but if smart reports there are bad blocks
>>>> (using the previous given smartctl -a /dev/sdXX command), given the
>>>> price of hard drives and given the price of your own data integrity
>>>> (your data has no price, does it ?), I would directly go buy a new disk...
>>>>
>>>>
>>>>     
>>>>       
>>>>         
>>>>> NO!  Bad blocks are BAD.  You map them out because they can NEVER be trusted.
>>>>>   
>>>>>     
>>>>>       
>>>>>         
>>>>>           
>>>>   
>>>>     
>>>>       
>>>>         
>>> Dear Derek,
>>>
>>> I feel like a friend with all at the 'List' now, so I will embarrass 
>>> myself a bit.  I am a  retired fine-artist that never made a lot of 
>>> money.  (It is obvious that 'fine' doesn't mean the quality of my work, 
>>> for I have not earned much from the task; it just means that art is what 
>>> I do for a living.)  Consequently, when I had to retire and live on my 
>>> Social Security, (I could never save for old age.) it was an amount that 
>>> most people pay in tips each month.  So I am just too poor to solve a 
>>> problem by purchasing something, unless I am absolutely sure the 
>>> something is really broken.  Knowing that, is not an easy thing, when 
>>> you are as inhibited intellectually as I am.  But even if the 'List' got 
>>> frustrated enough to boot me off, I will not stop trying to learn this 
>>> stuff.  I will still be struggling to learn this system, when I am 
>>> looking up at the roots of grass, with a 'Here Lies' marker at my head.  
>>> I will not give up.  I am not a quitter.
>>>
>>>   
>>>     
>>>       
>> Hi,
>>
>> I'm sorry, I did not really mean that the easiest thing to do was buy a
>> new disk : what I meant was that if badblock or smart starts telling you
>> there are several bad blocks (lots of ?), you should really think about
>> buying a new disk because yours is failing, and you will soon loose data :'(
>> I've not seen a drive loosing sectors (blocks) without dying shortly
>> after that
>>
>> I haven't seen the results of previous commands you were asked to run,
>> so could you please try this :
>>
>> sudo apt-get install smartmontools
>> sudo smartctl -a /dev/sdb
>>
>> Hopefully this will give you lots of output. If it does, please post the
>> lines that look like this :
>>
>> 5 Reallocated_Sector_Ct   0x0033   100   100   036    Pre-fail 
>> Always       -       0
>> ...
>> 197 Current_Pending_Sector  0x0012   100   100   000    Old_age  
>> Always       -       0
>> 198 Offline_Uncorrectable   0x0010   100   100   000    Old_age  
>> Offline      -       0
>>
>> And be aware that if the last number (0 for me) is not 0 , your drive
>> already knows about bad blocks and tried to or reallocated some already.
>> If that number is high (more than ... I don't know : 100 ?), you're
>> really going to be in trouble.
>>
>> If the above command (smartctl) doesn't give you any output... errhhh...
>> you might try badblocks on the drive.
>> Be warned however : keep backups of your data (just in case...) !!
>>
>> sudo badblocks -n /dev/sdb
>>
>> This is going to be veeeeerrryyyyyy slow though.
>>
>> Regards
>>
>>   
>>     
> This kind of report overwhelms me at my level of understanding.  Could 
> you take a look and give an opinion on the health of the drive?  Please 
> point out serious concerns?
>
>
>
> SMART Attributes Data Structure revision number: 16
> Vendor Specific SMART Attributes with Thresholds:
> ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      
> UPDATED  WHEN_FAILED RAW_VALUE
>
>   
(...)

Smart does not seem to report any reallocated block : that's a good sign :]
You can try to run the SMART surface test this way :
sudo smarctl -t offline /dev/sdb

Then , when it's finished after a few hours, you can list the drive
errors this way :
sudo smarctl -l error /dev/sdb

You will have errors given the previous output you gave, but these are
not sectors errors. If you have bad sectors, you will be given the
address of the first sector that failed, and the count that's given by
the -A option will be increased... and you'll know ;)

Regards




More information about the kubuntu-users mailing list