Hi. How a user-defined property can be removed? I can''t find a way... -- Pawel Jakub Dawidek http://www.wheel.pl pjd at FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20070401/ee75edab/attachment.bin>
You should be able to get rid of it with ''zfs inherit''. It''s not exactly intuitive, but it matches the native property behavior. If you have any advice for improving documentation, plese let us know. - Eric On Sun, Apr 01, 2007 at 08:25:39PM +0200, Pawel Jakub Dawidek wrote:> Hi. > > How a user-defined property can be removed? I can''t find a way... > > -- > Pawel Jakub Dawidek http://www.wheel.pl > pjd at FreeBSD.org http://www.FreeBSD.org > FreeBSD committer Am I Evil? Yes, I Am!> _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss-- Eric Schrock, Solaris Kernel Development http://blogs.sun.com/eschrock
On Sun, Apr 01, 2007 at 12:03:36PM -0700, Eric Schrock wrote:> You should be able to get rid of it with ''zfs inherit''. It''s not > exactly intuitive, but it matches the native property behavior. If you > have any advice for improving documentation, plese let us know.Indeed, but I was more looking for something as simple as ''zfs del property filesystem''. Your method won''t work in this situation: # zfs create tank/foo # zfs create tank/foo/bar # zfs set org.freebsd:test=test tank/foo # zfs get -r org.freebsd:test tank/foo NAME PROPERTY VALUE SOURCE tank/foo org.freebsd:test test local tank/foo/bar org.freebsd:test test inherited from tank/foo Now how to remove it only from tank/foo/bar? Let''s assume that I''ve many datasets under tank/foo/ I don''t want to remove the property from tank/foo and add it to each dataset. -- Pawel Jakub Dawidek http://www.wheel.pl pjd at FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20070401/cc95fdbf/attachment.bin>
This can''t be done due to the way ZFS property inheritance works in the DSL. You can explicitly set it to the empty string, but you can''t unset the property alltogether. This is exactly why the ''zfs get -s local'' option exists, so you can find only locally-set properties. - Eric On Sun, Apr 01, 2007 at 11:14:44PM +0200, Pawel Jakub Dawidek wrote:> On Sun, Apr 01, 2007 at 12:03:36PM -0700, Eric Schrock wrote: > > You should be able to get rid of it with ''zfs inherit''. It''s not > > exactly intuitive, but it matches the native property behavior. If you > > have any advice for improving documentation, plese let us know. > > Indeed, but I was more looking for something as simple as ''zfs del > property filesystem''. Your method won''t work in this situation: > > # zfs create tank/foo > # zfs create tank/foo/bar > # zfs set org.freebsd:test=test tank/foo > # zfs get -r org.freebsd:test tank/foo > NAME PROPERTY VALUE SOURCE > tank/foo org.freebsd:test test local > tank/foo/bar org.freebsd:test test inherited from tank/foo > > Now how to remove it only from tank/foo/bar? Let''s assume that I''ve many > datasets under tank/foo/ I don''t want to remove the property from > tank/foo and add it to each dataset. > > -- > Pawel Jakub Dawidek http://www.wheel.pl > pjd at FreeBSD.org http://www.FreeBSD.org > FreeBSD committer Am I Evil? Yes, I Am!-- Eric Schrock, Solaris Kernel Development http://blogs.sun.com/eschrock
On Sun, Apr 01, 2007 at 02:20:29PM -0700, Eric Schrock wrote:> This can''t be done due to the way ZFS property inheritance works in the > DSL. You can explicitly set it to the empty string, but you can''t unset > the property alltogether. This is exactly why the ''zfs get -s local'' > option exists, so you can find only locally-set properties.Ok, thanks! -- Pawel Jakub Dawidek http://www.wheel.pl pjd at FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20070401/5ac1f83f/attachment.bin>
Eric Schrock wrote:> This can''t be done due to the way ZFS property inheritance works in the > DSL. You can explicitly set it to the empty string, but you can''t unset > the property alltogether. This is exactly why the ''zfs get -s local'' > option exists, so you can find only locally-set properties.Yep, note that this is the same as other (non-user-defined) properties. Eg, if it was ''compression'', you''d have to explicitly set it on the child: # zfs set compression=on tank/foo # zfs set compression=off tank/foo/bar --matt