From owner-freebsd-fs@FreeBSD.ORG Sun Apr 19 16:15:45 2015 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 647DC3E0 for ; Sun, 19 Apr 2015 16:15:45 +0000 (UTC) Received: from smtprelay04.ispgateway.de (smtprelay04.ispgateway.de [80.67.31.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24BE0D24 for ; Sun, 19 Apr 2015 16:15:44 +0000 (UTC) Received: from [84.44.154.227] (helo=fabiankeil.de) by smtprelay04.ispgateway.de with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.84) (envelope-from ) id 1Yjrsd-0006UC-Va; Sun, 19 Apr 2015 18:15:36 +0200 Date: Sun, 19 Apr 2015 18:15:37 +0200 From: Fabian Keil To: javocado Cc: FreeBSD Filesystems Subject: Re: Resize geli provider (md) Message-ID: <29d12e6f.643fd081@fabiankeil.de> In-Reply-To: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/qM.Frm4x4ElpJ2IkGLLdFZ+"; protocol="application/pgp-signature" X-Df-Sender: Nzc1MDY3 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2015 16:15:45 -0000 --Sig_/qM.Frm4x4ElpJ2IkGLLdFZ+ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable javocado wrote: > I have a md-backed geli mount which I created as follows: >=20 > dd if=3D/dev/zero of=3Dgeli.img bs=3D1m count=3D102400 > mdconfig -f geli.img -u 123 > geli init /dev/md123 (blank pass) > geli attach /dev/md123 > newfs /dev/md123.eli > mkdir encrypted > mount /dev/md123.eli encrypted >=20 > And I wish to expand it's size. The method I've been using is to create n= ew > larger device and copy data over, but I'm hoping there's a better way to > expand in place (without the loss of the existing data). Any advice? Increase the size of geli.img (for example with truncate -s +...), resize the geli provider with 'geli resize', and finally grow the file system with growfs. For details see the man pages. Fabian --Sig_/qM.Frm4x4ElpJ2IkGLLdFZ+ Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlUz1KYACgkQBYqIVf93VJ3HkgCgwJETDJGOvvQNhM+0S0uNNMK4 MewAoJIvIC00UXyKYy91R8ovhY5j9sZ1 =HBOc -----END PGP SIGNATURE----- --Sig_/qM.Frm4x4ElpJ2IkGLLdFZ+--