Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zfs inherit for exec property - different behavior #1908

Closed
kolczykm opened this issue Nov 27, 2013 · 6 comments
Closed

zfs inherit for exec property - different behavior #1908

kolczykm opened this issue Nov 27, 2013 · 6 comments
Labels
Type: Feature Feature request or new feature

Comments

@kolczykm
Copy link

I have observed different behavior for zfs inherit command for exec property of dataset. First I will explain what it works for me in case of other properties, for example compression property:

zfs get compression
NAME                     PROPERTY     VALUE     SOURCE
Zpool1                   compression  off       default
Zpool1/dataset1          compression  off       default

zfs set compression=lz4 Zpool1/dataset1
zfs get compression
NAME                     PROPERTY     VALUE     SOURCE
Zpool1                   compression  off       default
Zpool1/dataset1          compression  lz4       local

zfs inherit compression Zpool1/dataset1

zfs get compression
NAME                     PROPERTY     VALUE     SOURCE
Zpool1                   compression  off       default
Zpool1/dataset1          compression  off       default

What I have showed for compression property and inherit command is that it works as I expected. But when I try the same thing with exec property it works the following way:

zfs set exec=off Zpool1/dataset1
zfs get exec
NAME                     PROPERTY  VALUE  SOURCE
Zpool1                   exec      on     default
Zpool1/dataset1          exec      off    local

zfs inherit exec Zpool1/dataset1

zfs get exec
NAME                     PROPERTY  VALUE  SOURCE
Zpool1                   exec      on     default
Zpool1/dataset1          exec      off    temporary

exec property after inherit doesn't reverted to on and source is set to temporary. This is different from what happens with for example compression property. Now when I unmount and mount again dataset exec property will switch back to on and source will be shown as default. My question is why behavior of zfs inherit command with exec property is different from other properties? Why dataset need to be remounted in case of exec property to inherit command take effect? I just add that I have also tried -r and -S switches but in case of exec property there were no difference.

@GregorKopka
Copy link
Contributor

compression is transparent to the os (affects only new writes), thus can be toggled anytime.
exec is evaluated at mount time and boils down to giving -o noexec to mount, thus it is active till remount.

devices, setuid, nbmand property behave similar, see man zfs: Temporary Mount Point Properties

@kolczykm
Copy link
Author

@GregorKopka tanks for explanation, now I understand it better but I still got some doubts. It's because I haven't showed all context of my datasets when I explained my problem to simplify it. In full context it looks the following way:

zfs get exec
NAME                     PROPERTY  VALUE  SOURCE
Zpool1                   exec      on     default
Zpool1/dataset1          exec      on     default
Zpool1/dataset1/a        exec      on     default
Zpool1/dataset1/a/b      exec      on     default
Zpool1/dataset1/a/b/c    exec      on     default
Zpool1/dataset1/a/b/c/d  exec      on     default

zfs set exec=off Zpool1/dataset1
zfs get exec
NAME                     PROPERTY  VALUE  SOURCE
Zpool1                   exec      on     default
Zpool1/dataset1          exec      off    local
Zpool1/dataset1/a        exec      off    inherited from Zpool1/dataset1
Zpool1/dataset1/a/b      exec      off    inherited from Zpool1/dataset1
Zpool1/dataset1/a/b/c    exec      off    inherited from Zpool1/dataset1
Zpool1/dataset1/a/b/c/d  exec      off    inherited from Zpool1/dataset1

zfs inherit exec Zpool1/dataset1
zfs get exec
NAME                     PROPERTY  VALUE  SOURCE
Zpool1                   exec      on     default
Zpool1/dataset1          exec      off    temporary
Zpool1/dataset1/a        exec      on     default
Zpool1/dataset1/a/b      exec      on     default
Zpool1/dataset1/a/b/c    exec      on     default
Zpool1/dataset1/a/b/c/d  exec      on     default

Sorry that I haven't included whole outputs but I thought it isn't necessary. My next question about above outputs is if exec applies on remount then why this property is set without remount for child datasets that I have? Those datasets are mounted when I run all commands showed above. Shouldn't child datasets get source set to temporary and change in exec property be applied after remount?

@GregorKopka
Copy link
Contributor

related: #985

@behlendorf
Copy link
Contributor

There's certainly an issue here which needs to be investigated and at a minimum explained. Fully implementing temporary mount point properties is part of the story, but I suspect there's something else going on here as well.

@kolczykm
Copy link
Author

kolczykm commented Dec 3, 2013

@behlendorf tanks for clarifying that described behavior isn't something intended. At the beginning I wasn't sure if I doing something wrong or doesn't understand it.

@behlendorf behlendorf removed this from the 0.6.4 milestone Oct 29, 2014
@behlendorf behlendorf added Type: Feature Feature request or new feature and removed Bug - Minor labels Oct 29, 2014
@behlendorf
Copy link
Contributor

This should now by resolved by temporary mount options which were implemented in 0282c41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Feature request or new feature
Projects
None yet
Development

No branches or pull requests

3 participants