Discussion:
'canmount' property
eXeC001er
2014-01-22 19:27:46 UTC
Permalink
Hello.

I want to unmount a zfs-datasets tree and disable automount across reboot
or reimport, but i do not want to change mountpoint property. 'canmount'
can resolve the task, but the prop cannot be inherited, so i need to set
'canmount=off/noauto' for each dataset, that is not comfortable.

Could somebody explain why 'canmount' property was made 'non-inheritable' ?

I read the man page for 'zfs' and a
https://blogs.oracle.com/eschrock/entry/new_zfs_features but cannot
understand why the descibed cases did not allow to do the property
'inheritable'.


Thanks.



-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
Matthew Ahrens
2014-01-22 19:38:18 UTC
Permalink
Post by eXeC001er
Hello.
I want to unmount a zfs-datasets tree and disable automount across reboot
or reimport, but i do not want to change mountpoint property. 'canmount'
can resolve the task, but the prop cannot be inherited, so i need to set
'canmount=off/noauto' for each dataset, that is not comfortable.
Could somebody explain why 'canmount' property was made 'non-inheritable' ?
I read the man page for 'zfs' and a
https://blogs.oracle.com/eschrock/entry/new_zfs_features but cannot
understand why the descibed cases did not allow to do the property
'inheritable'.
I think the blog entry explains the reasoning pretty well: the use case was
for data-less "containers" that serve only to have other filesystem
underneath them to inherit properties. E.g. you might not want to mount
"pool/home" (which typically contains just a bunch of empty directories),
but you definitely want to mount "pool/home/mahrens", etc. If you don't
want a whole tree of filesystems to be mounted, you can set
mountpoint=none, which is inherited.

Why don't you want to change the mountpoint property?

--matt



-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
eXeC001er
2014-01-22 20:00:09 UTC
Permalink
To be possible to do 'zfs mount' on a dataset and do not touch another
datasets. For example you have a backup and you do not want 'automount' for
it, but want to have access to it.

The blog describes a case that IMHO cannot be broken if 'canmount' is
inheritable:

So the following steps (copy pasted from the blog)

# zfs create -o mountpoint=/export -o canmount=off tank/accounting
# zfs create -o mountpoint=/export -o canmount=off tank/engineering
# zfs create tank/accounting/bob
# zfs create tank/engineering/anne

i can re-write as

# zfs create -o mountpoint=/export -o canmount=off tank/accounting
# zfs create -o mountpoint=/export -o canmount=off tank/engineering
# zfs create -o canmount=on tank/accounting/bob
# zfs create -o canmount=on tank/engineering/anne

or something wrong?

it seems current behavior provides more disadvantages and maybe additional
action in the source code. no?
Post by Matthew Ahrens
Post by eXeC001er
Hello.
I want to unmount a zfs-datasets tree and disable automount across reboot
or reimport, but i do not want to change mountpoint property. 'canmount'
can resolve the task, but the prop cannot be inherited, so i need to set
'canmount=off/noauto' for each dataset, that is not comfortable.
Could somebody explain why 'canmount' property was made 'non-inheritable'
?
I read the man page for 'zfs' and a
https://blogs.oracle.com/eschrock/entry/new_zfs_features but cannot
understand why the descibed cases did not allow to do the property
'inheritable'.
I think the blog entry explains the reasoning pretty well: the use case
was for data-less "containers" that serve only to have other filesystem
underneath them to inherit properties. E.g. you might not want to mount
"pool/home" (which typically contains just a bunch of empty directories),
but you definitely want to mount "pool/home/mahrens", etc. If you don't
want a whole tree of filesystems to be mounted, you can set
mountpoint=none, which is inherited.
Why don't you want to change the mountpoint property?
--matt
*illumos-zfs* | Archives<https://www.listbox.com/member/archive/182191/=now>
<https://www.listbox.com/member/archive/rss/182191/25501493-adfe097d> |
Modify<https://www.listbox.com/member/?&>Your Subscription
<http://www.listbox.com>
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
Matthew Ahrens
2014-01-22 20:47:28 UTC
Permalink
Post by eXeC001er
To be possible to do 'zfs mount' on a dataset and do not touch another
datasets. For example you have a backup and you do not want 'automount' for
it, but want to have access to it.
The blog describes a case that IMHO cannot be broken if 'canmount' is
So the following steps (copy pasted from the blog)
# zfs create -o mountpoint=/export -o canmount=off tank/accounting
# zfs create -o mountpoint=/export -o canmount=off tank/engineering
# zfs create tank/accounting/bob
# zfs create tank/engineering/anne
i can re-write as
# zfs create -o mountpoint=/export -o canmount=off tank/accounting
# zfs create -o mountpoint=/export -o canmount=off tank/engineering
# zfs create -o canmount=on tank/accounting/bob
# zfs create -o canmount=on tank/engineering/anne
or something wrong?
Sure, but as you observed, it's "uncomfortable" to set the canmount
property on all the filesystems.
Post by eXeC001er
it seems current behavior provides more disadvantages and maybe additional
action in the source code. no?
It does seem annoying for your use case.

