[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian 1.1: fsck failure.



> fsck.ext2: Attempt to read block from filesystem resulted in short read

From: "Susan G. Kleinmann" <sgk@sgk.tiac.net>
> Run fsck manually on the sick drive (fsck /dev/hda8).

I sent a private note to this user that he should print the disk partition
table (using "fdisk") and see what it says for partition 8. The message
indicates a possible corrupt partition table. Your instructions should be
followed once that problem is resolved.

> Then (this is on the advice of Sherwood Botsford) execute
> reboot -n
> He said:
> 'The -n is critical -- when you finish the fsck, the state of the
> disk and the state of the kernel image of the disk are NOT the same
> and the disk image is the right one. -n says, "Don't write out
> the kernel image of what the disk is..." '

As far as I can tell, this applies to every Unix system _except_ for
Linux. The reason is that other Unix systems provide "raw" and "block"
devices for the disk, and use the "raw" one to repair the disk. The
difference between the raw and block devices is that the block ones
cache disk blocks in memory, and the raw ones do not cache, but can be
faster to access for things like fsck. That meant that you could fix a
disk using the raw device, and a copy of the disk block in the memory
cache would be inconsistent with the one you had just fixed. Linux
_only_ provides block devices for the disks, there are no raw devices
for them at all. A second way in which Linix us different from older
Unix is that older Unix checked the root filesystem while it was
mounted for writing, and thus the in-kernel filesystem databases used
by mounted disks could be out of phase with the blocks that fsck wrote
to the raw device. Linux checks the root while it is mounted
read-only, and then re-mounts it, so this is not a problem. Don't ever
attempt to repair a disk that is mounted for writing.

	Bruce
--
       Clinton isn't perfect, but I like him a lot more than Dole.
            Please register to vote, and vote for Democrats.
Bruce Perens AB6YM          Bruce@Pixar.com            http://www.hams.com/



Reply to: