From owner-freebsd-bugs Wed Jul 25 20:30:20 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 73C3437B407 for ; Wed, 25 Jul 2001 20:30:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f6Q3U3V87623; Wed, 25 Jul 2001 20:30:03 -0700 (PDT) (envelope-from gnats) Date: Wed, 25 Jul 2001 20:30:03 -0700 (PDT) Message-Id: <200107260330.f6Q3U3V87623@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Mike Barcroft Subject: Re: bin/7756: disklabel misbehaving on seriously sick disks Reply-To: Mike Barcroft Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/7756; it has been noted by GNATS. From: Mike Barcroft To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: bin/7756: disklabel misbehaving on seriously sick disks Date: Wed, 25 Jul 2001 23:41:20 -0400 Adding to Audit-Trail. ----- Forwarded message from Bruce Evans ----- X-UIDL: 322cab6876710ba0e192e5cb3c34bd2c Delivered-To: mike@freebsd.org Date: Wed, 25 Jul 2001 19:48:18 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Mikhail Teterin Cc: mike@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG Subject: Re: bin/7756: disklabel misbehaving on seriously sick disks In-Reply-To: <200107241428.f6OESiY43239@aldan.algebra.com> On Tue, 24 Jul 2001, Mikhail Teterin wrote: > On 23 Jul, mike@FreeBSD.org wrote: > > Re-opened at the originator's request. I don't see how we can fix this > > problem with the amount of details in the PR, but the originator seems > > to think so. Awaiting fix and committer. > > The disklabel(8) should be modified, so that when -w is used, the disk > is NOT read prior to writing. No. `disklabel -w' doesn't read the label, but open(2) does. Then attempts to write a broken label using either ioctl(2) or write(2) fail. Anyway, `disklabel -w -B' must read the disk on i386's to preserve the partition^W slice table. The example in the PR (disklabel -w [-r] -B da0s1) attempts to apply the "auto" label (which was only for the whole disk slice at the time of the PR) to the first FreeBSD slice. This fails unless the disk has no slice table or the FreeBSD slice covers the whole disk. The example should work in RELENG_4 and -current. > In my PR, the work around is documented: > > dd if=/dev/zero ... This "works" by clobbering the slice table. This should be fixed someday. Bruce ----- End forwarded message ----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message