UCS Samba with ZFS via NFS working!

To add ZFS Snapshoting and Windows Previous Version features I figured out the following Solution
Result will be the ability of users to restore Files and Folders with a long history

Scenario is a Proxmox VE System with ZFS

  1. Install UCS on virtual HDD
  2. Install nfs-kernel-server on proxmox, install zfs-auto-snapshot from Github https://github.com/zfsonlinux/zfs-auto-snapshot
  3. create Dataset on Proxmox “zfs create rpool/data/test”
  4. share Dateset via nfs “zfs set sharenfs=on rpool/data/test” and set it to chmod -R 777 /mnt/data/test
  5. create share path mkdir /mnt/test
  6. mount nfs share on /etc/fstab " 172.28.11.252:/rpool/data/test /mnt/test nfs rsize=8192,wsize=8192,timeo=14,intr"
  7. mount -a mounts the new share
  8. Create Share in UCS, valid users = @TEST-GROUP
  9. Under advanced Samba settings set Key: vfs objects Value: shadow_copy2
  10. (next is broken at the moment but will work soon)

cat << EOF >>/etc/samba/local.conf
[global]
shadow: snapdir = .zfs/snapshot
shadow: sort = desc
# Specify snapshot name: frequent, hourly, daily… as desired
shadow: format = zfs-auto-snap_hourly-%Y-%m-%d-%H%M"
EOF

  1. Restart Samba
  2. Verify that the words zfs and shadow will show up with “testparm | grep zfs” and “testparm | grep vfs”
  3. Go to Share and check previous Versions

2017-09-21_15-12-05

7 Likes

to make all changes working you have to run

ucr commit /etc/samba/*

then you can check with testparm | grep zfs if it woked

apt-get install samba-vfs-modules

Keep all current settings!!!

Currently with PVE 6.1 not working, nfs shows empty client folders

Thanks for the nice howto.

Working again meanwhile?

i thinks its running currently
we will create a samba lxc as domain member for future

here we go

1 Like
Mastodon