Difference between revisions of "Amahi Create Manual Greyhole Setup"
Line 14: | Line 14: | ||
Initialize the basic settings for Greyhole, configure /etc/greyhole.conf: | Initialize the basic settings for Greyhole, configure /etc/greyhole.conf: | ||
* Make sure the settings for the database are correct: <u>db_user</u> and <u>db_password</u> should be <i>greyhole</i> | * Make sure the settings for the database are correct: <u>db_user</u> and <u>db_password</u> should be <i>greyhole</i> | ||
− | * Add a line for each drive | + | * Add a line for each drive in the storage pool at the end of the file. The example below is for two drives: |
<pre>storage_pool_drive = /var/hda/files/drives/drive2/gh, min_free: 10gb | <pre>storage_pool_drive = /var/hda/files/drives/drive2/gh, min_free: 10gb | ||
storage_pool_drive = /var/hda/files/drives/drive3/gh, min_free: 10gb</pre> | storage_pool_drive = /var/hda/files/drives/drive3/gh, min_free: 10gb</pre> | ||
+ | |||
+ | :'''NOTE''': If you have not initialized your newly added hard drives, refer to [[Adding_a_second_hard_drive_to_your_HDA|adding new hard drives]]. | ||
<!--<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 30: | Line 32: | ||
<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 | + | * In the Dashboard, Shares tab add the following to [[Share_Extra_Parameters|Extra Parameters]] for each share you will be configuring to use Greyhole: |
<pre>dfree command = /usr/bin/greyhole-dfree | <pre>dfree command = /usr/bin/greyhole-dfree | ||
vfs objects = greyhole</pre> | vfs objects = greyhole</pre> |
Revision as of 20:45, 10 April 2014
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. Also you might want to check out the Greyhole wiki page for additional information, such as working with shares locally on the HDA.
As root user, perform the following steps:
- Install the package:
yum -y install amahi-greyhole
- Set up a mysql database and user to access it:
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:
- Make sure the settings for the database are correct: db_user and db_password should be greyhole
- Add a line for each drive in the storage pool at the end of the file. The example below is for two drives:
storage_pool_drive = /var/hda/files/drives/drive2/gh, min_free: 10gb storage_pool_drive = /var/hda/files/drives/drive3/gh, min_free: 10gb
- NOTE: If you have not initialized your newly added hard drives, refer to adding new hard drives.
- 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 amahi-greyhole.service systemctl start amahi-greyhole.service
- You can monitor activity by watching /var/log/greyhole.log file:
tail -f /var/log/greyhole.log
- If you intend to modify or work with your files locally on the HDA, refer to Mount Shares Locally for guidance.
Return to Amahi 7 Installation page.