☺
Scritto da
il 2011-01-04 12:12:00.0 alle 2011-01-04 12:12:00.0
Trollate totali: 4459
QUESTO E' L'ANNO DI LINUX!!!
Adding a second hard drive to your HDA
From Amahi
More hard drives can be added in your Amahi HDA for additional storage space.
We'll detail how to add such hard drives, and how to put them to good use.
Contents
[hide]
* 1 Important Notes
* 2 Make sure your drive is detected by Fedora
* 3 Install prerequisites
* 4 Partition and format the hard drive
o 4.1 Using GParted
o 4.2 Using cfdisk
* 5 Mount the hard drive
o 5.1 Test your hard drive
* 6 Use the hard drive
o 6.1 Use the hard drive for all shares
o 6.2 Use the hard drive for only some shares
o 6.3 Use the hard drive in your Greyhole storage pool
Important Notes
* This is an how-to on how to add additional drives to your HDA.
* Amahi cannot be held responsible for any data breakage or destruction arising from the use or misuse of this script. We provide it as a service in good will. You accept this automatically if you use the script.
* This page and script does not support GUID-partitioned drives. You can find what your partition is like with fdisk -l
Make sure your drive is detected by Fedora
Open a Terminal, and type the following command:
ls -1 /dev/disk/by-id/ | egrep -v "part|scsi"
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-.
Look for your hard drive model and serial number.
Example:
[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
Install prerequisites
In a Terminal, as root, type the following (two) commands:
yum -y install pmount fuse fuse-libs ntfs-3g gparted util-linux-ng
Partition and format the hard drive
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.
You should (unless you have a good reason not to) use GParted to partition and format your hard drive.
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 use cfdisk from a Terminal, as root.
You'll probably want to create a single partition, and format it as ext3.
Note that Windows can't read ext3 partitions, so if you want dual-boot Windows on your Amahi PC, or if you intend to connect 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.
Remember that using NTFS partitions on Linux will be slower that using ext3 partitions, so you should only use NTFS if you really need it.
How much slower: compare the blue bars (NTFS-3G) with the red bars (ext3) on this graph.
To know what device (/dev/sdX) you need to partition and format, use the following command, in a Terminal, as root:
ls -l /dev/disk/by-id/
Find the row corresponding to your hard drive, and look at the end of the line to identify the correct device to use.
Example:
[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
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
From the HDA desktop (or using VNC), Open Terminal as root and type gparted to launch the GParted application.
Select the device (/dev/sdX) that you found above.
In the above example, /dev/sdb would be what I would select in GParted.
There are many easy to follow guides online on how to use GParted. You should Google for one, to find one that seems clear to you.
Here's one that looks simple. Just use ext3 instead of fat32 in you follow that tutorial.
Note that gparted supports GUID-partitioned drives, however, these directions and script do not support it at the moment.
Using cfdisk
From a 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 (eg. /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 top.
Select the [ New ] action, and accept the default (Primary, and size).
You should now have a single partition listed at the top, of type Linux.
Select the [ Write ] action, then [ Quit ].
Now that you partitioned your drive, you need to format your newly created partition.
To format as EXT3, use this command:
mkfs.ext3 -j /dev/sdX1
Replace ext3 with ext4 in 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.
Go back in cfdisk, and check the Name column if you're unsure.
If you see sdb1 in the name column, you should use /dev/sdb1 in the above command.
Mount the hard drive
A script is provided with Amahi that will look for unmounted partitions in your system, and mount any it finds.