New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot mount CIFS shares shared via ZFS #1170
Comments
Is the path not //eightyeight/pool_srv ? |
No. The path is //eightyeight/srv. The "pool/srv" mountpoint is "/srv" on the box, not "/pool/srv". This can be verified:
|
All it does is running "net usershare add" and since it is bad to just give I was looking at the code earlier trying to figure out how to rename share |
It won't share using standard authentication. Using guest is just a simple example. Also, as mentioned, I should not be sharing //eightyeight/pool/srv as the mountpoint is not '/pool/srv' but '/srv'. If that is what is expected, then that's another bug. Without ZFS, I can share //eightyeight/srv with no problem. |
Why is this a bug? |
Having pool/srv mounted to /srv is not a bug. Using a Samba client to mount /pool/srv/ when it does not exist, is. |
Look, you run smbclient -U guest -NL eightyeight 2> /dev/null | grep Disk Then you are doing smbclient -U guest -N //eightyeight/srv You are confused, ZoL just picks dataset name, replaces slashes with underscores and uses it as share name, NOT the mountpoint! |
Ok, so now I'M confused! Do we have a bug here or not? What IS the bug in such case? |
Well, all I can tell you is that I still cannot mount a Samba share when using "zfs share" with "sharesmb=on", whether I use underscores, directory paths or datasets. Doesn't matter if I try "//eightyeight/pool_srv", "//eightyeight/pool/srv" or "//eightyeight/srv", it won't mount. The Samba clients can see that the share exists, but can't do anything with it. Further, I can mount the //eightyeight/srv directory path fine using native Samba config, getting ZFS out of the way. So, if there exists some documentation on how to do this correctly, I would be much appreciated, but everything I've thrown at it shows me that I cannot mount a Samba share using ZFS natively. Has anyone even tried this? Or, are we arguing for the sake of argument? |
Okay. So, tearing everything down, and starting from scratch, I am getting a "permission denied" error, as guest, my user, and root. So, I'm guessing I also need to make some modifications in the smb.conf. Again, docs would be helpful, seeing as though the Solaris ones from Oracle only go so far. |
It's all in the man page - 'man zfs'. And the user you're trying to auth as must have access to the FS, naturally. Can you auth as 'my user' normally (i.e., against another share, not shared via zfs)? |
There is no bug, Aaron is just confused with how samba share names work, he seems to expect is to be same as mountpoint. edit: Check how usershares work in samba, because this is what zfs does. All their options are most likely stored in /var/lib/samba/usershares |
I guess I'm confused, because the Samba tools share a directory. ZFS isn't doing that. :) |
I'll close the ticket. |
Aikudinov, just for the record. Did you get it to work? It works for me, but there might be two other bugs lurking here:
|
and that samba needs to be able to authenticate user(s). * Add information that 'net' can be used to modify the share after ZFS sharing and that it will be undone with a 'zfs unshare'. Closes: openzfs#1181 * Do basic sanity checks in smb_available() to verify that the 'net' command and the usershare directory exists. Closes: openzfs#1124 * Give an example on how to mount a SMB filesystem shared via ZFS. Improves: openzfs#1170
and that samba needs to be able to authenticate user(s). * Add information that 'net' can be used to modify the share after ZFS sharing and that it will be undone with a 'zfs unshare'. Closes: openzfs#1181 * Do basic sanity checks in smb_available() to verify that the 'net' command and the usershare directory exists. Closes: openzfs#1124 * Give an example on how to mount a SMB filesystem shared via ZFS. Improves: openzfs#1170
* Update manpage with more information about the ACL, guest access and that samba needs to be able to authenticate user(s). * Add information that 'net' can be used to modify the share after ZFS sharing and that it will be undone with a 'zfs unshare'. * Give an example on how to mount a SMB filesystem shared via ZFS. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #1181 Issue #1170
+ Merge from iscsi+smbfs+snapshot+zvol Commits: c519b70606fc2cfba3423aeed1f7d6dfbc55b27e Add some ignores (among them pkg files). 9cc55935e3f1eed3cd0f67bfcc46aa5908e90927 Indicate full 'path' (latest git commit date and all patches) in the Release tag. + Script to run through some tests to test share/unsharing... + Improve upon the module load string to include the Release from META. + New automake'd Makefile.in's. + Merge latest from iscsi+smbfs+mine * Put the extra share script (/sbin/zfs_share_iscsi) as a define. * Optional /etc/iscsi_target_id which contain the TID - this instead of autogenerating one (which changes every month!). * Document iSCSI for ZFS for Linux. * Makefile.in is recreated by autogen.sh so remove it... * Remove a failed patch merge. * Re-add some debug from ZoL:master. * Mark the Release with the last GIT commit date. + In zfs_unmount(), support VOLUMEs. This function is called when (for example) doing a 'zfs destroy' on a shared volume as well as mounted filesystems so make sure we unshare instead of unmount any active volume. * Simplify domainname retreival. + Tripple check before continuing with reversing it. * Sanity checks for EXTRA_SHARE_SCRIPT, IETM_CMD_PATH and PROC_IET_VOLUME. * Update manpage with more information about the ACL, guest access and that samba needs to be able to authenticate user(s). * Add information that 'net' can be used to modify the share after ZFS sharing and that it will be undone with a 'zfs unshare'. Closes: openzfs#1181 * Do basic sanity checks in smb_available() to verify that the 'net' command and the usershare directory exists. Closes: openzfs#1124 * Give an example on how to mount a SMB filesystem shared via ZFS. Improves: openzfs#1170 * Remove superfluous ZFS_PROP_SHAREISCSI. * Remove some extra heavy debugging I forgot to remove from my development of iSCSI/SMBFS!
and that samba needs to be able to authenticate user(s). * Add information that 'net' can be used to modify the share after ZFS sharing and that it will be undone with a 'zfs unshare'. Closes: openzfs#1181 * Do basic sanity checks in smb_available() to verify that the 'net' command and the usershare directory exists. Closes: openzfs#1124 * Give an example on how to mount a SMB filesystem shared via ZFS. Improves: openzfs#1170
* Update manpage with more information about the ACL, guest access and that samba needs to be able to authenticate user(s). * Add information that 'net' can be used to modify the share after ZFS sharing and that it will be undone with a 'zfs unshare'. Closes: openzfs#1181 * Do basic sanity checks in smb_available() to verify that the 'net' command and the usershare directory exists. Closes: openzfs#1124 * Give an example on how to mount a SMB filesystem shared via ZFS. Improves: openzfs#1170
* Update manpage with more information about the ACL, guest access and that samba needs to be able to authenticate user(s). * Add information that 'net' can be used to modify the share after ZFS sharing and that it will be undone with a 'zfs unshare'. Closes: openzfs#1181 * Do basic sanity checks in smb_available() to verify that the 'net' command and the usershare directory exists. Closes: openzfs#1124 * Give an example on how to mount a SMB filesystem shared via ZFS. Improves: openzfs#1170
* Update manpage with more information about the ACL, guest access and that samba needs to be able to authenticate user(s). * Add information that 'net' can be used to modify the share after ZFS sharing and that it will be undone with a 'zfs unshare'. * Give an example on how to mount a SMB filesystem shared via ZFS. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes openzfs#1181 Issue openzfs#1170
…openzfs#1170) Bumps [memchr](https://github.com/BurntSushi/memchr) from 2.5.0 to 2.6.0. - [Commits](BurntSushi/memchr@2.5.0...2.6.0) --- updated-dependencies: - dependency-name: memchr dependency-type: indirect update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
I've discovered a bug with mounting Samba shares on Debian testing with up-to-date packages and using the 0.6.0-rc13 packages compiled from source. First, I installed the necessary Samba packages, created my ZFS dataset, and made it available to Samba:
Using the Samba client, I can verify that it is available (assuming 'eightyeight' is my workstation):
Yet, trying to mount it fails:
Trying to access the share via the interactive Samba client without mounting also fails:
However, if I add the relevant config to /etc/samba/smb.conf and restart the Samba daemon, I can mount the share and browse it:
Relevant operating system info:
I can provide straces or other debugging output as needed.
The text was updated successfully, but these errors were encountered: