[Tutorial] GreyHole Plugin Guide/Drive Pooling in OMV

  • Quote from "snakyjake"

    Another issue noticed...


    When I added a Greyhole Samba share, I choose Use Trash = No. After clicking the Save and Apply, the main screen shows Use Trash = Use Default.


    Grayhole has a global trash and a per share trash, if you don't set trash when you add a share it uses the global setting.

    [align=center]
    What I am watching/watched on my Popcorn Hour media player
    omv 2.1.1 stoneburner | 64 bit | omvextrasorg 1.29
    MySQL (Percona[size=8]) | Newznab | Sonarr | CP | HP | NZBget | YAMJ | CUPS

  • Thank you for adding the trash share.
    Found one problem with it:
    The samba share is added with path in quotes:

    Code
    path = "/media/drive/Greyhole Trash"


    While this works for samba, greyhole doesn't seem to like it. It internally converts that to:

    Code
    /"/media/drive/Greyhole Trash"/


    This is more a greyhole bug than your fault, but removing the quotes from smb.conf makes it work.


    Also, it's possible to make the Trash writeable, so users can delete files from Trash, for example with

    Code
    write list = @"users"


    This can be easily used as trash share "extra option".


  • While Greyhole has received a (trivial) fix for this already, the man page for smb.conf doesn't say that double-quoting values is allowed, and so I think it is pure luck that this format works for Samba. It might even break something on the Samba side that we can't think about... Who knows.

  • I thought it would need to be double quoted since it has a space. I couldn't find anywhere that it was or wasn't allowed but it seemed to work :) Found it now (under file format). I will change that and add an option to make the trash writable.

    omv 5.5.1 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.3
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • What i forgot to say:
    Awesome piece of software and a nice plugin!
    I'm using it in my environment now.


    Also, i have a question for gboudreau:
    I tried an rsync-based backup to a share which failed. So i tried again and it failed (guess because unix extensions are off).
    While that wasn't very clever, i had
    - many many DB task entries (500.000) that had to be executed, which took 8 hours. The thing is: when greyhole executed a creation task, the file was already gone, because the backup was deleted.
    So i think this could have been faster, maybe by aggregating sql queries and not reading only one task at a time from DB.


    - After that was done, i have a database full of tasks_completed. By default, this table is cleared every 365 days!? After a year of use, this could grow to gigabytes of size, while it is usually completely useless. The default retention time should be way shorter (set mine to a day). Is there any reason to keep this data a whole year?

  • Quote from "julakali"

    - many many DB task entries (500.000) that had to be executed, which took 8 hours. The thing is: when greyhole executed a creation task, the file was already gone, because the backup was deleted.
    So i think this could have been faster, maybe by aggregating sql queries and not reading only one task at a time from DB.


    The default greyhole.conf ignores rsync temporary files, and Greyhole will then only work on the complete files. This ignored_files setting is not there when the greyhole.conf file is created by the OMV plugin. I already commented about that to the plugin authors.
    And Greyhole is already simplifying the tasks table, and reading multiple rows at a time from the DB.


    Quote from "julakali"

    - After that was done, i have a database full of tasks_completed. By default, this table is cleared every 365 days!? After a year of use, this could grow to gigabytes of size, while it is usually completely useless. The default retention time should be way shorter (set mine to a day). Is there any reason to keep this data a whole year?


    If you ever have an issue with Greyhole, where you loose a file or something, there will be no way to understand what happened if you don't have this data. Same for the greyhole.log that are logrotate-d.
    My tasks_completed is at about a Gb. This is 0.1% on a 1TB drive (and 0.025% on a 4TB drive)... Much less than the default 5% that ext3 reserve for root, if we compare wasted space. :)
    Now that I think about it, the rotated logs are kept only for a week. Might increase that to 30 days in the next version, and lower the default retention for tasks_completed to match.

  • Quote from "gboudreau"

    The default greyhole.conf ignores rsync temporary files, and Greyhole will then only work on the complete files. This ignored_files setting is not there when the greyhole.conf file is created by the OMV plugin. I already commented about that to the plugin authors.


    I will have it in the next version :)


    ** edit - 0.5.8 is in the repo with ability to add ignored files/folders.

    omv 5.5.1 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.3
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • OMV/Linux noob here. I've been playing with OMV for the past few weeks and am learning quite a bit. I am switching from a Raid5 over to SnapRaid with pooling. I originally used AUFS but have had several recurrent issues with it (permission issues, not syncing changes after Snapraid Recovery, duplicate files left on Branches ect.) anyways because of this and the fact that I primarily use SMB for all my devices that access my OMV server anyways I want to give GreyHole a try as I have decent hardware to power and am not worried about additional overhead required over AUFS, stability and dependability are most essential in this setup.


    I plan on doing SnapRaid with 5 x 2Tb Data Drives and 1 parity drive (2TB) then use GreyHole to pool the drives and probably leave the files copy option to 1 (mostly for my large media collection) but set it to 2 for important shares (if this is possible according to my understanding) anyways I am also going to be using sickbeard, headphones, and couchpotato with Transmission or any other recommended torrent server.


    I am at the stage of setting up a database file in mySQL and am wondering where I should save the DB file?... I have a 250gb System Boot Drive, but if I lose that database file will my Pool data be useless?.. Should I just put it on the system drive and plan on doing clonezilla backups? should I place the DB on one of my data drives? if I do this will I not see the DB in the pool because the DB will be outside the pool? (still trying to understand) I would want the db file to have 2 copies for safety anyways... I was also planning on using mysql with a DB for XBMC Library support (if this changes your answer) or I can do that different if you guys recommend I do or use something different.


    What recommendations do you guys have about where to save the DB? and anything else I should know as I setup my OMV setup... I want to tread lightly as to not get all my data on my OMV and then screw up my system install...


    Thanks again,
    I've really enjoyed reading these forum posts thus-far and hope to continue my learning.

  • It doesn't matter where the Greyhole MySQL database is. It mostly contains temporary information. You can lose everything in the Greyhole DB, and all your files will still be accessible.
    I suggest using the fast drive you have for the MySQL data files.

  • Why not use the mysql and greyhole plugins? It answers a lot of your questions since the mysql plugin forces you to use a data drive (best idea in my opinion and can still be an SSD) and there is a button to install the greyhole database.

    omv 5.5.1 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.3
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • The greyhole database? No, you just need to enter the credentials in the plugin. Just trying to save you trouble of doing all this manually.

    omv 5.5.1 usul | 64 bit | 5.4 proxmox kernel | omvextrasorg 5.3.3
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Thanks again guys, that works perfectly. GreyHole is very polished and smooth. One more quick question that I didn't see reference to... From my understanding if I want to have a plugin (couchpotato for example) use GreyHole as a Data Drive and copy to my LZ I would have to mount the SMB share as a local drive then have couchpotato access that share?... from my reading I don't think you are supposed to just mount the LZ because you should only "read" from the LZ (and only with sticky files)....
    where can I find some simple instructions on mounting a SMB share as a local drive in OMV?... is it the same as any debian tutorial?


    EDIT: I am half-answering my question... correct me if I'm wrong: I can follow the guide Here https://github.com/gboudreau/G…e/wiki/MountSharesLocally
    A few questions as I am a noob - is there an easier way in OMV I'm not aware of? like a plugin? will this mount auto-start at boot or do I need to add it to cronjobs or something?
    Thanks again.

  • Hi all,


    Excuse if this is a stupid question but I am a noob at Linux and OMV. I have followed the guide to install Greyhole through to the end a couple of times but it refuses to actually start whatever I try.
    First a couple of minor points of confusion with the guide:


    "5. Now you should have the SQL Buddy sign in. For Host put in localhost, for Username put in root and for password leave it blank. Click on Submit."
    It would not take blank password, entered "openmediavault" to login. Is this ok?


    "6. Once in SQL web-interface on upper left click on users, then in middle you need to put a checkmark in all 3 root users (localhost, 127.0.0.1, and nameofyouromv). Then click edit. There will be 3 sections in next screen put in new password and click on submit on each blank (square). Use same password for all three blanks (squares)."
    What new password? I used openmediavault for all is that ok?


    In the web GUI under Services Greyhole shows as Enabled but the Running button is red. Queried status in Putty:


    root@OMV:~# greyhole -status
    PHP Fatal error: Uncaught exception 'Exception' with message 'SQLSTATE[HY000]: General error: 1017 Can't find file: './greyhole/tasks.frm' (errno: 13)' in /usr/bin/greyhole:491
    Stack trace:
    #0 /usr/bin/greyhole(517): DB::execute('DESCRIBE tasks', Array)
    #1 /usr/bin/greyhole(562): DB::getAll('DESCRIBE tasks')
    #2 /usr/bin/greyhole(472): DB::migrate()
    #3 /usr/bin/greyhole(3159): DB::connect()
    #4 /usr/bin/greyhole(3123): CommandLineHelper->getRunner()
    #5 /usr/bin/greyhole(3498): CommandLineHelper->processCommandLine()
    #6 {main}
    thrown in /usr/bin/greyhole on line 491


    I am determined to get this working but after trying everything recommended I am tearing my hair out and wondering of Windows would be a better option :( . Please help if you can.


    I will be happy to supply any further information as I have no idea what would be useful


    I have an HP 54L with 8 Gig RAM : 1x160 GB HDD for system : 1x 3TB & 3 x 2 TB for the data pool


    Thanks, Dave

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!