NetBSD-Users archive

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

Re: fixing a bad sector



On Tue, Sep 05, 2017 at 06:05:08PM +0000, Steve Blinkhorn wrote:
> Is there a way of identifying the file that's affected from the fsbn?
> Because it's the boot partition and the server is far away I need to
> be sure the machine will come up in multi-user mode if I have to
> reboot.

  pkgsrc/sysutils/ddrescue might help.  Not only is the tool itself
very useful in some situations, but the documentation is a helpful
read... to me it was like a "failing HDD recovery techniques 101".

  For your specific question, the ddrescue docs mention something
relevant in the chapter on `Fill mode'.  The Example 3 and Example
4 sections talk about a general, file-system independent method--
using ddrescue functionality--of identifying which files are
affected by bad sectors.  The technique depends on resources that
may not available in your current scenario, such as a large chunk
of free scratch space on a healthy drive and a bunch of time to do
scans and analysis of the failing drive/data; but notwithstanding
that, ddrescue is probably worth a look anyway.

Best, -D

> --
> Steve Blinkhorn <steve%prd.co.uk@localhost>
> 
> You wrote:
> > 
> > On Tue, Sep 05, 2017 at 05:35:07PM +0000, Steve Blinkhorn wrote:
> > > I have discovered a problem on a live server (i386) I run - this 
> > > is filling up /var/log/messages so that it has turned over more than
> > > 10 times today.
> > > 
> > > The message:
> > > 
> > > Sep  5 16:56:49 trafalgar /netbsd: wd0a: error reading fsbn 1005056 of 1005056-1005087 (wd0 bn 1005119; cn 997 tn 2 sn 17), retrying
> > > Sep  5 16:56:49 trafalgar /netbsd: wd0: (uncorrectable data error)
> > > 
> > > The fsbn is mostly 1005056 but sometimes 1005086.
...



Home | Main Index | Thread Index | Old Index