Difference between revisions of "Amahi Create Manual Greyhole Setup"
From Amahi Wiki
(29 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{MessageBox| |
− | The following guidance is provided to assist users with setting up [[Greyhole]] in Amahi 7. This has been tested with no issues. | + | backgroundcolor = #faa| |
+ | image =Warning.png| | ||
+ | heading =WARNING| | ||
+ | message = | ||
+ | Amahi application [https://www.amahi.org/apps/greyhole-ui Greyhole UI] provides this capability. Manual setup recommended for Advanced users '''ONLY'''!}} | ||
+ | The following guidance is provided to assist users with setting up [[Greyhole]] in Amahi 7 or greater. This has been tested with no issues, however the recommended method of install is via [https://www.amahi.org/apps/greyhole-ui Greyhole UI] plugin with dashboard integration. | ||
− | <b>NOTE:</b> 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. | + | <b>NOTE:</b> There is no guarantee this will work for you or not cause problems with your Amahi 7/8 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 [[Open_Terminal_as_root|root user]], perform the following steps: | As [[Open_Terminal_as_root|root user]], perform the following steps: | ||
− | * Install the package | + | * Install the package: |
− | < | + | <pre>yum -y install amahi-greyhole</pre> |
* Set up a mysql database and user to access it: | * Set up a mysql database and user to access it: | ||
− | < | + | <pre>hda-create-db-and-user greyhole</pre> |
* Load the database schema: | * Load the database schema: | ||
− | < | + | <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: | ||
− | * | + | * Make sure the settings for the database are correct: ''db_user'' and ''db_password'' should be ''greyhole'' |
− | * 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_directory = /var/hda/files/drives/drive2/gh, min_free: 10gb |
− | storage_pool_directory | + | storage_pool_directory = /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]]. | |
* Now configure the number of copies per share. The example below sets the shares as follows: | * Now configure the number of copies per share. The example below sets the shares as follows: | ||
− | ** Books | + | ** Books: max copies (which is 2 for 2 drives) |
− | ** Pictures | + | ** Pictures: 2 copies (i.e. 1 extra copy) |
− | ** Movies | + | ** Movies: no extra copies (data loss will occur if one of your drive fails) |
− | < | + | <pre>num_copies[Books] = max |
− | num_copies[Pictures] | + | num_copies[Pictures] = 2 |
− | num_copies[Movies] | + | num_copies[Movies] = 1</pre> |
− | + | * 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 | |
− | * In the Dashboard, Shares tab add the following to | + | vfs objects = greyhole</pre> |
− | < | ||
− | vfs objects | ||
* Finally, enable greyhole permanently and start the service: | * Finally, enable greyhole permanently and start the service: | ||
− | < | + | <pre>systemctl enable amahi-greyhole.service |
− | systemctl start greyhole.service | + | systemctl start amahi-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: | ||
− | < | + | <pre>tail -f /var/log/greyhole.log</pre> |
+ | |||
+ | * If you intend to modify or work with your files locally on the HDA, refer to [[Mount_Shares_Locally|Mount Shares Locally]] for guidance. |
Latest revision as of 03:42, 18 June 2017
WARNING | |
---|---|
Amahi application Greyhole UI provides this capability. Manual setup recommended for Advanced users ONLY! |
The following guidance is provided to assist users with setting up Greyhole in Amahi 7 or greater. This has been tested with no issues, however the recommended method of install is via Greyhole UI plugin with dashboard integration.
NOTE: There is no guarantee this will work for you or not cause problems with your Amahi 7/8 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_directory = /var/hda/files/drives/drive2/gh, min_free: 10gb storage_pool_directory = /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: max copies (which is 2 for 2 drives)
- Pictures: 2 copies (i.e. 1 extra copy)
- Movies: no extra copies (data loss will occur if one of your drive fails)
num_copies[Books] = max num_copies[Pictures] = 2 num_copies[Movies] = 1
- 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.