Changes

From Amahi Wiki
Jump to: navigation, search
no edit summary
<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;">
'''NOTE:''' In the future, Amahi [https://www.amahi.org/apps/disk-wizard Disk Wizard] application (under in ''Development'') will provide this capability from the Dashboard.
</div>
<br />
More The purpose of this tutorial is to make partitioning, formatting, and mounting hard drives can be added in your the Amahi HDA server simple for additional storage space. We'll detail how to add such hard drives, and how to put them those new to good useLinux.
'''<big><u>Alternative Tutorial</u></big>'''* ''Rookie'' - [[Adding_Hard_Drives_101|Adding hard drives 101]] The scenario is to have an HDA with a simple guide designed single hard drive, but want to connect additional hard drive(s) for users with little or no Linux experienceincreased storage. Examples provided are for adding a single hard drive.
 In order to keep this process simple, it's important '''NOTE:NOT''' Recommend you choose <u>ONLY</u> one tutorial to followconnect additional hard drive(s) until the end of the [[Adding_a_second_hard_drive_to_your_HDA#Preparation|Preparation]] step. Missing steps between them may corrupt your HDA.
=Disclaimer=
* GUID-partitioned drives (such as drives previously in a Mac or have GPT partition tables) are not supported in this tutorial.
* ''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).
 
=OS Detects Drive =
 
[[Open Terminal as root|In a Terminal, as root]], and type the following command:
 
<div style="border: 1px solid #A3B1BF; padding: .5em 1em; background-color: #E6F2FF; margin: 3px 3px 1em 3px;">
ls -1 /dev/disk/by-id/ | egrep -v "part|scsi"
</div>
 
Look for the line that matches the hard drive you added.
 
IDE and SATA hard drives will start with '''ata-''' and USB hard drives will start with '''usb-'''.<br/>
Look for your hard drive model and serial number.
 
Example:
 
<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;">
[gb@hda ~]$ ls -1 /dev/disk/by-id/ | egrep -v "part|scsi"
ata-Hitachi_HDS722020ALA330_JK1131YAGDU37V
ata-ST31000528AS_6VP08W65
ata-ST3750640A_3QD0LJN8
ata-ST3750640A_5QD27A57
ata-WDC_WD10EADS-00L5B1_WD-WCAU4C700358
usb-ST310003_33AS_9E1CA6FFFFFF-0:0
usb-ST375064_0A_2009031309E2-0:0
</div>
=Prerequisites=
[[Open Terminal as root|In a Terminal, as root]], verify disk tools are installed by executing:<br />
Verify disk tools are installed by executing: * Fedora
<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px; text-align: left">
yum -y install pmount fuse fuse-libs ntfs-3g util-linux-ng parted nano
</div>
 * 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
:'''NOTE:''' Drives must be formatted as '''MBR''' not '''GUID/GPT''' for hda-diskmount to recognize the disk.
=Partition and Format Hard DrivePreparation=[[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><br />
This step is optional, and should only be executed if you want to delete the content of your new hard drive, or if the hard drive has not yet been formatted: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
You should (unless you have a good reason not to) use GParted to partition Power ''OFF'' the HDA and format your install/connect any additional hard drive(s).<br/>Not having X installed would qualify as a good reason! In such cases, either use SSH X11 Forwarding (Google that if you'd like to use this), or [[Adding_a_second_hard_drive_to_your_HDA#Using_cfdisk|use cfdisk]] from a [[Open Terminal as root|Terminal, as root]].
You=Identify=Power 'll probably want to create a single partition, and format it as ''ext3ON''the HDA and collect data about the new hard drive configuration.<br/>Note that Windows can't read ext3 partitions Again, so if you want dual-boot Windows on your Amahi PC, or if you intend to connect save this hard drive to a Windows computer later, you should format as NTFS instead, and you should do that on Windows before you connect the drive in your HDA.<br/>Remember that using NTFS partitions on Linux will be slower that using ext3 partitions, so you should only use NTFS if you really need ittext file for reference.<br/>
To know what device (/dev/sdX) you need to partition and format, use the following command, in a [[Open Terminal as rootOpen_Terminal_as_root|Terminal, In a terminal as root]], execute the following to capture current hard drive configuration: <div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> ls -l /dev/disk/by-id/> after.txt cat after.txt</div> Find the row corresponding to your hard drive, and look at the end of the line to identify the correct device to use.<br />
Example:<div style="borderEXAMPLE: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"><small> [gb@hda ~]$ ls -l /dev/disk/by-id/ total 0
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
lrwxrwxrwx 1 root root 9 2010-02-18 03:24 ata-ST31000528AS_6VP08W65 -> ../../sdb
</small>
</div>
In the above example, /dev/sdb would be what I would select in GParted (or use on the cfdisk command). sda in my primary hard drive, and sdb my second hard drive.
==Using GParted (Ubuntu) ==From the HDA desktop (or using VNC), [[Open Terminal as root]] '''TIP:''' IDE/SATA hard drives will start with '''ata-''' and type USB hard drives will start with '''gpartedusb-''' to launch the GParted application.<br/>
Select =Partition/Format=Compare the difference between before.txt and after.txt to determine the new hard drive(s) device (name. This can be done automatically by executing:<div style="border: 1px solid #A3B1BF; padding: .5em 1em; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> diff before.txt after.txt</devdiv><br /sdX) that you found above.>
In the above example, :EXAMPLE: lrwxrwxrwx 1 root root 9 2010-02-18 03:24 ata-ST31000528AS_6VP08W65 -> ../dev../sdb would be what I would select in GParted.
There At this point, partition and format the hard drive(s) if they are many easy new. For hard drive(s) that contain data to follow guides online on how to use GParted. You should Google for onebe preserved, skip to find one that seems clear to youthe [[Adding_Hard_Drives_101#Mount|Mount]] step.
Here==Command-line (Fedora)==To partition the hard drive(s), execute the applicable commands (substitute sdX with hard drive device name, such as ''s a general introduction on [httpsdb'')://www.youtube.com/watch?v=vdWkdrnNGRg YouTube]. Just use ext3 or ext4 instead of fat32 in you follow that tutorial.
If you have a drive <blockquote> 2<div style="border: 1px solid #A3B1BF; padding: .0 TB5em 1em; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> parted /dev/sdX</div></blockquote><br />* Up to 2TB, there is an in-depth guide below at the ''(that may be outdatedparted). Instead'' prompt, it is possible to use GParted with the following stepsenter::# mklabel (answer ''yes'' when prompted):# mkpart primary 0% 100%:# quit<br />* select Greater than 2TB, at the correct drive in the dropdown on the top right of GParted''(parted)'' prompt, enter:* click Device > Create Partition Table... > Advanced > :# mklabel gpt (Choose answer ''yes'gpt'when prompted)* then create your partition as normally instructed:# mkpart primary 0% 100%** I use :# quit<br /ext4** add an appropriate label>
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-uuid/
</div><br />
: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
<span style="color:#FF0000">'''lrwxrwxrwx 1 root root 10 Dec 29 18:10 547b073d-e591-4913-b4fb-7c5084353979 -> ../../sdb1'''</span>
<b>NOTE:</b> GParted supports GUID-partitioned drives, however, these directions and script do not support it at the moment. ==Using cfdisk==From a [[Open Terminal as root|terminal, as root]], type '''cfdisk /dev/sdX''' to launch the cfdisk application. If you have a GUID-partitioned drive, cfdisk will complain. GUID partitions are not supported. Make sure to replace /dev/sdX with the actual device The new partition is named sdX1 (egi. /dev/sdb) that you found above. If your hard drive contains existing partitions, select them one by one at the top (using up/down arrow keys), then select the '''[ Delete ]''' action (using the left/right arrow keys), then hit ENTER. You should now only have Free Space listed at the tope.sdb1 in <br/span style="color:#FF0000">Select the '''[ New ]RED''' action, and accept the default (Primary, and size). You should now have a single partition listed at the top, of type Linux.<br/span>Select the '''[ Write ]''' action, then '''[ Quit ]'''. Now that you partitioned your drive, you need to format your newly created partition).<br/>To format as EXT3, use this command:
Format the partition, execute (can substitute ext3):<blockquote><div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> mkfs.ext3 ext4 -j /dev/sdX1</div></blockquote><br />
Replace ext3 with ext4 in Repeat the above command to format your partition as EXT4 instead of EXT3. '''/dev/sdX1''' in the above command refers to the partition your created in cfdisk.<br/>Go back in cfdisk, and check the ''Name'' column if you're unsure.<br/>If you see ''sdb1'' in the name column, you should use '''/dev/sdb1''' in the above command. ==Partition over 2.1TB==[[Partitions_Over_2.1_TB|Here is a work around]] for drives with partitions over 2.1TB like the new 3 & 4TB TB drives. =Mount Hard Drive= ==hda-diskmount script==A script is provided with Amahi that will look for unmounted partitions in your system, and mount any it finds. [[Open Terminal as root|In a Terminal, as root]], type the following command: <div style="border: 1px solid Adding_a_second_hard_drive_to_your_HDA#A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> hda-diskmount<Partition/div> Example:<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px; text-align: left;"><small> [root@hda ~]$ hda-diskmount **************************************************************** Ignoring /devFormat|Partition/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</strong>' (read-write) You may want your system to mount it every time you boot. To do so, add this line VERY CAREFULLY to /etc/fstab and reboot: <strong style="color:blue">UUID=9d972abc-1639-44df-a60e-668618d40236 /var/hda/files/drives/drive1 ext4 defaults 1 2</strong> **************************************************************** All Linux, Windows and Mac partitions on non-removable disks have been mounted</small></div> Do '''not''' edit /etc/fstab just yet. What you'll need to add there will depend on how you want to use the extra storage. More about that below.<br/>Just note down the information in bold (green, red and blue). We'll use them below. Note about ext4 in the blue line above: that doesn't necessarily mean your partition is formatted as ext4. It means the ext4 driver will be used to mount your partition. Since that driver is backward compatible, it can be safely used to mount ext2, ext3 and ext4 partitions. If you get something like ''Disk /dev/dm-0 doesn't contain a valid partition table'' or ''mount: unknown file system type 'lvm2pv''' its because you have LVM's that 'fdisk' can not recognize (or something similar). It's nothing to worry about if you get that when executing the hda-diskmount script. :'''NOTE:''' If hda-diskmount does not recognize your new drive and you are trying to add a GPT partitioned 2+TB drive, you may need to edit your hda-diskmount script. You can a fix for this issue at this [https://forums.amahi.org/viewtopic.php?f=15&t=2326&p=11617 forum threadFormat]. :Failure message to recognize GPT drive:<blockquote><div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px; text-align: left;"><small> [root@hda ~]$ hda-diskmount **************************************************************** Ignoring /dev/sdf1 - already mounted Ignoring /dev/sdf1 - already in /etc/fstab as UUID=b8c125e3-4199-4b56-a566-397fdd8bab8a **************************************************************** No usable Linux, Windows or Mac partitions found on your disks.</small></div></blockquote> :How to fix /usr/sbin/hda-dismount<blockquote><div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px; text-align: left;"><small> # Now step for the real work drivesntfs=`fdisk -l 2> /dev/null | grep -i 'ntfs' | awk -F '/| ' '{print $3}'` drivesfat=`fdisk -l 2> /dev/null | grep -i 'fat32' | awk -F '/| ' '{print $3}'` driveshfs=`fdisk -l 2> /dev/null | grep -i 'HFS' | awk -F '/| ' '{print $3}'` drivesext=`fdisk -l 2> /dev/null | <strong style="color:red">egrep -iw 'Linux|GPT'</strong> | egrep -v 'swap|LVM' | awk -F '/| ' '{print $3}'`</small></div></blockquote> If you have changed the order of your installed each hard drives, hda-diskmount may return the following message: <div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;">Ignoring /dev/sda1 - already in /etc/fstab as /dev/sda1This device appears drive to be commented out of your /etc/fstab. You will need to remove it from there for hda-diskmount to be able to mount itpartitioned and formatted.</div>
This might occur if you have made changes to the drive configuration order after you installed Amahi==[http://gparted. If you want to stay with org GParted] (Ubuntu)==From the reconfigured drive orderHDA desktop (or using VNC), instructions on how to fix this are in [[Adding_a_second_hard_drive_to_your_HDA#Change_Disk_Mount_OrderOpen_Terminal_as_root|Change Disk Mount OrderIn a terminal as root]] section belowand type '''gparted''' to launch the application.
Here's a general introduction on [http://www.youtube.com/watch?v==Test Hard Drive==Optionally, you can test your new drive for bad blocksvdWkdrnNGRg YouTube].<br/>Note that this step can take a Just use ''ext3'' or ''ext4''instead of 'long'fat32' time to complete! You'll probably want to start it in the evening, to have it completed in the morningif you follow that tutorial.
To do soFor drives > 2.0 TB, [[Open Terminal as root|following these steps:* Choose hard disk in a Terminal, as root]], type the following commanddropdown menu (top right)* Select Device > Create Partition Table... Replace <strong style="color:green">sdb1</strongAdvanced > with the (greenChoose 'gpt') value you received from hda-diskmount.* Create partition
:<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"b>e2fsck -cn /dev/<strong style="colorNOTE:green">sdb1</strongb>< [http://div>gparted.org GParted] supports GUID-partitioned drives, however, the hda-mount script do not support currently.
You'll receive a warning that says "WARNING!!! Running e2fsck on a mounted filesystem may cause SEVERE filesystem damage. Do you really want to continue (yRepeat the [[Adding_a_second_hard_drive_to_your_HDA#Partition/n)?"<brFormat|Partition/>Answer ''yes''. The -cn option we're using can safely Format]] step for each hard drive to be used on mounted filesystemspartitioned and formatted.
=Use Hard DriveMount=Mount the hard drive(s)/partition(s) for use in the HDA.
You have a choice here on how to use your The new hard drive storage spacecan 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]]. We'll offer some examples Follow the guidance below based on desired usage.
==All sharesShares==
If you want all your shares to be on your new hard drive, here's how to do that.
</div>
That The last command should show you will display contents of the content of you new hard drive. That's it. All your shares in /var/hda/files are now on your the new hard drive.
==Some Shares==
==Greyhole Storage Pool==
Mount points will be created (drive1, drive2, etc) and hard drive(s) muonted automatically. [[Open Terminal as root|In a Terminal, as root]], execute the following command:
<div style="border: 1px solid #A3B1BF; padding: .5em 1em; background-color: #E6F2FF; margin: 3px 3px 1em 3px;">
hda-diskmount
</div><br />
If you :EXAMPLE: **************************************************************** 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</strong>' (read-write) You may want your system to mount it every time you boot. To do so, add your new hard drive this line VERY CAREFULLY to your Greyhole storage pool/etc/fstab and reboot: <strong style="color:blue">UUID=547b073d-e591-4913-b4fb-7c5084353979 /var/hda/files/drives/drive1 ext4 defaults 1 2</strong> **************************************************************** All Linux, hereWindows and Mac partitions on non-removable disks have been mounted The line in <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 how ) to do thatbe permanently mounted.
First, There will be multiple lines for multiple hard drive(s) added. Ensure youcopy and add '''ONLY'''ll need to make those which were not present in the mount permanent''before.txt'' file. [[Open Terminal as root|In a Terminal, as root]], type the following command:
Use the ''nano'' command line editor:<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> umount /var/hda/files/drives/drive1
nano /etc/fstab
</div><br />
In nano:EXAMPLE: # # /etc/fstab # Created by anaconda on Sat Nov 9 01:46:39 2013 # # Accessible filesystems, by reference, youare maintained under '/dev/disk'll need to add a new line at the bottom. Take the line that hda-diskmount gave you # See man pages fstab(5), findfs(8), mount(8) and insert that.<br/>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 0So, following previous examples, I should add this 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>
<div style="border: 1px solid #A3B1BF; padding: .5em 1em; color: #000; background-color: #E6F2FF; margin: 3px 3px 1em 3px; text-align: left;"> <span style="color: blue;">UUID=9d972abc-1639-44df-a60e-668618d40236 Verify the hard drive(s)/varpartition(s) configuration is correct in ''/hdaetc/files/drives/drive1 ext4 defaults 1 2</span></div>fstab''.
Save and exit nano Refer to [[Greyhole#Amahi 6|Greyhole (CTRL-X, Y, ENTERUbuntu), and try your new mount:]] or [[Greyhole#Amahi 7|Greyhole (Fedora)]] for guidance on configuring the [[Storage_pooling|Greyhole Storage Pool]].
=Verify/Test=Verify the hard drive/partition is mounted:<div style="border: 1px solid #A3B1BF; padding: .5em 1em; background-color: #E6F2FF; margin: 3px 3px 1em 3px;"> mount df -ah</div><br />
'''<u>Ubuntu<:EXAMPLE: Filesystem Size Used Avail Use% Mounted on /dev/sda5 16G 4.3G 11G 30% /u>'''<br devtmpfs 493M 0 493M 0% />devFinally, you'll need to configure Greyhole to select your new partition. To configure Greyhole, Advanced Settings must be enabled under Settings 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
In The hard drive(s) and the Storage Pool page of your Amahi dashboard, you'll see a list of mounted partitions, with checkboxes next to mount point (path) should be listed for each, allowing you to include those partitions in your storage poolhard drive addedYou should now have a new row in there If not, referring then further investigation will be needed to /var/hda/files/drives/drive1. Select it (click determine the checkbox)problemThat's it. Your new hard drive just increased your Greyhole storage pool capacity. '''<u>Fedora 19</u>'''<br />Refer to [[Amahi_7_Create_Manual_Greyhole_Setup|Amah 7 Greyhole Setup]] for guidance or use the Amahi [https://www.amahi.org/apps/greyhole-ui Greyhole UI] application.
=Tips=
==Change Disk Mount Order==
The following will outline how to manually order your disks and mount drives automatically on boot.
[[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]], type the following command. Replace <strong style="color:green">sdb1</strong> with the (green) 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/<strong style="color:green">sdb1</strong>
</div>
 
You'll receive a warning that says "WARNING!!! Running e2fsck on a mounted filesystem may cause SEVERE filesystem damage. Do you really want to continue (y/n)?"<br/>
Answer ''yes''. The -cn option we're using can safely be used on mounted filesystems.
 
=Troubleshooting=
If ''hda-diskmount'' does not mount the hard drive, you can manually do it.
 
Complete the following steps:
 
* Create the mount point (choose one '''NOT''' in use)
<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><br />
* 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><br />
 
: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><br />
: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 be 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><br />
: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.
 
=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].
12,424

edits