Accessing ZFS snapshots over SMB

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Accessing ZFS snapshots over SMB

Samba - samba-technical mailing list
Hi!

https://bugzilla.samba.org/show_bug.cgi?id=13175

Currently trying to access ZFS snapshot directories over SMB fails:

$ bin/smbclient -U slow%x //localhost/test
Try "help" to get a list of possible commands.
smb: \> ls
  .                                   D        0  Tue Dec  5 09:05:27 2017
  ..                                  D        0  Tue Dec  5 08:49:27 2017
  .zfs                               DH        0  Tue Dec  5 08:49:27 2017
  test                                D        0  Tue Dec  5 09:06:06 2017

                1949611 blocks of size 1024. 1949578 blocks available
smb: \> ls .zfs/*
NT_STATUS_NOT_SUPPORTED listing \.zfs\*

This happens because the acl() library call fails with ENOTSUP on the snapshot
directories. This could be easily fixed by synthesizing an ACL based on the
POSIX mode, much like the getfacl() command on FreeBSD does. The attached WIP
patch implements this.

Question: do we want this?

-slow

--
Ralph Boehme, Samba Team       https://samba.org/
Samba Developer, SerNet GmbH   https://sernet.de/en/samba/
Reply | Threaded
Open this post in threaded view
|

Re: Accessing ZFS snapshots over SMB

Samba - samba-technical mailing list
On Tue, 5 Dec 2017 10:28:09 +0100, Ralph Böhme via samba-technical wrote:

> smb: \> ls .zfs/*
> NT_STATUS_NOT_SUPPORTED listing \.zfs\*
>
> This happens because the acl() library call fails with ENOTSUP on the snapshot
> directories. This could be easily fixed by synthesizing an ACL based on the
> POSIX mode, much like the getfacl() command on FreeBSD does. The attached WIP
> patch implements this.
>
> Question: do we want this?

Given that it's self-contained within the zfs module, I don't have
problem with it. Please add a comment in the fallback path explaining
why it's done, and then feel free to push with:
Reviewed-by: David Disseldorp <[hidden email]>

Cheers, David

Reply | Threaded
Open this post in threaded view
|

Re: Accessing ZFS snapshots over SMB

Samba - samba-technical mailing list
On Tue, Dec 05, 2017 at 11:20:09PM +0100, David Disseldorp via samba-technical wrote:

> On Tue, 5 Dec 2017 10:28:09 +0100, Ralph Böhme via samba-technical wrote:
>
> > smb: \> ls .zfs/*
> > NT_STATUS_NOT_SUPPORTED listing \.zfs\*
> >
> > This happens because the acl() library call fails with ENOTSUP on the snapshot
> > directories. This could be easily fixed by synthesizing an ACL based on the
> > POSIX mode, much like the getfacl() command on FreeBSD does. The attached WIP
> > patch implements this.
> >
> > Question: do we want this?
>
> Given that it's self-contained within the zfs module, I don't have
> problem with it. Please add a comment in the fallback path explaining
> why it's done, and then feel free to push with:
> Reviewed-by: David Disseldorp <[hidden email]>

thanks David. I wanted to give the FreeBSD/FreeNAS guys some more time to
comment. I was suspecting there might be a reason they've not patched it
yet. Generally they will be using shadow_copy2 for Windows clients, but that
doesn't work with Macs, so I wonder why they've never run into this broken use
case before...

-slow

--
Ralph Boehme, Samba Team       https://samba.org/
Samba Developer, SerNet GmbH   https://sernet.de/en/samba/