public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* Bad block on partition, how to deal with it?
@ 2006-09-06 11:59 Vijay Gill
  2006-09-06 14:22 ` Eric Sandeen
  2006-09-06 17:23 ` Chris Wedgwood
  0 siblings, 2 replies; 3+ messages in thread
From: Vijay Gill @ 2006-09-06 11:59 UTC (permalink / raw)
  To: xfs

Hi,

Got this bad sector in a seagate 40G hard disk. Is there any tool
under linux to scan the surface of the disk and mark the sectors bad
in file system (or at even lower level like seatools does)?

Running Linux Fedora Core 5.

In the mean while I am doing a dd on that partition to copy the data
and try to recover it from there.

Also I have run badblocks to get the number of the block which is bad,
but how do I get it marked now so that the OS does not try to allocate
it for data in future.

Thanks
Vijay

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bad block on partition, how to deal with it?
  2006-09-06 11:59 Bad block on partition, how to deal with it? Vijay Gill
@ 2006-09-06 14:22 ` Eric Sandeen
  2006-09-06 17:23 ` Chris Wedgwood
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Sandeen @ 2006-09-06 14:22 UTC (permalink / raw)
  To: Vijay Gill; +Cc: xfs

Vijay Gill wrote:
> Hi,
> 
> Got this bad sector in a seagate 40G hard disk. 

You should buy a new disk for $20 or so :)

> Is there any tool
> under linux to scan the surface of the disk and mark the sectors bad
> in file system (or at even lower level like seatools does)?

xfs has no badblocks support.  If you can convince the drive to remap 
the block with vendor tools then maybe it's ok.  But modern drives remap 
on their own; if you have a block that can't be remapped then your drive 
is probably not long for this world.  Don't try to keep using it.

> Running Linux Fedora Core 5.
> 
> In the mean while I am doing a dd on that partition to copy the data
> and try to recover it from there.
> 
> Also I have run badblocks to get the number of the block which is bad,
> but how do I get it marked now so that the OS does not try to allocate
> it for data in future.

With xfs, you don't.  It's not worth it IMHO, just get a new disk.

-Eric

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bad block on partition, how to deal with it?
  2006-09-06 11:59 Bad block on partition, how to deal with it? Vijay Gill
  2006-09-06 14:22 ` Eric Sandeen
@ 2006-09-06 17:23 ` Chris Wedgwood
  1 sibling, 0 replies; 3+ messages in thread
From: Chris Wedgwood @ 2006-09-06 17:23 UTC (permalink / raw)
  To: Vijay Gill; +Cc: xfs

On Wed, Sep 06, 2006 at 12:59:24PM +0100, Vijay Gill wrote:

> Got this bad sector in a seagate 40G hard disk.

recorder where it is, dd over it and hopefully the drive will remap it
(if there are many sectors the drive is probably toast)

if you know which block is/was bad you can user xfs_bmap to figure out
which file it was in

> Also I have run badblocks to get the number of the block which is
> bad, but how do I get it marked now so that the OS does not try to
> allocate it for data in future.

modern drivers (pretty much anything less than 10 years old) will
remap bad sectors on writes, if they fail to do this get a new drive

smartctl will usually let you get a count of how many times the drive
has done this since

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-09-06 17:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-06 11:59 Bad block on partition, how to deal with it? Vijay Gill
2006-09-06 14:22 ` Eric Sandeen
2006-09-06 17:23 ` Chris Wedgwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox