Greyhole

    • OMV 2.x
    • Hello,

      I have just come across OMV and I have installed as a virtual machine (using virtualbox) to determine whether I can move my server over. I am having trouble getting greyhole working. I have installed it, added the database and enabled the service. I can see the greyhole database using mysql plugin. However, when I try and add a drive to the pool I get an error. I have included it below. Can anyone help?

      Source Code

      1. Error #4000:
      2. exception 'OMVException' with message 'Failed to execute command 'omv-mkconf greyhole 2>&1': # Stop Greyhole
      3. # Start/Enable Greyhole
      4. update-rc.d: using dependency based boot sequencing
      5. Starting Greyhole ... Nov 11 21:40:07 WARN test-config: PHP Warning [2]: Invalid argument supplied for foreach() in /usr/bin/greyhole on line 510; BT: greyhole[L3286] run() => greyhole[L2886] process_config() => greyhole[L6058] parse() => greyhole[L147] init() => greyhole[L360] getShares()
      6. Nov 11 21:40:07 WARN test-config: PHP Warning [2]: Invalid argument supplied for foreach() in /usr/bin/greyhole on line 510; BT: greyhole[L3286] run() => greyhole[L2886] process_config() => greyhole[L6058] parse() => greyhole[L147] init() => greyhole[L401] getShares()
      7. Nov 11 21:40:07 WARN test-config: The storage pool drive '/media/41148273-184b-4e09-868e-bc99a1fe646f/.greyhole' is not part of any drive_selection_algorithm definition, and will thus never be used to receive any files.
      8. Nov 11 21:40:07 CRITICAL test-config: Can't connect to database: SQLSTATE[HY000] [1045] Access denied for user 'admin'@'localhost' (using password: YES)
      9. FAILED' in /usr/share/openmediavault/engined/module/greyhole.inc:39
      10. Stack trace:
      11. #0 /usr/share/openmediavault/engined/rpc/config.inc(180): OMVModuleGreyhole->applyConfig()
      12. #1 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      13. #2 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      14. #3 /usr/share/php/openmediavault/rpcservice.inc(158): OMVRpcServiceAbstract->callMethod('applyChanges', Array, Array)
      15. #4 /usr/share/openmediavault/engined/rpc/config.inc(224): OMVRpcServiceAbstract->callMethodBg('applyChanges', Array, Array)
      16. #5 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      17. #6 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      18. #7 /usr/share/php/openmediavault/rpc.inc(79): OMVRpcServiceAbstract->callMethod('applyChangesBg', Array, Array)
      19. #8 /usr/sbin/omv-engined(500): OMVRpc::exec('Config', 'applyChangesBg', Array, Array, 1)
      20. #9 {main}
      Display All
    • Looks like a configuration issue.
      I'd poke the guys who made the OMV plugin.

      Can't connect to database: SQLSTATE[HY000] [1045] Access denied for user 'admin'@'localhost' (using password: YES)
      That error means Greyhole can't connect to your MySQL server using the credentials found in /etc/greyhole.conf
      I'd investigate this first, as the plugin should handle this for you, so resolving this might fix all your issues.

      The storage pool drive '/media/41148273-184b-4e09-868e-bc99a1fe646f/.greyhole' is not part of any drive_selection_algorithm definition, and will thus never be used to receive any files.
      That error means what is says(!) Not sure what caused this, but your configuration seems to be the problem again.

      The two other warnings are probably also related to bad/missing configuration options.
    • gboudreau wrote:

      I'd poke the guys who made the OMV plugin.

      The guy who wrote it (part of it anyway) was poking you because he doesn't know :D

      I will have to install it in a VM to see if something is wrong.
      omv 4.1.22 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • I was pretty sure it was my error, I just wasn't sure what i'd done. Perhaps installation wasn't the correct forum to post this.

      Starting from a new install, i upgraded the packages and then installed the plugin in manager. From there i installed the greyhole plugin and tried to configure it. In the plugin I unputted mysql root pass password and added the database. As I said I can see the database is there using mysql plugin. Next i tried to add the drive by selecting the volume. Then on applying the change I get the error that I posted.

      Am I supposed to modify the values of the config options in the database build part? I tried changing the username and password to my login in the blind hope that it helped but the same error persists.

      I'll roll back to a fresh install this evening and start from scratch paying extra attention to what I do.
    • You need enable MySQL first and change your root password. You will use the root user and that password when you enable Greyhole. The "root" user is the admin user in MySQL.

      The you can add drives to the pool. And then add shares with the number of copies you want. 1 is not a copy, it is just the original file. You need to use 2 to have a copy of a file on more than one disk in the pool. Also, to have 2 copies you need at least 2 disks in the pool. For 3 you need 3 disks in the pool.

      The post was edited 1 time, last by tekkb ().

    • [Hostname] localhost
      [Databasename] greyhole
      [username] greyhole (user used with the Greyhole database)
      [password] what you want for password (password for greyhole user used with the greyhole database)
      [MySQL root] the the password you changed for the root user (administrator) in the MySQL plugin.

      The post was edited 5 times, last by tekkb ().

    • The above advice seems to have done the trick and greyhole appears to be working. I think I'd done a few things out of order in the first instance.

      I have a few more questions about working with it now though.

      When I originally created the shared folders I had to select a volume. I picked one of my data drives is this my landing zone?
      Previously I used greyhole with Amahi. There was a script which mounted shares to /mnt/samba/[SHARES] and you were told to only modify files here not in the original location. Is there an equivalent script here? Are the shares mounted locally?
    • I'm confused as to how I interact with files that are in the greyhole pool. If I accessed the files from /media/UUID/sharename don't i run the risk of greyhole moving the file at some point due to disc balancing? I thought the idea was to address a symlink location which could never move.

      I noticed that there was a similar script located at github.com/alfbr/openmediavaul…c/init.d/mountsmb-locally
      It looks like it mounts all the shares locally so that they are available at /pool/[shares]. I think this is what I was after but it hasnt been updates in a long while so, not knowing too much about this stuff, I'm a little wary to use it.

      I'm also unclear as to how on the OMV box I add files to the greyhole pool. Perhaps this is one for @gboudreau

      My ultimate goal is to get sabnzbd to download files. From there either sickbeard or couch potato will move my media into my greyhole pool so that it is available to all my devices on my home network via samba.

      The post was edited 1 time, last by gillepy ().

    • I noticed that there was a similar script located at github.com/alfbr/openmediavaul…c/init.d/mountsmb-locally
      It looks like it mounts all the shares locally so that they are available at /pool/[shares]. I think this is what I was after but it hasnt been updates in a long while so, not knowing too much about this stuff, I'm a little wary to use it.

      That looks like the right thing.
      This script should have been installed when you installed the OMV plugin. Just use the mounts you'll find in /pool/, and it should work fine.
      You'll need to restart mountsmb-locally when you add new shares, probably (unless the plugin does it for you).
      It should also run on boot, so your shares will be accessible to other daemons once boot-up completes.
    • Greyhole will work with the shared folders you create in the shared folders section. After you create them give users permissions to then and share them with SAMBA. Then access the shares and add some data. Then you can add them to Greyhole.

      When you add data to your shared folder your data will be copied to a pool and a symlink will be left in the shared folder.

      You do not need to mess with any init script in /etc/init.d
      You do not need to make a greyhole user.

      The chown on your shared folders will be root:users
      The chmod will be dependent on what you choose in the permissions dropdown when you create the shared folder.

      You do not need to do anything to the smb.conf file. The samba share will take part of it. The Greyhole plugin will add reguisite parameters to the share in the smb.conf when you add it in the greyhole plugin.

      The post was edited 1 time, last by tekkb ().

    • I think I understand a bit better now then. The shared folders are the landing zone for greyhole and files placed there will be moved and the appropriate symlinks will be formed.

      My concern are these lines from the greyhole wiki (my emphasis):

      ​Mounting your Samba shares locally is useful when you are using Greyhole, and want to write or in any way work with those files locally. Greyhole data should only be accessed through shares, so mounting those shares locally is an easy way to work with Greyhole data safely.


      @gboudreau can you comment on whether its okay to access shares via the landing zone?