From owner-freebsd-bugs@FreeBSD.ORG Fri Jul 15 23:10:02 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A34B16A41C for ; Fri, 15 Jul 2005 23:10:02 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 05B6943D46 for ; Fri, 15 Jul 2005 23:10:01 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j6FNA0k1002673 for ; Fri, 15 Jul 2005 23:10:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j6FNA06b002672; Fri, 15 Jul 2005 23:10:00 GMT (envelope-from gnats) Resent-Date: Fri, 15 Jul 2005 23:10:00 GMT Resent-Message-Id: <200507152310.j6FNA06b002672@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Francis Gendreau Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E7C0916A41C for ; Fri, 15 Jul 2005 23:02:44 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA73843D45 for ; Fri, 15 Jul 2005 23:02:44 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j6FN2ibn059635 for ; Fri, 15 Jul 2005 23:02:44 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j6FN2iGr059633; Fri, 15 Jul 2005 23:02:44 GMT (envelope-from nobody) Message-Id: <200507152302.j6FN2iGr059633@www.freebsd.org> Date: Fri, 15 Jul 2005 23:02:44 GMT From: Francis Gendreau To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: kern/83529: partition table corruption using wdc/wd driver X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jul 2005 23:10:02 -0000 >Number: 83529 >Category: kern >Synopsis: partition table corruption using wdc/wd driver >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jul 15 23:10:00 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Francis Gendreau >Release: FreeBSD 4.11 STABLE >Organization: Makwa >Environment: FreeBSD 4.11-STABLE FreeBSD 4.11-STABLE #0: Fri Jul 15 17:56:42 EDT 2005 root@:/usr/obj/usr/src/sys/registette i386 >Description: I am building a system with two slice on a single drive, since a single slice does not provides me enough partitions for my filesystem design. In order to optimise the operating system, I've compiled the wdc and wd driver, from which I access my partition. Using the 'ad' driver, I was able to access every partition created of every slices of every drives. The problem here reside in the two commented partitions of the wd0s2 slice. N.B. I uses the STABLE release onyl because the Robert Watson's ACL patch is included with it. I do ignore if the 4.11-RELEASE also have the problem. ===================================================================== # cat /etc/fstab # See the fstab(5) manual page for important information on automatic # mounts of network filesystems before modifying this file. # # Device Mountpoint FStype Options Dump Pass# /dev/wd1s1b none swap sw 0 0 /dev/wd0s1b none swap sw 0 0 /dev/wd0s1a / ufs rw 1 1 /dev/wd0s2f /data ufs rw 2 2 /dev/wd0s2h /data/db ufs rw 2 2 /dev/wd0s2g /data/dev ufs rw 2 2 #/dev/wd0s2a /data/profiles ufs rw 2 2 /dev/wd1s1f /data/shares ufs rw 2 2 /dev/wd0s1g /root ufs rw 2 2 /dev/wd0s1f /tmp ufs rw 2 2 /dev/wd0s1e /usr ufs rw 2 2 #/dev/wd0s2b /usr/home ufs rw 2 2 /dev/wd0s2e /usr/local ufs rw 2 2 /dev/wd0s1h /var ufs rw 2 2 /dev/wd1s1e /var/log ufs rw 2 2 /dev/wd0s1d /var/tmp ufs rw 2 2 /dev/acd0c /cdrom cd9660 ro,noauto 0 0 proc /proc procfs rw 0 0 ===================================================================== # fdisk /dev/wd0 ******* Working on device /dev/wd0 ******* parameters extracted from in-core disklabel are: cylinders=4112 heads=255 sectors/track=63 (16065 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=4112 heads=255 sectors/track=63 (16065 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165,(FreeBSD/NetBSD/386BSD) start 63, size 12610962 (6157 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 784/ head 254/ sector 63 The data for partition 2 is: sysid 165,(FreeBSD/NetBSD/386BSD) start 12611025, size 67681845 (33047 Meg), flag 0 beg: cyl 785/ head 0/ sector 1; end: cyl 1023/ head 254/ sector 63 The data for partition 3 is: The data for partition 4 is: ===================================================================== # disklabel -r /dev/wd0s1 # /dev/wd0s1: type: ESDI disk: ad0s1 label: flags: bytes/sector: 512 sectors/track: 63 tracks/cylinder: 255 sectors/cylinder: 16065 cylinders: 784 sectors/unit: 12610962 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] a: 2097152 0 4.2BSD 2048 16384 89 # (Cyl. 0 - 130*) b: 1048576 2097152 swap # (Cyl. 130*- 195*) c: 12610962 0 unused 0 0 # (Cyl. 0 - 784*) d: 1076626 11534336 4.2BSD 2048 16384 89 # (Cyl. 717*- 784*) e: 4194304 3145728 4.2BSD 2048 16384 89 # (Cyl. 195*- 456*) f: 1048576 7340032 4.2BSD 2048 16384 89 # (Cyl. 456*- 522*) g: 1048576 8388608 4.2BSD 2048 16384 89 # (Cyl. 522*- 587*) h: 2097152 9437184 4.2BSD 2048 16384 89 # (Cyl. 587*- 717*) # ===================================================================== # /dev/wd0s2: type: ESDI disk: ad0s2 label: flags: bytes/sector: 512 sectors/track: 63 tracks/cylinder: 255 sectors/cylinder: 16065 cylinders: 4213 sectors/unit: 67681845 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] a: 41943040 31485393 4.2BSD 2048 16384 89 # (Cyl. 1959*- 4570*) b: 6864437 73428433 4.2BSD 2048 16384 89 # (Cyl. 4570*- 4997*) c: 67681845 12611025 unused 0 0 # (Cyl. 785 - 4997) e: 4194304 12611025 4.2BSD 2048 16384 89 # (Cyl. 785 - 1046*) f: 2097152 16805329 4.2BSD 2048 16384 89 # (Cyl. 1046*- 1176*) g: 4194304 18902481 4.2BSD 2048 16384 89 # (Cyl. 1176*- 1437*) h: 8388608 23096785 4.2BSD 2048 16384 89 # (Cyl. 1437*- 1959*) partition a: partition extends past end of unit partition b: offset past end of unit partition b: partition extends past end of unit partition c: partition extends past end of unit Warning, partition c doesn't start at 0! Warning, An incorrect partition c may cause problems for standard system utilities # ===================================================================== >How-To-Repeat: To repeat the problem, simply create a second slice using disklabel while installing the operating system. The problem, after 3 re-installations, always reside in the 2 last created partition of the second slice of the drive. The system repports their parameters are invalid. >Fix: >Release-Note: >Audit-Trail: >Unformatted: