A stupid mistake

From: Mike Davis (mdavis@kieser.net)
Date: Thu Jun 22 2000 - 11:59:35 EST


Hi,

I bought myself a 40Gb drive 3 weeks ago and couldn't get access to the full drive using v2.2.11, only
the first 30Gb (65535 of 79144cyls). This didn't bother me until I got bored one day and thought, maybe
it's a kernel limit, so I got 2.4_test1 and then (with a new cfdisk as well), no probs, I added a new
partition for the remaining space, mounted it and copied some files in no problem.

The problem arrived when I rebooted into my default kernel (2.2.11) without thinking about it and then
started copying data into the new partition - the session hung and various disk errors spewed onto the
screen... when I ran fsck, there were so many errors I gave up and just mkfs'd it... then I thought,
maybe the disk was faulty, so I did an fsck of the first 30Gb and the same problem... so I landed up
mkfs'ing that too. :((

I ran a fsck -c on the whole disk and no problems under 2.4.

Anyway, my question is, is it possible that the 2.2 kernel wrapped the cyl number around to
(65535-79144) in the classic way when I tried to copy data onto the second partition? If so, wouldn't it
be better to check for this (a negative number) and can the call instead of merrily over-writing the
wrong bit of disk?

BTW, I'm aware that it was plain old stupidity! :)

Thanks
Mike

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:24 EST