How to get Greyhole to work with the Ubuntu 14.04 (trusty) builds #107

Closed
ajw107 opened this Issue Feb 9, 2014 · 7 comments

Comments

Projects
None yet
2 participants

ajw107 commented Feb 9, 2014

Hi,
Just a quick message to let you know how to get Greyhole to work with the quite stable Trusty builds for Ubuntu (so many of my 13.10 Saucy problems seem to have gone, phew). A new version of samba is working, and you will keep on getting errors like this:

[2014/02/08 23:33:53.823752, 0] ../lib/util/modules.c:56(load_module)
Error loading module '/usr/lib/x86_64-linux-gnu/samba/vfs/greyhole.so': libsmbd_base.so: cannot open shared object file: No such file or directory
[2014/02/08 23:33:53.823834, 0] ../source3/smbd/vfs.c:184(vfs_init_custom)
error probing vfs module 'greyhole': NT_STATUS_UNSUCCESSFUL
[2014/02/08 23:33:53.823894, 0] ../source3/smbd/vfs.c:349(smbd_vfs_init)
smbd_vfs_init: vfs_init_custom failed for greyhole
[2014/02/08 23:33:53.823950, 0] ../source3/smbd/service.c:632(make_connection_snum)
vfs_init failed for service Docs

When you try and mount in linux you will also get the error:

CIFS VFS: cifs_mount failed w/return code = -6

Also when you try and open a share in Windows (or any OS really) you will be able to see all of the share names, but you will not be able to go further than that, and will be told the device does not exist. (sorry for being overly verbose with the errors, it's just to make it easier for someone to find this post if they are googling for the error).

This is because the greyhole.so vfs library for samba 4.0 needs to be recompiled for samber 4.0.13 for some reason (the one that comes with the package will not work). The instructions on how to do this are in the INSTALL file in the root directory of this repository. Just remember to do a:

sudo apt-get install samba4-dev python-dev

before you come to the configure part, or it will not configure.

When I compiled it using make, it didn;t actually complete, and bombed out with errors at the linking stage. Luckily the greyhole.so library was linked just before it bombed out, so you are still able to copy it into place.

When copying, I also found the library in two other places to those mentioned in the INSTALL file (this coming from greyhole installed through the greyhole repositroy and apt-get). Not sure if it matters, but I also copied over these too. The locations are:

/usr/lib/x86_64-linux-gnu/samba/vfs/greyhole.so
/usr/lib64/greyhole/greyhole-samba40.so
as well as
/usr/lib/samba/vfs/greyhole.so
/usr/lib64/samba/vfs/greyhole.so
mentioned in the INSTALL file

After that, either sudo reboot, or just run:

sudo initctl restart greyhole
sudo service smbd restart
sudo service nmbd restart

optionally:
sudo service mount_shares_locally
if you use that script too.

Then you are good to go.

Hope that helps someone out there....
Alex

Owner

gboudreau commented Feb 9, 2014

Thanks for the detailed report.
Greyhole 0.9.42 comes with new VFS modules, and the 4.0 modules were compiled against 4.0.14.
Please let me know of the packaged module work, or do not, using 0.9.42.

(If not, make sure to re-compile the VFS module; it changed in 0.9.42, and using an earlier module will make Greyhole pretty unhappy.)

Thanks.

ajw107 commented Feb 9, 2014

Hi

No problem. I've just done a apt-get update and got the 0.9.43 version
of greyhole, unfortunately it break samba again. I just copied back the
vfs modules I compiled last night, and all is well. The modules were
compiles against the git repo as of about 11pm GMT last night
(Saturday), so I assume it will be the 0.9.42 version I compiled
against, or will I have to recompile?
Alex

On 09/02/2014 14:43, Guillaume Boudreau wrote:

Thanks for the detailed report.
Greyhole 0.9.42 comes with new VFS modules, and the 4.0 modules were
compiled against 4.0.14.
Please let me know of the packaged module work, or do not, using 0.9.42.

(If not, make sure to re-compile the VFS module; it changed in 0.9.42,
and using an earlier module will make Greyhole pretty unhappy.)

Thanks.


Reply to this email directly or view it on GitHub
#107 (comment).

Owner

gboudreau commented Feb 9, 2014

Yesterday's git HEAD is OK. You can use what you compiled then.
Can you please send me that .so you compiled?
Thanks.

ajw107 commented Feb 11, 2014

Yeah, no problem. I've attached it to this email. As Trusty is still
in alpha, I wouldn't necessarily release a new version to compensate for
this error, as god only knows what will change in the next month or two,
unless you want to. Not sure when they are are putting the freeze on
development (although I would imagine it will be soon).
Alex

On 09/02/2014 22:26, Guillaume Boudreau wrote:

Yesterday's git HEAD is OK. You can use what you compiled then.
Can you please send me that .so you compiled?
Thanks.


Reply to this email directly or view it on GitHub
#107 (comment).

ajw107 commented Feb 11, 2014

Hya, I'm just including an updated greyhole.so. Today there was
anupdate of samba, and it's at 4.1.3 now, so this uses the 41.c file
(again the original doesn't seem to work). The instructions are the
same as before. Just instead of using the vfs_greyhole40.c and 4.0
patch, you use vfs_greyhole41.c and the 41 patch.
Alex

On 09/02/2014 22:26, Guillaume Boudreau wrote:

Yesterday's git HEAD is OK. You can use what you compiled then.
Can you please send me that .so you compiled?
Thanks.


Reply to this email directly or view it on GitHub
#107 (comment).

Owner

gboudreau commented Feb 13, 2014

Hi,

Instead of compiling your own module, use the packaged module.
To fix the issue you're having, you just need to create a missing symlink in your Samba library folder:

ln -s /usr/lib/x86_64-linux-gnu/samba/libsmbd_base.so.0 /usr/lib/x86_64-linux-gnu/samba/libsmbd_base.so

Then everyone will be happy.

Might want to report that to the Ubuntu team somehow.

@gboudreau gboudreau closed this Feb 13, 2014

Owner

gboudreau commented Feb 13, 2014

Nevermind. I'll file the bug myself, since I have all the info.
Ref: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1280050

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment