gboudreau / Greyhole

Greyhole uses Samba to create a storage pool of all your available hard drives, and allows you to create redundant copies of the files you store.
http://www.greyhole.net
GNU General Public License v3.0
262 stars 34 forks source link

daemon: Greyhole VFS module warning #314

Open tamorgen opened 1 year ago

tamorgen commented 1 year ago

Good morning, I saw on my server that I'm getting the following error:

Jul 05 01:41:47 daemon: Greyhole VFS module (/usr/lib64/samba/vfs/greyhole.so) seems to be missing some required libraries. If you have issues connecting to your Greyhole-enabled shares, try to compile a new VFS module for Samba by running this command: sudo /usr/share/greyhole/build_vfs.sh current

I tried compiling as directed, but it fails:

Installing build dependencies...
Last metadata expiration check: 2:20:30 ago on Wed 05 Jul 2023 06:05:04 AM EDT.
Package patch-2.7.6-17.fc37.x86_64 is already installed.
Package gcc-12.3.1-1.fc37.x86_64 is already installed.
Package python3-devel-3.11.4-1.fc37.x86_64 is already installed.
Package gnutls-devel-3.8.0-2.fc37.x86_64 is already installed.
Package make-1:4.3-11.fc37.x86_64 is already installed.
Package rpcgen-1.4-10.fc37.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
Last metadata expiration check: 2:20:36 ago on Wed 05 Jul 2023 06:05:04 AM EDT.
Package perl-CPAN-2.34-4.fc37.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
- Installing Parse::Yapp::Driver perl module
- Installing zlib-devel
Last metadata expiration check: 2:20:49 ago on Wed 05 Jul 2023 06:05:04 AM EDT.
Package zlib-devel-1.2.12-5.fc37.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
- Installing e2fsprogs-devel & heimdal-devel
Last metadata expiration check: 2:20:50 ago on Wed 05 Jul 2023 06:05:04 AM EDT.
Package e2fsprogs-devel-1.46.5-3.fc37.x86_64 is already installed.
Package heimdal-devel-7.8.0-5.fc37.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

Compiling Greyhole VFS module for samba-4.17.8... 
  Downloading Greyhole source code
  Running 'configure'

Configuring Samba failed.
Hint : install the required dependencies. See step 3 in https://raw.githubusercontent.com/gboudreau/Greyhole/master/INSTALL

cat /usr/share/greyhole/vfs-build/samba-4.17.8/gh_vfs_build.log :
./configure --enable-debug --disable-symbol-versions --without-acl-support --without-ldap --without-ads --without-pam --without-ad-dc --disable-python --with-shared-modules=!vfs_snapper --without-json --without-libarchive --with-system-heimdalkrb5'

I ran the command in step 3, and I get the same results afterwards.

sudo yum -y install patch gcc python-devel gnutls-devel make rpcgen zlib-devel e2fsprogs-devel heimdal-devel
Last metadata expiration check: 2:31:28 ago on Wed 05 Jul 2023 06:05:04 AM EDT.
Package patch-2.7.6-17.fc37.x86_64 is already installed.
Package gcc-12.3.1-1.fc37.x86_64 is already installed.
Package python3-devel-3.11.4-1.fc37.x86_64 is already installed.
Package gnutls-devel-3.8.0-2.fc37.x86_64 is already installed.
Package make-1:4.3-11.fc37.x86_64 is already installed.
Package rpcgen-1.4-10.fc37.x86_64 is already installed.
Package zlib-devel-1.2.12-5.fc37.x86_64 is already installed.
Package e2fsprogs-devel-1.46.5-3.fc37.x86_64 is already installed.
Package heimdal-devel-7.8.0-5.fc37.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

The shares appear to work, however, I would like to determine 1) why I a getting the error and b) why the configure command is failing.

[tmorgenthaler@galactica docs]$ cat /etc/fedora-release 
Fedora release 37 (Thirty Seven)
[tmorgenthaler@galactica docs]$ sudo smbstatus

Samba version 4.17.8
gboudreau commented 1 year ago

Try ldd /usr/lib64/samba/vfs/greyhole.so
This should list all required libraries, and the error is because some are not found.

As for why it fails, can you take a look at the end of /usr/share/greyhole/vfs-build/samba-4.17.8/gh_vfs_build.log, there should be an error somewhere in there.

tamorgen commented 1 year ago

Try ldd /usr/lib64/samba/vfs/greyhole.so This should list all required libraries, and the error is because some are not found.

As for why it fails, can you take a look at the end of /usr/share/greyhole/vfs-build/samba-4.17.8/gh_vfs_build.log, there should be an error somewhere in there.

Okay, thanks.

sudo ldd /usr/lib64/samba/vfs/greyhole.so | grep 'not found'
ldd: warning: you do not have execution permission for `/usr/lib64/samba/vfs/greyhole.so'
        libsmbd-base-samba4.so => not found
        libtalloc-samba4.so => not found
        libtevent-samba4.so => not found
        libsamba-debug-samba4.so => not found

I've attached gh_vfs_build.log. There are a log of 'not found' comments in there. I don't know if that is normal or not. Like I said, greyhole appears to work and the shares are accessible, which I would think if there was an issue would not be the case.

gh_vfs_build.log