Changes

From Amahi Wiki
Jump to: navigation, search
no edit summary
AMAHI NOTES{{MessageBox|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://wiki.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 Make sure both, user and pass are "greyhole".Example: db_user = greyhole db_pass = greyhole db_name = greyhole 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 show up as offline it means that 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 eachshare being used with Greyhole:(this command lines can be double checked directory wasn't created on the smbdrives.conf file)  dfree command = /usr/bin/greyhole-dfree vfs objects = greyhole
Enable and Restart Greyhole and Samba'''SOLUTION: systemctl enable amahi-greyhole.service service smb restart service amahi-greyhole restart'''
MONITOR OUTPUT ON GREYHOLERefer to [https://forums.amahi.org/viewtopic.php?f=16&t=5248 this] Amahi Forums article.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 the Greyhole service. Turn off the Watchdog option in the Setup > Advanced > Servers page, and then stop the service. Move the LZ from it's old path to the new path. mv /var/hda/files/xshare /var/hda/files/drives/drive4/xshare
Edit '''SOLUTION:''' * (This step is optional) First, you might want to wait until the share path Greyhole is done working on the Amahi Dashboard, Shares tab to reflect latest changes. You can check that by looking at /var/log/greyhole.log: look for Sleeping... log lines. Doing so will speed up the new pathwhole process of moving your LZ.
Repeat * Stop the last two steps for all Samba service. Turn off the shares you'd like to relocateWatchdog option in the Setup > Advanced > Servers page, and then stop the service.
Restart * Stop the Greyhole service. Turn back on off the Watchdog option in the Setup > Advanced > Servers page, and then start stop the service.
Restart * Move the Samba serviceLZ from it's old path to the new path.Turn back on the Watchdog option in the Setup > Advanced > Servers page, and then start the service. mv /var/hda/files/xshare /var/hda/files/drives/drive4/xshare
Check Greyhole * Edit the share path on the Amahi Dashboard, Shares tab to reflect the new path. Repeat the last two steps for possible errorsall the shares you'd like to relocate. greyhole --fsck
* Restart the Greyhole service. Turn back on the Watchdog option in the Setup > Advanced > Servers page, and then start the service.
-----------------------------------------------------------------------------------------------HANDY COMMANDS vi opens a file editor :w saves changes to an edited file :q quits * Restart the vi editor :q! quits he vi editor without saving changes fdisk -l hdd's stats df -h hdd's stats fpaste paste file information ls shows files and directories in Samba service. Turn back on the indicated path greyhole -f pushes/forces greyhole to star copies of files in shares greyhole -s shows drives Watchdog option in the storage pool greyhole --view-queue Greyhole work queue greyhole --debug xfile Greyhole info about a particular file in Setup > Advanced > Servers page, and then start the shares tail -f /var/log/greyholeservice.log monitor greyhole activity service x restart restart a service service x stop stop a service
* Check Greyhole for possible errors. greyhole -----------------------------------------------------------------------------------------------SOURCES: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.htmlAMAHIhttps://wiki.amahi.org/index.php/Main_Pagehttps://wiki.amahi.org/index.php/Vista_Networking_Issuehttps://wiki.amahi.org/index.php/Network_troubleshootinghttp://webchat.freenode.net/?channels=amahi* ''HARD DRIVES''https://wiki.amahi.org/index.php/Adding_a_second_hard_drive_to_your_HDA#Mount_the_hard_drivehttps://wiki.amahi.org/index.php/Partitions_Over_2.1_TB** http://rainbow.chard.org/2013/01/30/how-to-align-partitions-for-best-performance-using-parted/GREYHOLEhttps://wiki.amahi.org/index.php/Greyholehttps://wiki.amahi.org/index.php/Amahi_7_Create_Manual_Greyhole_Setuphttps://forums.amahi.org/viewtopic.php?f=16&t=5248https://github.com/gboudreau/Greyhole/wiki/AboutLZhttps://github.com/gboudreau/Greyhole/wiki/MovingLandingZonehttps://wiki.amahi.org/index.php/Greyhole_troubleshooting
12,424

edits