Re: BadBlocks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Littleguru wrote:
> I read some where that if the partition has been created through mkefs 
> and mkxfs , it is not need
> to run any badblocks on har drive , and the new hard drive bad block is 
> done through it self .

Hi.

It doesn't sound as though English is your first language. If anything
isn't clear, please ask.

First of all, it might be helpful to know how large your hard disk is,
and whether it's connected by a SCSI, an IDE, or a SATA cable. If you
don't know, tell us the age of the system.

If it's IDE, it would also be helpful if you could tell us whether you
have an 80 pin or a 40 pin cable.

With modern hard disks, the disk itself keeps a record of bad blocks.
With any luck, as a block is going bad, it will note the fact, mark the
block as bad, and rescue the data to a good, spare, block, which it will
"map" over the old one: any future requests to the old block will be
redirected to the new one.

This is all done in the hard disk's firmware. You can't turn it off.

If it can't rescue the data on the block, it will only remap the block
the next time it's asked to write to that block.

This does give you a problem: given the fact that you know that there is
a bad block on your drive (which you don't, in fact), and you want to
keep the data on the drive, how do you find which file contains the bad
block?

But you're talking about re-creating the filesystem. Until you use the
block, it doesn't matter that it's bad. When you do write there, a spare
block will be mapped in. mkfs won't see that there ever was a problem.

> only if we create the file system through mkfs we have to check the hard 
> drive , so now I want to make sure I am doing right because last night 
> in a working server I got bad crc io error , I restarted the seerver and 
> after running fscek , it is working fine , but how do I know if it was 
> becaouse of bad block or simple IO error , and do I need to run 
> badblocks command  ?
> and how do I know how did I create my file system , be cause it was 
> created through linux
> installation.

You're right to be slightly suspicious of the cable connecting the
disk to the motherboard or adapter.

But what you really want to use is the smartctl package (it's on the
CDs). Run
smartctl -H /dev/hda
(or whatever is appropriate) and
smartctl -l error /dev/hda
as root. That will tell you if the disk is healthy. If it is healthy,
then the disk will handle bad blocks itself. If it isn't healthy,
replace it fast. Never trust a disk with visible bad blocks that don't
go away when you overwrite the file in question.

Beyond that, it might be relevant to see the output of running
lspci
and
hdparm -I /dev/hda
(or whatever) as root, and to make sure that your cable is good (give it
a visual inspection).

It would also be worth checking how hot your drive gets in operation.

As for how your filesystem was created: it doesn't matter, but it would
have used the appropriate mkfs program.

James.

-- 
E-mail address: james | The sendmail configuration file is one of those
@westexe.demon.co.uk  | files that looks like someone beat their head on
                      | the keyboard.  After working with it... I can see
                      | why!



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux