From owner-freebsd-stable@FreeBSD.ORG Fri May 1 12:15:49 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08A2D1065670 for ; Fri, 1 May 2009 12:15:49 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr10.xs4all.nl (smtp-vbr10.xs4all.nl [194.109.24.30]) by mx1.freebsd.org (Postfix) with ESMTP id 73FFC8FC1C for ; Fri, 1 May 2009 12:15:48 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr10.xs4all.nl (8.13.8/8.13.8) with ESMTP id n41CFkBv001665; Fri, 1 May 2009 14:15:47 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id 56769BAA3; Fri, 1 May 2009 14:15:46 +0200 (CEST) Date: Fri, 1 May 2009 14:15:46 +0200 From: Roland Smith To: ghostcorps Message-ID: <20090501121546.GA95759@slackbox.xs4all.nl> References: <4c06024b0905010112m42cbd2a5m9474aa86c003fb0@mail.gmail.com> <20090501095305.GA91771@slackbox.xs4all.nl> <4c06024b0905010402r77141b0dwd783f56b55f7afb5@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+QahgC5+KEYLbs62" Content-Disposition: inline In-Reply-To: <4c06024b0905010402r77141b0dwd783f56b55f7afb5@mail.gmail.com> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.19 (2009-01-05) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: freebsd-stable@freebsd.org Subject: Re: Can i add a new HDD to an encrypted array? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2009 12:15:50 -0000 --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 01, 2009 at 09:02:46PM +1000, ghostcorps wrote: > Thanks Roland, >=20 > You have confirmed my worst fears.=20 Well, there is one thing that _might_ work. It might also destroy your data, hence the first step: - Make a backup and verify it. - Remove the array from fstab, so it isn't mounted automatically. - Add the disks to the array. - Re-initialize and attach the new array as a geli(8) device, using the same password and/or key file and algorithm. - Try to grow the filesystem with growfs(8). - If that works, mount the array and restore it to fstab. Whether this works or not will depend on how the new disks are added to the array. If they are added as a continious space at the rear it will probably be fine. If the extra space shows up as patches in between or at the front it will not work because your filesystem will be hosed. :-) I'm also _assuming_ that if you initialize two geli devices with the same parameters, the on-disk data will be the same. This might not be true, in which case you've lost all your data. Alternatively, you can use dd(1) to make a copy of the geli data from the last sector of the old array, and write it to the last sector of the new array. Again, this might blow up in your face if some of the metadata isn't correct for the new array. So don't try this without a solid backup, for obvious reasons. If this works, you can write it up and submit it as a new section for the Handbook, gaining eternal glory. ;-) Roland --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --+QahgC5+KEYLbs62 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEARECAAYFAkn65/IACgkQEnfvsMMhpyUwqwCfVKfg+7VEf0epvZ6z++EeLK9o 3OoAn3gtB6nqP/77+sMl5I1n4dgo8FCj =0CvL -----END PGP SIGNATURE----- --+QahgC5+KEYLbs62--