From owner-freebsd-bugs Wed Jul 25 2:51:48 2001 Delivered-To: freebsd-bugs@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 2DCFB37B405; Wed, 25 Jul 2001 02:51:45 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id TAA24888; Wed, 25 Jul 2001 19:51:35 +1000 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> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message