docs/124716: Geom RAID1 handbook example only covers boot partition

hywel at hmallett.co.uk hywel at hmallett.co.uk
Wed Jun 18 22:23:25 UTC 2008


Patch attached for perusal. It is to be applied to chapter.sgml in the  
geom directory.
I've merely copied the sgml from the existing article - it may not be  
standards-compliant.


-------------- next part --------------
--- chapter.sgml        2008-06-18 15:23:31.000000000 +0100
+++ chapter.sgml.new    2008-06-18 15:23:52.000000000 +0100
@@ -239,11 +239,77 @@
       interruption, and even be physically stored in a data
       safe.</para>

+    <procedure>
+      <title>Creating a mirror of unformatted ATA disks</title>
+
+      <step><para>Load the <filename>geom_mirror</filename>
+        module:</para>
+
+    <screen>&prompt.root; <userinput>kldload geom_mirror</userinput></screen>
+       </step>
+
+      <step><para>Ensure that a suitable mount point exists, such as <filename
+        role="directory">/mnt</filename>:</para>
+
+        <screen>&prompt.root; <userinput>mkdir /mnt</userinput></screen>
+      </step>
+
+      <step><para>Determine the device names for the disks which will
+        be mirrored, and create the new mirror device.  For example,
+       to mirror two unused and unpartitioned <acronym>ATA</acronym> disks,
+       for example <filename>/dev/ad2</filename> and
+       <filename>/dev/ad3</filename>:</para>
+
+        <screen>&prompt.root; <userinput>gmirror label -vb round-robin gm0 /dev/ad2 /dev/ad3</userinput></screen>
+
+<!--
+    <para>A message should be returned explaining that meta data has
+      been stored on the devices.
+XXX: What message?  Put it inside the screen output above.
+-->
+      </step>
+
+      <step><para>Write a standard label, also known as a partition
+        table, on the new volume:</para>
+
+        <screen>&prompt.root; <userinput>bsdlabel -w /dev/mirror/gm0</userinput></screen>
+
+      </step>
+
+      <step><para>This process should have created two other devices
+        in the <filename role="directory">/dev/mirror</filename>
+        directory in addition to the <devicename>gm0</devicename> device.
+        Those include <devicename>gm0a</devicename> and
+        <devicename>gm0c</devicename>.  At this point a file system may be created
+        on the <devicename>gm0a</devicename> device with the
+        <command>newfs</command> utility:</para>
+
+      <screen>&prompt.root; <userinput>newfs -U /dev/mirror/gm0a</userinput></screen>
+
+      <para>Many numbers will glide across the screen, and after a few
+        seconds, the process will be complete.  The volume has been
+        created and is ready to be mounted.</para>
+    </step>
+  </procedure>
+
+  <para>To manually mount the created disk stripe:</para>
+
+  <screen>&prompt.root; <userinput>mount /dev/mirror/gm0a /mnt</userinput></screen>
+
+  <para>To mount this striped file system automatically during the boot
+    process, place the volume information in
+    <filename>/etc/fstab</filename> file:</para>
+
+  <screen>&prompt.root; <userinput>echo "/dev/mirror/gm0a /mnt ufs rw 2 2" \</userinput>
+    <userinput>>> /etc/fstab</userinput></screen>
+
+    <para>To use gmirror on a root partition, more steps are required for setup</para>
+
     <para>To begin, ensure the system has two disk drives of equal size,
       this exercise assumes they are direct access (&man.da.4;)
       <acronym>SCSI</acronym> disks.</para>
-
-    <para>Begin by installing &os; on the first disk with only two
+
+   <para>Begin by installing &os; on the first disk with only two
       partitions.  One should be a swap partition, double the
       <acronym>RAM</acronym> size and all remaining space devoted to
       the root (<filename role="directory">/</filename>) file system.


More information about the freebsd-doc mailing list