When running Samba 4.1.7 (and prior) in normal samba server mode, a share with the following configuration correctly presents 'Previous Version' file details to Windows systems: vfs objects = shadow_copy2 shadow: sort = desc shadow: snapdir = .zfs/snapshot shadow: format = zfs-auto-snap_%Y-%m-%d-%H%M%S When Samba AD / DC mode is configured, and when the same share is added to smb.conf the 'Previous Version' details now reports to Windows that there are no previous versions available. Browsing to the share, the .zfs/snapshot directory is visible, the modified / previous files are able to be accessed without issue. When enabling logging (level 9) nothing appears obvious as an error. Happy to do any legwork to provide any details required to further diagnose.
Are you still using the smbd file server when Samba AD / DC mode is configured? The smbd file server is required, in order to support the vfs_shadow_copy2 module.
Hi David, Thanks for the response. How do I check for this? I provision Samba AD via the following: /usr/bin/samba-tool domain provision --domain=$netbiosDomain --realm=$dnsDomainName --server-role=$serverRole --adminpass=$administratorPassword --dns-backend=$dnsBackend --use-rfc2307 --use-ntvfs Apart from adding in the share's manually that have known snapshots, the smb.conf that samba-tool generates is left intact. If I attempt to start the smb service when the samba service (Samba AD) is running, the smb service fails to start. If I attempt to run smbd manually (/usr/sbin/smbd -D), whilst samba is running the following gets logged in the log.smbd: [2014/05/17 08:01:56.059546, 0] ../source3/smbd/server.c:1257(main) server role = 'active directory domain controller' not compatible with running smbd standalone. You should start 'samba' instead, and it will control starting smbd if required So .. the log is advising what you've mentioned as well. Is there a configuration option that I am missing that allows 'samba' to control 'smbd' ? smb.conf below: [global] workgroup = LAB realm = localdomain.net netbios name = LAB-AD server role = active directory domain controller dns forwarder = 192.168.153.2 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 posix:eadb = /var/lib/samba/eadb.tdb vfs objects = shadow_copy2 shadow: sort = desc shadow: snapdir = .zfs/snapshot shadow: format = zfs-auto-snap_%Y-%m-%d-%H%M%S log level = 9 [netlogon] path = /var/lib/samba/sysvol/localdomain.net/scripts read only = No [sysvol] path = /var/lib/samba/sysvol read only = No [home] comment = User Home Directories path = /storage/samba/UserHomeDirectories hide files = /desktop.ini/$RECYCLE.BIN/ read only = No
In further diagnosis, this issue is caused by the --use-ntvfs switch. Without the switch, Windows 'Previous Versions' works as expected when provisioning Samba AD in the following fashion: /usr/bin/samba-tool domain provision --domain=$netbiosDomain --realm=$dnsDomainName --server-role=$serverRole --adminpass=$administratorPassword --dns-backend=$dnsBackend --use-rfc2307 Happy to close this issue out as not a bug, however could someone potentially enlighten me as to if Windows 'Previous Versions' should be working when the --use-ntvfs switch is used? If so, then this is potentially a bug?
(In reply to comment #3) > Happy to close this issue out as not a bug, however could someone potentially > enlighten me as to if Windows 'Previous Versions' should be working when the > --use-ntvfs switch is used? If so, then this is potentially a bug? It's unlikely that that will work with ntvfs. And it's more unlikely that this will be fixed, ntvfs is only around for historic reasons. smbd is the recommended solution for file serving these days.
comment 4 says it all. Closing as wontfix. It works with smbd.