Yes, this would be useful.  See:

6364688 method to preserve properties when making a clone

The infrastructure is all there (zfs_clone() takes an nvlist of
properties), it just hasn't been implemented yet.

Note that 'volblocksize' is special because it is a create-time property
and cannot be changed once it is set.  It doesn't make sense to
'inherit' volblocksize from the new parent, as the resulting volume
would be unusable.  I believe that 'volsize', while changeable, is also
preserved with a snapshot for a similar purpose.

Can the encryption properties be changed once a filesystem is created?

- Eric

On Mon, Sep 03, 2007 at 05:10:45PM +0100, Darren J Moffat wrote:
> I had expected that when I clone'd a snapshot properties like 
> "compression" would be "copied" over to the clone from the parent 
> snapshot regardless of the inheritance implied from the place in the 
> tree.  Particularly since 'zfs clone' doesn't have the ability to
> set options.   However it seems this doesn't happen.
> 
> For example:
> 
> braveheart# zfs create -o compression=on tank/x
> braveheart# zfs snapshot tank/[EMAIL PROTECTED]
> braveheart# zfs clone tank/[EMAIL PROTECTED] tank/y
> braveheart# zfs get compression tank/y
> NAME    PROPERTY     VALUE     SOURCE
> tank/y  compression  off       default
> 
> Versus:
> 
> braveheart# zfs clone tank/[EMAIL PROTECTED] tank/x/y
> braveheart# zfs get compression tank/x/y
> NAME      PROPERTY     VALUE     SOURCE
> tank/x/y  compression  on        inherited from tank/x
> 
> 
> I assume this is the intended behaviour and not a bug ?  That is that 
> inheritance follows only the "tree names" not the clone parent.
> 
> However if I do this for ZVOL rather than a filesystem I do get the 
> behaviour I expected for the volblocksize (but still not compression).
> 
> It wasn't intuitive to me and it is the opposite of the behaviour I need 
> to arrange for the "encryption", "keytype" and "wrappedkey" properties 
> for ZFS Crypto support.  For clones both "encryption", "keytype" and 
> "wrappedkey" can not be set for the clone and they must be the same as 
> the clone_parent.
> 
> I can code this in myself (I already have in place and working the 
> ability to create the per-dataset keys when a normal dataset is created) 
> but I expected this to have been done automatically for clones.
> 
> -- 
> Darren J Moffat
> _______________________________________________
> zfs-discuss mailing list
> zfs-discuss@opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

--
Eric Schrock, Solaris Kernel Development       http://blogs.sun.com/eschrock
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to