[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Bad Sector....



Hi
Though i havent encountered this problem so far i have been reading about this for
some time now
Here is how u can go about it

1.    Use the badblocks command
2.    If the partition can be lost then u can remake the filesystem along with the
input from the badblocks command to mark the whole blocks as bad .. Linux will not
try to read / write from these blocks again

I am enclosing a excerpt from the system administration guide (SAG) which covers
this topic in Chapter 4.. For more detials u can refer to this manual which is
available from sunsite or i can mail u the pages

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Checking for disk errors with badblocks
************************************
It can be a good idea to periodically check for bad blocks. This is done with the
badblocks command. It outputs a list of the numbers of all bad blocks it can find.
This list can be fed to fsck to be recorded in the filesystem data structures so
that the operating system won?t try to use the bad blocks for storing data.
The following example will show how this could be done.

$ badblocks /dev/fd0H1440 1440 > bad-blocks
$ fsck -t ext2 -l bad-blocks /dev/fd0H1440
Parallelizing fsck version 0.5a (5-Apr-94)
e2fsck 0.5a, 5-Apr-94 for EXT2 FS 0.5, 94/03/10
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Check reference counts.
Pass 5: Checking group summary information.
/dev/fd0H1440: ***** FILE SYSTEM WAS MODIFIED *****
/dev/fd0H1440: 11/360 files, 63/1440 blocks
$

If badblocks reports a block that was already used, e2fsck will try to move the
block to another place. If
the block was really bad, not just marginal, the contents of the file may be
corrupted.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

ChenthilWhelan wrote:


> Sorry to post a stupid question like this. My HDD developed 1 bad block. I ran
> e2fsck -c  but it did'nt solve the prob. can anyone help me the ways of marking
> that entire block as bad and making linux not to read/wrire in that block.
>  --
>
> BYE. Will Keep In Touch.
> Plz ignore any spelling and gramatical bugs.
> -----------------------------------------------------------------
> Y's
> SenthilVelan PI
> chenthil@xxxxxxxxxxxx
> http://senthil.webjump.com
> ----------------------------------------------------------------
>
> --------------------------------------------------------------------
> For more information on Linux in India visit http://www.linux-india.org/
> The Linux India mailing list does not accept postings in HTML format.

- --
Great minds discuss ideas;
 Average minds discuss events;
   Small minds discuss people.



- --------------------------------------------------------------------
For more information on Linux in India visit http://www.linux-india.org/
The Linux India mailing list does not accept postings in HTML format.

------------------------------