From oberman@es.net  Tue May  6 15:11:48 2003
Return-Path: <oberman@es.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 21CCE37B404
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  6 May 2003 15:11:48 -0700 (PDT)
Received: from postal1.es.net (postal1.es.net [198.128.3.205])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 6760143FD7
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  6 May 2003 15:11:43 -0700 (PDT)
	(envelope-from oberman@es.net)
Received: from ptavv.es.net ([198.128.4.29])
        by postal1.es.net (Postal Node 1) with ESMTP id MUA74016
        for <FreeBSD-gnats-submit@freebsd.org>; Tue, 06 May 2003 15:11:42 -0700
Received: by ptavv.es.net (Tachyon Server, from userid 9381)
	id 1B9315D04; Tue,  6 May 2003 15:11:42 -0700 (PDT)
Message-Id: <20030506221142.1B9315D04@ptavv.es.net>
Date: Tue,  6 May 2003 15:11:42 -0700 (PDT)
From: Kevin Oberman <oberman@es.net>
Reply-To: Kevin Oberman <oberman@es.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Add example for disklable for md devices
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         51897
>Category:       docs
>Synopsis:       Add example for disklable for md devices
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    blackend
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 06 15:20:10 PDT 2003
>Closed-Date:    Sat Oct 11 03:00:11 PDT 2003
>Last-Modified:  Sat Oct 11 03:00:11 PDT 2003
>Originator:     Kevin Oberman
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
ESnet--The Energy Sciences Network
>Environment:
System: FreeBSD ptavv.es.net 5.0-CURRENT FreeBSD 5.0-CURRENT #20: Mon May 5 12:11:13 PDT 2003 oberman@ptavv.es.net:/usr/obj/usr/src/sys/PTAVV i386

>Description:
I would like to request an small addition to the man page for
mdconfig. It has no examples of labeling a memory disk. There was such
an example in the old vnconfig man page. This might replace the existing
example for creating an md device with /tmp/boot.flp as backing.

>How-To-Repeat:
	N/A
>Fix:
Add the following:

     To create a disk named /dev/md0 with somebackingfile as backing and
     label it with ffs partitions:

           mdconfig -a -t vnode -f somebackingfile -u 0
           disklabel -r -w md0 auto
           disklabel -e md0
>Release-Note:
>Audit-Trail:

From: "Simon L. Nielsen" <simon@nitro.dk>
To: freebsd-gnats-submit@FreeBSD.org, oberman@es.net
Cc:  
Subject: Re: docs/51897: Add example for disklable for md devices
Date: Wed, 7 May 2003 02:03:59 +0200

 Hello
 
 A patch could be as below.
 
 Note I have changed the proposed commands a bit since to match new usage
 of disklabel and to init the backing file.
 
 I just add it as a different example since it IMO serves a different
 purpose than the example with backing of /tmp/boot.flp.
 
 Btw. note my posting to freebsd-current about disklabel coredumping if
 anyones decides to try this.
 
 %%%
 Index: mdconfig.8
 ===================================================================
 RCS file: /home/ncvs/src/sbin/mdconfig/mdconfig.8,v
 retrieving revision 1.19
 diff -u -d -r1.19 mdconfig.8
 --- mdconfig.8	27 Apr 2003 01:46:56 -0000	1.19
 +++ mdconfig.8	6 May 2003 23:54:40 -0000
 @@ -164,6 +164,18 @@
  mount /dev/md10 /tmp
  chmod 1777 /tmp
  .Ed
 +.Pp
 +To create a 10MB memory disk named
 +.Pa /dev/md0
 +with the file
 +.Pa somebackingfile
 +as backing and label it with normal partitions:
 +.Bd -literal -offset indent
 +dd if=/dev/zero of=somebackingfile bs=1k count=10k
 +mdconfig -a -t vnode -f somebackingfile -u 0
 +disklabel -w md0
 +disklabel -e md0
 +.Ed
  .Sh SEE ALSO
  .Xr md 4 ,
  .Xr disklabel 8 ,
 %%%
 
 -- 
 Simon L. Nielsen

From: "Simon L. Nielsen" <simon@nitro.dk>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: docs/51897: Add example for disklable for md devices
Date: Mon, 19 May 2003 02:17:23 +0200

 --eJnRUKwClWJh1Khz
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Adding relevant part of notes by blackend@ and myself regarding this PR
 to the audit-trail.
 
 ----- Forwarded message from Marc Fonvieille <blackend@FreeBSD.org> -----
 
 =46rom: Marc Fonvieille <blackend@FreeBSD.org>
 Date: Wed, 7 May 2003 20:36:49 +0200
 To: "Simon L. Nielsen" <simon@nitro.dk>
 Cc: freebsd-doc@FreeBSD.org
 User-Agent: Mutt/1.4i
 Subject: Re: docs/51897: Add example for disklable for md devices
 
 On Wed, May 07, 2003 at 10:58:48AM +0200, Simon L. Nielsen wrote:
 > > We shoould be consistent with other docs (Handbook etc..) i.e.
 > > disklabel -r -w md0 auto
 >=20
 > Actually it was on purpose that I changed that.  As I understand it '-r'
 > and 'auto' are not needed anymore post GEOM.  The examples in
 > bsdlabel(8) does not use auto and this is the code handling '-r' :
 >
 
 Well I did not think about the brand new disklabel :(
 
 > 	case 'r':
 > 		/*
 > 		 * We accept and ignode -r for compatibility with
 > 		 * historically disklabel usage.
 > 		 */
 > 		break;
 >=20
 > I would rather say that the rest of the docs should be change not to use
 > '-r' and 'auto' and perhaps add a compatibility note for FreeBSD < 5.0.
 >=20
 
 You meant 5.1 I think.
 In the Handbook I would write that -r and auto options can be safely
 omitted on FreeBSD 5.1 and later.
 
 Marc
 
 ----- End forwarded message -----
 
 --=20
 Simon L. Nielsen
 
 --eJnRUKwClWJh1Khz
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.1 (FreeBSD)
 
 iD8DBQE+yCKS8kocFXgPTRwRAsJZAKDPpVK61BqsvuJGAY5wEdkk1o3SbwCfRsbu
 t509Xg33Zflc/9MFaInpyYI=
 =2W+W
 -----END PGP SIGNATURE-----
 
 --eJnRUKwClWJh1Khz--
Responsible-Changed-From-To: freebsd-doc->blackend 
Responsible-Changed-By: blackend 
Responsible-Changed-When: Mon May 19 02:05:37 PDT 2003 
Responsible-Changed-Why:  
I will take it since I'm in the audit-trail. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=51897 
State-Changed-From-To: open->closed 
State-Changed-By: blackend 
State-Changed-When: Sat Oct 11 02:59:41 PDT 2003 
State-Changed-Why:  
I added the Handbook's example.  Thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=51897 
>Unformatted:
