My bad blocks aren't getting marked bad ...

My bad blocks aren't getting marked bad ...

Post by Bert Hym » Sat, 04 Mar 2000 04:00:00



I'm running 3.4-20000114-STABLE on a P-200 system as a small news server.
It has an Adaptec 2940U2W controller and an IBM DNES-309170 9GB disk as the
news spool.

I've got one bad block that's started showing up each night during the
expire. It's in an "overview" file that gets re-written each night, and the
block is apparently being re-allocated to a different file each time,
because the INODE number changes in the message from night to night.

I've got the disk configured to do auto-reallocation of bad blocks, but it
doesn't seem to be happening.

Is there a way to find out what file the block is currently allocated to so
I can "mv" the file somewhere safe to lock up that block? Or, is there some
other way to force the block to be marked unusable?

--

 
 
 

My bad blocks aren't getting marked bad ...

Post by Matthew A. Kol » Sat, 04 Mar 2000 04:00:00



> Is there a way to find out what file the block is currently allocated to so
> I can "mv" the file somewhere safe to lock up that block? Or, is there some
> other way to force the block to be marked unusable?

try stopping your news process
(if you installed from ports, /usr/local/etc/rc.d/innd.sh stop),
comment out the line in your news crontab to do the nntpsend,
unmount /spool
and run fsck on that device.
that should help you out a bit.
./matt

--
Matthew A. Kolb                         Michigan State University SCNC


 
 
 

My bad blocks aren't getting marked bad ...

Post by Bert Hym » Sat, 04 Mar 2000 04:00:00





>> Is there a way to find out what file the block is currently allocated to
>> so I can "mv" the file somewhere safe to lock up that block? Or, is
>> there some other way to force the block to be marked unusable?
>try stopping your news process
>(if you installed from ports, /usr/local/etc/rc.d/innd.sh stop),
>comment out the line in your news crontab to do the nntpsend,
>unmount /spool
>and run fsck on that device.
>that should help you out a bit.
>./matt

How would fsck help? There doesn't appear to be anything wrong at the file-
system level, just a bad block on the disk. I don't ->think<- that info is
retained anywhere or acted on by fsck. Am I wrong?

--

 
 
 

My bad blocks aren't getting marked bad ...

Post by J Wuns » Sun, 05 Mar 2000 04:00:00



> I've got the disk configured to do auto-reallocation of bad blocks, but it
> doesn't seem to be happening.

Auto-reallocation upon read only happens if the read data could be
reconstructed using ECC.  If not, the disk doesn't automatically
auto-reallocate so it gives you the chance to have a peek of the
unrecovered bad data before.

It should however reallocate once you really write over that block.
The block number ought to be in the system error messages
(/var/log/messages), watch the `info' field in the SCSI error message.
You could write a tool that fseek()s to that block, and zeroes it out.

Of course, the safest way to get them all reallocated is to scsiformat
the disk.  ("camcontrol format", ahem, those patches by Ken apparently
never made it into the official camcontrol source...  use "camcontrol
cmd daN -t 7200 -c '4 0 0 0 0 0'" instead.)

--
cheers, J"org  /  73 de DL8DTL


Never trust an operating system you don't have sources for. ;-)

 
 
 

My bad blocks aren't getting marked bad ...

Post by Bert Hym » Sun, 05 Mar 2000 04:00:00




>It should however reallocate once you really write over that block.
>The block number ought to be in the system error messages
>(/var/log/messages), watch the `info' field in the SCSI error message.
>You could write a tool that fseek()s to that block, and zeroes it out.

I suppose if I can read any data from the block, I might be able to
figure out what file it belongs to; I'd like to do that before zapping
it. Otherwise, this sounds like a simple enough way to approach the
problem.

Quote:

>Of course, the safest way to get them all reallocated is to scsiformat
>the disk.  ...

I did that from the controller before I started using it, so I guess I've
got some new defects. Besides, I'd ->really<- like to keep the 6GB of
news articles currently on the disk :-).

Thanks ...

--

 
 
 

My bad blocks aren't getting marked bad ...

Post by J Wuns » Mon, 06 Mar 2000 04:00:00



>>Of course, the safest way to get them all reallocated is to scsiformat
>>the disk.  ...

> I did that from the controller before I started using it, so I guess I've
> got some new defects. Besides, I'd ->really<- like to keep the 6GB of
> news articles currently on the disk :-).

Use dump(8) to save them to a tape...  dump should be able to continue
even in case of bad blocks, just skipping this single file.

I think there's also a SCSI command to forcibly remap a bad block, but
i remember it wasn't that easy to handle.

--
cheers, J"org  /  73 de DL8DTL


Never trust an operating system you don't have sources for. ;-)

 
 
 

1. Finding out if there are bad blocks in the bad blocks list

Hi

I'm trying to find out whether there are any bad blocks in the ext2fs
bad block list. I think there might be, because I had a whole lot of
ext2fs error messages popping up during a compile, and when I removed
the directory I was working with and ran e2fsck -cf /dev/hdc6, it told
me the filesystem was modified, even though none of the regular checks
had failed (I'd previously run e2fsck -f /dev/hdc6, so all the duplicate
blocks and unattached inodes and stuff had been sorted out). I think the
drive might still be under warranty, so if there are bad blocks I'll
take it back.

TIA
Bruce
--
Please remove the ".nospam" from my address before replying
/--------------------------------------------------------------------\
| Bruce Merry (Entropy)            | bmerry at iafrica dot com       |
| Proud user of Linux!             | http://www.cs.uct.ac.za/~bmerry |
|               When you make your mark on the world,                |
|                 watch out for people with erasers.                 |
\--------------------------------------------------------------------/

2. problem with fips.exe

3. How do you add a bad block to e2fs bad block list?

4. Netscape not closing sockets - reposting

5. Can't mark bad block

6. SIOCADDRT: Do not specify an existing file.

7. HOW do i mark BAD BLOCKS in ext2???

8. Linux on MIPS

9. Q: How to mark EXT2 blocks as BAD ?

10. Bad blocks. e2fsck does not mark them!

11. RedHat 2.1 install: How to mark bad disk blocks?

12. HELP: Q: How to mark block as bad!!!

13. How do I mark bad blocks on my disk?