How to add an extra hard disk to a SME server | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Author: Michiel Blotwijk <Michiel.Blotwijk@Altiplano.Be> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Release supported: All | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
License: GPL | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Last updated: 9 June, 2006 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Most Up-todate version can be found here: http://www.contribs.org/contribs/mblotwijk/HowToGuides/AddExtraHardDisk.htm | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
How to add an extra hard disk to
an existing SME server |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 1: Switch to single-user modeFirst you need to switch to single-user mode. Logon as root and type:
Step 2: Partition the diskNow you need to identify the device name of the new disk. The following command will show you all the drives on your server (including any USB drives you might have)
and when prompted:
This will create the primary partition /dev/hdc1, using the entire disk space. Step 3: Format the new partitionNext you want to format the new partition:
If you are using SME 5.6 or newer, it is recommended to convert the partition to the ext3 format:
Step 4: Create a mounting point for the new disk A mounting point is just an empty directory that will link to your new disk. This can be any valid directory on your server, but it is recommended not to use /home or one of its subdirectories. In step 6 you will see a much better method to link your /home directory to the second disk. For now just create a directory underneath /mnt
Step 5: Automount at boot timeTo automatically mount the partition at boot time, you need to add the following line to /etc/fstab:
Make sure you end this line with a newline. Hit <ctrl-x> to exit the editor
Check if everything works as expected:
If you don't see a line for /dev/hdc1, something went wrong. Go back to step 2 and check if you followed all instructions correctly. Step 6 ( Optional): Use /home to mount the new diskOn standard Linux machines, the /home directory contains the user's directories and is therefore a popular place to mount a bigger disk. However, on a SME server this is not a good idea:
A much better approach is to leave the second disk mounted at /mnt/bigdisk and to create symlinks for specific ibays or user folders. The following example shows you how to place the mp3 ibay on the second disk. 1/ Create the necessary subdirectories on your second
disk
2/ Apply the ownerships and permissions from the original directory
3/ Copy the content to your new disk
4/ Check if all files have been copied correctly
5/ Remove the original files
6/ Create a symlink to the new location
7/ Test the new location
8/ If you want the ibay to be accessible from the
internet, you also need to enable "follow symlinks" in apache
Step 7( Optional): Activate the quotaNext you might want to activate the quota on the disk. This will only work if you activated quota management for at least one user (Server Manager > Collaboration > Quota Management).
If quotachecks comes back to the command prompt without errors, you're ready. Step 8: Final checkReboot your machine and check if the drive was mounted correctly. If that's the case, relax and tell the world about it:
|