From owner-p4-projects@FreeBSD.ORG Thu Jul 5 14:44:54 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C1F8C16A46B; Thu, 5 Jul 2007 14:44:53 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E5AA16A400 for ; Thu, 5 Jul 2007 14:44:53 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 5EE7913C448 for ; Thu, 5 Jul 2007 14:44:53 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l65Eir70080565 for ; Thu, 5 Jul 2007 14:44:53 GMT (envelope-from lulf@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l65EirIS080560 for perforce@freebsd.org; Thu, 5 Jul 2007 14:44:53 GMT (envelope-from lulf@FreeBSD.org) Date: Thu, 5 Jul 2007 14:44:53 GMT Message-Id: <200707051444.l65EirIS080560@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to lulf@FreeBSD.org using -f From: Ulf Lilleengen To: Perforce Change Reviews Cc: Subject: PERFORCE change 122957 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2007 14:44:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=122957 Change 122957 by lulf@lulf_carrot on 2007/07/05 14:44:30 - Update the manpage, and add information about the new raid5 command in it. Affected files ... .. //depot/projects/soc2007/lulf/gvinum_fixup/sbin/gvinum/gvinum.8#3 edit Differences ... ==== //depot/projects/soc2007/lulf/gvinum_fixup/sbin/gvinum/gvinum.8#3 (text+ko) ==== @@ -129,6 +129,10 @@ when running in interactive mode. Normally this would be done by entering the EOF character. +.It Ic raid5 Oo Fl fv Oc Oo Fl s Ar stripesize Oc Oo Fl n Ar name Oc Ar drives +Create a RAID-5 volume from the specified drives. If no name is specified, +a unique name will be set by Ic gvinum. This organization requires at least +three drives. .It Ic rename Oo Fl r Oc Ar drive | subdisk | plex | volume newname Change the name of the specified object. The @@ -250,14 +254,6 @@ directory with device nodes for .Nm objects -.It Pa /dev/gvinum/plex -directory containing device nodes for -.Nm -plexes -.It Pa /dev/gvinum/sd -directory containing device nodes for -.Nm -subdisks .El .Sh EXAMPLES To create a mirror on disks /dev/ad1 and /dev/ad2, create a filesystem, mount, @@ -276,42 +272,32 @@ .Dl "gvinum mirror -s -n data /dev/ad1 /dev/ad2 /dev/ad3 /dev/ad4" .Dl "newfs /dev/gvinum/data" .Pp -To create a raid5 array on disks /dev/ad1 /dev/ad2 and /dev/ad3, you can -create a config file like this: +To create a raid5 array on disks /dev/ad1 /dev/ad2 and /dev/ad3, with stripesize +493k you can use the raid5 command: .Pp -.Dl "gvinum create" +.Dl "gvinum raid5 -s 493k /dev/ad1 /dev/ad2 /dev/ad3" .Pp -Then an editor will open, and you can create your configuration: -.Pp -.Dl "drive gdrive1 device /dev/ad1" -.Dl "drive gdrive2 device /dev/ad2" -.Dl "drive gdrive3 device /dev/ad3" -.Dl "volume myraid5vol" -.Dl "plex org raid5 493k" -.Dl "sd drive gdrive1" -.Dl "sd drive gdrive2" -.Dl "sd drive gdrive3" -.Pp +Then the volume will be created automatically. Afterwards, you have to initialize the volume: .Pp .Dl "gvinum start myraid5vol" .Pp The initialization will start, and the states will be updated when it's -finished. +finished. The list command will give you information about its progress. .Pp Imagine that one of the drives fails, and the output of 'printconfig' looks something like this: .Pp -.Dl "drive gdrive2 device /dev/ad2" -.Dl "drive gdrive3 device /dev/???" -.Dl "drive gdrive1 device /dev/ad1" +.Dl "drive gvinumdrive1 device /dev/ad2" +.Dl "drive gvinumdrive2 device /dev/???" +.Dl "drive gvinumdrive0 device /dev/ad1" .Dl "volume myraid5vol" .Dl "plex name myraid5vol.p0 org raid5 986s vol myraid5vol" -.Dl "sd name myraid5vol.p0.s2 drive gdrive3 len 32538s driveoffset 265s" +.Dl "sd name myraid5vol.p0.s2 drive gvinumdrive2 len 32538s driveoffset 265s" .Dl "plex myraid5vol.p0 plexoffset 1972s" -.Dl "sd name myraid5vol.p0.s1 drive gdrive2 len 32538s driveoffset 265s" +.Dl "sd name myraid5vol.p0.s1 drive gvinumdrive1 len 32538s driveoffset 265s" .Dl "plex myraid5vol.p0 plexoffset 986s" -.Dl "sd name myraid5vol.p0.s0 drive gdrive1 len 32538s driveoffset 265s" +.Dl "sd name myraid5vol.p0.s0 drive gvinumdrive0 len 32538s driveoffset 265s" .Dl "plex myraid5vol.p0 plexoffset 0s" .Pp Create a new drive with this configuration: