I've had a long winded ride in getting Amahi 7 with Greyhole installed and working.
Some of the problems I faced:
Amahi 7 supports only installing from a DVD; I don't want a dvd drive
Amahi 7 USB install guide did not work for me
Amahi 7 does not have greyhole integrated yet, so a manual install has to be done
hda-greyhole did not work well with Fedora 19's Samba
After installing hda-greyhole and configuring samba to use it, I could no longer access the share and was getting the following errors:
Code: Select all
Sep 5 01:48:23 amahi smbd[13392]: Error loading module '/usr/lib64/samba/vfs/greyhole.so': /usr/lib64/samba/libsmbd_base.so: version `SAMBA_4.0.0' not found (required by /usr/lib64/samba/vfs/greyhole.so)
Sep 5 01:48:23 amahi smbd[13392]: [2013/09/05 01:48:23.379707, 0] ../source3/smbd/vfs.c:184(vfs_init_custom)
Sep 5 01:48:23 amahi smbd[13392]: error probing vfs module 'greyhole': NT_STATUS_UNSUCCESSFUL
Sep 5 01:48:23 amahi smbd[13392]: [2013/09/05 01:48:23.379830, 0] ../source3/smbd/vfs.c:349(smbd_vfs_init)
Sep 5 01:48:23 amahi smbd[13392]: smbd_vfs_init: vfs_init_custom failed for greyhole
Sep 5 01:48:23 amahi smbd[13392]: [2013/09/05 01:48:23.379946, 0] ../source3/smbd/service.c:632(make_connection_snum)
Sep 5 01:48:23 amahi smbd[13392]: vfs_init failed for service Music
Sep 5 01:48:23 amahi smbd[13392]: [2013/09/05 01:48:23.389801, 0] ../lib/util/modules.c:56(load_module)
Here is a summarised list of how I got things working. I've had to recreate all the steps here, leaving out all the incorrect attempts and dead ends and trying to patch them in an order that might work, so this might (in fact likely) to have errors, so be careful, here be dragons.
Standard disclaimer applies; use the details here at your own risk, you could certainly destroy all your data and risk a bricked system! Also, this is outside of Amahi supported practices.
Note
I run a headless system so all commands after the installation of Fedora, are run in a bash terminal.
I ran all commands as root (i.e. I executed sudo su – in the terminal first)
This assumes a fair amount of knowledge, like being able to use ping and edit files.
In a nutshell
Upgrade Memory
Update Bios
Install Fedora 19
Install Amahi
Add Hard Drive
Change Share locations
Install Greyhole
Upgrade Memory
I installed more RAM (Corsair CMV8GX3M1A1333C9 Value Select 8GB (1x8GB) DDR3 1333 Mhz CL9 Mainstream Desktop Memory Module”) first after taking out the 2GB it came with as I prefer my RAM to be exactly the same in my servers.
The case is easy to take apart; after you take off all the cables connected to the motherboard (conveniently easy to get to as it is at the front) the motherboard comes out easily as it sits on a metal sliding base. The only issue I had was taking off the two thumb screws holding the motherboard in place as they were too tight to remove by hand…but HP provide a handy L-shape star wrench to use.
Update Bios
The official bios for this board has been modded to support 6 ports of AHCI SATA 3gb/s. You can find the modded bios here:
http://www.avforums.com/forums/networki ... pport.html
To create a bootable USB key with the bios just download the .rar file, extract, and execute RunMe.exe.
Install Fedora 19
Prepare your USB stick
Download Unetbootin:
http://unetbootin.sourceforge.net/unetb ... latest.exe
Unetbootin is a standalone executable so doesn't need to be installed. You will need admin rights.
Make sure you have a USB stick with enough space in your machine, then execute UNetbootin.
In the UNetbootin window for Distribution select Fedora 19_Live_x64
Make sure under type at the bottom, "USB Drive" is selected and that next to Drive it shows your USB stick, else you run the risk of overwriting your data.
Once UNetbootin finishes, don’t reboot, just exit.
Remove your USB stick and boot off it on your server. By default it should be able to boot off USB, however you may need to enable booting off USB in the Bios if that is not already set .
Complete Fedora installation by following the instructions that appear.
Log on, turn on SSH and make available after reboot:
Code: Select all
service sshd start
chkconfig sshd on
DNS
Make sure you can connect to the internet (ping google.com for example). If you can’t, try manually adding DNS servers to /etc/resolv.conf (you could add the openDNS servers for example: 208.67.222.222 and 208.67.220.220)
Install Amahi
To install Amahi execute:
Code: Select all
rpm -Uvh http://f19.amahi.org/noarch/hda-release-6.9.0-1.noarch.rpm
yum -y install mariadb-libs mariadb-server
yum -y install hda-ctl hda-platform
hda-install
If all went well, your Amahi control panel (
https://www.amahi.org/users) should show your new install as running (might take a minute or two to catchcup)
Optionally you can turn off DHCP in your router at this stage
Add Hard Drive
I used parted for prepping my new 4TB hard drive, which appeared as /dev/sdb (read here:
http://rainbow.chard.org/2013/01/30/how ... ng-parted/)
at the parted prompt
Code: Select all
mklabel gpt
mkpart primary ext4 4096s 100%
align-check opt 1
quit
Format
mount
using the output from the above command, first backup /etc/fstab, and then add to /etc/fstab.
For me this meant I added the following to the bottom of my fstab:
Code: Select all
UUID=e68bc54a-b795-4ce0-802f-213f4ab71e60 /var/hda/files/drives/drive1 ext4 defaults 1 2
Change Share Locations
I changed my default share paths from the drive that the OS lived on to my new drive using the Amahi web interface (after creating the following folder /var/hda/files/drives/drive1/shares/). This is so I have plenty of space before greyhole can move files and as it is a drive in the pool, when Greyhole moves the files it should happen quicker if it decides to store a copy on the same drive (of course copies that need to be moved to other pooled drives will take more time).
Install Greyhole
As I’d already followed the installation instructions for installing greyhole on Amahi, before finding out that Amahi 7 didn’t work, I didn’t have to recreate the DB schema. Here is what I had previously done:
Code: Select all
yum -y install hda-greyhole
hda-create-db-and-user greyhole
mysql -u greyhole -pgreyhole greyhole < /usr/share/greyhole/schema-mysql.sql
To upgrade greyhole, I removed hda-greyhole first:
and installed it from the greyhole repository
Code: Select all
curl -o /etc/yum.repos.d/greyhole.repo http://www.greyhole.net/releases/rpm/greyhole.repo
yum update greyhole
I edited the /etc/greyhole.conf file, adding in my storage_pool_drive:
Code: Select all
storage_pool_drive = /var/hda/files/drives/drive1/gh, min_free: 10gb
...and changed the db_user and db_pass to (security minded people should change this at some point):
Code: Select all
db_user = greyhole
db_pass = greyhole
In /etc/samba/smb.conf I added the following two lines to the shares I wanted to participate in the pool:
Code: Select all
dfree command = /usr/bin/greyhole-dfree
vfs objects = greyhole
I then restarted Samba and greyhole
Code: Select all
Service smb restart
Service greyhole restart
I now have a working Amahi 7 with greyhole system. I’ve tested it and all seems to work very well.
In summary
The combination that did not work:
Samba: samba-4.0.9-1.fc19.x86_64
Amahi Greyhole: hda-greyhole-0.9.31-1.x86_64
The combination that does work:
samba-4.0.9-1.fc19.x86_64
greyhole-0.9.34-1.x86_64
I'm fairly sure I've made a few mistakes in creating this both in terms of steps taken to get Amahi+Greyhole running, and producing this document. Please feel free to, constructilvy correct me
Links
Some links that gave me solutions and others that helped get me pointed in the right direction
Amahi Install related
https://wiki.amahi.org/index.php/Amahi_7_installation
https://wiki.amahi.org/index.php/Express_CD
https://wiki.amahi.org/index.php/USB_Install
http://docs.amahi.org/amahi-7-express.html
Greyhole related
https://wiki.amahi.org/index.php/Greyhole
http://greyhole.googlecode.com/svn-hist ... nk/INSTALL
viewtopic.php?f=39&t=2714&p=13570
https://getsatisfaction.com/greyhole/to ... ed_working
viewtopic.php?f=39&t=4035
HD Installation related
https://wiki.amahi.org/index.php/Adding ... o_your_HDA
http://rainbow.chard.org/2013/01/30/how ... ng-parted/
General reading
http://www.samba.org/samba/docs/man/Sam ... n/VFS.html
Too many others to list