Difference between revisions of "Amahi Create Manual Greyhole Setup"

From Amahi Wiki
Jump to: navigation, search
Line 6: Line 6:
 
As [[Open_Terminal_as_root|root user]], perform the following steps:
 
As [[Open_Terminal_as_root|root user]], perform the following steps:
 
* Install the package (to get the latest version, follow [https://wiki.amahi.org/index.php/Greyhole_updating#Option_2_-_Manually_install_the_latest_RPM upgrade guidance]):
 
* Install the package (to get the latest version, follow [https://wiki.amahi.org/index.php/Greyhole_updating#Option_2_-_Manually_install_the_latest_RPM upgrade guidance]):
<blockquote>{{code|yum -y install hda-greyhole}}</blockquote>
+
<pre>yum -y install hda-greyhole</pre>
 
* Set up a mysql database and user to access it:
 
* Set up a mysql database and user to access it:
<blockquote>{{code|hda-create-db-and-user greyhole}}</blockquote>
+
<pre>code|hda-create-db-and-user greyhole</pre>
 
* Load the database schema:
 
* Load the database schema:
<blockquote>{{code|mysql -u greyhole -pgreyhole  greyhole < /usr/share/greyhole/schema-mysql.sql}}</blockquote>
+
<pre>mysql -u greyhole -pgreyhole  greyhole < /usr/share/greyhole/schema-mysql.sql</pre>
  
 
Initialize the basic settings for Greyhole, configure /etc/greyhole.conf:
 
Initialize the basic settings for Greyhole, configure /etc/greyhole.conf:
 
* Change <u>db_user</u> and <u>db_password</u> to <i>greyhole</i>.<br />
 
* Change <u>db_user</u> and <u>db_password</u> to <i>greyhole</i>.<br />
 
* Add a line for each drive (go [[Adding_a_second_hard_drive_to_your_HDA|here]] for adding new hard drives) in the storage pool at the end of the file.  The example below is for two drives:
 
* Add a line for each drive (go [[Adding_a_second_hard_drive_to_your_HDA|here]] for adding new hard drives) in the storage pool at the end of the file.  The example below is for two drives:
<blockquote>{{text|storage_pool_directory <nowiki>=</nowiki> /var/hda/files/drives/drive2/gh, min_free: 10gb
+
<pre>storage_pool_directory = /var/hda/files/drives/drive2/gh, min_free: 10gb
storage_pool_directory <nowiki>=</nowiki> /var/hda/files/drives/drive3/gh, min_free: 10gb}}</blockquote>
+
storage_pool_directory = /var/hda/files/drives/drive3/gh, min_free: 10gb</pre>
  
 
<b>NOTE:</b>  Although the /etc/greyhole.conf contents indicate <b>storage_pool_drive</b>, it should be <b>storage_pool_directory</b>.  If you don't set it correctly, Greyhole will not work.
 
<b>NOTE:</b>  Although the /etc/greyhole.conf contents indicate <b>storage_pool_drive</b>, it should be <b>storage_pool_directory</b>.  If you don't set it correctly, Greyhole will not work.
Line 24: Line 24:
 
** Pictures for 1 copy (which is the same as max)
 
** Pictures for 1 copy (which is the same as max)
 
** Movies for no copies
 
** Movies for no copies
<blockquote>{{text|num_copies[Books] <nowiki>=</nowiki> 999
+
<pre>num_copies[Books] = 999
num_copies[Pictures] <nowiki>=</nowiki> 2
+
num_copies[Pictures] = 2
num_copies[Movies] <nowiki>=</nowiki> 1}}</blockquote>
+
num_copies[Movies] = 1</pre>
  
 
<b>NOTE:</b>  For a system with 2 Greyhole drives, 1 copy is the max.  The first Greyhole drive holds the master copy and the second a copy.  The share will contain a symbolic link to the master.
 
<b>NOTE:</b>  For a system with 2 Greyhole drives, 1 copy is the max.  The first Greyhole drive holds the master copy and the second a copy.  The share will contain a symbolic link to the master.
  
 
* In the Dashboard, Shares tab add the following to <b>Extra Parameters</b> for each share you will be configuring to use Greyhole:
 
* In the Dashboard, Shares tab add the following to <b>Extra Parameters</b> for each share you will be configuring to use Greyhole:
<blockquote>{{text|dfree command <nowiki>=</nowiki> /usr/bin/greyhole-dfree
+
<pre>dfree command = /usr/bin/greyhole-dfree
vfs objects <nowiki>=</nowiki> greyhole}}</blockquote>
+
vfs objects = greyhole</pre>
  
 
* Finally, enable greyhole permanently and start the service:
 
* Finally, enable greyhole permanently and start the service:
<blockquote>{{code|systemctl enable greyhole.service
+
<pre>systemctl enable greyhole.service
systemctl start greyhole.service}}</blockquote>
+
systemctl start greyhole.service</pre>
  
 
* You can monitor activity by watching /var/log/greyhole.log file:
 
* You can monitor activity by watching /var/log/greyhole.log file:
<blockquote>{{code|tail -f /var/log/greyhole.log}}</blockquote>
+
<pre>tail -f /var/log/greyhole.log</pre>
  
  
  
 
Return to [[Amahi_7_installation|Amahi 7 Installation]] page.
 
Return to [[Amahi_7_installation|Amahi 7 Installation]] page.

Revision as of 00:22, 2 December 2013

Warning.png WARNING
This is recommended for advanced users only, please proceed with caution.



The following guidance is provided to assist users with setting up Greyhole in Amahi 7. This has been tested with no issues. Please note this is ONLY a work around until Greyhole is integrated into the Amahi 7 dashboard.

NOTE: There is no guarantee this will work for you or not cause problems with your Amahi 7 install. Please proceed with caution as carelessness could cause data loss.

As root user, perform the following steps:

yum -y install hda-greyhole
  • Set up a mysql database and user to access it:
code|hda-create-db-and-user greyhole
  • Load the database schema:
mysql -u greyhole -pgreyhole  greyhole < /usr/share/greyhole/schema-mysql.sql

Initialize the basic settings for Greyhole, configure /etc/greyhole.conf:

  • Change db_user and db_password to greyhole.
  • Add a line for each drive (go here for adding new hard drives) in the storage pool at the end of the file. The example below is for two drives:
storage_pool_directory = /var/hda/files/drives/drive2/gh, min_free: 10gb
storage_pool_directory = /var/hda/files/drives/drive3/gh, min_free: 10gb

NOTE: Although the /etc/greyhole.conf contents indicate storage_pool_drive, it should be storage_pool_directory. If you don't set it correctly, Greyhole will not work.

  • Now configure the number of copies per share. The example below sets the shares as follows:
    • Books for max copies (which is 1 for 2 drives)
    • Pictures for 1 copy (which is the same as max)
    • Movies for no copies
num_copies[Books] = 999
num_copies[Pictures] = 2
num_copies[Movies] = 1

NOTE: For a system with 2 Greyhole drives, 1 copy is the max. The first Greyhole drive holds the master copy and the second a copy. The share will contain a symbolic link to the master.

  • In the Dashboard, Shares tab add the following to Extra Parameters for each share you will be configuring to use Greyhole:
dfree command = /usr/bin/greyhole-dfree
vfs objects = greyhole
  • Finally, enable greyhole permanently and start the service:
systemctl enable greyhole.service
systemctl start greyhole.service
  • You can monitor activity by watching /var/log/greyhole.log file:
tail -f /var/log/greyhole.log


Return to Amahi 7 Installation page.