More intellegent bad block reallocation in software?

More intellegent bad block reallocation in software?

Post by John Bradfor » Wed, 04 Dec 2002 01:20:06



Is it possible, or at least feasible for certain disk devices, to
disable the firmware-level re-allocation of bad blocks, (note: I am
aware that disks typically have many bad blocks that are reliant on
ECC to function - I am refering to completely bad blocks, that are
replaced with a 'spare' block), and do this in software?

The reason I'm asking, is because presumably the 'spare' blocks are
kept at the end or the disk, or at least all in one place, (or
possibly throughout the disk in each ZBR zone).  If this is the case,
then reading a single large file which is, according to the
filesystem, all in consecutive blocks, could involve several seeks to
the area where the spare blocks are.

My idea is that we could allocate one block out of every ten to be a
spare block, (which would reduce disk capacity by 10%), and then if a
block needed to be re-allocated, we could allocate one from the same
cylinder, therefore removing the need for the heads to seek across the
disk.

How easily could this be added to existing filesystems?  Presumably
we'd need extra functionality in both filesystem code and the IDE and
SCSI code, and I realise that it might be completely impossible,
without custom firmware on the disk.  It's an interesting idea
though.

John.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

More intellegent bad block reallocation in software?

Post by Andreas Dilge » Wed, 04 Dec 2002 01:20:11



Quote:> My idea is that we could allocate one block out of every ten to be a
> spare block, (which would reduce disk capacity by 10%), and then if a
> block needed to be re-allocated, we could allocate one from the same
> cylinder, therefore removing the need for the heads to seek across the
> disk.

> How easily could this be added to existing filesystems?  Presumably
> we'd need extra functionality in both filesystem code and the IDE and
> SCSI code, and I realise that it might be completely impossible,
> without custom firmware on the disk.  It's an interesting idea
> though.

Even better - just ignore bad blocks and don't relocate them at all.
That's what ext2/3 do - just skip those blocks and avoid the seek
entirely.

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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

More intellegent bad block reallocation in software?

Post by Manish Lachwan » Wed, 04 Dec 2002 01:40:07


The remapping of bad sectors is a house-keeping function of the drive. By
default, every drive supports this. If a drive is unable to remap a sector
(due to physical defect/lack of spares/schedule later), it becomes a pending
sector. This can be taken care of in the software by writing to that sector
and leaving it upto the drive to remap this sector.

Different drives have different remapping strategy. Some drives allocate
zone based spares in which case the latency involved in fetching the spare
sector is anyway lesser.

By removing this check of a bad sector from the drive, you will need to
implement a similar algorithm in the software. IMHO, this itself might
introduce latencies. You can write a disk sc* sort of application which
reads every sector and then checks some stats (like READ times) and decides
whether that needs to be remapped or not. In any case, this would certainly
require a custom firmware to turn off this check.

-----Original Message-----

Sent: Monday, December 02, 2002 3:20 PM

Subject: More intellegent bad block reallocation in software?

Is it possible, or at least feasible for certain disk devices, to
disable the firmware-level re-allocation of bad blocks, (note: I am
aware that disks typically have many bad blocks that are reliant on
ECC to function - I am refering to completely bad blocks, that are
replaced with a 'spare' block), and do this in software?

The reason I'm asking, is because presumably the 'spare' blocks are
kept at the end or the disk, or at least all in one place, (or
possibly throughout the disk in each ZBR zone).  If this is the case,
then reading a single large file which is, according to the
filesystem, all in consecutive blocks, could involve several seeks to
the area where the spare blocks are.

My idea is that we could allocate one block out of every ten to be a
spare block, (which would reduce disk capacity by 10%), and then if a
block needed to be re-allocated, we could allocate one from the same
cylinder, therefore removing the need for the heads to seek across the
disk.

How easily could this be added to existing filesystems?  Presumably
we'd need extra functionality in both filesystem code and the IDE and
SCSI code, and I realise that it might be completely impossible,
without custom firmware on the disk.  It's an interesting idea
though.

John.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://www.veryComputer.com/
Please read the FAQ at  http://www.veryComputer.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://www.veryComputer.com/
Please read the FAQ at  http://www.veryComputer.com/

 
 
 

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. copy image from floppy?

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

4. Function needed

5. Scan for bad block software?

6. Segmentation faults in GNOME

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

8. Promiscous mode, Ne2000

9. Bad magic number in super-block / Group descriptors look bad

10. Terminal Server vs. Intellegent I/O

11. Non blocking socket blocks; says 'read would block' ?

12. 014 Bad Bad Bad !!! for Linux

13. Bad, bad, bad VM behaviour in 2.4.10