Changes

From Amahi Wiki
Jump to: navigation, search
866 bytes added ,  01:30, 17 January 2017
== What is Greyhole ==
A new feature in [http://www.greyhole.net/ Greyhole] is Amahi is 's [[Storage pooling]] using [http://greyholetechnology of choice.pommepauseStorage 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.com/ Greyhole]was designed independently of Amahi, however, with feedback and great work, the Greyhole team made it suitable for integration with Amahi.
This feature is installed by defaultSpecifically, but requires 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<br />Recommend you consult [https://github.com/gboudreau/Greyhole/wiki/WhatNotToPutInGreyholeShares what not to put in Greyhole shares] as a few simple steps precaution when determining which shares to begin utilizing the featuresselect.
You can add additional drives to your hda HDA and prepare them for use in Greyhole by following [[Adding Adding_a_second_hard_drive_to_your_HDA|adding a second hard drive to your HDA|this tutorial]]guidance or use the Amahi [https://www.amahi.org/apps/disk-wizard Disk Wizard] (Amahi 8 or greater).
To add a drive to your Greyhole storage {{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. First open your dashboard and navigate If you want to work with files on Greyhole shares on the HDA, you should [[Mount Shares tabLocally]]. Then click on <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 Storage Pool subnext check, which runs automatically at midnight (or manually using ''greyhole --categoryfsck''). You Until then, your new files will see a page similar to the one belowbe stored in your shared directories (normally ''/var/hda/files/share_name/'').
== Important Warnings ==<div style="color:darkred">You should Also, touching anything inside the '''nevergh''' change or delete files in the shared directories (''/var/hda/files/*'' by default) directly on that Greyhole creates at the HDA, using the terminal, or the Gnome file browser, root of your partitions is a recipe for the shares for which disaster. [[Greyhole not on root|We strongly discourage you checked from using the ''Uses root partition in a drive pool'' option in the Amahi dashboard]].</div><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 'NOTE:'greyhole --fsck'' All commands are executed as root user (Fedora) or preceded with sudo (Ubuntu). Until then, your new files will be stored in your shared directories (normally '' == Amahi 7 or greater ==Amahi application [https:/var/hdawww.amahi.org/files/share_nameapps/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]].
Also, touching anything inside the '''gh''' directories that Greyhole creates at the root of your partitions is a recipe for disaster.== Amahi 6 ==
We You need to go in the Settings tab, and select [[Greyhole not on root Advanced_Settings| strongly discourage Enable Advanced Settings]]. Without Advanced Settings enabled, you from using won't see the root partition in a drive pool]]following page and options.</div><br/><br/>
== For <b><u>Storage Pool (Partitions) ==</u></b><br />
[[File:Storage_Pool_1.png|600px|thumb|left]]
Select the drives you want available for your storage pool.
== Greyhole options ==<b><u>Share Options</u></b><br />
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.
[[File:Greyhole_Options_1.png|600px|thumb|left]]
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'''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://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: To specify the following to Greyhole in greyhole.conf: <pre>sticky_files <nowiki>=</nowiki> Music/ sticky_files <nowiki>=</nowiki> Videos/Movies/ stick_into <nowiki>=</nowiki> /mnt/hdd1/gh stick_into <nowiki>=</nowiki> /mnt/hdd5/gh sticky_files <nowiki>=</nowiki> Backups/CrashPlan/ stick_into <nowiki>=</nowiki> /mnt/hdd0/gh</pre> one should specify this in the greyhole.yml file, where '''precise indentation matters''': <pre>sticky_files: - - Music/ - - Videos/Movies/ - - /mnt/hdd1/gh - /mnt/hdd5/gh - - Backups/CrashPlan/ - - /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.
== Greyhole advanced options ==:<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
sticky_files and stick_into options can be specified using :Then regenerate the YAML formattinggreyhole set up by changing any setting in Shares or in Drive pooling. It's important <!--== Convert Greyhole from SQLite to note that '''indentation matters'''MySQL ==Greyhole is already using MySQL in Amahi 6.0
To specify Greyhole was previously using SQLite as the following default database for queueing up tasks on Amahi. This was unique to Amahi as Greyhole in greyholewas originally designed to use MySQL for this task.conf (where indentation does not matter):
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/ghThere are some major performance benefits to using MySQL over SQLite when writing large amounts of files. Switching can be especially useful when moving data to Greyhole shares for the first time. For now there is a script you can run if you want to switch over. This script has been tested to be safe while Greyhole is working but should be used with discretion.
one should specify this in the greyhole.yml file''To Convert to MySQL, run as root:''
sticky_files: - - Music / - - Videosusr/Moviesshare/ - - greyhole/mnt/hdd1/gh db_migration- /mnt/hdd5/gh - - Backups/CrashPlan/*/ - - /mnt/hdd0/ghsqlite2mysql.sh
To see what DB engine is Greyhole using, do this:
== Copying you data into Greyhole shares the first time == grep db_engine /etc/greyhole.conf-->
When you start using Greyhole, you might want to copy or move all your exiting files into your new shares that use the storage pool.== Tips and Best Practices ==
Note: This is not necessary if your files are already in Amahi shares. If they are there, and you enable the ''Uses pool'' option in the Amahi dashboard, the files will start getting moved around into the drives in your storage pool during the night (starting at midnight), when the nightly storage pool check starts.<br/>The instructions below are for users who have more data Refer to copy into the [[Greyhole_Tips|Greyhole shares than their currently free space in the /var/hda/files/ folderTips]] for additional guidance.
Once way to do that is to mount the shares that use the Greyhole storage pool, either on the HDA itself, or on a client computer on your local network, == Testing and copy your data from their existing location into the mounted shares.This can be time consuming, but it is the safest way to use Greyhole.Reliability ==
Another way to move your files from their current location into Check out the storage pool is [[Greyhole grinder]] to share their current location using an Amahi share that ''Uses pool'', then let help make Greyhole nightly check move the files from there into the poolrock solid.
Here's a more detailed walkthrough for this method== References ==* Good [http://revxatlarge.blogspot.com/2011/04/restoring-deleted-files-in-greyhole-and.html article] on Greyhole with terms explained.
# Setup the Greyhole Storage Pool in the Amahi dashboard, Shares > Storage Pool page.# Go in the Shares > Shares page. In there, make sure you have an existing share for each share you have data for. Create new ones if you need, remove the ones you don't need.# Edit the ''path'' of each of those shares, and enter the current location of your existing data. For example, the Movies share could have a path = ''/media* [https:/External Drive/Movies''# Enable the ''Uses pool'' option for each of your shares, and select the number of extra copies you'd like, if anygithub.# Now, you either need to wait for Greyhole'S nightly check to start, or you can start it manually from a terminal, as root, using this command: greyhole --fsck# Monitor com/vargboudreau/logGreyhole/greyhole.log to see when the ''fsck'' operation is done.# Once ''fsck'' is done, your data has now been moved into the wiki Greyhole storage pool (in the drives you selected in Shares > Storage Pool). All that should be left in the previous location of your data (''/media/External Drive/Movies'' from the previous example) should be symbolic links pointing to the new file copies. If the previous location is just empty directories (no symlinks), do not panic. This is normal if your previous location is an NTFS or FAT partition (drive).# Move all those directories / symlinks from there into the correct folders in /var/hda/files/share_name# Back in the Amahi dashboard, edit the path of the shares once again, Wiki]: Provides additional guidance and put back ''/var/hda/files/share_name'' (iinformation.e. the folders where you moved the symbolic links).# If you used an NTFS or FAT partition for the previous location, you'll need another fsck to create the symlinks where they should be. Either wait for midnight, or launch it manually, from a command line, as root: ''greyhole --fsck''
You're done* [https://github. All your existing data is now stored in the various drives included in your storage pool, com/gboudreau/Greyhole/wiki/MigrateFromWHS Windows Home Server (WHS) Drive Extender Migration Guide]: Move from WHS to Amahi and are accessible via the Samba shares you have defined in the Amahi dashboardGreyhole.<br />
12,424

edits