# samba41 & vfs_shadow_copy2 setup troubles



## silkie (Mar 17, 2014)

Hi, I used to have "previous versions" running just fine on my old SMB3.6 system.

I've recently migrated to FreeBSD 10 with Samba 4.1 but I can't get it to play nice, I was hoping someone might be able to point out if this works at all on Samba 4.1. Maybe one of you chaps have this working fine and you could spot some problems in my smb4.conf. Here be my smb4.conf.....


```
# Global parameters
[global]
        workgroup = SILKIE
        realm = SILKIE.NET
        netbios name = BSSS
        server role = active directory domain controller
        interfaces = 192.168.69.2
        bind interfaces only = yes
        dns forwarder = 192.168.69.1
        server services = rpc, nbt, wrepl, ldap, cldap, kdc, drepl, winbind, ntp_signd, kcc, dnsupdate, dns, smb
        dcerpc endpoint servers = epmapper, wkssvc, rpcecho, samr, netlogon, lsarpc, spoolss, drsuapi, dssetup, unixinfo, browser, eventlog6, backupkey, dnsserver, winreg, srvsvc
        idmap_ldb:use rfc2307 = yes
        nsupdate command = /usr/local/bin/samba-nsupdate -g

        aio write size = 8192
        aio read size = 8192
        write cache size = 1048576
        socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072
        strict sync = no
        sync always = no
        use sendfile = true
        use sendfile = true
        min receivefile size = 16384
        strict locking = no
        read raw = yes
        write raw = yes

        os level = 99
        wins support = yes
        name resolve order = wins bcast
        wins proxy = yes
        domain master = yes
        preferred master = yes
        unix extensions = no

[netlogon]
        path = /var/db/samba4/sysvol/silkie.net/scripts
        read only = no
        browseable = no

[sysvol]
        path = /var/db/samba4/sysvol
        read only = no
        browseable = no

[Incoming]
        comment = OMG LOADS OF SHARED SPACE
        path = /BIGSMELLYRAID2/Incoming
        read only = No
        browseable = no
        vfs objects = shadow_copy2, zfsacl, acl_xattr, full_audit, readahead
        nfs4:acedup = merge
        nfs4:mode = special
        nfs4:chown = yes
        full_audit:success = connect opendir disconnect unlink mkdir rmdir open rename
        full_audit:failure = connect opendir disconnect unlink mkdir rmdir open rename
        shadow: format = daily-%Y-%m-%d
        shadow: sort = desc
        shadow: basedir = /BIGSMELLYRAID2/Incoming
        shadow: snapdir = .zfs/snapshot
        shadow: localtime = yes
        follow symlinks = yes
        wide links = yes
```

Other points of note, .zfs/sanpshot directory is browsable with samba and the snapshot format matches the declaration in the smb4.conf. The only difference is that I currently have more than just "daily" snaps in the snapdir.

Here's a listing of the snapshot folder for more clarity.

```
drwxr-xr-x  11 silkie  silkie  13 Mar 14 17:24 weekly-2014-10
drwxr-xr-x  11 silkie  silkie  13 Mar 14 17:24 daily-2014-03-15
drwxr-xr-x  11 silkie  silkie  14 Mar 15 13:20 hourly-2014-03-17-08
drwxr-xr-x  11 silkie  silkie  14 Mar 15 13:20 hourly-2014-03-17-07
drwxr-xr-x  11 silkie  silkie  14 Mar 15 13:20 daily-2014-03-17
drwxr-xr-x  11 silkie  silkie  14 Mar 15 13:20 daily-2014-03-16
drwxr-xr-x  11 silkie  silkie  13 Mar 17 08:56 hourly-2014-03-17-09
drwxr-xr-x  11 silkie  silkie  13 Mar 17 10:01 hourly-2014-03-17-12
drwxr-xr-x  11 silkie  silkie  13 Mar 17 10:01 hourly-2014-03-17-11
drwxr-xr-x  11 silkie  silkie  13 Mar 17 10:01 hourly-2014-03-17-10
```

I've found setting the log level to 10 almost pointless as I'm struggling to make sense of the extra logging.


----------



## acheron (Mar 18, 2014)

It works fine on my system, I don't have shadow: basedir defined though.


----------



## silkie (Mar 19, 2014)

acheron, thank you, I will persevere with it.  :beergrin


----------

