Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 May 2009 14:15:46 +0200
From:      Roland Smith <rsmith@xs4all.nl>
To:        ghostcorps <ghostcorps@gmail.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Can i add a new HDD to an encrypted array?
Message-ID:  <20090501121546.GA95759@slackbox.xs4all.nl>
In-Reply-To: <4c06024b0905010402r77141b0dwd783f56b55f7afb5@mail.gmail.com>
References:  <4c06024b0905010112m42cbd2a5m9474aa86c003fb0@mail.gmail.com> <20090501095305.GA91771@slackbox.xs4all.nl> <4c06024b0905010402r77141b0dwd783f56b55f7afb5@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--+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--



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