Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Jan 2012 12:18:58 +1100
From:      Mark Gladman <mark@legios.org>
To:        <freebsd-doc@freebsd.org>
Subject:   FreeBSD documentation help - new graid3 page.
Message-ID:  <4b483061e36652917b178aa44447026f@legios.org>

index | next in thread | raw e-mail

[-- Attachment #1 --]
Hey all,

I've written up a (very) rough draft (attached) of a graid3 page for 
the FreeBSD manual and would love some input.

I'm not going to pretend to know how to write in DocBook, so I 
apologise for the low-tech plain text nature of it, but as mentioned at 
this point it's still very much a draft and I'm looking for some 
feedback.

The main issue I'm having is explaining how RAID3 actually works. While 
I get it in principle, I'm not sure how the sector size vs. byte-level 
striping stuff works, nor do I know the algorithm used for calculating 
the default sector size when creating a new array.

Sadly I don't have access to FreeBSD box at the moment so I can't look 
through the source code and see this information.

Any feedback would be greatly appreciated. I've also credited Tom 
Rhodes and Murray Stokely since my documentation is based on their RAID0 
handbook page.

Also, it's possible that people will see this page as unneccesary but I 
thought it might be nice to have it.

Thanks!
Mark

PS. Also note there's some asterisks in the page, this is for footnotes 
on the number of bytes by default and about switches which change this 
functionality respectively. I've also asked pjd@ for some implementation 
information too, but knowing he's insanely busy I'd prefer to not hassle 
him if possible.
[-- Attachment #2 --]
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
help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4b483061e36652917b178aa44447026f>