Difference between revisions of "Greyhole"
Line 107: | Line 107: | ||
:Then regenerate the greyhole set up by changing any setting in Shares or in Drive pooling. | :Then regenerate the greyhole set up by changing any setting in Shares or in Drive pooling. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<!--== Convert Greyhole from SQLite to MySQL == | <!--== Convert Greyhole from SQLite to MySQL == | ||
Greyhole is already using MySQL in Amahi 6.0 | Greyhole is already using MySQL in Amahi 6.0 |
Revision as of 01:37, 7 August 2014
Contents
What is Greyhole
Greyhole is Amahi's Storage pooling technology. 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. 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
This feature is installed by default, but requires a few simple steps to begin utilizing the features.
You can add additional drives to your hda and prepare them for use in Greyhole by following this tutorial.
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.
Also, touching anything inside the gh directories that Greyhole creates at the root of your partitions is a recipe for disaster. We strongly discourage you from using the root partition in a drive pool. |
NOTE: All commands are executed as root user (Fedora) or preceded with sudo (Ubuntu).
Amahi 7
Amahi application Greyhole UI provides this capability. Refer to the Greyhole UI Application Transition guide for details on installation and configuration.
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.
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.
Disable Greyhole
For those who do not use Greyhole, you can disable it. This is based on the fact you never have used it on any share. Recommend using extreme caution as this could have unpredictable results.
Amahi 6 (Ubuntu 12.04.x)
Perform the following steps as user root (Ubuntu):
update-rc.d -f greyhole remove rm /etc/monit.d/greyhole.conf service monit restart service greyhole stop
- NOTE: DO NOT attempt to remove the Greyhole package as it is a dependency of the HDA software. Doing so will break your HDA.
Amahi 7 (Fedoara 19)
systemctl stop amahi-greyhole.service systemctl disable amahi-greyhole.service yum -e amahi-greyhole
Testing and Reliability
Check out the Greyhole grinder to help make Greyhole rock solid.
Emptying Trash
- Fedora
- As root user:
greyhole --empty-trash
- Ubuntu
sudo greyhole --empty-trash
About the trash: The trash is used like a Recycle Bin. That means you'll need to manually empty it once in a while. To do so, use the --empty-trash parameter (see above). Another option is to create a 'Greyhole Trash' Samba share. More details about that here.
Moving drives/data out of Greyhole
You may need to remove a drive from Greyhole and transfer the share files to another drive. See Greyhole moving data out of the pool.
Changing Greyhole drive mount points
Refer to Changing Greyhole Mount Points.
Reference
- Good article on Greyhole with terms explained.
- Greyhole Wiki: Provides guidance for various tasks.