Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 May 2001 20:48:46 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Greg Lehey <grog@lemis.com>
Cc:        Doug Barton <DougB@DougBarton.net>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sbin/disklabel disklabel.8
Message-ID:  <Pine.BSF.4.21.0105232017570.67564-100000@besplex.bde.org>
In-Reply-To: <20010523140004.J76823@wantadilla.lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 23 May 2001, Greg Lehey wrote:

> On Tuesday, 22 May 2001 at 18:16:09 -0700, Doug Barton wrote:
> > Greg Lehey wrote:
> >>   ...
> >>   1.27      +20 -6     src/sbin/disklabel/disklabel.8

> > 	I'm not certain you're right about disklabel not enforcing the convention
> > of the c partition needing to be of type "unused." I was playing around
> > with a disklabel and accidentally used the word "unknown" instead, and
> > disklabel pitched a fit, although I think that was on a releng_4 system...

Only a few types names are valid (see <sys/disklabel.h>:fstypenames[]).
Most spelling errors give an invalid one so they are rejected.

The type name is mostly read-only in disklabel(8).  It is normally written
by utilities like newfs(8) when they write some data.  newfs(8) shouldn't
and mostly doesn't care what the partition type is -- it's purpose is to
take over the partition.  It only refuses to write to partitions of type
"boot".  Rev.1.27 of disklabel.8 is mostly misleading about this.

> I'd have to check the code.  Certainly I see enough people set c to
> type "vinum" and wonder why things don't work.

Perhaps they were misled by vinum(8) :-).  vinum(8) should be writing
the type name after it makes the partition valid for vinum, not users
before they run vinum.

I agree that taking over foreign partitions is too easy.  I think newfs,
etc. should only write to partitions of type "unused" unless forced.
OTOH, utilities like cp and dd shouldn't know about partitions, and
having some metadata outside of partitions is not good when you create
filesystems by copying images of them.

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" 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.0105232017570.67564-100000>