From owner-freebsd-fs@FreeBSD.ORG Mon Apr 27 17:26:38 2015 Return-Path: Delivered-To: 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 275263BA for ; Mon, 27 Apr 2015 17:26:38 +0000 (UTC) Received: from smtp.digiware.nl (unknown [IPv6:2001:4cb8:90:ffff::3]) (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 DE6AA11FD for ; Mon, 27 Apr 2015 17:26:37 +0000 (UTC) Received: from rack1.digiware.nl (unknown [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id 685D016A51F; Mon, 27 Apr 2015 19:26:33 +0200 (CEST) X-Virus-Scanned: amavisd-new at digiware.nl Received: from smtp.digiware.nl ([127.0.0.1]) by rack1.digiware.nl (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9YBdJQCxn11a; Mon, 27 Apr 2015 19:26:22 +0200 (CEST) Received: from [IPv6:2001:4cb8:3:1:7460:5f9a:4d6f:40c1] (unknown [IPv6:2001:4cb8:3:1:7460:5f9a:4d6f:40c1]) by smtp.digiware.nl (Postfix) with ESMTPA id C859216A502; Mon, 27 Apr 2015 19:26:22 +0200 (CEST) Message-ID: <553E713C.2000602@digiware.nl> Date: Mon, 27 Apr 2015 19:26:20 +0200 From: Willem Jan Withagen User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: "Andrey V. Elsukov" , fs@freebsd.org Subject: Re: resampeling of a ZVOL that has been resized References: <55381127.4090603@digiware.nl> <5539B0C4.6070000@yandex.ru> <553B7200.7090002@digiware.nl> <553DF9E3.1090609@yandex.ru> In-Reply-To: <553DF9E3.1090609@yandex.ru> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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: Mon, 27 Apr 2015 17:26:38 -0000 On 27/04/2015 10:57, Andrey V. Elsukov wrote: > On 25.04.2015 13:52, Willem Jan Withagen wrote: >> So it seems that although gpart understands that the ZVOL volume has >> grown, it does not take it far enough and set it to CORRUPTED and then >> let the user correct/grow it. > > Can you try this patch? > > Index: head/sys/geom/part/g_part_gpt.c > =================================================================== > --- head/sys/geom/part/g_part_gpt.c (revision 282044) > +++ head/sys/geom/part/g_part_gpt.c (working copy) > @@ -760,7 +760,7 @@ g_part_gpt_resize(struct g_part_table *basetable, > struct g_part_gpt_entry *entry; > > if (baseentry == NULL) > - return (EOPNOTSUPP); > + return (g_part_gpt_recover(basetable)); > > entry = (struct g_part_gpt_entry *)baseentry; > baseentry->gpe_end = baseentry->gpe_start + gpp->gpp_size - 1; > That actually generates on the console: (And probably in dmesg) Apr 27 15:35:37 freetest kernel: GEOM_PART: zvol/zfsdata/vol was automatically resized. Apr 27 15:35:37 freetest kernel: Use `gpart commit zvol/zfsdata/vol` to save changes or `gpart undo zvol/zfsdata/vol` to revert them. And after gpart commit, it allows to gpart resize, growfs.. Exactly like I wanted. But I need to set freetest# sysctl kern.geom.debugflags=16 before resize actually works. And I did get a panic in one of the attempts, but with no keyboard to the console. So I had very little to act on, and needed to reset. I'll finish the test script and run it in a loop to see if the panic reoccurs. But so far so good. --WjW