Date: Sun, 15 Oct 2017 11:33:10 +0200 From: Harry Schmalzbauer <freebsd@omnilan.de> To: FreeBSD Stable <freebsd-stable@freebsd.org> Subject: reboot-less zfs volmode property refresh? Message-ID: <59E32B56.6050203@omnilan.de>
next in thread | raw e-mail | index | archive | help
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?
And vice versa, changing volmode property from "geom" to "dev" or "none"
doesn't have any effecit either, until reboot.
Thanks,
-harry
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?59E32B56.6050203>
