mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* find a file containing a specific sector
@ 2002-01-23 18:00 Chuck Campbell
  2002-01-23 18:08 ` Mark Hahn
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chuck Campbell @ 2002-01-23 18:00 UTC (permalink / raw)
  To: linux-kernel; +Cc: campbell

For the last 7 months, I've been getting the following error in 
/var/log/messages every night during the cron.daily execution.  I've finally
tracked it down to happening during my tripwire run, and I suspect
(based on linear time into the run, and sizes of files) the problem file
lies somwhere in /usr/lib.

The error message has been identical for months, so I assume I have a bad 
spot that is not spreading.  I'd like to find the affected file, rename it
and ignore the problem for a while longer.

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.


thanks,
-chuck



-- 
ACCEL Services, Inc.| Specialists in Gravity, Magnetics |  1(713)993-0671 ph.
1980 Post Oak Blvd. |   and Integrated Interpretation   |  1(713)960-1157 fax
    Suite 2050      |                                   |
 Houston, TX, 77056 |          Chuck Campbell           | campbell@neosoft.com
                    |  President & Senior Geoscientist  |

     "Integration means more than having all the maps at the same scale!"

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

* Re: find a file containing a specific sector
  2002-01-23 18:00 find a file containing a specific sector Chuck Campbell
@ 2002-01-23 18:08 ` Mark Hahn
  2002-01-23 18:29 ` Alexander Viro
  2002-01-23 18:36 ` Andreas Dilger
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Hahn @ 2002-01-23 18:08 UTC (permalink / raw)
  To: linux-kernel

> If I know the sector and lbasector, can I determine the inode and/or
> the actual file affected?

probably makes more sense to just "e2fsck -c".


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

* Re: find a file containing a specific sector
  2002-01-23 18:00 find a file containing a specific sector Chuck Campbell
  2002-01-23 18:08 ` Mark Hahn
@ 2002-01-23 18:29 ` Alexander Viro
  2002-01-23 18:36 ` Andreas Dilger
  2 siblings, 0 replies; 4+ messages in thread
From: Alexander Viro @ 2002-01-23 18:29 UTC (permalink / raw)
  To: Chuck Campbell; +Cc: linux-kernel



On Wed, 23 Jan 2002, Chuck Campbell wrote:

> For the last 7 months, I've been getting the following error in 
> /var/log/messages every night during the cron.daily execution.  I've finally
> tracked it down to happening during my tripwire run, and I suspect
> (based on linear time into the run, and sizes of files) the problem file
> lies somwhere in /usr/lib.
> 
> The error message has been identical for months, so I assume I have a bad 
> spot that is not spreading.  I'd like to find the affected file, rename it
> and ignore the problem for a while longer.
> 
> If I know the sector and lbasector, can I determine the inode and/or
> the actual file affected?

find /usr/lib -type f|sed -e 's!.*!cat & >/dev/null || echo &!'|sh


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

* Re: find a file containing a specific sector
  2002-01-23 18:00 find a file containing a specific sector Chuck Campbell
  2002-01-23 18:08 ` Mark Hahn
  2002-01-23 18:29 ` Alexander Viro
@ 2002-01-23 18:36 ` Andreas Dilger
  2 siblings, 0 replies; 4+ messages in thread
From: Andreas Dilger @ 2002-01-23 18:36 UTC (permalink / raw)
  To: Chuck Campbell, linux-kernel

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/


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

end of thread, other threads:[~2002-01-23 18:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-23 18:00 find a file containing a specific sector Chuck Campbell
2002-01-23 18:08 ` Mark Hahn
2002-01-23 18:29 ` Alexander Viro
2002-01-23 18:36 ` Andreas Dilger

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®