doc-el commit 1016:0b3f811345fb - Replace english text of 'geom'...
freebsd-doc-el at lists.hellug.gr
freebsd-doc-el at lists.hellug.gr
Sun Nov 9 06:50:06 EET 2008
changeset: 1016:0b3f811345fb
user: Manolis Kiagias <sonicy at otenet.gr>
date: 2008-11-06 16:38 +0200
details: http://hg.hellug.gr/freebsd/doc-el/?cmd=changeset;node=0b3f811345fb
description:
Replace english text of 'geom' chapter with rev. 1.43 (Fixed a tag error in synopsis)
diffstat:
1 file changed, 143 insertions(+), 133 deletions(-)
el_GR.ISO8859-7/books/handbook/geom/chapter.sgml | 276 +++++++++++-----------
diffs (truncated from 447 to 300 lines):
diff -r 5088d006af82 -r 0b3f811345fb el_GR.ISO8859-7/books/handbook/geom/chapter.sgml
--- a/el_GR.ISO8859-7/books/handbook/geom/chapter.sgml Thu Nov 06 16:31:29 2008 +0200
+++ b/el_GR.ISO8859-7/books/handbook/geom/chapter.sgml Thu Nov 06 16:38:54 2008 +0200
@@ -7,7 +7,7 @@
$FreeBSD: doc/el_GR.ISO8859-7/books/handbook/geom/chapter.sgml,v 1.2 2008/01/14 14:19:45 keramida Exp $
%SOURCE% en_US.ISO8859-1/books/handbook/geom/chapter.sgml
- %SRCID% 1.1
+ %SRCID% 1.43
-->
@@ -80,6 +80,8 @@
<listitem>
<para>Íá êáôáíïåßôå ðùò ìåôá÷åéñßæåôáé ôï &os; ôéò óõóêåõÝò äßóêùí
(<xref linkend="disks">).</para>
+ </listitem>
+
<listitem>
<para>Íá ãíùñßæåôå ðùò èá ñõèìßóåôå êáé èá åãêáôáóôÞóåôå Ýíá íÝï
ðõñÞíá óôï &os;
@@ -94,7 +96,7 @@
<para>GEOM permits access and control to classes — Master Boot
Records, <acronym>BSD</acronym> labels, etc — through the
use of providers, or the special files in
- <filename role="directory">/dev</filename>. Supporting various
+ <filename class="directory">/dev</filename>. Supporting various
software <acronym>RAID</acronym> configurations, GEOM will
transparently provide access to the operating system and
operating system utilities.</para>
@@ -164,7 +166,7 @@
<step><para>Ensure that a suitable mount point exists. If this
volume will become a root partition, then temporarily use
another mount point such as <filename
- role="directory">/mnt</filename>:</para>
+ class="directory">/mnt</filename>:</para>
<screen>&prompt.root; <userinput>mkdir /mnt</userinput></screen>
</step>
@@ -193,7 +195,7 @@
</step>
<step><para>This process should have created two other devices
- in the <filename role="directory">/dev/stripe</filename>
+ in the <filename class="directory">/dev/stripe</filename>
directory in addition to the <devicename>st0</devicename> device.
Those include <devicename>st0a</devicename> and
<devicename>st0c</devicename>. At this point a file system may be created
@@ -248,142 +250,128 @@
safe.</para>
<para>To begin, ensure the system has two disk drives of equal size,
- this exercise assumes they are direct access (&man.da.4;)
+ these exercises assume they are direct access (&man.da.4;)
<acronym>SCSI</acronym> disks.</para>
- <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.
- It is possible to have separate partitions for other mount points;
- however, this will increase the difficulty level ten fold due to
- manual alteration of the &man.bsdlabel.8; and &man.fdisk.8;
- settings.</para>
+ <sect2>
+ <title>Mirroring Primary Disks</title>
- <para>Reboot and wait for the system to fully initialize. Once this
- process has completed, log in as the <username>root</username>
- user.</para>
+ <para>Assuming &os; has been installed on the first,
+ <devicename>da0</devicename> disk device, &man.gmirror.8;
+ should be told to store its primary data there.</para>
- <para>Create the <filename>/dev/mirror/gm</filename> device and link
- it with <filename>/dev/da1</filename>:</para>
+ <para>Before building the mirror, enable additional debugging
+ information and opening access to the device by setting the
+ <varname>kern.geom.debugflags</varname> &man.sysctl.8; option
+ to the following value:</para>
- <screen>&prompt.root; <userinput>gmirror label -vnb round-robin gm0 /dev/da1</userinput></screen>
+ <screen>&prompt.root; <userinput>sysctl kern.geom.debugflags=17</userinput></screen>
- <para>The system should respond with:</para>
- <screen>
-Metadata value stored on /dev/da1.
+ <para>Now create the mirror. Begin the process by storing
+ meta-data information on the primary disk device,
+ effectively creating the
+ <filename class="devicefile">/dev/mirror/gm</filename> device
+ using the following command:</para>
+
+ <screen>&prompt.root; <userinput>gmirror label -vb round-robin gm0 /dev/da0</userinput></screen>
+
+ <para>The system should respond with:</para>
+
+ <screen>Metadata value stored on /dev/da0.
Done.</screen>
- <para>Initialize GEOM, this will load the
- <filename>/boot/kernel/geom_mirror.ko</filename> kernel
- module:</para>
+ <para>Initialize GEOM, this will load the
+ <filename>/boot/kernel/geom_mirror.ko</filename> kernel
+ module:</para>
- <screen>&prompt.root; <userinput>gmirror load</userinput></screen>
+ <screen>&prompt.root; <userinput>gmirror load</userinput></screen>
- <note>
- <para>This command should have created the
- <devicename>gm0</devicename>, device node under the
- <filename role="directory">/dev/mirror</filename>
- directory.</para>
- </note>
+ <note>
+ <para>When this command completes successfully, it creates the
+ <devicename>gm0</devicename> device node under the
+ <filename class="directory">/dev/mirror</filename>
+ directory.</para>
+ </note>
- <para>Install a generic <command>fdisk</command> label and boot code
- to new <devicename>gm0</devicename> device:</para>
+ <para>Enable loading of the <filename>geom_mirror.ko</filename>
+ kernel module during system initialization:</para>
- <screen>&prompt.root; <userinput>fdisk -vBI /dev/mirror/gm0</userinput></screen>
+ <screen>&prompt.root; <userinput>echo 'geom_mirror_load="YES"' >> /boot/loader.conf</userinput></screen>
- <para>Now install generic <command>bsdlabel</command>
- information:</para>
+ <para>Edit the <filename>/etc/fstab</filename> file, replacing
+ references to the old <devicename>da0</devicename> with the
+ new device nodes of the <devicename>gm0</devicename> mirror device.
+ As the <username>root</username> user, edit the
+ <filename>/etc/fstab</filename>:</para>
- <screen>&prompt.root; <userinput>bsdlabel -wB /dev/mirror/gm0s1</userinput></screen>
+ <screen>&prompt.root; <userinput>vi /etc/fstab</userinput></screen>
- <note>
- <para>If multiple slices and partitions exist, the flags for the
- previous two commands will require alteration. They must match
- the slice and partition size of the other disk.</para>
- </note>
+ <para>In &man.vi.1; back up the current contents of
+ <filename>fstab</filename> by typing
+ <userinput>:w /etc/fstab.bak</userinput>. Then
+ replace all old <devicename>da0</devicename> references
+ with <devicename>gm0</devicename> by typing
+ <userinput>:%s/da/mirror\/gm/g</userinput>.<para>
- <para>Use the &man.newfs.8; utility to construct a default <acronym>UFS</acronym>
- file system on the <devicename>gm0s1a</devicename> device node:</para>
+ <para>The resulting <filename>fstab</filename> file should look
+ similar to the following. It does not matter if the disk
+ drives are <acronym>SCSI</acronym> or <acronym>ATA</acronym>,
+ the <acronym>RAID</acronym> device will be
+ <devicename>gm</devicename> regardless.</para>
- <screen>&prompt.root; <userinput>newfs -U /dev/mirror/gm0s1a</userinput></screen>
+ <programlisting># Device Mountpoint FStype Options Dump Pass#
+/dev/mirror/gm0s2b none swap sw 0 0
+/dev/mirror/gm0s2a / ufs rw 1 1
+#/dev/mirror/gm0s2d /store ufs rw 2 2
+/dev/mirror/gm0s2e /usr ufs rw 2 2
+/dev/acd0 /cdrom cd9660 ro,noauto 0 0</programlisting>
- <para>This should have caused the system to spit out some
- information and a bunch of numbers. This is good. Examine the
- screen for any error messages and mount the device to the
- <filename role="directory">/mnt</filename> mount point:</para>
+ <para>Reboot the system:</para>
- <screen>&prompt.root; <userinput>mount /dev/mirror/gm0s1a /mnt</userinput></screen>
+ <screen>&prompt.root; <userinput>shutdown -r now</userinput></screen>
- <para>Now move all data from the boot disk over to this new file
- system. This example uses the &man.dump.8; and &man.restore.8;
- commands; however, &man.dd.1; would also work with this
- scenario.</para>
+ <para>During system initialization, the
+ <devicename>gm0</devicename> should be used in place of the
+ <devicename>da0</devicename> device. Once fully initialized,
+ this may be checked by visually inspecting the output from
+ the <command>mount</command> command:</para>
- <screen>&prompt.root; <userinput>dump -L -0 -f- / |(cd /mnt && restore -r -v -f-)</userinput></screen>
+ <screen>&prompt.root; <userinput>mount</userinput>
+Filesystem 1K-blocks Used Avail Capacity Mounted on
+/dev/mirror/gm0s1a 1012974 224604 707334 24% /
+devfs 1 1 0 100% /dev
+/dev/mirror/gm0s1f 45970182 28596 42263972 0% /home
+/dev/mirror/gm0s1d 6090094 1348356 4254532 24% /usr
+/dev/mirror/gm0s1e 3045006 2241420 559986 80% /var
+devfs 1 1 0 100% /var/named/dev</screen>
- <para>This must be done for each file system. Simply place the
- appropriate file system in the correct location when running the
- aforementioned command.</para>
+ <para>The output looks good, as expected. Finally, to begin
+ synchronization, insert the <devicename>da1</devicename> disk
+ into the mirror using the following command:</para>
- <para>Now edit the replicated <filename>/mnt/etc/fstab</filename>
- file and remove or comment out the swap file
- <footnote>
- <para>It should be noted that commenting out the swap file entry
- in <filename>fstab</filename> will most likely require you to
- re-establish a different way of enabling swap space. Please
- refer to <xref linkend="adding-swap-space"> for more
- information.</para>
- </footnote>. Change the other file system information to use the
- new disk as shown in the following example:</para>
+ <screen>&prompt.root; <userinput>gmirror insert gm0 /dev/da1</userinput></screen>
- <programlisting># Device Mountpoint FStype Options Dump Pass#
-#/dev/da0s2b none swap sw 0 0
-/dev/mirror/gm0s1a / ufs rw 1 1</programlisting>
+ <para>As the mirror is built the status may be checked using
+ the following command:</para>
- <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>gmirror status</userinput></screen>
- <screen>&prompt.root; <userinput>echo "1:da(1,a)/boot/loader" > /boot.config</userinput></screen>
+ <para>Once the mirror has been built and all current data
+ has been synchronized, the output from the above command
+ should look like:</para>
- <screen>&prompt.root; <userinput>echo "1:da(1,a)/boot/loader" > /mnt/boot.config</userinput></screen>
+ <screen> Name Status Components
+mirror/gm0 COMPLETE da0
+ da1</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"' >> /mnt/boot/loader.conf</userinput></screen>
-
- <para>Reboot the system:</para>
-
- <screen>&prompt.root; <userinput>shutdown -r now</userinput></screen>
-
- <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>
-
- <screen>&prompt.root; <userinput>gmirror configure -a gm0</userinput>
-&prompt.root; <userinput>gmirror insert gm0 /dev/da0</userinput></screen>
-
- <para>The <option>-a</option> flag tells &man.gmirror.8; to use
- automatic synchronization; i.e., mirror the disk writes
- automatically. The manual page explains how to rebuild and
- replace disks, although it uses <devicename>data</devicename>
- in place of <devicename>gm0</devicename>.</para>
+ <para>If there are any issues, or the mirror is still
+ completing the build process, the example will show
+ <literal>DEGRADED</literal> in place of
+ <literal>COMPLETE</literal>.</para>
+ </sect2>
<sect2>
<title>Troubleshooting</title>
-
<sect3>
<title>System refuses to boot</title>
@@ -410,6 +398,30 @@
That should remedy this issue.</para>
</sect3>
</sect2>
+
+ <sect2>
+ <title>Recovering From Disk Failure</title>
+
+ <para>The wonderful part about disk mirroring is that when a
+ disk fails, it may be replaced, presumably, without losing
+ any data.</para>
+
+ <para>Considering the previous <acronym>RAID</acronym>1
+ configuration, assume that <devicename>da1</devicename>
+ has failed and now needs to be replaced. To replace it,
+ determine which disk has failed and power down the system.
+ At this point, the disk may be swapped with a new one and
+ the system brought back up. After the system has restarted,
More information about the Freebsd-doc-el
mailing list