From owner-freebsd-fs@FreeBSD.ORG Wed Apr 22 21:23:02 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 2C6058B9 for ; Wed, 22 Apr 2015 21:23:02 +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 E39B61755 for ; Wed, 22 Apr 2015 21:23:01 +0000 (UTC) Received: from rack1.digiware.nl (unknown [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id D3E2F16A572 for ; Wed, 22 Apr 2015 23:22:59 +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 0uDrp0TniJRo; Wed, 22 Apr 2015 23:22:49 +0200 (CEST) Received: from [IPv6:2001:4cb8:3:1:f9ee:b7ef:2371:dea6] (unknown [IPv6:2001:4cb8:3:1:f9ee:b7ef:2371:dea6]) by smtp.digiware.nl (Postfix) with ESMTPA id 60EB616A574 for ; Wed, 22 Apr 2015 23:22:49 +0200 (CEST) Message-ID: <55381127.4090603@digiware.nl> Date: Wed, 22 Apr 2015 23:22:47 +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: fs@freebsd.org Subject: resampeling of a ZVOL that has been resized Content-Type: text/plain; charset=utf-8 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: Wed, 22 Apr 2015 21:23:02 -0000 Hi, I'm trying to do some tests with resizing/growfsing partitions because an earlier attempt for a online system did not work as expected. So I first create ZVOL, format it and then mount it. Fill it with some data. And then grow it ---- zfs create -V 100G $VOL gpart create -s GPT $DEV gpart add -t freebsd-ufs -l test $DEV newfs $DISK mount $DISK $MNT rsync -rav /usr/src/ $MNT zfs set volsize=200G $VOL ---- Now gpart show gives me: => 40 209715120 zvol/zfsdata/vol GPT (200G) 40 8 - free - (4.0K) 48 209715104 1 freebsd-ufs (100G) 209715152 8 - free - (4.0K) But I'm not able to grow partition 1.... Only once the system is rebooted is get: => 40 209715120 zvol/zfsdata/vol GPT (200G) [CORRUPT] 40 8 - free - (4.0K) 48 209715104 1 freebsd-ufs (100G) 209715152 8 - free - (4.0K) 'gpart recover zvol/zfsdata/vol' then recovers the GPT data. After which we can resize the partition: 'gpart resize -i 1 zvol/zfsdata/vol' And even when the partion is mounted growfs does its work and resizes with a few seconds to the full size.... Now the question: How can I get GEOM to resample the zvol, and have it really detect that the disk has changed.... It sort of does, but not enough to actually allow it to grow to the new size. Thanx, --WjW