Configure /etc/samba/smb.conf
[global]
...
usershare path = /var/lib/samba/usershares
usershare max shares = 100
usershare allow guests = yes
usershare owner only = no
Create that usershare directory and set proper permissions on it. As root:
mkdir /var/lib/samba/usershares
chmod +t /var/lib/samba/usershares
Create users using smbpasswd, restart smbd. Works.
]]>[backup]
comment = Bakcup Files
path = /srv/backup
browseable = yes
# guest ok = yes
writable = yes
How do I configure this with zfs sharesmb? Apart from zfs set sharesmb=on
EDIT---
BTW:
$ sudo zfs get sharesmb
NAME PROPERTY VALUE SOURCE
zdata sharesmb off local
zdata/backup sharesmb off local
zdata/media sharesmb off local
zdata/sw sharesmb off local
although sharesmb is off I can access the share from a Win box.
]]>You can share a ZFS file system by setting the sharenfs or sharesmb file system property.
It is confusing that one need to setup share in two just remotely connected places.
Puzzled
]]>Or is it a way of sharing a volume without mounting it localy?
I don't use samba myself, but yes, that is what I understand from: http://zfsonlinux.org/faq.html#HowDoISetupShares
]]>Interesting (but a bit confusing). I already had this
[media]
comment = Media files
path = /srv/media
browseable = yes
guest ok = yes
writable = yes
in my smb.conf.
For my understanding what is the effect of sharesmb=on? Is it required for a mounted volume to share over samba?
Or is it a way of sharing a volume without mounting it localy?
]]>When on
$ sudo zfs list
NAME USED AVAIL REFER MOUNTPOINT
zdata 1.48T 1.19T 41.9K /mnt/zdata
zdata/backup 177G 323G 177G /srv/backup
zdata/media 1.25T 216G 1.25T /srv/media
zdata/sw 50.5G 49.5G 50.5G /srv/software
I try
$ sudo zfs set sharesmb=on zdata/media
I get following error
cannot share 'zdata/media': smb add share failed
I looked in dmesg but couln't find anything specific to this, nor in journalctl
What could be the cause of this
]]>