<center>{{MessageBox|
backgroundcolor = #faa|
image =Warning.png|
heading =WARNING|
message = This is recommended only for ''Advanced'' users, proceed with caution.}}</center>
<div style="border: 1px solid #A3B1BF; padding: .8em 1em; background-color: #E6F2FF; margin: 0px 1em;">
IMPORTANT NOTES'''NOTE:''' The Amahi [https://www.amahi.org/apps/disk-wizard Disk Wizard] application (Amahi 8 or greater '''ONLY''') provides this capability from the Dashboard UI.
* This </div><br />The purpose of this tutorial is an '''advanced''' howto on how to add a drive to your HDA* This page needs a refresh to make sure it matches partitioning, formatting, and mounting hard drives in the Amahi server simple for those new script called hda-diskmount, based on the old scriptto Linux. Please edit this page if as you walk through you find issues
=Quickstart=A secondary In order to keep this process simple, it's important '''NOT''' to connect additional hard drive (fat32, ntfs, etcs) can be added for additional storage in your Amahi HDAuntil the end of the [[Adding_a_second_hard_drive_to_your_HDA#Preparation|Preparation]] step.
First thing's first, make sure your drive is detected by =Disclaimer=* [https://www.amahi.org Amahi] cannot be held responsible for any data breakage or destruction arising from the BIOS, connected properly and formatted properlyuse or misuse of this script. Once the BIOS sees We provide it, as a service in good will. You accept this automatically if you need to have it partitioneduse the script.
You can check this with the following command (run before and after connecting the * [http://en.wikipedia.org/wiki/GUID_Partition_Table GUID-partitioned] hard drives (USBsuch as those previously used in a Mac or have GPT partition tables) disk):are not supported in this tutorial.
dmesg* [http://en.wikipedia.org/wiki/GNU_nano nano] is used as the command-line text editor (refer to [http://www.howtogeek.com/howto/42980/the-beginners-guide-to-nano-the-linux-command-line-text-editor/ beginners guide to nano] as needed).
You'll see something along the lines of=Prerequisites=[[Open Terminal as root|In a Terminal, as root]], verify disk tools are installed by executing:<br />
USB Mass Storage device found at ..Fedora<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px; text-align: left"> dnf -y install pmount fuse fuse-libs ntfs-3g util-linux-ng parted nano</div>
followed by a line :'''NOTE:''' <code>yum</code> (deprecated) has been replaced with a <code>dnf</devcode> as the package manager for Fedora 23 and greater.Ubuntu <div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px; text-align: left"> sudo apt-get -y install gparted</sd<xdiv> device.
<ul><li>run the diskmounter script: <code>root@localhost # hda-diskmount</code><br>Answer "yes" to the prompt to make the drive world writable.</li><li>install pmount if you get an error'''NOTE: <code>root@localhost # yum -y install pmount<''' Hard drives must be formatted as '''MBR''' not '''GUID/code></li><li>try to run the script again: <code>root@localhost # GPT''' for ''hda-diskmount</code></li><li>reboot</li><li>check your /etc/fstab how the disk is mounted: <code>root@localhost # cat /etc/fstab</code> (it will usually be the last line that's added). Edit it to where you want ' to mount itwork correctly.</li></ul>
=Complete walkthroughPreparation=[[Open_Terminal_as_root|In terminal as root]], execute the following to capture current hard drive configuration:<div style="border: 1px solid #A3B1BF; padding: .5em 1em; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> ls -l /dev/disk/by-id/ > before.txt cat before.txt</div>
:EXAMPLE:
lrwxrwxrwx 1 root root 9 2010-02-18 03:24 ata-Hitachi_HDS722020ALA330_JK1131YAGDU37V -> ../../sda
lrwxrwxrwx 1 root root 10 2010-02-18 03:24 ata-Hitachi_HDS722020ALA330_JK1131YAGDU37V-part1 -> ../../sda1
Your new Power ''OFF'' the HDA and install/connect any additional hard drive can be configured to mount permanently using the hda-diskmounter script (thanks to Dennis Kaarsemaker and Luigi Capriottis). You can use this for adding a new fixed (internal) disk or an external USB<br /FireWire disk.>
* Make sure you have pmount installed: yum -y install pmount=Identify=* Execute the script as Power ''rootON'' and answer YES to the prompt to make the drive writable to all users.* Once complete, reboot HDA and collect data about the secondary new hard drive should automatically mountconfiguration. * As user ''root''Again, edit '''''/etc/fstab''''' save this to change location of shared ''//hda'' folders to the secondary drivea text file for reference. * To run the diskmounter script, in the directory where the file is located, do the following:
[[Open_Terminal_as_root|In a terminal as root]], execute the following to capture current hard drive configuration:<codediv style="border: 1px solid #A3B1BF; padding: .5em 1em; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> ls -l /dev/disk/by-id/ > after./Diskmountertxt cat after.shtxt</codediv>
This is what the script added for my drive:EXAMPLE: ''Added by diskmounter utility''lrwxrwxrwx 1 root root 9 2010-02-18 03:24 ata-Hitachi_HDS722020ALA330_JK1131YAGDU37V -> ../../sda ''lrwxrwxrwx 1 root root 10 2010-02-18 03:24 ata-Hitachi_HDS722020ALA330_JK1131YAGDU37V-part1 -> ../dev../sdb1 /varsda1 lrwxrwxrwx 1 root root 9 2010-02-18 03:24 ata-ST31000528AS_6VP08W65 -> ../hda../files vfat rw,user,fmask=0111,dmask=0000 0 0'' sdb
I changed second path to :'''FYI:''' IDE/var/hda/filesSATA hard drives will start with '''ata-''' to enable all shared files to be stored on the secondary and USB hard drive. This is the default path for drives will start with '''usb-'//hda'' file storage system.<br/>
If you get =Partition/Format=Compare the following error "bash: difference between before./Diskmountertxt and after.sh: Permission denied" try executing txt to determine the following without the commas:new hard drive(s) device name. This can be done automatically.
[[Open Terminal as root|In a Terminal, as root]], execute the following:<div style="border: 1px solid #A3B1BF; padding: .5em 1em; background-color: #E6F2FF; margin: $ chmod 755 Diskmounter.sh 3px 3px 1em 3px;">After executing that command you should be able to execute the Diskmounter diff before.sh scripttxt after.txt</div>
If you get something similar like "Disk /dev/dm:EXAMPLE: lrwxrwxrwx 1 root root 9 2010-02-0 doesn't contain a valid partition table" or "mount18 03: unknown file system type 'lvm2pv'" its because you have LVM's that 'fdisk' can not recognize, (or something like that) its nothing to worry about if you get that when executed the Diskmounter24 ata-ST31000528AS_6VP08W65 -> .sh script./../sdb
At this point, partition and format the hard drive(s) if they are new. For hard drive(s) that contain data to be preserved, skip to the [[Adding_a_second_hard_drive_to_your_HDA#Mount|Mount]] step.
=If =Command-line (Fedora)==To partition the script doesnhard drive(s), substitute sdX with hard drive device name, such as 't work for you='sdb'':
These instructions are adapted from [http[Open Terminal as root|In a Terminal, as root]], execute the following:<blockquote><div style="border:1px solid #A3B1BF; padding: .5em 1em; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> parted /dev/sdX</div></blockquote>Up to 2TB, at the ''(parted)'' prompt, enter:# mklabel msdos (answer ''yes'' if prompted)# mkpart primary 0% 100%# quit<br />Greater than 2TB, at the ''(parted)'' prompt, enter:# mklabel gpt (answer ''yes'' if prompted)# mkpart primary 0% 100%# quit<br /www>Verify the new partition was created:<div style="border: 1px solid #A3B1BF; padding: .5em 1em; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> ls -l /dev/disk/by-id/</div>:EXAMPLE: lrwxrwxrwx 1 root root 9 2010-02-18 03:24 ata-Hitachi_HDS722020ALA330_JK1131YAGDU37V -> .mjmwired.net/resources../mjmsda lrwxrwxrwx 1 root root 10 2010-fedora02-f918 03:24 ata-Hitachi_HDS722020ALA330_JK1131YAGDU37V-part1 -> .html./../sda1 lrwxrwxrwx 1 root root 9 2010-02-18 03:24 ata-ST31000528AS_6VP08W65 -> ../../sdb <span style="color:#ntfs here]FF0000">'''lrwxrwxrwx 1 root root 9 2010-02-18 03:24 ata-ST31000528AS_6VP08W65-part1 -> ../../sdb1'''</span>
If youThe new partition is named sdX1 (i.e. sdb1 in <span style="color:#FF0000">'''RED''re planning to mount a NTFS disk, you'll need to make sure you have ntfs-3g, fuse and fuse libs all installed</span>). If not, login as root and run:
Format the partition, execute (can substitute ext3):<blockquote><div style="border: 1px solid #A3B1BF; padding: .5em 1em; background-color: #E6F2FF; margin: $ yum install fuse fuse-libs ntfs3px 3px 1em 3px;"> mkfs.ext4 -3gj /dev/sdX1</div></blockquote>
Then use fdisk to find the disk by running fdisk -l (this is a lower case L not a 1). You may have to give Repeat the path ([[Adding_a_second_hard_drive_to_your_HDA#Partition/sbinFormat|Partition/fdisk) Format]] step for each hard drive to make it workbe partitioned and formatted.
$ /sbin/fdisk -l==GParted (Ubuntu)==From the HDA desktop (or using VNC), [[Open_Terminal_as_root|In a terminal as root]] and type '''gparted''' to launch the application.
This should return the needed information about all your disksHere's a general introduction on [http://www.youtube.com/watch?v=vdWkdrnNGRg YouTube]. Look out for your newly attached diskJust use ''ext3'' or ''ext4'' instead of ''fat32'' if you follow that tutorial. In my case in among the results I can find:
Disk /dev/sdbFor drives > 2.0 TB, following these steps: 120.0GB 120034123776 bytes255 heads, 63 sectors/track* Choose hard disk in the dropdown menu (top right)* Select Device > Create Partition Table.... etc etc.> Advanced > (Choose 'gpt')* Create partition
I know my disk is 120GB so that's the right one. This tells us the name of the new disk which is "sdb" in my case. Running
$ sudo /sbin/fdisk -lu /dev/sdb | grep NTFS
:<b>NOTE:</b> [http://gparted..will give you a break down of partitions. In my case, there's just one partitionorg GParted] supports GUID-partitioned drives, sdb1however, so this is the partition I will hda-mountscript do not support currently.
Now we can go on to create Repeat the mount points if needs be. But because my disk contains all my music, I want it to be mounted as if it were my local "Music" folder, so [[Adding_a_second_hard_drive_to_your_HDA#Partition/Format|Partition/Format]] step for me the mount point already exists. But if just want each hard drive to access your disk easily you could just as easily mount it anywhere. Commonly mount points are put in either /mnt/ or /media/. It doesn't matter where - just be consistent when you are doing thispartitioned and formatted. To do this run these commands as root: $ cd /mnt/ $ mkdir my_ntfs_disk
Substituting my_ntfs_disk =Mount=Mount the hard drive(s)/partition(s) for whatever you want to call ituse in the HDA.
Now we can mount the disk in the desired location. Again as root run this command:'''NOTE:''' $ mount /dev/sdb1 /mnt/my_ntfs_drive If you prefer not to use ''hda-t ntfsdiskmount'', refer to [[Adding_a_second_hard_drive_to_your_HDA#hda-3g diskmount|Troubleshooting ''hda-r -o umask=0222diskmount]].
This command [[Open Terminal as root|In a Terminal, as root]], execute the following(it will make create drive1, drive2, etc and mount the mounted hard drive read only. That'(s great if that's what you want, but for me, since I want to save my music there, I need it to be read and writeable) automatically):<div style="border: 1px solid #A3B1BF; padding: . For this you'll use5em 1em; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> hda-diskmount</div>
:EXAMPLE: $ mount **************************************************************** Ignoring /dev/sda1 - already in /etc/fstab or mounted **************************************************************** Mounted /dev/<strong style="color:green">sdb1 </strong> as '<strong style="color:red">/var/hda/files/drives/drive1</mntstrong>' (read-write) You may want your system to mount it every time you boot. To do so, add this line VERY CAREFULLY to /my_ntfs_drive etc/fstab and reboot: <strong style="color:blue">UUID=547b073d-e591-t ntfs4913-3g b4fb-rw 7c5084353979 /var/hda/files/drives/drive1 ext4 defaults 1 2</strong> **************************************************************** All Linux, Windows and Mac partitions on non-o umask=0000removable disks have been mounted
or The line in my case<span style="color:#0000FF">'''BLUE'''</span> is what you need to copy and add to the bottom of ''/etc/fstab''. This is '''REQUIRED''' for the hard drive(s) to be permanently mounted.
There will be multiple lines for multiple hard drive(s) added. $ mount /dev/sdb1 /home/USERNAME/Music -t ntfs-3g -rw -o umask=0000Ensure you copy and add '''ONLY''' those which were not present in the ''before.txt'' file.
because I want it mounted in my "Music" fileThe new hard drive storage space can be used for [[Adding_a_second_hard_drive_to_your_HDA#All Shares|All Shares]], [[Adding_a_second_hard_drive_to_your_HDA#Some Shares|Some Shares]], or the [[Adding_a_second_hard_drive_to_your_HDA#Greyhole Storage Pool|Greyhole Storage Pool]]. Follow the guidance below based on desired usage for each hard drive.
Remember in both of these commands you==All Shares==Host 'll need to substitute sdb1 with whatever the partition name/number is ''ALL''' shares on your machine. And in the second command USERNAME is your linux usernamenew hard drive.
If you now go Move all the shares data to your desktopthe new drive, you should see replacing path in '''<span style="color: red;">RED</span>''' with the drive is mounted there. Click on it to see path from the contents are there. If you've mounted it as say So far so good? Ok, let's continuehda-diskmount'' output line in <span style="color:#0000FF">'''BLUE'''</span>.<br />
What you've achieved so far is [[Open Terminal as root|In a temporary mounting of Terminal, as root]], execute the drivefollowing:<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> mv /var/hda/files/partition. That shows it can be done but you'll need to make it permanent otherwise when you reboot it'll disappear again. For this you need to edit fstab with your favourite text editor. As root run* <strong style="color:red">/var/hda/files/drives/drive1/</strong></div>
:'''NOTE:''' $ gedit There may be a '''WARNING''' that can be ignored indicating ''/etcvar/fstabhda/files/drives cannot be moved to a subdirectory of itself''.
A text editor window will pop upUnmount the new hard drive:<div style="border: 1px solid #A3B1BF; padding: . Enter this on 5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> umount /var/hda/files/drives/drive1/</div>Mount the new hard drive permanently as ''/var/hda/files'' by editing ''/etc/fstab'':<div style="border: 1px solid #A3B1BF; padding: .5em 1em; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> nano /etc/fstab</div>Add the last lineto ''/etc/fstab'' provided in the ''hda-diskmount'' output in '''<span style="color:blue;">BLUE</span>''' and change the second value (path) to ''/var/hda/files''.
:EXAMPLE hda-diskmount output (Original): <span style="color: blue;">UUID=547b073d-e591-4913-b4fb-7c5084353979 <strong>/devvar/sdb1 hda/mntfiles/my_ntfs_drive ntfsdrives/drive1</strong> ext4 defaults 1 2</span>:EXAMPLE hda-3g ro,diskmount output (Modified): UUID=547b073d-e591-4913-b4fb-7c5084353979 <strong>/var/hda/files</strong> ext4 defaults,umask=0222 0 01 2
* change '''ro to rw':EXAMPLE /etc/fstab: # # /etc/fstab # Created by anaconda on Sat Nov 9 01:46:39 2013 # # 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 # UUID=1ebbf241-528c-465e-889f-acc15400dd8c / ext4 defaults 1 1 UUID=087b15a5-c3ca-4615-b6ee-bf5f399a803e /boot ext4 defaults 1 2 UUID=75346b8e-b162-458c-b0e9-a8d48ec2bc82 swap swap defaults 0 0 UUID=ad85eeb9-18f0-4b85-9bfa-b88a5d1489b3 swap swap defaults 0 0 <span style="color:#0000FF">'''umaskUUID=0222 to umask=0000547b073d-e591-4913-b4fb-7c5084353979 /var/hda/files ext4 defaults 1 2''' if you want it to be writable</span>Finally, execute the following:<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> mount -a ls /var/hda/files/</div>The last command will display contents of the new hard drive. All shares are now located on the new hard drive.
You==Some Shares==Host 'll need to do this for every partition, so if you have several partitions ''SOME''' shares on sdb, the last lines of you fstab may look something like thisnew hard drive.
/dev/sdb1 /mnt/my_ntfs_drive_C ntfs-3g ro,defaults,umaskMove some shares data to the new drive by executing the following command (replace path in '''<span style=0222 0 0/dev/sdb2 "color: red;">RED</mnt/my_ntfs_drive_D ntfsspan>''' with the path from the ''hda-3g ro,defaults,umaskdiskmount'' output line in <span style=0222 0 0/dev/sdb3 "color:#0000FF">'''BLUE'''</mntspan>; sharename will be the share to move to the new drive).<br /my_ntfs_drive_E ntfs-3g ro,defaults,umask=0222 0 0>
When you reboot[[Open Terminal as root|In a Terminal, you should find your data where you want itas root]], execute the following:<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> mv /var/hda/files/<strong>sharename</strong> <strong style="color:red">/var/hda/files/drives/drive1/</strong></div>Repeat the process with every share to be moved to the new drive.
Unmount the new hard drive: <div style= Guide to Adding a Hard Drive to Fedora ="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> umount /var/hda/files/drives/drive1</div>
This is a good guideMount the new hard drive permanently by editing ''/etc/fstab'': <div style="border: 1px solid #A3B1BF; padding: .5em 1em; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> nano /etc/fstab</div>Add the line to ''/etc/fstab'' provided in the ''hda-diskmount'' output in '''<span style="color: blue;">BLUE</span>'''.:EXAMPLE /etc/fstab: # # /etc/fstab # Created by anaconda on Sat Nov 9 01:46:39 2013 # # Accessible filesystems, by reference, are maintained under '/dev/disk' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for advanced users, to adding a more info # UUID=1ebbf241-528c-465e-889f-acc15400dd8c / ext4 defaults 1 1 UUID=087b15a5-c3ca-4615-b6ee-bf5f399a803e /boot ext4 defaults 1 2 UUID=75346b8e-b162-458c-b0e9-a8d48ec2bc82 swap swap defaults 0 0 UUID=ad85eeb9-18f0-4b85-9bfa-b88a5d1489b3 swap swap defaults 0 0 <span style="color:#0000FF">'''UUID=547b073d-e591-4913-b4fb-7c5084353979 /var/hda/files/drives/drive1 ext4 defaults 1 2'''</span>Verify the hard drive to Fedora:(s)/partition(s) configuration is correct in ''/etc/fstab''.
Next, execute the following:<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> mount -a http:ls /var/hda/fedoranews.orgfiles/tchungdrives/storagedrive1</div>The last command will display contents of the new hard drive. All shares are now located on the new hard drive.
And a good fedora 9 guide here, including a section on adding a '''<u>HDA Dashboard Update</u><br />'''The location of each share that was moved to the new hard drive here:will need updated. Select ''Setup'' followed by the ''Shares'' section. Expand each share that was moved individually and change the location (path) accordingly.
httpFor example, the original movies location was <span style="color:red">/var/www.mjmwired.nethda/files/movies</span> but the new location might be <span style="color:blue">/var/hda/files/drives/drive1/resourcesmovies</mjm-fedora-f9span>.html
=Partitioning a Brand New Disk=Repeat for any other shares that you have moved to the new hard drive. Verify these shares are accessible from another machine within your network.
'''NOTE:''' If you have any services depend on the location of a blankmoved share, unpartitionedensure they are configured to use the new share location. For example, driveif [https://www.amahi.org/apps/dlna DLNA] is installed, you have check the configuration file to 1) partition verify it can find the new share location. Secondly, validate that that all such services start correctly and 2) format behave as expected. If the service doesn't start, itmay be that it's looking for a specific share location during the service start up.
If you want to move this disk to windows machines, you may want to format it as NTFS. To do this, it's best if you do that in Windows==Greyhole Storage Pool==Use new hard drive for [[Storage_pooling|Greyhole Storage Pool]].
[[Open Terminal as root|In a Terminal, as root]], mount the new hard drive permanently by editing ''/etc/fstab'':
<div style="border: 1px solid #A3B1BF; padding: .5em 1em; background-color: #E6F2FF; margin: 3px 3px 1em 3px;">
nano /etc/fstab
</div>
Add the line to ''/etc/fstab'' provided in the ''hda-diskmount'' output in '''<span style="color: blue;">BLUE</span>'''.
:EXAMPLE /etc/fstab:
#
# /etc/fstab
# Created by anaconda on Sat Nov 9 01:46:39 2013
#
# 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
#
UUID=1ebbf241-528c-465e-889f-acc15400dd8c / ext4 defaults 1 1
UUID=087b15a5-c3ca-4615-b6ee-bf5f399a803e /boot ext4 defaults 1 2
UUID=75346b8e-b162-458c-b0e9-a8d48ec2bc82 swap swap defaults 0 0
UUID=ad85eeb9-18f0-4b85-9bfa-b88a5d1489b3 swap swap defaults 0 0
<span style="color:#0000FF">'''UUID=547b073d-e591-4913-b4fb-7c5084353979 /var/hda/files/drives/drive1 ext4 defaults 1 2'''</span>
Verify the hard drive(s)/partition(s) configuration is correct in ''/etc/fstab''.
To make a partition, it's best Refer to use [[Greyhole#Amahi 6|Greyhole (as rootAmahi 6)]] for Ubuntu or [[Greyhole#Amahi 7|Greyhole (Amahi 7)]] for Fedora to configure the [[Storage_pooling|Greyhole Storage Pool]].
gparted=Verify/Test=Verify the hard drive/partition is mounted.
[[Open Terminal as root|In a Terminal, as root]], execute the following:<div style="border: 1px solid #A3B1BF; padding: .5em 1em; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> df -h</div> :EXAMPLE: Filesystem Size Used Avail Use% Mounted on /dev/sda5 16G 4.3G 11G 30% / devtmpfs 493M 0 493M 0% /dev tmpfs 498M 84K 498M 1% /dev/shm tmpfs 498M 364K 498M 1% /run tmpfs 498M 0 498M 0% /sys/fs/cgroup tmpfs 498M 1.1M 497M 1% /tmp /dev/sda1 190M 75M 102M 43% /boot /dev/sdb1 917G 398G 473G 46% /var/hda/files/drives/drive1 The hard drive(s) and the mount point (path) should be listed for each hard drive added. If not, then further investigation will be needed to determine the problem.<br /> =Tips===Mount Order==The following guide will outline how to manually order hard drives and mount them automatically on boot. [[Open Terminal as root|In a Terminal, as root]], executing the following command to obtain the UUID for each hard drive:<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> blkid</div>:EXAMPLE: /dev/sda1: LABEL="Seagate-Alpha2TB" UUID="55d9333f-d801-425a-b2af-d65c5966d56f" TYPE="ext4" /dev/sdb1: LABEL="Seagate-Beta2TB" UUID="5bd5498f-30c1-4780-948e-ca46656507d2" TYPE="ext4" /dev/sdc1: LABEL="WD-Charlie2TB" UUID="a7337504-376a-4d36-9f7a-1a24c0f55fbd" TYPE="ext4" /dev/sdd1: LABEL="WD-Delta2TB" UUID="8d881dcb-8de3-4621-b9bd-00025196868a" TYPE="ext4" /dev/sde1: LABEL="root" UUID="4d6f8004-d190-4234-a03b-b68de988abf0" TYPE="ext4" /dev/sde3: LABEL="home" UUID="d0531fa1-9311-4d53-b838-f35898adbd98" TYPE="ext4" /dev/sde5: LABEL="swap" UUID="3c39206c-ba60-47ff-a1fe-f5821b2ab543" TYPE="swap" In this case, there are four data drives (sda1, sdb1, sdc1, sdd1) and the Operating system assigned to a fifth drive, sde. Take note of the UUID's for each drive. Easiest to cut and paste UUID's straight from the terminal. Edit ''/etc/fstab'' to mount each drive:<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> nano /etc/fstab</div>Then '''very carefully''' add the following line for each disk into the end of the fstab file. Ensure correct UUID, hard drive number and hard drive file system (ext4 in this case) are added. :EXAMPLE: UUID=55d9333f-d801-425a-b2af-d65c5966d56f /var/hda/files/drives/drive1 ext4 defaults 1 2 It should look something like the following when lines are added for each of the five drives in this example. :EXAMPLE: # Mounting Greyhole Drives for Drive Pool. # # Drive1 = Seagate-Alpha2TB in Microserver Bay 1 from left UUID=55d9333f-d801-425a-b2af-d65c5966d56f /var/hda/files/drives/drive1 ext4 defaults 1 2 # # Drive2 = Seagate-Beta2TB in Microserver Bay 2 from left UUID=5bd5498f-30c1-4780-948e-ca46656507d2 /var/hda/files/drives/drive2 ext4 defaults 1 2 # # Drive3 = WD-Charlie2TB in Microserver Bay 3 from left UUID=a7337504-376a-4d36-9f7a-1a24c0f55fbd /var/hda/files/drives/drive3 ext4 defaults 1 2 # # Drive4 = WD-Delta2TB in Microserver Bay 4 from left UUID=8d881dcb-8de3-4621-b9bd-00025196868a /var/hda/files/drives/drive4 ext4 defaults 1 2 # # Drive5 = 250GB OS Drive mounted in Optical Drive bay UUID="4d6f8004-d190-4234-a03b-b68de988abf0 /var/hda/files/drives/drive5 ext4 defaults 1 2 # # :'''NOTE:''' Lines beginning with # are comments where the remainder of the line is ignored Verify there are no issues by executing the following:<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> mount -a</div>If there are errors,most likely a line was not added properly. If this is not corrected, the machine may not boot and hang trying to mount the hard drives! Once there are no errors, reboot machine:<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> reboot</div>Verify the hard drives have successfully mounted in the '''HDA Dashboard'''. If all drives mounted successfully, it should look something like this (Ubuntu): :EXAMPLE:[[File:Gstreet_greyhole_pool.png|options|caption]] ==Bad Blocks==Optionally, you can test your new drive for bad blocks.<br/> :'''NOTE:''' This can take a ''long'' time to complete! Recommend starting it in the evening so it will be completed the next day. [[Open Terminal as root|In a Terminal, as root]], execute following command (replace '''sdb1''' with the (<strong style="color:blue">BLUE</strong>) value you received from ''hda-diskmount''):<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> e2fsck -cn /dev/'''sdb1'''</div>You'll receive a message stating '''WARNING!!!''' ''Running e2fsck on a mounted filesystem may cause SEVERE filesystem damage. Do you really want to continue (y/n)?''<br/> Answer ''yes''. The <code>-cn</code> option we're using can safely be used on mounted file systems.==Spin Down Hard Drives== Low power is a good thing to have in servers. If you do not use your fedora desktopserver very often, you may want to force the hard drives to spin down faster than the default. Here is how. First ensure ''hdparm'' package is installed: sudo dnf install hdparm To force to spin down after 10 minutes of being idle, add these lines to <code>/etc/rc.local</code>:<pre># power drives down after 10 minutes idle/sbin/hdparm -S120 /dev/sda/sbin/hdparm -S120 /dev/sdb...</pre> Most drives will power down on their own without doing this. Once stopped, the drive may take as long as 30 seconds to respond to a subsequent disk access, though most drives are much quicker. The encoding of the -S timeout value is somewhat peculiar. A value of zero means "timeouts are disabled": the device will not automatically enter standby mode. Values from 1 to 240 specify multiples of 5 seconds, yielding timeouts from 5 seconds to 20 minutes. Values from 241 to 251 specify from 1 to 11 units of 30 minutes, yielding timeouts from 30 minutes to 5.5 hours. A value of 252 signifies a timeout of 21 minutes. A value of 253 sets a vendor-defined timeout period between 8 and 12 hours, and the value 254 is reserved. 255 is interpreted as 21 minutes plus 15 seconds. Note that some older drives may have very different interpretations of these values. It may make the system run cooler and power efficient (especially on a Home Server you are rarely using all of the pool drives at the same time). =Troubleshooting===hda-diskmount==If ''hda-diskmount'' does not mount the hard drive or you prefer to do itmanually, complete the following steps: Create the mount point (choose one '''NOT'''s graphical in use) [[Open Terminal as root|in a Terminal, as root]] by executing the following:<blockquote><div style="border: 1px solid #A3B1BF; padding: .5em 1em; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> mkdir -p /var/hda/files/drives/drive1</div></blockquote>Identify the hard drive to mount and copy the UUID from the output that corresponds to the hard drive (i.e. sdb)<blockquote><div style="border: 1px solid #A3B1BF; padding: .5em 1em; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> ls -l /dev/disk/by-uuid/</div></blockquote> :EXAMPLE: lrwxrwxrwx 1 root root 10 Dec 29 18:10 1b8597e0-5d95-4474-b093-53099c8c81c9 -> ../../sda1 lrwxrwxrwx 1 root root 10 Dec 29 18:10 1c161033-c695-4291-aba1-257d3987edf7 -> ../../dm-0 lrwxrwxrwx 1 root root 10 Dec 29 18:10 b7017251-cb54-438b-92a3-781537c565e6 -> ../../sdb lrwxrwxrwx 1 root root 10 Dec 29 18:10 c1fe62b3-41dc-4a67-8a6b-09f90b7893ba -> ../../dm-1 lrwxrwxrwx 1 root root 10 Dec 29 18:10 e0f5a9bd-f52b-431e-89af-61da70659bdd -> ../../dm-2 lrwxrwxrwx 1 root root 10 Dec 29 18:10 <span style="color:#FF0000">'''547b073d-e591-4913-b4fb-7c5084353979'''</span> -> ../../sdb1 :The UUID for sdX1 (i.e. sdb1 is <span style="color:#FF0000">'''RED'''</span>).Add the following to the end of ''/etc/fstab'', replacing the UUID as captured in the previous step<blockquote><div style="border: 1px solid #A3B1BF; padding: .5em 1em; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> nano /etc/fstab</div></blockquote>:EXAMPLE: # # /etc/fstab # Created by anaconda on Sat Nov 9 01:46:39 2013 # # 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 # UUID=1ebbf241-528c-465e-889f-acc15400dd8c / ext4 defaults 1 1 UUID=087b15a5-c3ca-4615-b6ee-bf5f399a803e /boot ext4 defaults 1 2 UUID=75346b8e-b162-458c-b0e9-a8d48ec2bc82 swap swap defaults 0 0 UUID=ad85eeb9-18f0-4b85-9bfa-b88a5d1489b3 swap swap defaults 0 0 <span style="color:#0000FF">'''UUID=547b073d-e591-4913-b4fb-7c5084353979 /var/hda/files/drives/drive1 ext4 defaults 1 2'''</span> :The new entry will help make decisionsbe mounted as ''/var/hda/files/drives/drive1'' (i.e. sdb1 in '''<span style="color:#0000FF">BLUE</span>''') Mount the hard drive<blockquote><div style="border: 1px solid #A3B1BF; padding: .5em 1em; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> mount -a</div></blockquote>:If all goes well, there should not be any output. If there are errors, stop and diagnose the problem. Accomplish [[Adding_Hard_Drives_101#Verify/Test|Verify/Test]] step to ensure the hard drive is properly mounted.<br /> Repeat this process for each hard drive to be mounted. ==Partitions > 2.1TB==If by following this tutorial you are unable to mount hard drives with partitions > 2.1TB, refer to the [[Partitions_Over_2.1_TB|Partitions over 2.1TB]] guidance. =Help=If you need assistance, please post in the [https://forums.amahi.org Amahi Forums] or receive '''LIVE''' support on the [http://talk.amahi.org Amahi IRC channel].