[Samba] Samba 3.4.2 with Solaris ZFS Snaphots

Jean-Christophe Delaye Jean-Christophe.Delaye at eurecom.fr
Wed Nov 18 03:35:49 MST 2009


Hi,
I'm trying to make samba working with Solaris ZFS Snaphots.

Solaris 10 is running on a x64/X86 box which is both Samba (3.4.2) 
server and Zfs server.
I created home/delaye filesystem with home zfs pool.

# zpool list
NAME   SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
home  1.98G  2.60M  1.98G     0%  ONLINE  -

home/delaye                          2.47M  1.95G  1.66M  /home/delaye

Snapshots are named with the syntax @GMT-`date -u +%Y.%m.%d-%H.%M.%S`
and created using
# zfs snapshot home/delaye at GMT-`date -u +%Y.%m.%d-%H.%M.%S`

# zfs list
NAME                                  USED  AVAIL  REFER  MOUNTPOINT
home                                 1.80M  1.95G    23K  /home
home/delaye                          1.70M  1.95G  1.67M  /home/delaye
home/delaye at GMT-2009.11.18-10.01.13    31K      -  1.67M  -

samba supports shadow copy (and  zfs acl) as Build Options.
smbd -b

    vfs_shadow_copy2_init
    vfs_shadow_copy_init
    vfs_zfsacl_init

Builtin modules:
     pdb_ldap pdb_smbpasswd pdb_tdbsam pdb_wbc_sam rpc_lsarpc rpc_winreg 
rpc_initshutdown rpc_dssetup rpc_wkssvc rpc_svcctl rpc_ntsvcs 
rpc_netlogon rpc_netdfs rpc_srvsvc rpc_spoolss rpc_eventlog rpc_samr 
idmap_ldap idmap_tdb idmap_passdb idmap_nss nss_info_template auth_sam 
auth_unix auth_winbind auth_wbc auth_server auth_domain auth_builtin 
auth_netlogond vfs_default vfs_solarisacl

I tried to configure a share in smb.conf supporting zfs snapshot as 
shadow copy provider with the following:

[delaye]
         comment = JCD
         path = /home/delaye
         read only = No
         writable = yes
         acl check permissions = No
         hide dot files = No
         oplocks = No
         level2 oplocks = No
         vfs objects = shadow_copy2
         shadow:snapdir = /home/delaye/.zfs/snapshot
         shadow:basedir = /home/delaye

but I never see any previous version for files from client PC running XP 
(SP3) accessing to this samba share.

Can anyone help to troubleshoot this? Does anybody have a running setup 
for Solaris zfs snapshots ?

Thanks


More information about the samba mailing list