-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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-2.2.0 - after upgrade from 2.1.12 zfs fails to honor the mountpoint unless zoned is set to on #15407
Comments
I would suspect you're running the old module version and new userland and there's some inconsistent behavior around interpreting the properties struct returned, somehow, but |
:~# zfs version I've also tried exporting and re-importing the pools in case the ID is updated on import but there was no change. |
I believe I my be running into a related issue. I created a file backed zpool in an unshare, and I was able to import it in the unshare. After this I believe I created a dataset on the host, and zoned it to the unshare's user namespace. After fooling around with mounting and unmounting on both sides, I somehow managed to get into a state where I couldn't mount the dataset in the unshare, even though it was unmounted on the host. (mount | grep zfs was empty). Export/import didnt seem to help, neither did share/unshare. I wasn't able to change any properties on the dataset either. The documentation for allow says:
Wouldn't this be the whole point of user / mount namespaces though? After changing zoned=on on the host (didn't try in the unshare) I was able to change the mountpoint property to legacy in the unshare and mount to some other directory. Until I did this, I could not, even though I used zfs allow to add the capabilities listed as unsupported above. (Which is expected I guess.) Using nsenter to enter the mount namespace, ls shows that the directory that was automounted into is owned by root:root. |
It looks like the above entry, #15419, does explain my issue. My build doesn't have CONFIG_USER_NS set:
|
Since 15419 describes this issue better and matches my case I'm going to close this as a dup. @deliciouslytyped I think you should resubmit your issue as it's own thing as it looks like your build has namespaces enabled. |
System information
Describe the problem you're observing
After an upgrade to zfs 2.2.0 from 2.1.12 it was observed that none of the zfs filesystems automounted. zfs mount -a mounted nothing. Trying to mount a specific filesystem, ie: zfs mount backup, resulted in 'permission denied'.
Trying to change the mountpoint resulted in the following message:
cannot set property for 'backup': 'mountpoint' cannot be set while dataset 'zoned' property is set
turning zoned on, default was off, results in in the mount working again and mountpoint allowed to be set.
turning it back off causes it to fail:
root@darkstar:/home/zfs-2.2.0# zfs set zoned=off backup
root@darkstar:/home/zfs-2.2.0# zfs get mountpoint backup
NAME PROPERTY VALUE SOURCE
backup mountpoint /home/backup local
root@darkstar:/home/zfs-2.2.0# zfs set mountpoint=/home/backup backup
cannot set property for 'backup': 'mountpoint' cannot be set while dataset 'zoned' property is set
root@darkstar:/home/zfs-2.2.0# zfs set zoned=on backup
root@darkstar:/home/zfs-2.2.0# zfs set mountpoint=/home/backup backup
root@darkstar:/home/zfs-2.2.0# zfs mount backup
root@darkstar:/home/zfs-2.2.0#
Describe how to reproduce the problem
Create filesystem on zfs 2.1.12. set the mountpoint to something other than legacy. Upgrade to zfs 2.2.0.
Workaround
setting the mountpoint to legacy works if zoned is off. While it's set to legacy mount -t zfs backup /home/backup works without error.
Include any warning/errors/backtraces from the system logs
Nothing is logged during any of these errors. As near as I can tell the global ID has somehow changed and no longer matches the ID stored in the filesystem, but I have no idea how to modify these IDs. The documentation suggests that zoned shouldn't do anything on linux, but I'd still prefer it to be off since it's the default.
The text was updated successfully, but these errors were encountered: