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
_______________________________________________
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

Reply via email to