[Tutorial] GreyHole Plugin Guide/Drive Pooling in OMV

  • Zitat von "snakyjake"

    I'm presuming OMV+Samba+Greyhole will provide a single network share that will have pooled 1+ physical drives.
    When I go to the OMV network share, I can see the two Samba shares I've created. I was expecting to see only 1 share (the Greyhole pool share).


    Greyhole can allow any number of shares to use the pool. All the shares on which you enabled Greyhole will share the storage of the pooled drives.
    For example, if you have a Videos and Photos shares, and both are using Greyhole, they will all appear to have the free space of all the drives in your pool, but when you add files in either share, the available space on both shares will decrease.


    So create the shares you'd like to use the storage pool on (in the SMB service tab), and continue with step 6 to configure each share (in the Greyhole service page, Samba Shares tab). People usually create multiple shares (Documents, Videos, Photos, etc.)
    And if you need further help on that, please post the screenshot the other guys asked for.

  • Comments on the guide:
    - You're missing a first step necessary for all other steps to succeed: install OMV-extras, per those instructions:
    http://omv-extras.org/simple/i…install-omv-extras-plugin [done]


    - When you said to logout and back in the web UI, I just hit Ctrl/Cmd-R in my browser. That worked to show the newly added service in the list on the left. [done}


    - In MySQL install, step 3, I couldn't assign a data volume. I didn't have any extra drives attached at that point. I added two drives, and used Storage/Filesystems to create new data volumes, click Mount on each (why doesn't it auto-mount new volumes..?), before I could continue with this step.
    [note added about the requisite for a data drive prior to MySQL installation]


    Before step 4, I had to enable "SQL management site", Save, then Apply. Then clicking "Launch management site" worked as expected. [done]


    - Typo here: "and click on submit on each blank" - you meant "block" maybe? [done]


    - Before step 6 of the Greyhole install, I would say:
    "Greyhole works with any number of shares. If you don't have shares yet, go in Services>SMB/CIFS now, and create yourself some shares (Photos, Videos, Documents, etc.) Also make sure SMB/CIFS is enabled. Save and Apply." [done]


    Comments on the plugin:
    - In the Samba Shares tab, when you see a list of the shares, in the Use Trash column, you shouldn't say "No". It should say "Default" or something that means that the server-level setting will apply.
    This is also no way for the user to select "Use trash" and the server level, and not use trash only on a specific share. i.e. the choices for share-level trash should be: yes, no, use default.


    - Database settings: I would hide all those options, except for the option to install the DB, so only leave the root password field, and the install DB button. The other options aren't really useful to change; the plugin can manage them without the user knowing what values are used there.
    I would also hide the password field and button once the database is installed. Replace them with a message that says "Greyhole database is installed.", or hide this whole section. I would also move it before the General section, to make sure the user sees it first. Calling that block "Install" or "Initial setup" would be best. It could also indicate to the user that he needs to configure pool drives, and shares, until he does that in the other tabs.
    Not sure all of this is feasible using the OMV plugins API; just saying what I think would work best.


    - Log level: I strongly suggest keeping the default to DEBUG for now.


    Good work on this plugin. Might try to replace my CentOS server with OMV at some point, to see if I like it long term.


    Cheers.

    • Offizieller Beitrag

    I'll see what I can do about those changes. Thanks for the feedback :)

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I will make adjustments to the guide sometime today. Normally in English, at least in the US, we do say about empty spaces on forms "fill in the blanks". I will add something in parentheses.

    • Offizieller Beitrag
    Zitat von "gboudreau"

    This is also no way for the user to select "Use trash" and the server level


    Is this a different setting than "delete_moves_to_trash" labeled Trash Deletes in the web interface?


    As for the database settings, I want to leave the fields because some security-conscience people would not like having the same username and password for every installation. I will hide all of the database settings when the plugin is enabled.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Zitat von "ryecoaaron"


    Is this a different setting than "delete_moves_to_trash" labeled Trash Deletes in the web interface?


    Yes, this is what I was talking about.


    So say the user wants to do:

    Code
    delete_moves_to_trash = yes
    delete_moves_to_trash[Videos] = no

    There is no way for him to do that using the plugin, because not selecting the Trash checkbox for a share simply doesn't add a delete_moves_to_trash[Videos] line in the greyhole.conf, which means use the default delete_moves_to_trash value (yes).
    Like I said, the user should have 3 options, when configuring share's trash: yes, no, and use default. The plugin only allow yes and use default right now.


    Zitat von "ryecoaaron"

    As for the database settings, I want to leave the fields because some security-conscience people would not like having the same username and password for every installation. I will hide all of the database settings when the plugin is enabled.


    You can simply generate a random password on every install, and use that in the .conf, and to create the MySQL user.
    Users who want to modify those values can always edit the greyhole.conf file manually (right? the plugin could simply not write those lines, if they are already in the .conf - the users will need to be able to modify the .conf file to add advanced options).


    One other thing I just thought of: you are missing some options that are present in the default .conf. Stuff like ignored_files/folders. It would be a good idea to keep all the default values, even if they are not configurable from the web UI. I saw an "other options" box for MySQL; maybe this should be pre-filled with those, on install.

  • Zitat von "julakali"

    Would it be possible to support the Trash Samba share that greyhole can provide?


    Indeed, the plugin should create a "Greyhole Trash" SMB share on install. The user could always manually remove it if he doesn't want to use it.

    • Offizieller Beitrag

    delete_moves_to_trash fixed in 0.5.5


    I will look at the greyhole trash smb share stuff and the missing .conf options.


    As for password, you can't change it in the conf file because it is completely overwritten with any change.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Zitat von "ryecoaaron"

    As for password, you can't change it in the conf file because it is completely overwritten with any change.


    That would be a problem. If the user wants to enter customized sticky_files rules, or drive_selection_groups / algorithm, or anything else not possible from the web UI, he needs a way to have his changes saved. The 'extra options' box could be used for those too I guess.

    • Offizieller Beitrag

    I just looked at how those options work and they would be fairly complicated to implement into the plugin. I keep thinking about how to implement them. So, maybe in a future version. I guess the extra options box will have to do for now.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Here's what my Greyhole\Samba settings look like...AFTER I manually installed SMB/CIFS shares (presumably suggested by gboudreau Sun 19. Jan 2014, 00:36), and manually entered them into Greyhole\Samba.


    The naming convention I used is smb1_d1 = SMB share # + drive#.
    I'm trying to keep track of physical disks -> file system -> SMB -> shared folders -> Greyhole Pooles -> Greyhole SMB. There seems to be a long chain of steps that allows me to make mistakes.

  • Zitat von "snakyjake"

    The naming convention I used is smb1_d1 = SMB share # + drive#.
    I'm trying to keep track of physical disks -> file system -> SMB -> shared folders -> Greyhole Pools -> Greyhole SMB. There seems to be a long chain of steps that allows me to make mistakes.


    I guess you added both drives to the pool. At that point, it doesn't really matter which one you use in the Services > SMB/CIFS page. The volume you choose there is only where links will be kept (called the Landing Zone in Greyhole - you should read about Greyhole here: https://github.com/gboudreau/Greyhole/wiki). And it doesn't matter where the landing zone is.
    i.e. you don't have to create one Samba share per drive. You create just one share, add both drives to the Greyhole pool, then tell Greyhole to keep X copies of files on that share.
    If you want to keep X copies of all your files, then one share is fine. But if you have some files for which you don't want extra copies, it'd be better to create various shares for the various files you might want to configure differently.


    Here's a visual guide:


    1. Enable SMB/CIFS service:



    2. Click Add to create as many SMB shares as you want:



    3. When creating SMB shares, create all shared folders on one of your drive. The fastest drive would be best, but pick any one really.



    ...

  • Thanks for sharing the visuals...helps a lot.


    Here's one step that adds to my confusion. Before the Greyhole steps, I'm adding the SMB share for Documents. I see my two Shared Folders. This is where I would like to see ONE pooled drive for my Documents.




    I'm reading what you say, and reading the Greyhole wiki, and I might be on the verge of understanding. It sounds like Greyhole is a post-process: When a file is written to the SMB share/drive, Greyhole might physically move the file, and substitute the location with a symbolic link.


    Jake

  • Zitat von "snakyjake"

    When a file is written to the SMB share/drive, Greyhole might physically move the file, and substitute the location with a symbolic link.


    This is exactly what it does. The original file can be copied to any drive in the pool. It does it automatically for you and leaves the symblic link in the originals place.


    See this pic. There is a .greyhole folder created on every drive in the pool. Any share you add will have it's folders and files moved to some disk in one of the .grehole folders depending on how full each disk is. When you add a file in a share is auto moved and symbolic link left. When you delete a file or folder it is auto deleted from wherever it was moved. 1 copy means there will only be 1 file. 2 files will give you redundancy and there will be 2 copies on 2 different disks, in case one drive fails. So say you have 4 TB of data and 3 x 2TB of drives in the pool. You can put all that data onto one share on what seems to be one drive. The drive will not get full because greyhole will move the data autmatically to other drives in the pool for you. But appears the data has not moved from a functional standpoint of the share. Say it was a movie folder. All those movies will play off the other drives perfectly due to the symbolic links


  • In 0.5.5, i can't select any value in the per-share trash option.
    When i try to change it, it says "2 is not an integer".


    Code
    Invalid method parameter: 2 is not an integer.
    Error #2002: exception 'OMVException' with message 'Invalid method parameter: 2 is not an integer.' in /usr/share/php/openmediavault/rpcservice.inc:150 Stack trace: #0 /usr/share/openmediavault/engined/rpc/greyhole.inc(498): OMVRpcServiceAbstract->validateMethodParams(Array, '{?? ...') #1 [internal function]: OMVRpcServiceGreyhole->setSMBShare(Array, Array) #2 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array) #3 /usr/share/php/openmediavault/rpc.inc(62): OMVRpcServiceAbstract->callMethod('setSMBShare', Array, Array) #4 /usr/sbin/omv-engined(495): OMVRpc::exec('Greyhole', 'setSMBShare', Array, Array, 1) #5 {main}
    • Offizieller Beitrag

    My mistake. The numbers shouldn't be in quotes. I am adding another feature and will release a fix soon.

    omv 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I just received the following error:


    Code
    Error #2002:
    exception 'OMVException' with message 'Invalid method parameter: 2 is not an integer.' in /usr/share/php/openmediavault/rpcservice.inc:150
    Stack trace:
    #0 /usr/share/openmediavault/engined/rpc/greyhole.inc(498): OMVRpcServiceAbstract->validateMethodParams(Array, '{??            ...')
    #1 [internal function]: OMVRpcServiceGreyhole->setSMBShare(Array, Array)
    #2 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
    #3 /usr/share/php/openmediavault/rpc.inc(62): OMVRpcServiceAbstract->callMethod('setSMBShare', Array, Array)
    #4 /usr/sbin/omv-engined(495): OMVRpc::exec('Greyhole', 'setSMBShare', Array, Array, 1)
    #5 {main}


    Repro Steps:
    From Greyhole\Services\Samba Shares:
    Click Add.


    Select SMB Share "Movies".
    Number of Copies = 1
    Click Save.

  • There is error in this file Samba.js at this path /var/www/openmediavault/js/omv/module/admin/service/greyhole/Samba.js



    If you look at this file you will see quotes around the 0, 1 and 2. There are 4 places that you need to edit it and make it look like the code box above.
    These lines should not look lilke "0" "1" "2" "2" The quotes ("") have to be taken out like below.
    [ 0, _("No") ],
    [ 1, _("Yes") ],
    [ 2, _("Use Default") ]


    value : 2,



    You can edit this manually. Ryeco has already fixed that code but did not do a version upgrade. If you wait til tomorrow I'm sure the upgrade will be out.


    PS- If you edit it manually make sure you logout and back into the web-interface to reload the page.
    PPS- I tested on a virtual machine and the manual edit fixed the problem.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!