Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jul 2001 19:48:18 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Mikhail Teterin <mi@aldan.algebra.com>
Cc:        mike@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG
Subject:   Re: bin/7756: disklabel misbehaving on seriously sick disks
Message-ID:  <Pine.BSF.4.21.0107251919010.48232-100000@besplex.bde.org>
In-Reply-To: <200107241428.f6OESiY43239@aldan.algebra.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0107251919010.48232-100000>