Installing HDA on HP Proliant Gen8 MicroServer

From Amahi Wiki
Revision as of 17:56, 6 January 2015 by Bigfoot65 (talk | contribs) (Created page with "AMAHI NOTES Amahi 7 and Greyhole on a HP Proliant Gen8 MicroServer This is a headless system so all commands after the installation of Fedora, are run in a bash terminal u...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

AMAHI NOTES

Amahi 7 and Greyhole on a HP Proliant Gen8 MicroServer


This is a headless system so all commands after the installation of Fedora, are run in a bash terminal using puTTY.

All commands are run as Root.


HARDWARE HP Proliant Gen8 MicroServer 4 x 3TB Seagate NAS HDDs (Storage Drives) 1 x 120gb Samsung PRO 840 SSD (OS Drive)

PARTITIONS ON 120GB SSD / 100gb /boot 1gb /swap 10gb

ALL FOUR 3TB DRIVES USED FOR GREYHOLE SHARES.


INSTALL AMAHI AS PER INSTRUCTIONS ON EXPRESS CD http://docs.amahi.org/amahi-7-express

ADD HARD DRIVES This is for 3TB drives, for 4TB drives see the following: https://wiki.amahi.org/index.php/Partitions_Over_2.1_TB#4TB_Hard_Drives

Do 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

FORMAT THE DRIVES Change parameters for the rest of the drives, sdb1, sdc1, sdd1.

mkfs.ext4 -T largefile /dev/sda1 mkfs.ext4 -L greyhole01 /dev/sda1


MOUNT HARD DRIVES

hda-diskmount

EDIT FSTAB FILE Add the output from the hda-fstab 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 /etc/fstab

Example:

# # /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


(Note that all lines starting with # are for personal reference/information only, you are not required to input any additional information, but it helps to keep things organized).

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 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


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 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 the latest 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 the share path on the Amahi Dashboard, Shares tab to reflect the new path.

Repeat the last two steps for all the shares you'd like to relocate.

Restart the Greyhole service. Turn back on the Watchdog option in the Setup > Advanced > Servers page, and then start the service.

Restart the Samba service. Turn back on the Watchdog option in the Setup > Advanced > Servers page, and then start the service.

Check Greyhole for possible errors. greyhole --fsck



HANDY COMMANDS vi opens a file editor :w saves changes to an edited file :q quits 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 the indicated path greyhole -f pushes/forces greyhole to star copies of files in shares greyhole -s shows drives in the storage pool greyhole --view-queue Greyhole work queue greyhole --debug xfile Greyhole info about a particular file in the shares tail -f /var/log/greyhole.log monitor greyhole activity service x restart restart a service service x stop stop a service


SOURCES:

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 AMAHI https://wiki.amahi.org/index.php/Main_Page https://wiki.amahi.org/index.php/Vista_Networking_Issue https://wiki.amahi.org/index.php/Network_troubleshooting http://webchat.freenode.net/?channels=amahi HARD DRIVES https://wiki.amahi.org/index.php/Adding_a_second_hard_drive_to_your_HDA#Mount_the_hard_drive https://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/ GREYHOLE https://wiki.amahi.org/index.php/Greyhole https://wiki.amahi.org/index.php/Amahi_7_Create_Manual_Greyhole_Setup https://forums.amahi.org/viewtopic.php?f=16&t=5248 https://github.com/gboudreau/Greyhole/wiki/AboutLZ https://github.com/gboudreau/Greyhole/wiki/MovingLandingZone https://wiki.amahi.org/index.php/Greyhole_troubleshooting