From owner-freebsd-geom@FreeBSD.ORG Wed Nov 10 18:40:04 2010 Return-Path: Delivered-To: freebsd-geom@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0C2F1065670 for ; Wed, 10 Nov 2010 18:40:03 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 651F18FC12 for ; Wed, 10 Nov 2010 18:40:03 +0000 (UTC) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id oAAIdTLn062693; Wed, 10 Nov 2010 19:39:45 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id oAAIdTpo062692; Wed, 10 Nov 2010 19:39:29 +0100 (CET) (envelope-from olli) Date: Wed, 10 Nov 2010 19:39:29 +0100 (CET) Message-Id: <201011101839.oAAIdTpo062692@lurza.secnetix.de> From: Oliver Fromme To: freebsd-geom@FreeBSD.ORG, bsemene@cyanide-studio.com In-Reply-To: <4CDAC7E2.5050309@cyanide-studio.com> X-Newsgroups: list.freebsd-geom User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.5 (lurza.secnetix.de [127.0.0.1]); Wed, 10 Nov 2010 19:39:45 +0100 (CET) Cc: Subject: Re: Newbie RAID 0 question X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-geom@FreeBSD.ORG, bsemene@cyanide-studio.com List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Nov 2010 18:40:04 -0000 Bastien Semene wrote: > Is there a way to add a component to an existing RAID 0 array ? There are several ways in FreeBSD to create a RAID-0 array. Since you're posting to freebsd-geom, I assume that you are talking about gstripe(8). If you mean something else, then please be more specific. As far as I know, you cannot directly add a new provider to an existing gstripe volume. This would be technically difficult, because the stripes are spread evenly across the existing providers. Adding a new provider would require changing the stripe distribution, which means rewriting large parts of the existing providers. However, you can add a new provider to a gconcat(8) volume (there's even an example for that in the manual page). gconcat simply concatenates its providers without striping (thus it's not RAID-0). So, basically you can add space to an existing gstripe by creating another gstripe containing the new disks, and then combine the two gstripes with gconcat. For example: gstripe1 <-- /dev/ad0 + /dev/ad1 (old) gstripe2 <-- /dev/ad2 + /dev/ad3 (new) gconcat <-- gstripe1 + gstripe2 Depending on your partition layout, you will have to modify the partition table (BSD label, GPT) to increase the size of the partition, and then use growfs(8) to resize the file system contained in the partition. Of course, you could also dump(8) your data (or copy it elsewhere), then recreate everything from scratch, and finally restore(8) your data (or copy it back). And of course you should have a good backup in either case, no matter which approach you choose. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd C++: "an octopus made by nailing extra legs onto a dog" -- Steve Taylor, 1998