Amahi Create Manual Greyhole Setup

From Amahi Wiki
Revision as of 03:25, 18 November 2013 by Bigfoot65 (talk | contribs)
Jump to: navigation, search

As root user, perform the following steps:

bash code
​yum -y install hda-greyhole​
  • Set up a mysql database and user to access it:
bash code
​hda-create-db-and-user greyhole​
  • Load the database schema:
bash code
​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:
Text
​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
Text
​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:
Text
​dfree command = /usr/bin/greyhole-dfree vfs objects = greyhole​
  • Finally, enable greyhole permanently and start the service:
bash code
​systemctl enable greyhole.service systemctl start greyhole.service​
  • You can monitor activity by watching /var/log/greyhole.log file:
bash code
​tail -f /var/log/greyhole.log​