Difference between revisions of "Greyhole"
(164 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:apps]] | [[Category:apps]] | ||
− | + | == What is Greyhole == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | [http://www.greyhole.net/ Greyhole] is Amahi's [[Storage pooling]] technology of choice. Storage Pooling combines the space of multiple disk drives and makes them look as if they were all part of a single pool of disk space. Greyhole was designed independently of Amahi, however, with feedback and great work, the Greyhole team made it suitable for integration with Amahi. | |
− | |||
Specifically, Greyhole: | Specifically, Greyhole: | ||
* Combines the space from multiple drives into a single volume | * Combines the space from multiple drives into a single volume | ||
* Distributes files across all drives in the pool | * Distributes files across all drives in the pool | ||
* Creates multiple copies of files in admin-specified shares | * Creates multiple copies of files in admin-specified shares | ||
+ | <br /> | ||
+ | Recommend you consult [https://github.com/gboudreau/Greyhole/wiki/WhatNotToPutInGreyholeShares what not to put in Greyhole shares] as a precaution when determining which shares to select. | ||
− | + | You can add additional drives to your HDA and prepare them for use in Greyhole by following [[Adding_a_second_hard_drive_to_your_HDA|adding a second hard drive to your HDA]] guidance or use the Amahi [https://www.amahi.org/apps/disk-wizard Disk Wizard] (Amahi 8 or greater). | |
− | You | + | {{Warning| |
+ | <div style<nowiki>=</nowiki>"color:darkred">You should <u>'''NEVER'''</u> change or delete files in the shared directories (''/var/hda/files/*'' by default) directly on the HDA, using the terminal, or the Gnome file browser, for the shares for which you checked the ''Uses pool'' option in the Amahi dashboard. If you want to work with files on Greyhole shares on the HDA, you should [[Mount Shares Locally]].<br/> | ||
+ | <br/> | ||
+ | You should be safe reading existing files directly, or adding new files directly, as long as don't care that your new files will only be moved into the storage pool during the next check, which runs automatically at midnight (or manually using ''greyhole --fsck''). Until then, your new files will be stored in your shared directories (normally ''/var/hda/files/share_name/''). | ||
− | + | Also, touching anything inside the '''gh''' directories that Greyhole creates at the root of your partitions is a recipe for disaster. [[Greyhole not on root|We strongly discourage you from using the root partition in a drive pool]].</div><br/>}} | |
− | + | '''NOTE:''' All commands are executed as root user (Fedora) or preceded with sudo (Ubuntu). | |
− | |||
− | |||
− | + | == Amahi 7 or greater == | |
+ | Amahi application [https://www.amahi.org/apps/greyhole-ui Greyhole UI] provides this capability. Refer to the [[Greyhole_UI_App_Transition_Guide|Greyhole UI Application Transition guide]] for details on installation and configuration. | ||
− | + | '''NOTE:''' If you would still like to setup your Greyhole pool manually, please see [[Amahi_Create_Manual_Greyhole_Setup|Manual Greyhole Setup]]. | |
− | |||
− | == | + | == Amahi 6 == |
− | You need to go in the Settings tab, and | + | You need to go in the Settings tab, and select [[Advanced_Settings|Enable Advanced Settings]]. Without Advanced Settings enabled, you won't see the following page and options. |
− | Without Advanced Settings enabled, you won't see the following page and options. | ||
− | + | <b><u>Storage Pool</u></b><br /> | |
− | [[File:Storage_Pool_1.png|600px | + | [[File:Storage_Pool_1.png|600px]] |
Select the drives you want available for your storage pool. | Select the drives you want available for your storage pool. | ||
− | + | <b><u>Share Options</u></b><br /> | |
The next step is to select the share you want to replicate across the pool. | The next step is to select the share you want to replicate across the pool. | ||
Line 47: | Line 43: | ||
From the Shares tab, select the Shares sub-catagory. We chose the Pictures share for this tutorial. | From the Shares tab, select the Shares sub-catagory. We chose the Pictures share for this tutorial. | ||
− | [[File:Greyhole_Options_1.png|600px | + | [[File:Greyhole_Options_1.png|600px]] |
Check the option for "Uses pool" and choose the number of drives to replicate this share. In this instance we have chosen to use all drives available to the greyhole pool. | Check the option for "Uses pool" and choose the number of drives to replicate this share. In this instance we have chosen to use all drives available to the greyhole pool. | ||
− | + | '''NOTE:''' Greyhole is not a backup solution. If a file is removed, all copies are removed. | |
+ | |||
+ | == Advanced Options == | ||
− | + | You can further configure Greyhole by manually editing '''/var/hda/platform/html/config/greyhole.yml'''. | |
− | + | :'''NOTE:''' Options duplicated in ''/etc/greyhole.conf will be overridden by grehole.yml. | |
− | '''/ | ||
− | To see what options are available, and what they do, refer to the [https:// | + | To see what options are available, and what they do, refer to the [https://github.com/gboudreau/Greyhole/blob/master/greyhole.example.conf sample greyhole.conf] provided with Greyhole. |
+ | |||
+ | greyhole.yml is in in [http://en.wikipedia.org/wiki/YAML YAML] format. Most of it should be easy enough to modify. The only exception would be the sticky_files (and optional sticky_into) options.<br/> | ||
− | |||
Here's an example of how those should appear: | Here's an example of how those should appear: | ||
To specify the following to Greyhole in greyhole.conf: | To specify the following to Greyhole in greyhole.conf: | ||
− | + | <pre>sticky_files <nowiki>=</nowiki> Music/ | |
sticky_files <nowiki>=</nowiki> Videos/Movies/ | sticky_files <nowiki>=</nowiki> Videos/Movies/ | ||
stick_into <nowiki>=</nowiki> /mnt/hdd1/gh | stick_into <nowiki>=</nowiki> /mnt/hdd1/gh | ||
stick_into <nowiki>=</nowiki> /mnt/hdd5/gh | stick_into <nowiki>=</nowiki> /mnt/hdd5/gh | ||
sticky_files <nowiki>=</nowiki> Backups/CrashPlan/ | sticky_files <nowiki>=</nowiki> Backups/CrashPlan/ | ||
− | stick_into <nowiki>=</nowiki> /mnt/hdd0/gh | + | stick_into <nowiki>=</nowiki> /mnt/hdd0/gh</pre> |
one should specify this in the greyhole.yml file, where '''precise indentation matters''': | one should specify this in the greyhole.yml file, where '''precise indentation matters''': | ||
− | + | <pre>sticky_files: | |
- - Music/ | - - Music/ | ||
- - Videos/Movies/ | - - Videos/Movies/ | ||
Line 80: | Line 78: | ||
- /mnt/hdd5/gh | - /mnt/hdd5/gh | ||
- - Backups/CrashPlan/ | - - Backups/CrashPlan/ | ||
− | - - /mnt/hdd0/gh | + | - - /mnt/hdd0/gh</pre> |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Once finished, it's important that you check to see the file is properly formatted. To do so, do the following: | |
− | + | cd /var/hda/platform/html/config | |
+ | echo 'require "yaml"; YAML::load(File.open("greyhole.yml"))' | irb | ||
− | + | If you do not see any errors, then your ready for the next step. Otherwise, ensure you correct the errors before proceeding. | |
− | |||
− | + | For the changes to be effective, you will need to force Amahi to: | |
− | |||
+ | :<u>Ubuntu</u><br /> | ||
+ | :Regenerate the greyhole.conf file by editing a share, clicking it's path, and just clicking the Save button without actually changing the path. | ||
− | + | :<u>Fedora</u><br /> | |
− | + | :Restart the Dashboard with any one of these alternatives as [[Open_terminal|root user]]: | |
+ | |||
+ | :* touch /var/hda/platform/html/tmp/restart.txt | ||
+ | :* systemctl restart httpd.service | ||
+ | :* reboot | ||
− | == Convert Greyhole from SQLite to MySQL == | + | :Then regenerate the greyhole set up by changing any setting in Shares or in Drive pooling. |
+ | <!--== Convert Greyhole from SQLite to MySQL == | ||
Greyhole is already using MySQL in Amahi 6.0 | Greyhole is already using MySQL in Amahi 6.0 | ||
Line 146: | Line 108: | ||
''To Convert to MySQL, run as root:'' | ''To Convert to MySQL, run as root:'' | ||
− | + | /usr/share/greyhole/db_migration-sqlite2mysql.sh | |
To see what DB engine is Greyhole using, do this: | To see what DB engine is Greyhole using, do this: | ||
− | + | grep db_engine /etc/greyhole.conf | |
+ | --> | ||
− | == | + | == Tips and Best Practices == |
− | |||
− | + | Refer to [[Greyhole_Tips|Greyhole Tips]] for additional guidance. | |
− | + | == Testing and Reliability == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | = Testing and Reliability = | ||
Check out the [[Greyhole grinder]] to help make Greyhole rock solid. | Check out the [[Greyhole grinder]] to help make Greyhole rock solid. | ||
− | = | + | == References == |
− | + | * Good [http://revxatlarge.blogspot.com/2011/04/restoring-deleted-files-in-greyhole-and.html article] on Greyhole with terms explained. | |
− | |||
− | |||
− | = | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | * [https://github.com/gboudreau/Greyhole/wiki Greyhole Wiki]: Provides additional guidance and information. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | * [https://github.com/gboudreau/Greyhole/wiki/MigrateFromWHS Windows Home Server (WHS) Drive Extender Migration Guide]: Move from WHS to Amahi and Greyhole. | |
− | + | <br /> |
Latest revision as of 01:30, 17 January 2017
What is Greyhole
Greyhole is Amahi's Storage pooling technology of choice. Storage Pooling combines the space of multiple disk drives and makes them look as if they were all part of a single pool of disk space. Greyhole was designed independently of Amahi, however, with feedback and great work, the Greyhole team made it suitable for integration with Amahi.
Specifically, Greyhole:
- Combines the space from multiple drives into a single volume
- Distributes files across all drives in the pool
- Creates multiple copies of files in admin-specified shares
Recommend you consult what not to put in Greyhole shares as a precaution when determining which shares to select.
You can add additional drives to your HDA and prepare them for use in Greyhole by following adding a second hard drive to your HDA guidance or use the Amahi Disk Wizard (Amahi 8 or greater).
Warning! |
---|
You should NEVER change or delete files in the shared directories (/var/hda/files/* by default) directly on the HDA, using the terminal, or the Gnome file browser, for the shares for which you checked the Uses pool option in the Amahi dashboard. If you want to work with files on Greyhole shares on the HDA, you should Mount Shares Locally.
|
NOTE: All commands are executed as root user (Fedora) or preceded with sudo (Ubuntu).
Amahi 7 or greater
Amahi application Greyhole UI provides this capability. Refer to the Greyhole UI Application Transition guide for details on installation and configuration.
NOTE: If you would still like to setup your Greyhole pool manually, please see Manual Greyhole Setup.
Amahi 6
You need to go in the Settings tab, and select Enable Advanced Settings. Without Advanced Settings enabled, you won't see the following page and options.
Storage Pool
Select the drives you want available for your storage pool.
Share Options
The next step is to select the share you want to replicate across the pool.
From the Shares tab, select the Shares sub-catagory. We chose the Pictures share for this tutorial.
Check the option for "Uses pool" and choose the number of drives to replicate this share. In this instance we have chosen to use all drives available to the greyhole pool.
NOTE: Greyhole is not a backup solution. If a file is removed, all copies are removed.
Advanced Options
You can further configure Greyhole by manually editing /var/hda/platform/html/config/greyhole.yml.
- NOTE: Options duplicated in /etc/greyhole.conf will be overridden by grehole.yml.
To see what options are available, and what they do, refer to the sample greyhole.conf provided with Greyhole.
greyhole.yml is in in YAML format. Most of it should be easy enough to modify. The only exception would be the sticky_files (and optional sticky_into) options.
Here's an example of how those should appear:
To specify the following to Greyhole in greyhole.conf:
sticky_files = Music/ sticky_files = Videos/Movies/ stick_into = /mnt/hdd1/gh stick_into = /mnt/hdd5/gh sticky_files = Backups/CrashPlan/ stick_into = /mnt/hdd0/gh
one should specify this in the greyhole.yml file, where precise indentation matters:
sticky_files: - - Music/ - - Videos/Movies/ - - /mnt/hdd1/gh - /mnt/hdd5/gh - - Backups/CrashPlan/ - - /mnt/hdd0/gh
Once finished, it's important that you check to see the file is properly formatted. To do so, do the following:
cd /var/hda/platform/html/config echo 'require "yaml"; YAML::load(File.open("greyhole.yml"))' | irb
If you do not see any errors, then your ready for the next step. Otherwise, ensure you correct the errors before proceeding.
For the changes to be effective, you will need to force Amahi to:
- Ubuntu
- Regenerate the greyhole.conf file by editing a share, clicking it's path, and just clicking the Save button without actually changing the path.
- Fedora
- Restart the Dashboard with any one of these alternatives as root user:
- touch /var/hda/platform/html/tmp/restart.txt
- systemctl restart httpd.service
- reboot
- Then regenerate the greyhole set up by changing any setting in Shares or in Drive pooling.
Tips and Best Practices
Refer to Greyhole Tips for additional guidance.
Testing and Reliability
Check out the Greyhole grinder to help make Greyhole rock solid.
References
- Good article on Greyhole with terms explained.
- Greyhole Wiki: Provides additional guidance and information.
- Windows Home Server (WHS) Drive Extender Migration Guide: Move from WHS to Amahi and Greyhole.