-
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/snapshot automount does not work in linux namespace #3512
Comments
@Mic92 I think you may have answered your own question. Currently the |
Have a look to #616 which might be related to this issue. A few months ago I had a workaround with "mount --make-shared" but I cannot reproduce it anymore. |
Is there a something new about the problem? |
Hi. Do we have any progress with that issue? It also affects docker containers, so it's not possible to access snapshots from within the container :-( |
This can be (inelegantly) hacked together if you're desperate for the functionality today:
https://www.tecmint.com/restrict-sftp-user-home-directories-using-chroot/
Performance will vary but for a modern CPU at ~3Ghz with AES-NI, sshfs can sustain ~ 300MB/s (assuming your storage configuration can support that rate). |
One thing that could work, is to make |
That won't work in container situations where |
Container could support this though. LXC for example has special support for zfs. |
IMO that's the other end - containers can use zfs as their backend/overlay filesystem. The issue here is about using zfs features within the container (e.g. access a .zfs/snapshots directory) |
Yes. But I see no other way to implement this. zfs cannot rely on having a mount command in the container available. And if there is one, it should not execute it because it could be malicious. So cooperation with userspace is required. |
I also would have needed this, but found a niceish workaround. I used the zfs snapshots for samba shadow copies, instead of accessing them directly, I redirected the shadow copies to a nfs share (which supports auto mounting of the snapshots - you have to enable nfs option crossmnt) So maybe this would also be a solution for others with the problem |
I use zfs as root filesystem in lxc. When trying to enter /.zfs/snapshot mount fails.
This is properly because the zfs kernel module shell out to mount, which is not in the same mount namespace as the lxc-container in question (/.zfs in the container is not the same as on the host)
The container has the following capabilities:
however this should make any difference because the mount is run on host (does it?).
If you can give me a hint on how to solve this issue, I might create a patch on my own.
The text was updated successfully, but these errors were encountered: