Adding an extra Hard Drive
After installing Clark Connect and the admin tools PuTTY and WinSCP on your windows PC system, it's time to install the main file storage hard drive.
It is normal for a Linux system to not allocate 5% of the disk space with a standard format, this procedure will allow 100% of the drive to be available. Also I plan to spin-down the drive when it's idle (most of the time), therefore I'll mount it as an EXT2 file system rather than the default EXT3 which uses 'journaling'.
When you connect a hard drive into a Linux system the device is given a specific location, with IDE/PATA hard drives:
/dev/hda = primary / master
/dev/hdb = primary / slave
/dev/hdc = secondary / master
/dev/hdd = secondary / slave
... and with SATA hard drives:
/dev/sda = 1st SATA drive
/dev/sdb = 2nd SATA drive
/dev/sdc = 3rd SATA drive
/dev/sdd = 4th SATA drive
As I have connected my 500GB SATA hard drive to the first SATA port on the motherboard my device location is /dev/sda - obviously adjust the following commands to suit your device location.
Creating Partitions and Formatting
Login as root using PuTTY:
First remove any existing partitions and create one big one using the fdisk command, enter:
To get a list of possible options enter m.
I used the p option to view the existing partitions, then d option to delete each of the existing unwanted partitions. (I'd installed Linux on this drive previously so it had several unwanted partitions on it).
Once I'd removed all the existing partitions, I created a new one with the n option.
When asked for the type of partition enter p for primary, then give it the partition number 1.
When asked for the first cylinder press 'enter' to accept the default value (normally 1), and when asked for the last cylinder press 'enter' again to accept the default value (should be the maximum number of cylinders).
To write the partition table and exit enter w.
(For a guide to partitioning and the fdisk utility, see this page:
To format the new partition with the Linux 'ext3' file system enter:
mkfs.ext3 -m 0 /dev/sda1
Note - The hard drive was formatted with the ext3 files system, but we will mount it as an ext2 file system as we don't want 'journaling' to occur, (so we can spin down the drive when not in use).
Mounting the partition
Still logged in using PuTTY:
Create a folder for the location of the new partition, I chose to put it in the conventional '/mnt' directory and call it 'HardDrive', enter:
Now change the permissions of the folder so everyone has read write access (this is important if you plan to share it with Samba), enter:
chmod 777 /mnt/HardDrive
To mount the drive automatically on boot, login with WinSCP and double click on
the '/etc/fstab' file to edit it,
add the following line to the bottom of the file:
/dev/sda1 /mnt/HardDrive ext2 defaults,noatime 0 0
Remember to press 'Return' after the line - it will fail to mount at boot if you don't!!!
To force the changes in the fstab without re-booting, enter:
The hard drive should now be reported in the ClearOS web interface, go to: Reports - Current Status, and available for use.