[Samba] VFS shadowcopy2 with FeeBSD & ZFS

O'Connor, Daniel darius at dons.net.au
Mon Oct 5 11:22:55 UTC 2020



> On 5 Oct 2020, at 18:29, Remy Zandwijk <remy+samba at luckyhands.nl> wrote:
> We have:
> 
> vfs objects  = shadow_copy2 zfsacl
> 
> (Actually, vfs objects = shadow_copy2 zfsacl fruit streams_xattr, but I wanted to point out the order of shadow_copy2 and zfsacl).

Thanks, that was it!

I did try that earlier but must have stuff something else up which made me believe it didn't matter.

It would be Really Really Nice (tm) if there was more debugging for this feature - it feels like a "blind man with a Rubik's cube" situation :-/

> To rule out shadow:format problems, I would create just one snapshot with a simple name and configure shadow:format accordingly.
> 
> Also, is /public the mountpoint of the ZFS dataset? If not, then you might need 'shadow:snapdirseverywhere = yes'. If you have nested ZFS datasets, you'll also need that setting.
> 
> -Remy
> 
> 
> 
>> On 5 Oct 2020, at 09:00, O'Connor, Daniel via samba <samba at lists.samba.org> wrote:
>> 
>> Hi,
>> I have a FreeBSD 12.1 system with Samba 4.11.8 using ZFS and I want to get shadow copies working, however the clients (Windows 10) don't show anything in the 'previous versions' tab. I think it's doing something as it say 'working' for a short amount of time. Also if I crank up vfs debugging to 10 I get:
>> [2020/10/05 16:50:03.879093, 10, pid=50572, effective(0, 0), real(0, 0), class=vfs] ../../source3/smbd/vfs.c:65(vfs_find_backend_entry)
>> vfs_find_backend_entry called for shadow_copy2
>> Successfully loaded vfs module [shadow_copy2] with the new modules system
>> ...
>> [2020/10/05 16:50:12.483055, 10, pid=50572, effective(3000037, 20), real(0, 0), class=vfs] ../../source3/modules/vfs_default.c:1327(vfswrap_fsctl)
>> FSCTL_GET_SHADOW_COPY_DATA: 0 volumes for path[Program Files].
>> 
>> The share configuration is done like so:
>> 
>> [public]
>>       comment = Public
>>       path = /public
>>       read only = no
>>       public = yes
>>       vfs objects = zfsacl shadow_copy2
>>       shadow:snapdir = .zfs/snapshot
>>       shadow:format = zrepl_%Y%m%d_%H%M%S_000
>>       shadow:localtime = no
>>       shadow:sort = desc
>>       acl allow execute always = yes
>>       map acl inherit = yes
>>       store dos attributes = yes
>> 
>> ie it is mounted at /public, and snapshots are under /public/.zfs/snapshot and called things like 'zrepl_20201005_063741_000' and are in UTC.
>> 
>> Is there a way I can get some more debugging out of the shadow_copy2 module (or can someone point out my mistake :) ?
>> 
>> Thanks.
>> 
>> --
>> Daniel O'Connor
>> "The nice thing about standards is that there
>> are so many of them to choose from."
>> -- Andrew Tanenbaum
>> 
>> 
>> 
>> -- 
>> To unsubscribe from this list go to the following URL and read the
>> instructions:  https://lists.samba.org/mailman/options/samba
> 

--
Daniel O'Connor
"The nice thing about standards is that there
are so many of them to choose from."
 -- Andrew Tanenbaum





More information about the samba mailing list