From owner-freebsd-geom@FreeBSD.ORG Fri May 11 08:40:27 2007 Return-Path: X-Original-To: freebsd-geom@freebsd.org Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4C07F16A403 for ; Fri, 11 May 2007 08:40:27 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id DC20013C46C for ; Fri, 11 May 2007 08:40:26 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 4317A48809; Fri, 11 May 2007 10:40:25 +0200 (CEST) Received: from localhost (pjd.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 5B3B845696; Fri, 11 May 2007 10:40:20 +0200 (CEST) Date: Fri, 11 May 2007 10:40:18 +0200 From: Pawel Jakub Dawidek To: Eike Bernhardt Message-ID: <20070511084018.GA38860@garage.freebsd.pl> References: <46442175.60508@unorganized.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ew6BAiZeqk4r7MaW" Content-Disposition: inline In-Reply-To: <46442175.60508@unorganized.net> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-geom@freebsd.org Subject: Re: Growing a graid3? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2007 08:40:27 -0000 --ew6BAiZeqk4r7MaW Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 11, 2007 at 09:55:33AM +0200, Eike Bernhardt wrote: > Hello, >=20 > is it possible to expand a existing graid3? >=20 > I have a graid3 consisting of 3x 250GB drives, which is nearly full. >=20 > My idea would be to swap out each disk one after one with a bigger disk, > let the graid3 rebuild itself between swaps, and then use growfs to > resize the filesystem to the new availiabale maximum size. >=20 > Is this possible? Has anyone tried this? It should be possible. First you swap one disk after another waiting for synchronization. Once you have all new disks in place, you need to relabel your graid3 (it won't touch your data) and then growfs(8) it. You can try it with md(4) devices, eg: # truncate -s 8m /tmp/disk{0,1,2} # mdconfig -a -f /tmp/disk0 -u 0 # mdconfig -a -f /tmp/disk1 -u 1 # mdconfig -a -f /tmp/disk2 -u 2 # graid3 label test md{0,1,2} # newfs /dev/raid3/test # mount /dev/raid3/test /mnt/test # dd if=3D/dev/random of=3D/mnt/test/rand bs=3D1m count=3D12 # dd if=3D/mnt/test/rand bs=3D1m count=3D12 | md5 # umount /mnt/test # truncate -s 16m /tmp/disk{3,4,5} # mdconfig -a -f /tmp/disk3 -u 3 # mdconfig -a -f /tmp/disk4 -u 4 # mdconfig -a -f /tmp/disk5 -u 5 # graid3 remove -n 0 test # graid3 insert -n 0 test md3 [wait] # graid3 remove -n 1 test # graid3 insert -n 1 test md4 [wait] # graid3 remove -n 2 test # graid3 insert -n 2 test md5 [wait] # graid3 stop test # graid3 label test md{3,4,5} # order is very important # mount -o ro /dev/raid3/test /mnt/test # dd if=3D/mnt/test/rand bs=3D1m count=3D12 | md5 # verify if file is ok # umount /mnt/test # growfs /dev/raid3/test # mount -o ro /dev/raid3/test /mnt/test # dd if=3D/mnt/test/rand bs=3D1m count=3D12 | md5 # verify if file is ok a= gain Something like this. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --ew6BAiZeqk4r7MaW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGRCvyForvXbEpPzQRAmNDAJ98sfrRhCJfPVT4oECTo/+plHxEaQCfewWe zj1ww19//1ZHbfj3iA6+/IY= =/AGG -----END PGP SIGNATURE----- --ew6BAiZeqk4r7MaW--