docs/51897: Add example for disklable for md devices
Simon L. Nielsen
simon at nitro.dk
Wed May 7 20:32:12 UTC 2003
On 2003.05.07 20:36:49 +0200, Marc Fonvieille wrote:
> On Wed, May 07, 2003 at 10:58:48AM +0200, Simon L. Nielsen wrote:
> > case 'r':
> > /*
> > * We accept and ignode -r for compatibility with
> > * historically disklabel usage.
> > */
> > break;
> >
> > 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.
> >
>
> 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.
I actually meant 5.0 but after searching the archives and it looks like
phk has said -r should it be used to write the first label (before
disklabel(8) -> bsdlabel(8)).
So I think your suggestion about a note for >= 5.1 is right but I think
the mdconfig man page should only note the new form, right ?
Anyway just did a quick grep for disklabel in the handbook and added a
note about the options to the main places I found disklabel to be
referenced. Patch should be attached. What do you think of this approch?
Btw. I don't know the policy about repeating a note like this so I just
added it all the places I found since it is simpler for you to remove it
if it shouldn't be there than the over way around.
Btww. I noticed that in another example the arguments were given in a
different way so the patch also brings them in line to be more
consistent.
--
Simon L. Nielsen
-------------- next part --------------
Index: disks/chapter.sgml
===================================================================
RCS file: /home/ncvs/doc/en_US.ISO8859-1/books/handbook/disks/chapter.sgml,v
retrieving revision 1.157
diff -u -d -r1.157 chapter.sgml
--- disks/chapter.sgml 5 May 2003 19:36:10 -0000 1.157
+++ disks/chapter.sgml 7 May 2003 20:28:01 -0000
@@ -297,6 +297,15 @@
&prompt.root; <userinput>mount /dev/da1s1e /1</userinput> # Mount the partition(s)
&prompt.root; <userinput>vi /etc/fstab</userinput> # Add the appropriate entry/entries to your <filename>/etc/fstab</filename>.</screen>
+ <note>
+ <para>If you are using &os; 5.1 or newer the
+ &man.disklabel.8; arguments <option>-r</option> and
+ <option>auto</option> can be ommited so the command can
+ simply be :
+ </para>
+ <screen>&prompt.root; <userinput>disklabel -B -w da1s1</userinput></screen>
+ </note>
+
<para>If you have an IDE disk, substitute <filename>ad</filename>
for <filename>da</filename>. On pre-4.X systems use
<filename>wd</filename>.</para>
@@ -314,7 +323,7 @@
understand.</para>
<screen>&prompt.root; <userinput>dd if=/dev/zero of=/dev/da1 bs=1k count=1</userinput>
-&prompt.root; <userinput>disklabel -Brw da1 auto</userinput>
+&prompt.root; <userinput>disklabel -B -r -w da1 auto</userinput>
&prompt.root; <userinput>disklabel -e da1</userinput> # create the `e' partition
&prompt.root; <userinput>newfs -d0 /dev/da1e</userinput>
&prompt.root; <userinput>mkdir -p /1</userinput>
@@ -324,7 +333,7 @@
<para>An alternate method is:</para>
<screen>&prompt.root; <userinput>dd if=/dev/zero of=/dev/da1 count=2</userinput>
-&prompt.root; <userinput>disklabel /dev/da1 | disklabel -BrR da1 /dev/stdin</userinput>
+&prompt.root; <userinput>disklabel /dev/da1 | disklabel -B -r -R da1 /dev/stdin</userinput>
&prompt.root; <userinput>newfs /dev/da1e</userinput>
&prompt.root; <userinput>mkdir -p /1</userinput>
&prompt.root; <userinput>vi /etc/fstab</userinput> # add an entry for /dev/da1e
@@ -446,6 +455,13 @@
disklabel -r -w ad2 auto
disklabel -r -w ad3 auto</programlisting>
+ <note>
+ <para>If you are using &os; 5.1 or newer the
+ <command>disklabel</command> arguments
+ <option>-r</option> and <option>auto</option> can be
+ ommited.</para>
+ </note>
+
<para>This creates a disklabel for ad1c, ad2c and ad3c that
spans the entire disk.</para>
@@ -2284,6 +2300,14 @@
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/md0c 4846 2 4458 0% /mnt</screen>
</example>
+
+ <note>
+ <para>If you are using &os; 5.1 or newer the &man.disklabel.8;
+ arguments <option>-r</option> and <option>auto</option> can
+ be ommited so the command can simply be :
+ </para>
+ <screen>&prompt.root; <userinput>disklabel -w md<replaceable>0</replaceable></userinput></screen>
+ </note>
<para>If you do not specify the unit number with the
<option>-u</option> option, &man.mdconfig.8; will use the
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-doc/attachments/20030507/6a53a541/attachment.sig>
More information about the freebsd-doc
mailing list