docs/164228: Adding raid3 to handbook
Mark Gladman
mark at legios.org
Tue Jan 17 01:30:08 UTC 2012
>Number: 164228
>Category: docs
>Synopsis: Adding raid3 to handbook
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-doc
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue Jan 17 01:30:07 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Mark Gladman
>Release: 8.2-stable
>Organization:
>Environment:
>Description:
I'd like to propose adding a raid3 section to the FreeBSD handbook using geom_raid3
>How-To-Repeat:
>Fix:
Please find attached an ugly non-marked-up text document of a proposed raid3 handbook page. I apologise, I don't know DocBook (but am working on it as time permits)...
Patch attached with submission follows:
Written by Mark Gladman based on documentation from Tom Rhodes and Murray Stokely.
RAID3 is a method used to combine several disk drives into a single volume with a dedicated parity disk . The GEOM disk subsystem provides software support for RAID3.
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, that acts as a dedicated parity disk. This means that reading 1024kb from a RAID3 implementation will access all disks in the array bar one (the dedicated parity disk*) to read the 1024kb. This performance can be enhanced by using multiple disk controllers.
Each disk in a RAID3 array 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 aarray of unformatted ATA disks
1.
Load the geom_raid3.ko module:
# kldload geom_raid3
2.
Ensure that a suitable mount point exists. If this volume will become a root partition, then temporarily use another mount point such as /mnt:
# mkdir /mnt
3.
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 be the dedicated parity disk. For example, to add three disks unused and unpartitioned ATA disks, for example /dev/ad1, /dev/ad2 and /dev/ad3:
# graid3 label -v gr0 /dev/ad1 /dev/ad2 /dev/ad3
Metadata value stored on /dev/ad1.
Metadata value stored on /dev/ad2.
Metadata value stored on /dev/ad3.
Done.
4.
Write a standard label, also known as a partition table, on the new volume and install the default bootstrap code:
# bsdlabel -wB /dev/raid3/gr0
5.
This process should have created two other devices in the /dev/raid3 directory in addition to the gr0 device. Those include gr0a and gr0c. At this point a file system may be created on the gr0a device with the newfs utility:
# newfs -U /dev/raid3/gr0a
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:
# mount /dev/raid3/gr0a /mnt
To mount this newly created array's file system automatically during the boot process, place the volume information in /etc/fstab file. For this purpose, a permanent mount point, named raid3, is created:
# mkdir /raid3
# echo "/dev/raid3/gr0a /raid3 ufs rw 2 2" \
>> /etc/fstab
The geom_raid3.ko module must also be automatically loaded during system initialization, by adding a line to /boot/loader.conf:
# echo 'geom_raid3_load="YES"' >> /boot/loader.conf
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-doc
mailing list