From owner-freebsd-fs@FreeBSD.ORG Tue Apr 28 14:22:03 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 8BAE5A67 for ; Tue, 28 Apr 2015 14:22:03 +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 4E09C146E for ; Tue, 28 Apr 2015 14:22:03 +0000 (UTC) Received: from rack1.digiware.nl (unknown [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id 1FF8516A4F4; Tue, 28 Apr 2015 16:22:01 +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 ERJNdhkvgcf2; Tue, 28 Apr 2015 16:21:31 +0200 (CEST) Received: from [192.168.101.176] (vpn.ecoracks.nl [31.223.170.173]) by smtp.digiware.nl (Postfix) with ESMTPA id EE6B716A4DC; Tue, 28 Apr 2015 16:21:31 +0200 (CEST) Message-ID: <553F976B.5070608@digiware.nl> Date: Tue, 28 Apr 2015 16:21:31 +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> <553E713C.2000602@digiware.nl> In-Reply-To: <553E713C.2000602@digiware.nl> 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: Tue, 28 Apr 2015 14:22:03 -0000 On 27/04/2015 19:26, Willem Jan Withagen wrote: > 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. It has been running for most the day and night, in all kinds of incarnations.... And it has not failed yet and without crashes. So I'd say: that is a fix. --WjW