From owner-freebsd-geom@FreeBSD.ORG Thu Nov 14 14:11:05 2013 Return-Path: Delivered-To: freebsd-geom@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D7D75E0; Thu, 14 Nov 2013 14:11:05 +0000 (UTC) Received: from butcher-nb.yandex.net (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) by mx2.freebsd.org (Postfix) with ESMTP id 1762152FA; Thu, 14 Nov 2013 14:11:03 +0000 (UTC) Message-ID: <5284D8E1.6000104@FreeBSD.org> Date: Thu, 14 Nov 2013 18:06:25 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: freebsd-geom@FreeBSD.org Subject: [RFC/CFT] Resize support for geom_mirror X-Enigmail-Version: 1.6 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fHjJt6or2l89KoUajA3NghHkCQoSxDgAW" Cc: Pawel Jakub Dawidek , trasz@FreeBSD.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Nov 2013 14:11:05 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --fHjJt6or2l89KoUajA3NghHkCQoSxDgAW Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi All, I prepared the patch, that adds new verb "resize" to the gmirror(8) and such functionality to the geom_mirror(4). The main idea is to be able expand the mirror size after replacing all its components. But reducing the size also is possible. Also I added g_resize method, and now it automatically writes gmirror's metadata in the new last sector, when the parent provider changes the siz= e. Several notes about implementation: * `gmirror resize gm0` without exactly specified size will automatically calculate the maximum possible size for this mirror. * Reduce the size of the mirror when it is in use is possible only with debugflags=3D16. Pawel, please look at the case, when the size of the mirror reduced when synchronization is in progress. I guess it is enough to change the condition in g_mirror_sync_request? The patch is here: http://people.freebsd.org/~ae/g_mirror_resize.diff --=20 WBR, Andrey V. Elsukov --fHjJt6or2l89KoUajA3NghHkCQoSxDgAW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQEcBAEBAgAGBQJShNjlAAoJEAHF6gQQyKF6EKcH/0UFJOP7b2M8DvoGXso7v3fk cZrXp3xo2yYCxeougVdXunRz1LYFbX5kJsP4ZIp/pH83BOhm72FkrCjoqFxhM7XX 0RfVgJYUuownLMFiShFSBZnkyCZAiuE14XSr7utdL8nupOz9vu2pxg+eB3kOUTi4 JkI9j+gtdXWDDVKasFD57Ax+HsJxM1w/MlxeysIW+7gaBTWppu4PIHvWLngJPh6z tJLsMYQoE4Ke+MFUrrqvrB3byDyAi5bY0H7G8Uh1ZBS9bYJAoYUANzH0mAw05kPD 6LLOJXibDBzN3Z2kV+yswhwiL566gaUZzDirSU4UecF7y51zSuyjxew4iNV0vHQ= =xhLr -----END PGP SIGNATURE----- --fHjJt6or2l89KoUajA3NghHkCQoSxDgAW--