I'm testing on Ubuntu 16.04 with the included zol 0.6.5 packages.
zfs share and zfs share -a just don't work. zfs set sharesmb=on pool/dataset works fine. I discovered that the shares are listed in /etc/dfs/sharetab but don't work. If I reboot or anything and try to share them again with zfs share, it will not work. net usershare list displays nothing. And of course because of this all shares are lost on every reboot.
Despite a dataset having the sharesmb=on value set, it will not share with zfs share -a and if I use zfs share pool/dataset it says: cannot share 'pool/dataset': filesystem already shared, when net usershare list shows nothing**. Samba is running and the shares appear in /etc/dfs/sharetab, not that that is helping me.
root@igor:~# zfs get sharesmb pool2/Media
NAME PROPERTY VALUE SOURCE
pool2/Media sharesmb on local
root@igor:~# zfs get sharesmb pool2/home
NAME PROPERTY VALUE SOURCE
pool2/home sharesmb on local
root@igor:~# zfs share -a
root@igor:~# net usershare list
root@igor:~# ls /var/lib/samba/usershares/
root@igor:~#
I've detailed a bunch of stuff at serverfault... if that's not good enough, I can bring some of it over here:
Well known problem I'm afraid. The SMB implementation that's currently in ZoL is seriously broken! I've rewritten it completely, but there is no interest what so ever to getting it merged.
I mount folders on ZFS as smb shares, so I could use this functionality. I currently use Samba config files, but that is not so reliable if the order of loading is changed somehow.
Thanks FransUrbo,
Wow what a shame! I hope you can get it merged. It doesn't make sense to leave it broken.
I'm (sort of) surprised Ubuntu took something broken like that and set it all up like it was working and pretended nothing was wrong... oh well, they have a bug report from me now. It makes you wonder about their other packages.
I remember giving up on NFS shares for a similar reason a long time ago too. It seems like these things should be easier to do than rewriting ZFS, creating kernel modules, etc... :(
How did it get broken? I was using this feature with the ZoL DEB package on Debian a few months ago, no issues. Is there a bug/discussion I can read so I don't have to ask questions?
Thanks
Wow what a shame! I hope you can get it merged. It doesn't make sense to leave it broken.
Indeed, but it's not going to happen.
I remember giving up on NFS shares for a similar reason a long time ago too.
Yeah, I rewrote that to :)
How did it get broken?
I designed it completely wrong to begin with. I knew that USER
shares had serious limitations, but I couldn't get REGISTRY
shares to work.
Later turned out, that after I upgraded Samba, I could get it
to work, and therefor rewrote the SMB driver.
I was using this feature with the ZoL DEB package on Debian a few months ago, no issues. Is there a bug/discussion I can read so I don't have to ask questions?
Yeah, I'm the one packaging those packages and I included my iSCSI,
SMB and NFS patches in those packages.
We're now having the (same) discussion about including them into the
official Debian GNU/Linux packages or not.
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-zfsonlinux-devel
I can't remember where we've discussed this, but in essence, nobody
wants to merge any share* patches because "in the distant future"
ZED should deal with this.
And although I agree fully that that's probably a much better solution,
I think it's a disservice to our users not to have something that DO
As soon as you find a product that you really like,
they will stop making it.
Ubuntu 14.04 ZFS with Samba is working just fine for me, in fact I'm doing some consulting business for backup servers where this is the main feature. ZFS+Samba has always been the "killer/must have app" for me.
@FransUrbo , do you have your own PPA repo? Might get some traction if you can get Slashdot and Reddit to do an article or two exposing what's going on...
No, and I don't have time or interest to setup one. Use the official Debian GNU/Linux packages.
+1 to get your stuff merged until a viable alternative gets released.
Yes, +1 too!!
You definitely should upstream your work. i guess nobody knows when the "distant future" will (ever) be. In the meanwhile your patches are much welcome, IMO.
@rauar @jumbi77 these are the kinds of changes we could make once the zfs_share and zfs_unshare tests are enabled and working in the test suite. Any help you could offer on that front would be welcome. Direction on running the test suite can be found here and we've like to get the following suites enabled.
tests/zfs-tests/tests/functional/cli_root/zfs_share
tests/zfs-tests/tests/functional/cli_root/zfs_unshare
I dont want to pollute this issue and am still searching... But... I am unsure if I should open a new issue and where.
My problem is, that I switched to arch b/c ubuntu 16.04 hat too many issues for me. Now the (felt) past decade "zfs share" never worked for me, and samba often was too slow compared to a nfs share e.g. to my backup box with 2xGig-E bonded.
For now, all my attempts to make nfs-server.service wait until zpools are imported (but it is cool I can login to desktop before pools are imported!) and then share them via /etc/exports have utterly failed. Maybe a target such as zfs-poolcache-imported as in "network-manager-wait-online" is needed?.
(Ubuntu used to have a boot delay until pools where imported and nfs was started later)
If I would know that instead I could reliably use zfs properties for sharing, that would be so cool.
So PLEASE if FransUrbo fixed that, PLEASE include his patches, it can't get worse than now, can it?
Ping. What is the current state of this issue? Any updates? We've got users wondering if this has or will be fixed. https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1615405
The groundwork is now largely in place to properly support this in a maintainable way. But it's still going to take some additional development work to finish this functionality so it works reliably across distributions.
So maybe @FransUrbo can finish his work he already done? Or do you mean something else by 'groundwork'?
Waiting on this as well.
also waiting
Hi there, what's the current state of the development work for this bug?
I've been looking into this and am a little bummed out to find that these properties are in such a half-implemented state. I'm working on developing a kind of immutable private cloud infrastructure for some clients, and I was hoping that this feature did some very basic config generation that I could bootstrap into my own Samba install. This would prevent me from having to configure systems individually at all, aside from some generic SMB tuning. The share definitions would just come along with the array.
I see that this feature utilizes the "usershare" feature of Samba, which sounds good - but only works when a local installation of Samba is detected. Unfortunately there is no actual configuration of the share available in the ZFS property, so a dataset like "pool/data/set/Name" it ends up with the name "pool_dataset_Name".
It would be great to be able to nest simple configuration options like share name someplace. Solaris seems to support this, but I get errors tying it on Linux. I think it might also be better if this functionality is simplified... aka, simply dumping the simplest share definition file possible into a folder (kinda like it already does), but leaving it up to the user to include that folder in their Samba configuration. I love that ZFS can manage shares that it contains, but having ZFS actually manage the entire SMB installation is a little crazy. But that said, it's not unreasonable to require a simple include line.
Most helpful comment
+1 to get your stuff merged until a viable alternative gets released.