Changes

From Amahi Wiki
Jump to: navigation, search
3,195 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]= What is Greyhole ==
'''NEW[http://www.greyhole.net/ Greyhole] is Amahi''' s [[Greyhole troubleshootingStorage pooling]] guide</div>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
<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.
== What is 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).
A new feature {{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 is dashboard. If you want to work with files on Greyhole shares on the HDA, you should [[Storage poolingMount Shares Locally]] using [http:.<br/><br/greyhole.pommepause.com/ Greyhole]. Storage Pooling is a technology to pool disk drives and make them look >You should be safe reading existing files directly, or adding new files directly, as long as if they were all part of a single don't care that your new files will only be moved into the storage pool of disk spaceduring the next check, which runs automatically at midnight (or manually using ''greyhole --fsck'')This feature is installed by defaultUntil then, but requires a few simple steps to begin utilizing the featuresyour new files will be stored in your shared directories (normally ''/var/hda/files/share_name/'').
You can add additional drives to Also, touching anything inside the '''gh''' directories that Greyhole creates at the root of your hda and prepare them partitions is a recipe for use in Greyhole by following disaster. [[Adding Greyhole not on root|We strongly discourage you from using the root partition in a second hard drive to your HDA|this tutorialpool]].</div><br/>}}
To add a drive to your Greyhole storage pool. First open your dashboard and navigate to the Shares tab. Then click on the Storage Pool sub-category. You will see a page similar to the one below'''NOTE:''' All commands are executed as root user (Fedora) or preceded with sudo (Ubuntu).
== Important Warnings Amahi 7 or greater ==<div style="colorAmahi application [https:darkred">You should '''never''' change or delete files in the shared directories (''/var/hdawww.amahi.org/filesapps/*'' 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 dashboardgreyhole-ui Greyhole UI] provides this capability. If you want Refer to work with files on Greyhole shares on the HDA, you should [[Mount Shares LocallyGreyhole_UI_App_Transition_Guide|Greyhole UI Application Transition guide]].<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/'')for details on installation and configuration.
Also, touching anything inside the '''ghNOTE:''' directories that If you would still like to setup your Greyhole creates at the root of your partitions is a recipe for disasterpool manually, please see [[Amahi_Create_Manual_Greyhole_Setup|Manual Greyhole Setup]].
We [[Greyhole not on root | strongly discourage you from using the root partition in a drive pool]].</div><br/><br/>== Amahi 6 ==
== First things first ==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.
You need to go in the Settings tab, and enable '''Advanced Settings'''.<b><u>Storage Pool</u></b><br/>Without Advanced Settings enabled, you won't see the following page and options.
== For Storage Pool (Partitions) == [[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.
== Greyhole advanced options Advanced Options ==
You can further configure Greyhole by manually editing the following file:<br/>'''/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 [httphttps://greyhole.googlecodegithub.com/svngboudreau/trunkGreyhole/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/>
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 For your changes to be effective, you'll need to force Amahi to regenerate the greyhole.conf file. You can do so by editing a share, clicking it's path, and just clicking the Save button without actually changing the path. == Copying your data into Greyhole shares the first time == 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. 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/pre>The instructions below are for users who have more data to copy into the Greyhole shares than their currently free space in the /var/hda/files/ folder. One 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, 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. Another way to move your files from their current location into the storage pool is to share their current location using an Amahi share that ''Uses pool'', then let Greyhole nightly check move the files from there into the pool. Here's a more detailed walkthrough for this method:
# Setup the Greyhole Storage Pool in the Amahi dashboardOnce finished, 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 donit'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/External Drive/Movies''# Enable the ''Uses pool'' option for each of your shares, and select the number of extra copies you'd like, if any.# Now, s important that 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 /var/log/greyhole.log to see when the ''fsck'' operation file is doneproperly formatted.# Once ''fsck'' is done To do so, your data has now been moved into do the 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).following:# Move all those directories / symlinks from there into the correct folders in cd /var/hda/filesplatform/share_namehtml/config# Back in the Amahi dashboard, edit the path of the shares once again, and put back ''/var/hda/files/share_name' echo ' require "yaml"; YAML::load(iFile.eopen("greyhole. the folders where you moved the symbolic linksyml")).# 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''| irb
You're done. All If you do not see any errors, then your existing data is now stored in ready for the various drives included in your storage poolnext step. Otherwise, and are accessible via the Samba shares ensure you have defined in correct the Amahi dashboarderrors before proceeding.
For the changes to be effective, you will need to force Amahi to:
== Adding a new drive to your HDA and storage pool ==:<u>Ubuntu</u><br />This wiki page discusses how to add :Regenerate the greyhole.conf file by editing a new drive to your HDA share, clicking it's path, and to your greyhole storage pool[[Adding_a_second_hard_drive_to_your_HDA]]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
== /media ==Including :Then regenerate the greyhole set up by changing any drive mounted as /media/Something setting in your storage pool is usually a bad ideaShares or in Drive pooling.<br/>Those mounts are created by the ''gnome!--automounter'', which requires you == Convert Greyhole from SQLite to be logged in into X (Gnome) to become available.<br/>MySQL ==This will create issues with Greyhole, which expects drives to always be available, and will take action when some of them are missingis already using MySQL in Amahi 6.0
Follow this guide Greyhole was previously using SQLite as the default database for queueing up tasks on Amahi. This was unique to [[Adding a second hard drive Amahi as Greyhole was originally designed to your HDA|permanently mount your drives]], before you include them in your storage pooluse MySQL for this task.
== Monitoring Greyhole ==Sometimes you might want to monitor what Greyhole is doing, for example when writing data to your greyhole shares for the first time. Here are a few commands you can type in a terminal to follow along. '''Scrolling view of total Greyhole operations queue:''' while [ 1 == 1 ]; do greyhole --view-queue | grep Total; sleep 60; done '''Scrolling log of what files Greyhole is working on right now:''' tail -f /var/log/greyhole.log == Convert Greyhole from SQLite to MySQL ==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 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 Greyhole is working but should be used with discresiondiscretion.
''To Convert to MySQL, run as root:''
/usr/share/greyhole/db_migration-sqlite2mysql.sh
To see what DB engine is Greyhole using, do this:
grep db_engine /etc/greyhole.conf-->
== Disable Greyhole Tips and Best Practices ==For those who do not use Greyhole, you can disable it. This is based on the fact you never have used it by enabling 'Uses pool' on any share. Recommend using extreme caution as this could have unpredictable results.
Perform the following steps as user '''root''':Refer to [[Greyhole_Tips|Greyhole Tips]] for additional guidance.
chkconfig greyhole off rm /etc/monit.d/greyhole.conf service monit restart service greyhole stop '''DO NOT''' attempt to remove the 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.
= Reconnect the Greyhole storage pool after re-install of Fedora = References ==* Good [http:// Amahi After re-install, recreate all your shares exacty as they wererevxatlarge.Add the shares to the storage poolblogspot.As root, run greyhole --fsckThis wll recreate the symlinks in the landing zone com/var2011/hda04/restoring-deleted-files-in-greyhole-and.html article] on Greyhole with terms explained.
= * [https://github.com/gboudreau/Greyhole Troubleshooting =/wiki Greyhole Wiki]: Provides additional guidance and information.
* [[https://github.com/gboudreau/Greyhole troubleshooting/wiki/MigrateFromWHS Windows Home Server (WHS) Drive Extender Migration Guide]] guide: Move from WHS to Amahi and Greyhole.<br />
12,424

edits