mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@turbolabs.com>
To: Chuck Campbell <campbell@neosoft.com>, linux-kernel@vger.kernel.org
Subject: Re: find a file containing a specific sector
Date: Wed, 23 Jan 2002 11:36:44 -0700	[thread overview]
Message-ID: <20020123113644.R960@lynx.adilger.int> (raw)
In-Reply-To: <20020123120055.A14311@helium.inexs.com>
In-Reply-To: <20020123120055.A14311@helium.inexs.com>; from campbell@neosoft.com on Wed, Jan 23, 2002 at 12:00:55PM -0600

On Jan 23, 2002  12:00 -0600, Chuck Campbell wrote:
> If I know the sector and lbasector, can I determine the inode and/or
> the actual file affected?
> 
> The error message is:
> 
> Jan 23 04:24:34 helium kernel: hdc: dma_intr: status=0x51 { DriveReady SeekComplete Error } 
> Jan 23 04:24:34 helium kernel: hdc: dma_intr: error=0x40 { UncorrectableError }, LBAsect=4200315, sector=4200248 
> Jan 23 04:24:34 helium kernel: end_request: I/O error, dev 16:01 (hdc), sector 4200248 
> 
> as I said before, the sector number has never changed in months.

If you run 'badblocks /dev/hdc1' it will do a full (read-only by default)
surface scan of the disk and report the bad blocks.  This still doesn't
tell you the filename though.

You can use "debugfs /dev/hdc1" and then "icheck 525031" (assuming
you have a 4kB block ext2/ext3 filesystem on this drive) and then
"ncheck <inum>" for the inode number returned by icheck to find the
filename.

As someone else reported, running "e2fsck -c" will add this block to
the bad blocks list, and re-assign another block for the file in question.
It runs 'badblocks' in the background with the correct parameters (read
only check, correct blocksize for the filesystem).

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/


      parent reply	other threads:[~2002-01-23 18:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-23 18:00 Chuck Campbell
2002-01-23 18:08 ` Mark Hahn
2002-01-23 18:29 ` Alexander Viro
2002-01-23 18:36 ` Andreas Dilger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020123113644.R960@lynx.adilger.int \
    --to=adilger@turbolabs.com \
    --cc=campbell@neosoft.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®