Changes

From Amahi Wiki
Jump to: navigation, search
no edit summary
{{WorkInProgressMessageBox|backgroundcolor = #faa|image =Warning.png|heading =WARNING|message = Amahi 7 for Fedora 19<br />Maintenance Support ONLY!}}This article shows how to install Amahi 7 and Greyhole on a HP Proliant Gen8 MicroServer. Included are the system specifications for this use case and applicable notes to help resolved issues encountered.
Amahi 7 and Greyhole on a HP Proliant Gen8 MicroServerContributed by user gdp.
'''NOTE:''' ALL commands are run as ''root'' user.
This is a headless system so all commands after the installation of Fedora, are run in a bash ==Specifications==terminal using puTTY.<u>'''HARDWARE'''</u>* HP Proliant Gen8 MicroServer* 4 x 3TB Seagate NAS HDDs (Storage Drives)* 120GB Samsung PRO 840 SSD (OS Drive)
All commands are run as Root.
-----------------------------------------------------------------------------------------------<u>'''OS PARTITIONS (120GB SSD)'''</u>HARDWARE* / = 100GBHP Proliant Gen8 MicroServer* /boot = 1GB4 x 3TB Seagate NAS HDDs (Storage Drives)1 x 120gb Samsung PRO 840 SSD (OS Drive)* /swap = 10GB
PARTITIONS
ON 120GB SSD
/ 100gb
/boot 1gb
/swap 10gb
:'''NOTE:''' ALL FOUR 3TB DRIVES USED FOR GREYHOLE SHARESDrives were used for [[Greyhole]] shares.
-----------------------------------------------------------------------------------------------==Amahi 7 Installation==INSTALL AMAHI AS PER INSTRUCTIONS ON EXPRESS CD * Installed using [[Express_Disc|Express Disc]] following these [http://docs.amahi.org/amahi-7-expressinstructions].
ADD HARD DRIVES ==Add Hard Drives==This is for 3TB drives, for 4TB drives see the following:https'''NOTE://wiki.amahi.org/index.php/''' Followed [[Partitions_Over_2.1_TB#4TB_Hard_Drives|4TB Hard Drives]] guidance for formatting and mounting the drives.
Do * For the same with all 4 storage drives, sda, sdb, sdc and sdd. Type Yes to all sector/aligning warnings. parted /dev/sda (parted) mklabel gpt (parted) unit s (parted) mkpart primary ext4 2048 -1 (parted) quit
parted * Formatted the drives. Change parameters for the rest of the drives, sdb1, sdc1, sdd1. mkfs.ext4 -T largefile /dev/sdasda1 (parted) mklabel gpt (parted) unit s (parted) mkpart primary mkfs.ext4 2048 -1 (parted) quitL greyhole01 /dev/sda1
FORMAT THE DRIVESChange parameters for the rest of * Mounted the drives, sdb1, sdc1, sdd1. hda-diskmount
mkfs.ext4 -T largefile * Edit /devetc/sda1 mkfsfstab and added drives accordingly.ext4 Add the output from the hda-L greyhole01 diskmount command for all HDDs into the fstab file by editing it with the "vi" command, once done use :w to write the changes and then :q to exit, if any mistakes are done type :q! to exit without saving) vi /devetc/sda1fstab
''EXAMPLE:''
<pre>
#
# /etc/fstab
# Created by anaconda on Mon Dec 29 16:50:13 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
# Drive1 = Seagate NAS HDD 3TB in Microserver Bay 1 from left
UUID=e4e8b1c4-8b0d-449a-93fa-a41c7b602846 /var/hda/files/drives/drive1 ext4 defaults 1 2
#
# Drive2 = Seagate NAS HDD 3TB in Microserver Bay 2 from left
UUID=0cb468a6-cbaa-42a2-b8ad-225c92b24cd1 /var/hda/files/drives/drive2 ext4 defaults 1 2
#
# Drive3 = Seagate NAS HDD 3TB in Microserver Bay 3 from left
UUID=296f9c9b-2956-47cc-93be-4345dab6fdb5 /var/hda/files/drives/drive3 ext4 defaults 1 2
#
# Drive4 = Seagate NAS HDD 3TB in Microserver Bay 4 from left
UUID=56a00dc8-7e1e-469f-ae66-25a64a3bc617 /var/hda/files/drives/drive4 ext4 defaults 1 2
#
# Drive5 = Samsung 840 SSD 120GB mounted in Optical Drive bay
UUID=15f18177-4eca-40e8-8a7f-c76fe9843d3c / ext4 defaults 1 1
UUID=efc98aea-32c9-495c-8b5b-fb28b3751a5c /boot ext4 defaults 1 2
UUID=40c736ea-c943-43eb-9f4a-f0e1535651ee swap swap defaults 0 0</pre>
MOUNT HARD DRIVES
hda-diskmount:'''NOTE:''' All lines starting with # are for personal reference/information only, you are notrequired to input any additional information, but it helps to keep things organized).
EDIT FSTAB FILEAdd the output from the hda-fstab command for all HDDs into the fstab file by editing it * If any errors arise with the "vi" commandthis proccess, once done use :w to write the changes and then :q refer to exit, if any mistakesare done type :q! [[Adding_a_second_hard_drive_to_your_HDA|adding a second hard drive to exit without saving)your HDA]]
vi /etc/fstab* Reboot server and check that the drives mounted correctly.
Example:==Setup Greyhole==* Follow the [[Amahi_Create_Manual_Greyhole_Setup|manual Greyhole setup]] guidance.
# # /etc/fstab # Created by anaconda on Mon Dec 29 16:50:13 2014 # # Accessible filesystems, by reference, are maintained under '/dev/disk' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info # # Drive1 = Seagate NAS HDD 3TB in Microserver Bay 1 from left UUID=e4e8b1c4-8b0d-449a-93fa-a41c7b602846 /var/hda/files/drives/drive1 ext4 defaults 1 2 # # Drive2 Issues Encountered= Seagate NAS HDD 3TB in Microserver Bay 2 from left UUID=0cb468a6-cbaa-42a2-b8ad-225c92b24cd1 /var/hda/files/drives/drive2 ext4 defaults 1 2 # # Drive3 = Seagate NAS HDD 3TB in Microserver Bay 3 from left UUID=296f9c9b-2956-47cc-93be-4345dab6fdb5 /var/hda/files/drives/drive3 ext4 defaults 1 2 # # Drive4 = Seagate NAS HDD 3TB in Microserver Bay 4 from left UUID=56a00dc8-7e1e-469f-ae66-25a64a3bc617 /var/hda/files/drives/drive4 ext4 defaults Problem 1 2 # # Drive5 = Samsung 840 SSD 120GB mounted in Optical Drive bay UUID=15f18177-4eca-40e8-8a7f-c76fe9843d3c / ext4 defaults 1 1 UUID=efc98aea-32c9-495c-8b5b-fb28b3751a5c /boot ext4 defaults 1 2 UUID=40c736ea-c943-43eb-9f4a-f0e1535651ee swap swap defaults 0 0'''ERROR:''' no metadata files could be created
While adding a file to one of the shares, greyhole.log gave me an error about metadata files not being able to be created.
(Note that all lines starting with # are for personal reference/information only, you are notCHECK: required to input any additional information, but it helps to keep things organized). greyhole -s
If any errors arise with this proccess, see:https://wikidrives show up as offline it means that the gh directory wasn't created on the drives.amahi.org/index.php/Adding_a_second_hard_drive_to_your_HDA REBOOT SERVER AND CHECK AMAHI SERVER FOR MOUNTED DRIVES -----------------------------------------------------------------------------------------------INSTALL GREYHOLE yum -y install amahi-greyhole hda-create-db-and-user greyhole mysql -u greyhole -pgreyhole greyhole < /usr/share/greyhole/schema-mysql.sql
EDIT GREYHOLE.CONF vi /etc/greyhole.conf'''SOLUTION:'''
Make sure both, user and pass are "greyhole"Refer to [https://forums.amahi.org/viewtopic.Example: db_user php?f= greyhole db_pass 16&t= greyhole db_name = greyhole5248 this] Amahi Forums article.
Edit the number of copies per share to have in the storage pool.
Example:
num_copies[Bkups] = max
num_copies[Books] = 2
num_copies[Docs] = max
num_copies[Movies] = 2
num_copies[Music] = 2
num_copies[Media] = max
num_copies[Public] = 2
num_copies[Work] = max
 
Add your drives to the storage pool:
Example:
storage_pool_drive = /var/hda/files/drives/drive1/gh, min_free: 10gb
storage_pool_drive = /var/hda/files/drives/drive2/gh, min_free: 10gb
storage_pool_drive = /var/hda/files/drives/drive3/gh, min_free: 10gb
storage_pool_drive = /var/hda/files/drives/drive4/gh, min_free: 10gb
 
In the Amahi Dashboard, Shares tab add these command lines into the Extra Parameters for each
share being used with Greyhole:
(this command lines can be double checked on the smb.conf file)
 
dfree command = /usr/bin/greyhole-dfree
vfs objects = greyhole
 
Enable and Restart Greyhole and Samba:
systemctl enable amahi-greyhole.service
service smb restart
service amahi-greyhole restart
 
MONITOR OUTPUT ON GREYHOLE.LOG FOR STATUS AND POSSIBLE ERRORS
 
tail -f /var/log/greyhole.log
 
-----------------------------------------------------------------------------------------------
PROBLEM 1
 
ERROR:
no metadata files could be created
 
NOTES:
While adding a file to one of the shares, greyhole.log gave me an error about metadata files
not being able to be created.
 
CHECK:
greyhole -s
If drives show up as offline it means that the gh directory wasn't created on the drives.
 
SOLUTION:
https://forums.amahi.org/viewtopic.php?f=16&t=5248
Execute the following command for all drives in the storage pool, then restart the service and
check for drives status again, they should show up as online.
mkdir -p /var/hda/files/drives/drive1/gh
systemctl restart amahi-greyhole.service
greyhole -s
mkdir -p /var/hda/files/drives/drive1/gh===Problem 2=== systemctl restart amahi-'''ERROR:'''Mismatched share names on greyhole.service greyhole -sconf and smb.conf
-----------------------------------------------------------------------------------------------
PROBLEM 2
 
ERROR:
Mismatched share names on greyhole.conf and sms.conf
 
NOTES:
Noticed the error on greyhole.log while greyhole tried to create copies of files added to the
storage pool.
'''SOLUTION:Make sure when you set the number of copies on the "vi /etc/greyhole.conf" command, that all[xShare] names on the file match exactly the share names on the Amahi Dashboard, delete any shares that do not show up on the Dashboard.'''
-----------------------------------------------------------------------------------------------PROBLEM 3Make sure when you set the number of copies on the "vi /etc/greyhole.conf" command, that all [xShare] names on the file match exactly the share names on the Amahi Dashboard, delete any shares that do not show up on the Dashboard.
===Problem 3==='''ERROR:'''
LZ for one of the shares filed up and Greyhole stopped making copies of the files.
NOTES:
Added about 200GB of data to one of the shares, the LZ for it was located on the "/" partition
on the 120GB SSD (sde) used for the OS. Moved all share's LZs to the 4th 3TB storage drive (sdd). SOLUTION:(This step is optional) First, you might want to wait until the Greyhole is done working on thelatest changes. You can check that by looking at /var/log/greyhole.log: look for Sleeping... log lines. Doing so will speed up the whole process of moving your LZ. Stop the Samba service. Turn off the Watchdog option in the Setup > Advanced > Servers page, and then stop the service.
Stop '''SOLUTION:''' * (This step is optional) First, you might want to wait until the Greyhole serviceis done working on the latest changes. You can check that by looking at /var/log/greyhole.log: look for Sleeping... Turn off the Watchdog option in the Setup > Advanced > Servers page, and then stop log lines. Doing so will speed up the servicewhole process of moving your LZ.
Move * Stop the LZ from it's old path to Samba service. Turn off the Watchdog option in the Setup > Advanced > Servers page, and then stop the new pathservice. mv /var/hda/files/xshare /var/hda/files/drives/drive4/xshare
Edit * Stop the share path on Greyhole service. Turn off the Amahi DashboardWatchdog option in the Setup > Advanced > Servers page, Shares tab to reflect and then stop the new pathservice.
Repeat * Move the last two steps for all the shares youLZ from it'd like s old path to relocatethe new path. mv /var/hda/files/xshare /var/hda/files/drives/drive4/xshare
Restart * Edit the Greyhole service. Turn back share path on the Watchdog option in Amahi Dashboard, Shares tab to reflect the Setup > Advanced > Servers page, and then start new path. Repeat the last two steps for all the serviceshares you'd like to relocate.
* Restart the Samba Greyhole service.Turn back on the Watchdog option in the Setup > Advanced > Servers page, and then start the service.
Check Greyhole for possible errors* Restart the Samba service. Turn back on the Watchdog option in the Setup > Advanced > Servers page, and then start the service. greyhole --fsck
===SOURCES===* HP PROLIANT GEN8 MICROSERVER[http://www.silentpcreview.com/article1377-page8.html][https://b3nCheck Greyhole for possible errors.org/m1015-hba-in-the-hp-gen8-microserver/][http://shamsblog.crashcode.net/2013/09/amahi-7-and- greyhole-on-hp-proliant_5.html]fsck
==References==* ''HP PROLIANT GEN8 MICROSERVER''* * http://www.silentpcreview.com/article1377-page8.html** https://b3n.org/m1015-hba-in-the-hp-gen8-microserver/** http://shamsblog.crashcode.net/2013/09/amahi-7-and-greyhole-on-hp-proliant_5.html* ''HARD DRIVES''[** http://rainbow.chard.org/2013/01/30/how-to-align-partitions-for-best-performance-using-parted/]
12,424

edits