diff --git a/en_US.ISO8859-1/books/handbook/geom/chapter.sgml b/en_US.ISO8859-1/books/handbook/geom/chapter.sgml index 9551ef043c..5a77ca0352 100644 --- a/en_US.ISO8859-1/books/handbook/geom/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/geom/chapter.sgml @@ -30,7 +30,7 @@ This chapter covers the use of disks under the GEOM framework in &os;. This includes the major RAID + role="Redundant Array of Inexpensive Disks">RAID control utilities which use the framework for configuration. This chapter will not go into in depth discussion on how GEOM handles or controls I/O, the underlying subsystem, or code. @@ -50,12 +50,11 @@ How to use the base utilities to configure, maintain, - and manipulate the various RAID - levels. + and manipulate the various RAID levels. - How to mirror, stripe, encrypt, and remotely connect disk + How to mirror, stripe, encrypt, and remotely connect disk devices through GEOM. @@ -93,19 +92,19 @@ - - - - Tom - Rhodes - Written by - - - Murray - Stokely - - - + + + + Tom + Rhodes + Written by + + + Murray + Stokely + + + RAID0 - Striping @@ -134,90 +133,92 @@ the same size, since I/O requests are interleaved to read or write to multiple disks in parallel. - - - - + + + + - - Disk Striping Illustration - - + + Disk Striping Illustration + + Creating a stripe of unformatted ATA disks - Load the geom_stripe.ko - module: + + Load the geom_stripe.ko + module: - &prompt.root; kldload geom_stripe - - - Ensure that a suitable mount point exists. If this - volume will become a root partition, then temporarily use - another mount point such as /mnt: - - &prompt.root; mkdir /mnt + &prompt.root; kldload geom_stripe - Determine the device names for the disks which will - be striped, and create the new stripe device. For example, - to stripe two unused and unpartitioned ATA disks, - for example /dev/ad2 and - /dev/ad3: + + Ensure that a suitable mount point exists. If this + volume will become a root partition, then temporarily use + another mount point such as /mnt: - &prompt.root; gstripe label -v st0 /dev/ad2 /dev/ad3 + &prompt.root; mkdir /mnt + + + + Determine the device names for the disks which will + be striped, and create the new stripe device. For example, + to stripe two unused and unpartitioned ATA disks, + for example /dev/ad2 and + /dev/ad3: + + &prompt.root; gstripe label -v st0 /dev/ad2 /dev/ad3 Metadata value stored on /dev/ad2. Metadata value stored on /dev/ad3. Done. - - Write a standard label, also known as a partition - table, on the new volume and install the default - bootstrap code: - - &prompt.root; bsdlabel -wB /dev/stripe/st0 + + Write a standard label, also known as a partition + table, on the new volume and install the default + bootstrap code: + &prompt.root; bsdlabel -wB /dev/stripe/st0 - This process should have created two other devices - in the /dev/stripe - directory in addition to the st0 device. - Those include st0a and - st0c. At this point a file system may be created - on the st0a device with the - newfs utility: + + This process should have created two other devices + in the /dev/stripe + directory in addition to the st0 device. + Those include st0a and + st0c. At this point a file system may be + created on the st0a device with the + newfs utility: - &prompt.root; newfs -U /dev/stripe/st0a + &prompt.root; newfs -U /dev/stripe/st0a - 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. - - + 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. + + - To manually mount the created disk stripe: + To manually mount the created disk stripe: - &prompt.root; mount /dev/stripe/st0a /mnt + &prompt.root; mount /dev/stripe/st0a /mnt - To mount this striped file system automatically during the boot - process, place the volume information in - /etc/fstab file. For this purpose, a permanent mount - point, named stripe, is - created: + To mount this striped file system automatically during the boot + process, place the volume information in + /etc/fstab file. For this purpose, a permanent + mount point, named stripe, is + created: - &prompt.root; mkdir /stripe + &prompt.root; mkdir /stripe &prompt.root; echo "/dev/stripe/st0a /stripe ufs rw 2 2" \ >> /etc/fstab - The geom_stripe.ko module must also be automatically loaded during - system initialization, by adding a line to - /boot/loader.conf: - - &prompt.root; echo 'geom_stripe_load="YES"' >> /boot/loader.conf + The geom_stripe.ko module must also be + automatically loaded during system initialization, by adding a line to + /boot/loader.conf: + &prompt.root; echo 'geom_stripe_load="YES"' >> /boot/loader.conf @@ -237,8 +238,7 @@ Done. important aspect is that information on one disk or partition is being replicated. Later, that information could be more easily restored, backed up without causing service or access - interruption, and even be physically stored in a data - safe. + interruption, and even be physically stored in a data safe. To begin, ensure the system has two disk drives of equal size, these exercises assume they are direct access (&man.da.4;) @@ -291,20 +291,21 @@ Done. Edit the /etc/fstab file, replacing references to the old da0 with the - new device nodes of the gm0 mirror device. + new device nodes of the gm0 mirror + device. If &man.vi.1; is your preferred editor, the following is an easy way to accomplish this task: - &prompt.root; vi /etc/fstab + &prompt.root; vi /etc/fstab - In &man.vi.1; back up the current contents of - fstab by typing - :w /etc/fstab.bak. Then - replace all old da0 references - with gm0 by typing - :%s/da/mirror\/gm/g. + In &man.vi.1; back up the current contents of + fstab by typing + :w /etc/fstab.bak. Then + replace all old da0 references + with gm0 by typing + :%s/da/mirror\/gm/g. The resulting fstab file should look @@ -368,6 +369,7 @@ mirror/gm0 COMPLETE da0 Troubleshooting + System refuses to boot @@ -539,7 +541,7 @@ ggate0 specific, and will be created in the /dev/label directory. - A temporary label will go away with the next reboot. These + A temporary label will go away with the next reboot. These labels will be created in the /dev/label directory and are perfect for experimentation. A temporary label can be @@ -657,7 +659,7 @@ devfs on /dev (devfs, local) UFS Journaling Through GEOM - + GEOM @@ -674,7 +676,7 @@ devfs on /dev (devfs, local) What is journaling? Journaling capability stores a log of file system transactions, i.e.: changes that make up a complete disk write operation, before meta-data and file writes are - committed to the disk proper. This transaction log can later + committed to the disk proper. This transaction log can later be replayed to redo file system transactions, preventing file system inconsistencies. @@ -682,9 +684,8 @@ devfs on /dev (devfs, local) loss and inconsistencies of the file system. Unlike Soft Updates which tracks and enforces meta-data updates and Snapshots which is an image of the file system, an actual log is stored in disk - space specifically reserved for this task, - and in some cases may be stored on another disk - entirely. + space specifically reserved for this task, and in some cases may be + stored on another disk entirely. Unlike other file system journaling implementations, the gjournal method is block based and not @@ -720,8 +721,8 @@ devfs on /dev (devfs, local) At this point, there should be a /dev/da4 device node and a - /dev/da4.journal device node. A - file system may now be created on this device: + /dev/da4.journal device node. + A file system may now be created on this device: &prompt.root; newfs -O 2 -J /dev/da4.journal @@ -736,11 +737,12 @@ devfs on /dev (devfs, local) In the case of several slices, a journal will be created - for each individual slice. For instance, if ad4s1 and ad4s2 + for each individual slice. For instance, if + ad4s1 and ad4s2 are both slices, then gjournal will create - ad4s1.journal and ad4s2.journal. In the case of the command - being run twice, the result will be - journals. + ad4s1.journal and + ad4s2.journal. In the case of the command + being run twice, the result will be journals. Under some circumstances, keeping the journal on another disk @@ -751,8 +753,7 @@ devfs on /dev (devfs, local) before attempting to alter a file system. In most cases, the gjournal will fail if it is unable to create the actual journal but this does not protect against data loss - incurred as a result of misusing - tunefs. + incurred as a result of misusing tunefs. It is also possible to journal the boot disk of a &os; system. Please refer to the article