-
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
Automount of root dataset snapshot goes to wrong directory (/root) #14383
Comments
Again, other datasets seem to work fine:
|
Properties from the pool and datasets:
|
Seems like the behavior seen in: |
Yes, I suspect it is the same root (ha) issue. Suggest marking this as a duplicate. |
I think I might have seen someone cut a PR for 2.1.8 about this? Let me look... e: Nope, was thinking of f28c730 |
A followup to d7a6740 For `mount -t zfs -o opts ds mp` command line some implementations of `mount(8)`, e. g. Busybox in Debian work as follows: ``` newfstatat(AT_FDCWD, "ds", 0x7fff826f4ab0, 0) = -1 mount("ds", "mp", "zfs", MS_SILENT, NULL) = 0 ``` The logic above skips completely `mount.zfs` and prevents us from reading filesystem properties and applying mount options. For comparison, the coreutils `mount(8)` implementation does: ``` openat(AT_FDCWD, "/proc/filesystems", O_RDONLY|O_CLOEXEC) = 3 // figure out that zfs is a `nodev` filesystem and look for a helper newfstatat(AT_FDCWD, "/sbin/mount.zfs" ...) = 0 execve("/sbin/mount.zfs" ...) = 0 ``` Using `mount.zfs` in initramfs would help circumvent deficiencies of some of `mount(8)` implementations. `mount -t zfs` translates to `mount.zfs` invocation, except for cases when explicitly disabled by `-i`. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: szubersk <szuberskidamian@gmail.com> Closes #13305 (cherry picked from commit 35d81a7)
I'm seeing this issue after upgrading my system to Debian 12 (bookworm) that includes OpenZFS 2.1.11. Is there a fix or patch that can be applied? Edit: looks like this is fixed in 2.1.12. I will need to test this to confirm. |
System information
Describe the problem you're observing
Automatic mounting of snapshots of the root dataset is done in the wrong folder, causing confusion.
For example,
cd /.zfs/snapshot/snapname
causes the snapshot to be mounted under/root/.zfs/snapshot/snapname
rather than/.zfs/snapshot/snapname
.As far as I can tell, only the root dataset is affected.
Describe how to reproduce the problem
For the root dataset; the snapshot is automounted under
/root/.zfs/snapshot
rather than/.zfs/snapshot
as expected.For another dataset, things seem to work as expected:
One additional weirdness; a new snapshot doesn't seem to be automounted at all…
Any thoughts? This is stock Debian Bullseye + backports, with the kernel and ZFS (module built from DKMS) straight from Debian's repository.
The text was updated successfully, but these errors were encountered: