Installing HDA on HP Proliant Gen8 MicroServer

From Amahi Wiki
Revision as of 21:32, 6 January 2015 by Bigfoot65 (talk | contribs)
Jump to: navigation, search
Msgbox-WOPr.png Work In Progress
This article is currently undergoing major expansion or restructuring. You are welcome to assist by editing it as well. If this article has not been edited in several days, please remove this template.


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.


NOTE: ALL commands are run as root user.

Specifications

HARDWARE

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


OS PARTITIONS (120GB SSD)

  • / = 100GB
  • /boot = 1GB
  • /swap = 10GB


NOTE: ALL 3TB Drives were used for Greyhole shares.

Amahi 7 Installation

Add Hard Drives

NOTE: Followed 4TB Hard Drives guidance for formatting and mounting the drives.

  • For the 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
  • Formatted 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
  • Mounted the drives.
hda-diskmount
  • Edit /etc/fstab and added drives accordingly. Add the output from the hda-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 /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: 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).
  • Reboot server and check that the drives mounted correctly.

Setup Greyhole

Issues Encountered

Problem 1

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.

CHECK:

greyhole -s

If drives show up as offline it means that the gh directory wasn't created on the drives.

SOLUTION:

Refer to this Amahi Forums article.

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

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.

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

References