Date: Fri, 11 May 2007 10:40:18 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Eike Bernhardt <eike@unorganized.net> Cc: freebsd-geom@freebsd.org Subject: Re: Growing a graid3? Message-ID: <20070511084018.GA38860@garage.freebsd.pl> In-Reply-To: <46442175.60508@unorganized.net> References: <46442175.60508@unorganized.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070511084018.GA38860>