--- chapter.sgml.orig 2008-12-22 22:51:29.000000000 +0100
+++ chapter.sgml 2009-05-11 21:17:38.986943400 +0200
@@ -742,6 +742,99 @@
+
+ Rebuilding a RAID-5 volume
+
+ RAID-5 rebuilding is a frequent task for
+ many administrators, and gvinum supports online rebuild if RAID-5
+ plexes. This means that the filesystem on your volume may very well be
+ mounted while this is going on. A typical RAID-5 configuration might
+ look like this:
+
+
+ drive a device /dev/ad1
+ drive b device /dev/ad2
+ drive c device /dev/ad3
+ volume raid5vol
+ plex org raid5 512k name raid5vol.p0
+ sd drive a name raid5vol.p0.s0
+ sd drive b name raid5vol.p0.s1
+ sd drive c name raid5vol.p0.s2
+
+ If one of the drives fails (let's say ad3 for instance), the subdisk
+ using that drive will fail. When the drive is replaced, a new drive
+ will have to be created for vinum to use:
+
+
+ drive d device /dev/ad4
+
+ When this drive is created, the subdisk using the failed drive will
+ have to be moved to the new drive. This can be done with the following
+ command:
+
+
+ gvinum move d raid5vol.p0.s2
+
+ This will bind the subdisk to the new drive, and set it's state to
+ 'stale'. This means the plex is ready for rebuilding:
+
+
+ gvinum start raid5vol.p0
+
+ This command initiates the rebuild of the plex. The status of the
+ rebuild can be checked with the 'list' command, which shows how big
+ precentage of the plex that is rebuilt.
+
+
+ Growing a RAID-5 volume
+
+ Just like rebuilding, growing is a task
+ that is not that frequent, but rather very handy for an administrator.
+ Gvinum supports online growing of RAID-5 plexes the same way it does
+ with rebuilds. Also note that growing striped (RAID-0) plexes is also
+ supported, and the process of doing this is the same as for RAID-5
+ plexes. A typical configuration before expanding might look like
+ this:
+
+
+ drive a device /dev/ad1
+ drive b device /dev/ad2
+ drive c device /dev/ad3
+ volume raid5vol
+ plex org raid5 512k name raid5vol.p0
+ sd drive a name raid5vol.p0.s0
+ sd drive b name raid5vol.p0.s1
+ sd drive c name raid5vol.p0.s2
+
+ Let us say we want to expand this array with a new drive. There are
+ two ways to do this. One way is to extend the configuration and create
+ the drive manually:
+
+
+ drive d device /dev/ad4
+ sd drive d name raid5vol.p0.s3 plex raid5vol.p0
+
+ However, the following is a short version of the same:
+
+
+ grow raid5vol.p0 /dev/ad4
+
+ After the configuration is created, the state of the plex will be
+ set to 'growable'. This state means that the plex is capable of being
+ expanded. The size of the plex is not changed until the growing is
+ complete. First, start the growing process:
+
+
+ gvinum start raid5vol.p0
+
+ This command initiates the growing process. Just like when
+ rebuilding a plex, you are able to watch the status of the growing
+ process with the 'list' command, which shows how big precentage of the
+ plex that is grown. When the growing is finished, the plex will
+ hopefully be up again, and the volume will have the new size. Remember
+ that if UFS is run on top of the volume, the filesystem itself will
+ also have to be grown using growfs.
+