Re: SCSI Sector Size Problem

Richard B. Johnson (
Thu, 31 Oct 1996 17:52:15 -0500 (EST)

> >>>>> "SA" == System Administration <> writes:
> SA> If not, temporarily partition and format it with DOS. MS-DOS
> SA> reads the entire disk drive during its high-level format. This
> SA> will force bad blocks to be reloated.
> Why doesn't mke2fs do proper bad-block checking? I've had several
> floppies that had bad sectors on them that either (a) weren't detected
> by fdformat or (b) weren't detected by mke2fs. My only option was to
> format them with (Yggdrasil's) mkdosfs, which actually does the
> bad-block checking.
> Linux's Second Extended file system doesn't seem to be very fault
> tolerant. Because if there's a bad sector on the disk, the -c option
> won't catch it, even though everything else (including the kernel)
> does see it (and then panics, usually).
Note that I was only talking about SCSI. SCSI Disks should look perfect
to the file-system so that there will never be any bad blocks for a file-
system to hide from use. Once the bad-block replacement table within the
drive is full, you won't be able to write to the disk. However, you can
still read everything that was written, which means that you can "tar"
everything off to a tape. Then you low-level reformat the drive, find
some way to build a new file-system on the drive, put the directory
structure back from tape, then away you go. It's very convenient to
have two (or more) linux machines with SCSI controllers and an external
SCSI tape-drive. I can always rewrite an entire file-system as long
as one of the machines still works.

The initial boot of a newly recreated file-system will have to be off
a floppy, but once you mount /, you can "rdev" or "lilo" the boot sector
and everything is fixed.

To actually find bad blocks on a large SCSI Disk will require that the
whole disk be read (at least). This may take an hour or two with large
media. In the "olden" days, where media size was measured in megabytes,
this was not a problem. I have several VAXen that simply make any
bad blocks be "owned" by [000000]BADBLOCK.SYS, a file that is never
accessed and never backed up. If it seems as though I am running out
of disk space (a common problem on VAXes), I check the size of this
file. If this file has gotten large, it means that there are a lot of
bad blocks that have been found. I backup the disk to tape, boot into
the "console", low-level format the drive, then restore the drive's
contents from a "standalone" backup/restore, which allows even the
system disk a.k.a "root file-system" to be recovered in this manner.

Sorry I'm rambling on. The Ext2fs could make a /badbocks/BAD.SYS file
that would do the same thing. This would help with IDE drives that are
very prone to developing bad sectors right where the next access will
be during the most critical time. This wouldn't help the problems on
a swap partition though -- and this is what causes many drive-related

There are a lot of surplus SCSI drives around in the US, perhaps even
in Europe now. Drives smaller than 1 gb are practically given away.
Using SCSI will solve a lot of file-system problems.

Dick Johnson