Changes

From Amahi Wiki
Jump to: navigation, search
2,572 bytes removed ,  01:30, 17 January 2017
[[Category:apps]]
<div style="border: 1px solid #A3B1BF; padding: .8em 1em; background-color: #E6F2FF; margin: 0px 1em;">'''NEW:''' [http://code.google.com/p/greyhole/wiki/MigrateFromWHS Widows Home Server Drive Extender Migration Guide] '''NEW:''' [[= What is Greyhole troubleshooting]] guide</div>==
[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.
== What is 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<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.
A new feature You can add additional drives to your HDA and prepare them for use in Amahi is Greyhole by following [[Storage poolingAdding_a_second_hard_drive_to_your_HDA|adding a second hard drive to your HDA]] using guidance or use the Amahi [httphttps://greyholewww.pommepauseamahi.comorg/ Greyholeapps/disk-wizard Disk Wizard]. Storage Pooling is a technology to pool disk drives and make them look as if they were all part of a single pool of disk space(Amahi 8 or greater).
This feature is installed {{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, but requires a few simple steps for the shares for which you checked the ''Uses pool'' option in the Amahi dashboard. If you want to begin utilizing work with files on Greyhole shares on the featuresHDA, you should [[Mount Shares Locally]].<br/><br/>You can add additional drives to 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 hda and prepare them for use new files will be stored in Greyhole by following [[Adding a second hard drive to your HDA|this tutorial]]shared directories (normally ''/var/hda/files/share_name/'').
To add a drive to your Also, touching anything inside the '''gh''' directories that Greyhole storage pool. First open creates at the root of your dashboard and navigate to the Shares tabpartitions is a recipe for disaster. Then click [[Greyhole not on root|We strongly discourage you from using the Storage Pool sub-category. You will see root partition in a page similar to the one belowdrive pool]].</div><br/>}}
== Important Warnings ==<div style="color:darkred">You should '''neverNOTE:''' change or delete files in the shared directories All commands are executed as root user (''/var/hda/files/*'' by defaultFedora) 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 preceded with files on Greyhole shares on the HDA, you should [[Mount Shares Locally]].<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 sudo (or manually using ''greyhole --fsck''). Until then, your new files will be stored in your shared directories (normally ''/var/hda/files/share_name/''Ubuntu).
Also, touching anything inside == Amahi 7 or greater ==Amahi application [https://www.amahi.org/apps/greyhole-ui Greyhole UI] provides this capability. Refer to the '''gh''' directories that [[Greyhole_UI_App_Transition_Guide|Greyhole creates at the root of your partitions is a recipe UI Application Transition guide]] for disasterdetails on installation and configuration.
We '''NOTE:''' If you would still like to setup your Greyhole pool manually, please see [[Amahi_Create_Manual_Greyhole_Setup|Manual Greyhole not on root | strongly discourage you from using the root partition in a drive poolSetup]].</div><br/><br/>
== First things first Amahi 6 ==
You need to go in the Settings tab, and enable '''select [[Advanced_Settings|Enable Advanced Settings''']].<br/> Without Advanced Settings enabled, you won't see the following page and options.
== 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 advanced options ==by manually editing '''/var/hda/platform/html/config/greyhole.yml'''.
You can further configure Greyhole by manually editing the following file:<br/>'''NOTE:''' Options duplicated in ''/var/hda/platform/html/configetc/greyhole.conf will be overridden by grehole.yml'''.
To see what options are available, and what they do, refer to the [httphttps://greyhole.googlecodegithub.com/svngboudreau/Greyhole/trunkblob/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/>
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.<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/hdd5/gh
- - Backups/CrashPlan/
- - /mnt/hdd0/gh</pre>
For your changes to be effectiveOnce finished, it's important that you'll need check to force Amahi to regenerate see the greyhole.conf fileis properly formatted. You can To do so by editing a share, clicking itdo the following: cd /var/hda/platform/html/config echo 's path, and just clicking the Save button without actually changing the pathrequire "yaml"; YAML::load(File.open("greyhole.yml"))' | irb
== Copying If you data into Greyhole shares do not see any errors, then your ready for the first time ==next step. Otherwise, ensure you correct the errors before proceeding.
When you start using GreyholeFor the changes to be effective, you might want will need to copy or move all your exiting files into your new shares that use the storage pool.force Amahi to:
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.<u>Ubuntu</u><br/>The instructions below are for users who have more data to copy into :Regenerate the greyhole.conf file by editing a share, clicking it's path, and just clicking the Greyhole shares than their currently free space in Save button without actually changing the /var/hda/files/ folderpath.
One way to do that is to mount :<u>Fedora</u><br />:Restart the shares that use the Greyhole storage pool, either on the HDA itself, or on a client computer on your local network, and copy your data from their existing location into the mounted sharesDashboard with any one of these alternatives as [[Open_terminal|root user]]: :* touch /var/hda/platform/html/tmp/restart.txtThis can be time consuming, but it is the safest way to use Greyhole:* systemctl restart httpd.service:* reboot
Another way :Then regenerate the greyhole set up by changing any setting in Shares or in Drive pooling.<!--== Convert Greyhole from SQLite to move your files from their current location into the storage pool MySQL ==Greyhole is to share their current location already using an MySQL in Amahi share that ''Uses pool'', then let Greyhole nightly check move the files from there into the pool6.0
Here's a more detailed walkthrough Greyhole was previously using SQLite as the default database for queueing up tasks on Amahi. This was unique to Amahi as Greyhole was originally designed to use MySQL for this method:task.
# Setup the Greyhole Storage Pool in the Amahi dashboard, Shares > Storage Pool pageThere are some major performance benefits to using MySQL over SQLite when writing large amounts of files.# Go in the Shares > Shares page. In there, make sure you have an existing share for each share you have Switching can be especially useful when moving data to Greyhole shares 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 datafirst time. For example, the Movies share could have now there is a path = ''/media/External Drive/Movies''# Enable the ''Uses pool'' option for each of your shares, and select the number of extra copies script you'd like, can run if any.# Now, you either need want 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 /var/log/greyholeswitch over.log to see when the ''fsck'' operation is done.# Once ''fsck'' is done, your data This script has now been moved into the tested to be safe while Greyhole storage pool (in the drives you selected in Shares > Storage Pool). All that is working but 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, and put back ''/var/hda/files/share_name'' (i.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 bewith discretion. Either wait for midnight, or launch it manually, from a command line, as root: ''greyhole --fsck''
You're done. All your existing data is now stored in the various drives included in your storage pool'To Convert to MySQL, and are accessible via the Samba shares you have defined in the Amahi dashboard.run as root:''
== /media ==Including any drive mounted as usr/mediashare/Something in your storage pool is usually a bad idea.<brgreyhole/>Those mounts are created by the ''gnomedb_migration-automounter'', which requires you to be logged in into X (Gnome) to become available.<br/>This will create issues with Greyhole, which expects drives to always be available, and will take action when some of them are missingsqlite2mysql.sh
Follow To see what DB engine is Greyhole using, do this guide to [[Adding a second hard drive to your HDA|permanently mount your drives]], before you include them in your storage pool.:
== Monitoring Greyhole ==Sometimes you might want to monitor what Greyhole is doing, for example when writing data to your grep db_engine /etc/greyhole shares for the first time. Here are a few commands you can type in a terminal to follow along.conf-->
'''Scrolling view of total Greyhole operations queue:''' while [ 1 == 1 ]; do greyhole --view-queue | grep Total; sleep 60; doneTips and Best Practices ==
'''Scrolling log of what files Refer to [[Greyhole_Tips|Greyhole is working on right now:''' tail -f /var/log/greyholeTips]] for additional guidance.log
== Convert Greyhole from SQLite to MySQL Testing and Reliability ==Greyhole is at the time of writing using SQLite as the default database for queueing up tasks on Amahi. This is unqie to Amahi as Greyhole was originally designed to use MySQL for this task. There 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 discresion. '''To Convert to MySQL, run as root:'''/usr/share/greyhole/db_migration-sqlite2mysql.sh
Check out the [[Greyhole grinder]] to help make Greyhole rock solid.
== Disable Greyhole References ==For those who do not use Greyhole, you can disable it* Good [http://revxatlarge.blogspot.com/2011/04/restoring-deleted-files-in-greyhole-and. This is based html article] on the fact you never have used it by enabling 'Uses pool' on any share. Recommend using extreme caution as this could have unpredictable resultsGreyhole with terms explained.
Perform the following steps as user '''root'''* [https://github.com/gboudreau/Greyhole/wiki Greyhole Wiki]: Provides additional guidance and information.
chkconfig greyhole off rm * [https:/etc/monitgithub.dcom/gboudreau/Greyhole/wiki/greyhole.conf service monit restartMigrateFromWHS Windows Home Server (WHS) Drive Extender Migration Guide]: service greyhole stop '''DO NOT''' attempt Move from WHS to remove the Amahi and Greyhole package as it is a dependency of the HDA software. Doing so will break your HDA= Testing and Reliability = Check out the [[Greyhole grinder]] to help make Greyhole rock solid.<br />
12,424

edits