To install it in Ubuntu:
sudo sh -c 'echo "deb http://www.greyhole.net/releases/deb stable main" > /etc/apt/sources.list.d/greyhole.list' curl -s http://www.greyhole.net/releases/deb/greyhole-debsig.asc | sudo apt-key add - sudo apt-get update sudo apt-get install greyhole
Then my configuration, following the USAGE document.
I modified my /etc/samba/smd.conf adding the following to the [global]:
unix extensions = no wide links = yes
And I added the following to the rest of it:
[ComputerBackups] path = /mnt/wd20tb/shares/computerbackups create mask = 0660 directory mask = 0770 read only = no available = yes browseable = yes writable = yes guest ok = no printable = no dfree command = /usr/bin/greyhole-dfree vfs objects = greyhole [Documents] path = /mnt/wd20tb/shares/documents create mask = 0660 directory mask = 0770 read only = no available = yes browseable = yes writable = yes guest ok = no printable = no dfree command = /usr/bin/greyhole-dfree vfs objects = greyhole .... and similar text for each share
I added the mysql database using the following:
mysql -u root -p -e "create database greyhole; grant all on greyhole.* to greyhole_user@localhost identified by '89y63jdwe';" mysql -u greyhole_user -p89y63jdwe greyhole < /usr/share/greyhole/schema-mysql.sql
Then I went into /etc/greyhole.conf and set up my hard drives to be pooled.
I used /mnt/xxx/gh as the greyhole directory on each drive. I then copied a small temporary file to each share from another computer to make sure the replication was working, and to make the share directories under /gh/ for each drive. Once that was working, I moved my files from the other directories into the gh/shares directories as recommended on https://github.com/gboudreau/Greyhole/wiki/ReuseDataDrives in order to migrate from my previous setup. Once the files were in the greyhole directories, I ran the command recommended by that page, but without specifying a drive:
sudo greyhole --fsck --find-orphaned-files
My files were then visible from the shares and duplication began. The final step was to mount the shares locally using samba, since the greyhole shares or gh directories should not be directly accessed. https://github.com/gboudreau/Greyhole/wiki/MountSharesLocally has the information to do that using a script that runs at startup. I had to install the cifs-utils package for it to work. I also created a link for insserv in order to run the rest without errors:
sudo ln -s /usr/lib/insserv/insserv /sbin/insserv sudo chmod +x /etc/init.d/mount_shares_locally sudo update-rc.d mount_shares_locally defaults sudo chkconfig --add mount_shares_locally
I made some modifications to the file, and also made a copy of it that mounts the shares as guest, giving only read access. This will allow MythTV to access the shares without the chance of my kids deleting anything on accident or on purpose.
Leave a Reply