Hi,
This has to be my third or fourth time banging my head against this particular wall, but is something so great to have, so I´m willing to keep banging until I manage to break through
I´ve read through numerous threads like this one:
Samba 3.6 and Volume Shadow Copy/Previous Versions with ZFS
I have a similar setup copied all configurations, settings etc. but I cannot get it to work. Please look through this to see if I´ve missed something really obvoius.
FreeBSD 9.0-RELEASE-p4
samba36-3.6.7
Now, those are not what I would call good access permissions, but set for excluding access permissions as a source of failure.
/usr/local/etc/smb.conf
Log level 10 makes the server waaay slower but needed to see any information at all regarding shadow_copy2.
When I map either home$ or netlogon$, I right-click the share or any of the subfolders, choose Properties and click on "Previous Versions" it replies "There are no previous versions available". During this time, I am tailing samba.log like:
To catch anything useful, and this is what I get back:
shadow_copy2.log
On a sidenote that I don´t know if it matters, is that I can´t browse the ".zfs/snapshot"-folder mapped in Windows with Explorer, but it works with smbclient in a terminal, or mapped as a SMB share in my Mac with Finder.
I have tried with snapdir=hidden,visible; didn´t make a difference. I have tried with/without the patch mentioned in the linked thread at the top, that didn´t make any difference either.
Suggestions anyone?
/Sebulon
This has to be my third or fourth time banging my head against this particular wall, but is something so great to have, so I´m willing to keep banging until I manage to break through
I´ve read through numerous threads like this one:
Samba 3.6 and Volume Shadow Copy/Previous Versions with ZFS
I have a similar setup copied all configurations, settings etc. but I cannot get it to work. Please look through this to see if I´ve missed something really obvoius.
FreeBSD 9.0-RELEASE-p4
samba36-3.6.7
Code:
# zfs get -r aclmode,aclinherit pool2/storage | grep -v GMT
NAME PROPERTY VALUE SOURCE
pool2/storage aclmode passthrough local
pool2/storage aclinherit passthrough local
pool2/storage/home aclmode passthrough inherited from pool2/storage
pool2/storage/home aclinherit passthrough inherited from pool2/storage
pool2/storage/netlogon aclmode passthrough inherited from pool2/storage
pool2/storage/netlogon aclinherit passthrough inherited from pool2/storage
pool2/storage/profile aclmode passthrough inherited from pool2/storage
pool2/storage/profile aclinherit passthrough inherited from pool2/storage
# zfs list -t snapshot
NAME USED AVAIL REFER MOUNTPOINT
...
pool2/storage@GMT-2012.09.27-08.21.15 0 - 298K -
pool2/storage@GMT-2012.09.27-08.21.35 0 - 298K -
pool2/storage@GMT-2012.09.27-08.21.55 0 - 298K -
pool2/storage@GMT-2012.09.27-08.22.05 0 - 298K -
pool2/storage/home@GMT-2012.09.27-08.21.15 156K - 256K -
pool2/storage/home@GMT-2012.09.27-08.21.35 0 - 270K -
pool2/storage/home@GMT-2012.09.27-08.21.55 0 - 270K -
pool2/storage/home@GMT-2012.09.27-08.22.05 0 - 270K -
pool2/storage/netlogon@GMT-2012.09.27-08.21.15 0 - 256K -
pool2/storage/netlogon@GMT-2012.09.27-08.21.35 0 - 256K -
pool2/storage/netlogon@GMT-2012.09.27-08.21.55 0 - 270K -
pool2/storage/netlogon@GMT-2012.09.27-08.22.05 0 - 270K -
pool2/storage/profile@GMT-2012.09.27-08.21.15 0 - 256K -
pool2/storage/profile@GMT-2012.09.27-08.21.35 0 - 256K -
pool2/storage/profile@GMT-2012.09.27-08.21.55 0 - 256K -
pool2/storage/profile@GMT-2012.09.27-08.22.05 0 - 270K -
# df -h
...
pool2/storage 10T 312k 10T 0% /export/storage
pool2/storage/home 10T 269k 10T 0% /export/storage/home
pool2/storage/netlogon 10T 269k 10T 0% /export/storage/netlogon
pool2/storage/profile 10T 269k 10T 0% /export/storage/profile
[CMD="#"]ls -lah /export/storage/[/CMD]
drwxrwxrwx+ 3 root wheel 3B Sep 27 08:21 home
drwxrwxrwx+ 3 root wheel 3B Sep 27 08:21 netlogon
drwxrwxrwx+ 3 root wheel 3B Sep 27 08:22 profile
# getfacl /export/storage/*
# file: /export/storage/home
# owner: root
# group: wheel
owner@:rwxpDdaARWcCos:fd----:allow
group@:rwxpDdaARWcCos:fd----:allow
everyone@:rwxpDdaARWcCos:fd----:allow
# file: /export/storage/netlogon
# owner: root
# group: wheel
owner@:rwxpDdaARWcCos:fd----:allow
group@:rwxpDdaARWcCos:fd----:allow
everyone@:rwxpDdaARWcCos:fd----:allow
# file: /export/storage/profile
# owner: root
# group: wheel
owner@:rwxpDdaARWcCos:fd----:allow
group@:rwxpDdaARWcCos:fd----:allow
everyone@:rwxpDdaARWcCos:fd----:allow
/usr/local/etc/smb.conf
Code:
[global]
max protocol = SMB2
server string = %h server (Samba, FreeBSD)
security = ads
realm = DOMAIN.SOMETHING.SE
workgroup = DOMAIN
idmap config * : backend = tdb
idmap config * : range = 10000 - 1000000
winbind enum users = yes
winbind enum groups = yes
winbind nested groups = yes
winbind separator = .
winbind offline logon = true
winbind expand groups = 10
template homedir = /usr/home/%U
template shell = /usr/local/bin/bash
username map = /usr/local/etc/samba/usermap
log level = 10
log file = /var/log/samba/samba.log
max log size = 1024000
syslog = 0
enable core files = no
netbios name = FILESERVER
interfaces = xxx.xxx.xxx.xxx/24
unix extensions = no
follow symlinks = yes
wide links = yes
nt acl support = yes
map acl inherit = yes
inherit acls = yes
inherit permissions = yes
inherit owner = no
ea support = yes
store dos attributes = yes
map hidden = no
map system = no
map archive = no
case sensitive = no
[netlogon$]
comment = Network Logon Service
path = /export/storage/netlogon
guest ok = yes
writable = yes
vfs objects = zfsacl, shadow_copy2
nfs4:acedup = merge
nfs4:mode = special
nfs4:chown = yes
shadow: format = GMT-%Y.%m.%d-%H.%M.%S
shadow: sort = desc
shadow: snapdir = .zfs/snapshot
[home$]
comment = Network Home Directory
path = /export/storage/home
writable = yes
valid users = %U
vfs objects = zfsacl, shadow_copy2
nfs4:acedup = merge
nfs4:mode = special
nfs4:chown = yes
shadow: format = GMT-%Y.%m.%d-%H.%M.%S
shadow: sort = desc
shadow: snapdir = .zfs/snapshot
[profile$]
comment = Network Profile Directory
path = /export/storage/profile
writeable = yes
csc policy = disable
valid users = %U @"Domain Admins"
vfs objects = zfsacl
nfs4:acedup = merge
nfs4:mode = special
nfs4:chown = yes
Log level 10 makes the server waaay slower but needed to see any information at all regarding shadow_copy2.
When I map either home$ or netlogon$, I right-click the share or any of the subfolders, choose Properties and click on "Previous Versions" it replies "There are no previous versions available". During this time, I am tailing samba.log like:
# tail -f /var/log/samba/samba.log | egrep '(copy2|2012.09.27-08.21.15|2012.09.27-08.21.35|2012.09.27-08.21.55|2012.09.27-08.22.05)'To catch anything useful, and this is what I get back:
shadow_copy2.log
Code:
...
[2012/09/27 09:18:10.513795, 6] modules/vfs_shadow_copy2.c:495(convert_shadow2_name)
convert_shadow2_name: '@GMT-2012.09.27-08.22.05/test1' -> '/export/storage/home/.zfs/snapshot/GMT-2012.09.27-08.22.05/test1'
open_file_ntcreate: fname=@GMT-2012.09.27-08.22.05/test1, after mapping access_mask=0x80
grant_fsp_oplock_type: oplock type 0x0 on file @GMT-2012.09.27-08.22.05/test1
acl(ACE_GETACLCNT, @GMT-2012.09.27-08.22.05/test1): No such file or directory smbd_check_open_rights: Could not get acl on @GMT-2012.09.27-08.22.05/test1: NT_STATUS_OBJECT_NAME_NOT_FOUND
open_file: smbd_check_open_rights on file @GMT-2012.09.27-08.22.05/test1 returned NT_STATUS_OBJECT_NAME_NOT_FOUND
On a sidenote that I don´t know if it matters, is that I can´t browse the ".zfs/snapshot"-folder mapped in Windows with Explorer, but it works with smbclient in a terminal, or mapped as a SMB share in my Mac with Finder.
I have tried with snapdir=hidden,visible; didn´t make a difference. I have tried with/without the patch mentioned in the linked thread at the top, that didn´t make any difference either.
Suggestions anyone?
/Sebulon