--matt
Post by eXeC001er
Post by Matthew Ahrens
Post by eXeC001er
Hello.
I want to unmount a zfs-datasets tree and disable automount across
reboot or reimport, but i do not want to change mountpoint property.
'canmount' can resolve the task, but the prop cannot be inherited, so i
need to set 'canmount=off/noauto' for each dataset, that is not comfortable.
Could somebody explain why 'canmount' property was made
'non-inheritable' ?
I read the man page for 'zfs' and a
https://blogs.oracle.com/eschrock/entry/new_zfs_features but cannot
understand why the descibed cases did not allow to do the property
'inheritable'.
I think the blog entry explains the reasoning pretty well: the use case
was for data-less "containers" that serve only to have other filesystem
underneath them to inherit properties. E.g. you might not want to mount
"pool/home" (which typically contains just a bunch of empty directories),
but you definitely want to mount "pool/home/mahrens", etc. If you don't
want a whole tree of filesystems to be mounted, you can set
mountpoint=none, which is inherited.
Why don't you want to change the mountpoint property?
--matt
*illumos-zfs* | Archives<https://www.listbox.com/member/archive/182191/=now>
<https://www.listbox.com/member/archive/rss/182191/25501493-adfe097d> |
Modify <https://www.listbox.com/member/?&> Your Subscription
<http://www.listbox.com>
*illumos-zfs* | Archives<https://www.listbox.com/member/archive/182191/=now>
<https://www.listbox.com/member/archive/rss/182191/21635000-ebd1d460> |
Modify<https://www.listbox.com/member/?&>Your Subscription
<http://www.listbox.com>
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com

eXeC001er
2014-01-22 20:00:12 UTC
Permalink
To be possible to do 'zfs mount' on a dataset and do not touch another
datasets. For example you have a backup and you do not want 'automount' for
it, but want to have access to it.

The blog describes a case that IMHO cannot be broken if 'canmount' is
inheritable:

So the following steps (copy pasted from the blog)

# zfs create -o mountpoint=/export -o canmount=off tank/accounting
# zfs create -o mountpoint=/export -o canmount=off tank/engineering
# zfs create tank/accounting/bob
# zfs create tank/engineering/anne

i can re-write as

# zfs create -o mountpoint=/export -o canmount=off tank/accounting
# zfs create -o mountpoint=/export -o canmount=off tank/engineering
# zfs create -o canmount=on tank/accounting/bob
# zfs create -o canmount=on tank/engineering/anne

or something wrong?

it seems current behavior provides more disadvantages and maybe additional
action in the source code. no?
Post by Matthew Ahrens
Post by eXeC001er
Hello.
I want to unmount a zfs-datasets tree and disable automount across reboot
or reimport, but i do not want to change mountpoint property. 'canmount'
can resolve the task, but the prop cannot be inherited, so i need to set
'canmount=off/noauto' for each dataset, that is not comfortable.
Could somebody explain why 'canmount' property was made 'non-inheritable'
?
I read the man page for 'zfs' and a
https://blogs.oracle.com/eschrock/entry/new_zfs_features but cannot
understand why the descibed cases did not allow to do the property
'inheritable'.
I think the blog entry explains the reasoning pretty well: the use case
was for data-less "containers" that serve only to have other filesystem
underneath them to inherit properties. E.g. you might not want to mount
"pool/home" (which typically contains just a bunch of empty directories),
but you definitely want to mount "pool/home/mahrens", etc. If you don't
want a whole tree of filesystems to be mounted, you can set
mountpoint=none, which is inherited.
Why don't you want to change the mountpoint property?
--matt
*illumos-zfs* | Archives<https://www.listbox.com/member/archive/182191/=now>
<https://www.listbox.com/member/archive/rss/182191/25501493-adfe097d> |
Modify<https://www.listbox.com/member/?&>Your Subscription
<http://www.listbox.com>
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
Loading...