From owner-freebsd-bugs Tue Apr 11 9:37:25 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from eastwood.aldigital.algroup.co.uk (eastwood.aldigital.algroup.co.uk [194.128.162.193]) by hub.freebsd.org (Postfix) with ESMTP id 8591937BACF for ; Tue, 11 Apr 2000 09:37:17 -0700 (PDT) (envelope-from adam@algroup.co.uk) Received: from algroup.co.uk ([192.168.192.2]) by eastwood.aldigital.algroup.co.uk (8.8.8/8.6.12) with ESMTP id QAA08216; Tue, 11 Apr 2000 16:37:11 GMT Message-ID: <38F354BA.F633075A@algroup.co.uk> Date: Tue, 11 Apr 2000 17:37:14 +0100 From: Adam Laurie X-Mailer: Mozilla 4.7 [en-gb] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-bugs@freebsd.org Subject: freebsd 3.4 disklabel bug Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org FreeBSD stranger.aldigital.co.uk 3.4-RELEASE FreeBSD 3.4-RELEASE #1: Mon Apr 10 14:57:49 GMT 2000 root@stranger.aldigital.co.uk:/usr/src/sys/compile/STRANGER i386 ...on an IDE drive, it wrongly decides to use 1 more cylinder than it actually has: root@stranger /root# disklabel -r wd1 # /dev/rwd1c: type: ESDI disk: wd1s1 label: flags: bytes/sector: 512 sectors/track: 63 tracks/cylinder: 255 sectors/cylinder: 16065 cylinders: 2491 sectors/unit: 40032696 rpm: 3600 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # milliseconds track-to-track seek: 0 # milliseconds drivedata: 0 8 partitions: # size offset fstype [fsize bsize bps/cpg] c: 40032696 0 unused 0 0 # (Cyl. 0 - 2491*) e: 40032696 0 4.2BSD 1024 8192 16 # (Cyl. 0 - 2491*) note that it thinks it has 2491 cylinders, but then uses 0 - 2491, i.e. 2492. This will go unnoticed if your offending partition is swap, as it doesn't try to write to swap until it errr... swaps. However, if you have a 2nd hard disk, and you allocate the entire disk, you will be unable to newfs it (from dmesg): wd1e: hard error writing fsbn 40031999 (wd1 bn 40031999; cn 2491 tn 223 sn 35) (status 51 error 10) Setting it to this: # size offset fstype [fsize bsize bps/cpg] c: 40032696 0 unused 0 0 # (Cyl. 0 - 2491*) e: 40016631 0 4.2BSD 1024 8192 16 # (Cyl. 0 - 2490*) cures the problem. Apologies if this is already known... I'm not a regular subscriber to this list... cheers, Adam -- Adam Laurie Tel: +44 (181) 742 0755 A.L. Digital Ltd. Fax: +44 (181) 742 5995 Voysey House Barley Mow Passage http://www.aldigital.co.uk London W4 4GB mailto:adam@algroup.co.uk UNITED KINGDOM PGP key on keyservers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message