Difference between revisions of "Installing HDA on HP Proliant Gen8 MicroServer"

From Amahi Wiki
Jump to: navigation, search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{WorkInProgress}}
+
{{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 MicroServer
+
Contributed 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
+
* /    = 100GB
HP Proliant Gen8 MicroServer
+
* /boot = 1GB
4 x 3TB Seagate NAS HDDs (Storage Drives)
+
* /swap = 10GB
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.
+
:'''NOTE:''' ALL 3TB Drives 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-express instructions].
http://docs.amahi.org/amahi-7-express
 
  
ADD HARD DRIVES
+
==Add Hard Drives==
This is for 3TB drives, for 4TB drives see the following:
+
'''NOTE:''' Followed [[Partitions_Over_2.1_TB#4TB_Hard_Drives|4TB Hard Drives]] guidance for formatting and mounting the drives.
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.
+
* For the 4 storage drives, sda, sdb, sdc and sdd. Type Yes to all sector/aligning warnings.
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 /dev/sda
+
* Formatted the drives.  Change parameters for the rest of the drives, sdb1, sdc1, sdd1.
(parted) mklabel gpt
+
mkfs.ext4 -T largefile /dev/sda1
(parted) unit s
+
mkfs.ext4 -L greyhole01 /dev/sda1
(parted) mkpart primary ext4 2048 -1
 
(parted) quit
 
  
FORMAT THE DRIVES
+
* Mounted the drives.
Change parameters for the rest of the drives, sdb1, sdc1, sdd1.
+
hda-diskmount
  
mkfs.ext4 -T largefile /dev/sda1
+
* 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)
mkfs.ext4 -L greyhole01 /dev/sda1
+
vi /etc/fstab
  
 +
''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 FILE
+
* If any errors arise with this proccess, refer to [[Adding_a_second_hard_drive_to_your_HDA|adding a second hard drive to your HDA]]
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
+
* Reboot server and check that the drives mounted correctly.
  
Example:
+
==Setup Greyhole==
 +
* Follow the [[Amahi_Create_Manual_Greyhole_Setup|manual Greyhole setup]] guidance.
  
#
+
==Issues Encountered==
# /etc/fstab
+
===Problem 1===
# Created by anaconda on Mon Dec 29 16:50:13 2014
+
'''ERROR:'''  no metadata files could be created
#
 
# 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
 
  
 +
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 not
+
CHECK:
required to input any additional information, but it helps to keep things organized).
+
greyhole -s
  
If any errors arise with this proccess, see:
+
If drives show up as offline it means that the gh directory wasn't created on the drives.
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
+
'''SOLUTION:'''
vi /etc/greyhole.conf
 
  
Make sure both, user and pass are "greyhole".
+
Refer to [https://forums.amahi.org/viewtopic.php?f=16&t=5248 this] Amahi Forums article.
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
 
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.
 
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-greyhole.service
+
'''ERROR:'''
greyhole -s
+
Mismatched share names on greyhole.conf 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
 
Noticed the error on greyhole.log while greyhole tried to create copies of files added to the
 
storage pool.
 
storage pool.
  
SOLUTION:
+
'''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.
 
  
-----------------------------------------------------------------------------------------------
+
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:
+
===Problem 3===
 +
'''ERROR:'''
 
LZ for one of the shares filed up and Greyhole stopped making copies of the files.
 
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
 
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.
+
on the 120GB SSD (sde) used for the OS. Moved all share's LZs to the 4th 3TB storage drive (sdd).
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.  
+
'''SOLUTION:''' 
Turn off the Watchdog option in the Setup > Advanced > Servers page, and then stop the service.
+
* (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.
  
Move the LZ from it's old path to the new path.  
+
* Stop the Samba service. Turn off the Watchdog option in the Setup > Advanced > Servers page, and then stop the service.
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.
+
* Stop the Greyhole service. Turn off the Watchdog option in the Setup > Advanced > Servers page, and then stop the service.
  
Repeat the last two steps for all the shares you'd like to relocate.
+
* Move the LZ from it's old path to the new path.  
 +
mv /var/hda/files/xshare /var/hda/files/drives/drive4/xshare
  
Restart the Greyhole service.
+
* 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.
Turn back on the Watchdog option in the Setup > Advanced > Servers page, and then start the  
 
service.
 
  
Restart the Samba service.
+
* Restart the Greyhole service. Turn back on the Watchdog option in the Setup > Advanced > Servers page, and then start the 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===
+
* Check Greyhole for possible errors.
* HP PROLIANT GEN8 MICROSERVER
+
greyhole --fsck
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
+
==References==
http://rainbow.chard.org/2013/01/30/how-to-align-partitions-for-best-performance-using-parted/
+
* ''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/

Latest revision as of 01:06, 15 September 2015

Warning.png WARNING
Amahi 7 for Fedora 19
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.

Contributed by user gdp.

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