Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Nov 2010 19:39:29 +0100 (CET)
From:      Oliver Fromme <olli@lurza.secnetix.de>
To:        freebsd-geom@FreeBSD.ORG, bsemene@cyanide-studio.com
Subject:   Re: Newbie RAID 0 question
Message-ID:  <201011101839.oAAIdTpo062692@lurza.secnetix.de>
In-Reply-To: <4CDAC7E2.5050309@cyanide-studio.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Bastien Semene <bsemene@cyanide-studio.com> 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



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