From owner-freebsd-stable@freebsd.org Sun Oct 15 09:57:31 2017 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC90CE3F238 for ; Sun, 15 Oct 2017 09:57:31 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mx0.gentlemail.de (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 476E8710BD for ; Sun, 15 Oct 2017 09:57:31 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mh0.gentlemail.de (mh0.gentlemail.de [IPv6:2a00:e10:2800::a135]) by mx0.gentlemail.de (8.14.5/8.14.5) with ESMTP id v9F9vTeQ082359 for ; Sun, 15 Oct 2017 11:57:29 +0200 (CEST) (envelope-from freebsd@omnilan.de) Received: from titan.inop.mo1.omnilan.net (s1.omnilan.de [217.91.127.234]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id 4F0669EC; Sun, 15 Oct 2017 11:57:29 +0200 (CEST) Message-ID: <59E33109.6010101@omnilan.de> Date: Sun, 15 Oct 2017 11:57:29 +0200 From: Harry Schmalzbauer Organization: OmniLAN User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; de-DE; rv:1.9.2.8) Gecko/20100906 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: FreeBSD Stable Subject: Re: reboot-less zfs volmode property refresh? References: <59E32B56.6050203@omnilan.de> In-Reply-To: <59E32B56.6050203@omnilan.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]); Sun, 15 Oct 2017 11:57:29 +0200 (CEST) X-Milter: Spamilter (Reciever: mx0.gentlemail.de; Sender-ip: ; Sender-helo: mh0.gentlemail.de; ) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Oct 2017 09:57:31 -0000 Bezüglich Harry Schmalzbauer's Nachricht vom 15.10.2017 11:33 (localtime): > Hello, > > maybe I'm just missing something obvious, but modifying a dataset's > volmode property seems to force me to reboot the host to have any effect. > > Test to reproduce (parent dataset hostPsys/bhyveVOL/sys has volmode set > ot "dev"): > > 1.) Create new volume with volmode=geom, and write new GPT > > zfs create -o volmode=geom -V 10G hostPsys/bhyveVOL/sys/test > gpart create -s gpt /dev/zvol/hostPsys/bhyveVOL/sys/test > gpart show -l /dev/zvol/hostPsys/bhyveVOL/sys/test > => 40 20971440 zvol/hostPsys/bhyveVOL/sys/test GPT > (10G) > 40 20971440 - free - (10G) > > (works as expected) > > 2.) Create new volume with volmode=dev, and write new GPT > > zfs destroy hostPsys/bhyveVOL/sys/test > zfs create -V 10G hostPsys/bhyveVOL/sys/test > gpart create -s gpt > /dev/zvol/hostPsys/bhyveVOL/sys/test > > gpart: arg0 'zvol/hostPsys/bhyveVOL/sys/test': Invalid argument > > (fails as expected) > > 3.) Modify existing volmode=dev dataset and write new GPT > > zfs set volmode=geom > hostPsys/bhyveVOL/sys/test > > zfs get volmode > hostPsys/bhyveVOL/sys/test > > NAME PROPERTY VALUE > SOURCE > > hostPsys/bhyveVOL/sys/test volmode geom local > gpart create -s gpt > /dev/zvol/hostPsys/bhyveVOL/sys/test > > gpart: arg0 'zvol/hostPsys/bhyveVOL/sys/test': Invalid argument > > (fails unexpected) > > What can I do to let geom(4) know that there's a new device? Device should read provider. I found that last sentence in the zfs(8) man page, describing the volmode property: »This property can be changed any time, but so far it is processed only during volume creation and pool import.« So it seems to be a limitation by design. re-importing the pool is no option for me, so I'll keep in mind that changing volmode means outage. I'm aware that I can utilize ctl(8) to get access to a volmode=dev volume, also md(4) might help in that case, but for changing volmode=geom a reboot / re-import was required. I guess the benefit of extending the implementation design is much to small to justify the effort. But I think making "volmode" a creation-only property (like utf8only) should be considered. Thanks, -harry