From owner-freebsd-doc@FreeBSD.ORG Tue Jan 31 10:49:54 2012 Return-Path: Delivered-To: doc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CB161065670 for ; Tue, 31 Jan 2012 10:49:54 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 081638FC15; Tue, 31 Jan 2012 10:49:54 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q0VAnrFJ057583; Tue, 31 Jan 2012 10:49:53 GMT (envelope-from danger@freefall.freebsd.org) Received: (from danger@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q0VAnrCx057582; Tue, 31 Jan 2012 10:49:53 GMT (envelope-from danger) Date: Tue, 31 Jan 2012 10:49:53 +0000 From: Daniel Gerzo To: doc@freebsd.org Message-ID: <20120131104953.GA55314@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="SUOF0GtieIMvvwua" Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: New Handbook Section for Review - graid3 X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2012 10:49:54 -0000 --SUOF0GtieIMvvwua Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello everybody, A new Handbook section covering graid3 is now available for review; the patch is attached. The text is based on PR 164228. A built version is available at http://people.freebsd.org/~danger/geom-raid3.html. Comments are welcome. -- Kind regards Daniel Gerzo --SUOF0GtieIMvvwua Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="geom.diff" Index: chapter.sgml =================================================================== RCS file: /home/dcvs/doc/en_US.ISO8859-1/books/handbook/geom/chapter.sgml,v retrieving revision 1.51 diff -u -r1.51 chapter.sgml --- chapter.sgml 21 Nov 2011 18:11:25 -0000 1.51 +++ chapter.sgml 31 Jan 2012 10:44:44 -0000 @@ -436,6 +436,164 @@ + + + + + Mark + Gladman + Written by + + + Daniel + Gerzo + + + + + Tom + Rhodes + Based on documentation by + + + Murray + Stokely + + + + + + GEOM + + + RAID3 + + + <acronym>RAID</acronym>3 - byte-level striping with dedicated + parity + + RAID3 is a method used to combine several + disk drives into a single volume with a dedicated parity + disk. In a RAID3 system, data is split up in + to a number of bytes that get written across all the drives in + the array except for one disk which acts as a dedicated parity + disk. This means that reading 1024kb from a + RAID3 implementation will access all disks in + the array. This performance can be enhanced by using multiple + disk controllers. The RAID3 array provides a + fault tolerance of 1 drive, while providing 1 - 1/n size of the + total size of all drives in the array, where n is the total + amount of hard drives in the array. Such configuration is + mostly suitable for storing data of larger sizes, e.g. + multimedia files. + + At least 3 physical hard drives are required to build a + RAID3 array. Each disk must be of the same + size, since I/O requests are interleaved to read or write to + multiple disks in parallel. Also due to the nature of + RAID3, the number of components must be + equal to 3, 5, 9, 17, etc. (2^n + 1). + + + Creating Dedicated <acronym>RAID</acronym>3 Array + + In &os;, support for RAID3 is + implemented by the &man.graid3.8; GEOM + class. In order to create a dedicated + RAID3 array on &os;, the following steps + have to be done. + + + While it is theoretically possible to boot from + RAID3 array on &os;, such configuration + is not common and is not advised. As such, this section + does not provide description of how to accomplish such + configuration. + + + + + First step is to load the appropriate kernel module. + This can be done through invoking the following + command: + + &prompt.root; graid3 load + + Alternatively, it is possible to manually load the + geom_raid3.ko module: + + &prompt.root; kldload geom_raid3.ko + + + + Create or ensure that a suitable mount point + exists: + + &prompt.root; mkdir /multimedia/ + + + + Determine the device names for the disks which will be + added to the array, and create the new + RAID3 device. The final device listed + will act as the dedicated parity disk. The following + example will use three unpartitioned + ATA drives — + ada1 + and ada2 + for data and + ada3 + for parity: + + &prompt.root; graid3 label -v gr0 /dev/ada1 /dev/ada2 /dev/ada3 +Metadata value stored on /dev/ada1. +Metadata value stored on /dev/ada2. +Metadata value stored on /dev/ada3. +Done. + + + + Partition the newly created + gr0 device and put an UFS file + system on it: + + &prompt.root; gpart create -s GPT /dev/raid3/gr0 +&prompt.root; gpart add -t freebsd-ufs /dev/raid3/gr0 +&prompt.root; newfs -j /dev/raid3/gr0p1 + + 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. + + + + The last step is to mount the file system: + + &prompt.root; mount /dev/raid3/gr0p1 /multimedia/ + + The RAID3 array is now ready to + use. + + + + + To retain this configuration across reboots, the + geom_raid3.ko module must be + automatically loaded during the system initialization. To + accomplish this, invoke the following command: + + &prompt.root; echo 'geom_raid3_load="YES"' >> /boot/loader.conf + + It is also required to instruct the system to + automatically mount the array's file system during the boot + process. For this purpose, place the volume information in + the /etc/fstab file: + + &prompt.root; echo "/dev/raid3/gr0p1 /multimedia ufs rw 2 2" >> /etc/fstab + + + + GEOM Gate Network Devices --SUOF0GtieIMvvwua--