Update the gmirror section:

1: Pass -O 2 to newfs for UFS2;
  2: Add a dd command to clear the primary disk;
  3: Remove the creation of boot.config, it's unneeded and causes problems;
  4: Describe how to view the status of the mirror build.

PR:	112267 [3]
This commit is contained in:
Tom Rhodes 2008-01-22 03:44:53 +00:00
parent 7e383b86e6
commit 77e9a754e4
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=31336

View file

@ -298,7 +298,7 @@ Done.</screen>
<para>Use the &man.newfs.8; utility to construct a default <acronym>UFS</acronym>
file system on the <devicename>gm0s1a</devicename> device node:</para>
<screen>&prompt.root; <userinput>newfs -U /dev/mirror/gm0s1a</userinput></screen>
<screen>&prompt.root; <userinput>newfs -U -O 2 /dev/mirror/gm0s1a</userinput></screen>
<para>This should have caused the system to spit out some
information and a bunch of numbers. This is good. Examine the
@ -333,36 +333,27 @@ Done.</screen>
#/dev/da0s2b none swap sw 0 0
/dev/mirror/gm0s1a / ufs rw 1 1</programlisting>
<para>Now create a <filename>boot.config</filename> file on both the
current and new root partitions. This file will
<quote>help</quote> the system <acronym>BIOS</acronym>
boot the correct drive:</para>
<screen>&prompt.root; <userinput>echo "1:da(1,a)/boot/loader" &gt; /boot.config</userinput></screen>
<screen>&prompt.root; <userinput>echo "1:da(1,a)/boot/loader" &gt; /mnt/boot.config</userinput></screen>
<note>
<para>We have placed it on both root partitions to ensure proper
boot up. If for some reason the system cannot read from the
new root partition, a failsafe is available.</para>
</note>
<para>Ensure the <filename>geom_mirror.ko</filename> module will load
on boot by running the following command:</para>
<screen>&prompt.root; <userinput>echo 'geom_mirror_load="YES"' &gt;&gt; /mnt/boot/loader.conf</userinput></screen>
<screen>&prompt.root; <userinput>echo 'geom_mirror_load="YES"' &gt;&gt; /boot/loader.conf</userinput></screen>
<para>Reboot the system:</para>
<screen>&prompt.root; <userinput>shutdown -r now</userinput></screen>
<para>At the boot screen, select option four (4) to gain access to
single user mode. At the console, ensure that the system booted
from the <devicename>gm0s1a</devicename>. This can be done by
viewing the output from &man.df.1;.</para>
<para>If all has gone well, the system should have booted from the
<devicename>gm0s1a</devicename> device and a <command>login</command>
prompt should be waiting. If something went wrong, see review
the forthcoming troubleshooting section. Now add the
<devicename>da0</devicename> disk to <devicename>gm0</devicename>
device:</para>
<devicename>gm0s1a</devicename> device. From here, the primary
disk may be cleared and inserted into the mirror using the
following commands:</para>
<screen>&prompt.root; <userinput>dd if=/dev/zero of=/dev/da0 bs=512 count=79</userinput></screen>
<screen>&prompt.root; <userinput>gmirror configure -a gm0</userinput>
&prompt.root; <userinput>gmirror insert gm0 /dev/da0</userinput></screen>
@ -373,9 +364,13 @@ Done.</screen>
replace disks, although it uses <devicename>data</devicename>
in place of <devicename>gm0</devicename>.</para>
<para>As the mirror is built the status may be checked using
the following command:</para>
<screen>&prompt.root; <userinput>gmirror status</userinput></screen>
<sect2>
<title>Troubleshooting</title>
<sect3>
<title>System refuses to boot</title>