Line 29: |
Line 29: |
| Overwiev of harddrives: | | Overwiev of harddrives: |
| <br>Role IDE Device | | <br>Role IDE Device |
− | <br>Master 1 /dev/hda | + | <br>Master 1 /dev/hda |
− | <br>Slave 1 /dev/hdb | + | <br>Slave 1 /dev/hdb |
− | <br>Master 2 /dev/hdc | + | <br>Master 2 /dev/hdc |
− | <br>Slave 2 /dev/hdd | + | <br>Slave 2 /dev/hdd |
| + | |
| + | ''My intention was to have a nice table instead, but I couldn't get it right. You can see it at the end.'' |
| | | |
| 2.1 Let's assume you installed the disk as master on the second IDE controller. | | 2.1 Let's assume you installed the disk as master on the second IDE controller. |
Line 41: |
Line 43: |
| and when prompted: | | and when prompted: |
| | | |
− | n | + | n (to add a new partition) |
− | (to add a new partition) | + | p (to make a primary partion) |
− | | + | 1 (that's the number one, the number you want to assign to the partition) |
− | p | |
− | (to make a primary partion) | |
− | | |
− | 1 | |
− | (that's the number one, the number you want to assign to the partition) | |
| | | |
| Accept the suggested first & last cylinder values | | Accept the suggested first & last cylinder values |
| | | |
− | w | + | w (write and exit) |
− | (write and exit) | |
| | | |
| This will create the primary partition /dev/hdc1, using the entire disk space. | | This will create the primary partition /dev/hdc1, using the entire disk space. |
Line 69: |
Line 65: |
| A mounting point is just an empty directory that will link to your new disk. | | A mounting point is just an empty directory that will link to your new disk. |
| <br>This can be any valid directory on your server, but it is recommended not to use /home or one of its subdirectories. | | <br>This can be any valid directory on your server, but it is recommended not to use /home or one of its subdirectories. |
− | <br>In step 6 you will see a much better method to link your /home directory to the second disk. | + | <br>In step 4 you will see a much better method to link your /home directory to the second disk. |
| | | |
| 3.0 Create a directory underneath /mnt | | 3.0 Create a directory underneath /mnt |
Line 75: |
Line 71: |
| | | |
| 3.1 Automount at boot time | | 3.1 Automount at boot time |
− | <br>To automatically mount the partition at boot time, you need to add the following line to the file /etc/fstab -It can be done in the text editor Pico | + | <br>To automatically mount the partition at boot time, you need to add the following line to the file /etc/fstab |
| + | <br>It can be done in the text editor Pico |
| | | |
| pico /etc/fstab /dev/hdc1 /mnt/bigdisk ext3 usrquota,grpquota 1 2 | | pico /etc/fstab /dev/hdc1 /mnt/bigdisk ext3 usrquota,grpquota 1 2 |
Line 96: |
Line 93: |
| <br>Go back to step 2 and check if you followed all instructions correctly. | | <br>Go back to step 2 and check if you followed all instructions correctly. |
| | | |
| + | === 4 Mapping === |
| + | 4.0 Alternatives |
| + | |
| + | Alternative 1: Use /home to mount the new disk |
| + | |
| + | On 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: |
| + | |
| + | SME stores all its configuration files in /home/e-smith/db. |
| + | <br>If for whatever reason your disk doesn't mount, the configuration files will no longer be accessible, causing all kinds of nasty problems. |
| + | |
| + | Mounting your second disk to /home or even /home/e-smith/files effectively means that your first disk will no longer be used to store user files. |
| + | <br>In some cases that might be a good idea, but in most cases you are just wasting the remaining space of your first disk. |
| + | |
| + | Alternative 2: A much better approach is to leave the second disk mounted at /mnt/bigdisk and to create symlinks (symbolic links) for specific ibays or user folders. |
| + | |
| + | The following example shows you how to place the mp3 ibay on the second disk. |
| + | |
| + | 4.1 Create the necessary subdirectories on your second disk |
| + | mkdir -p /mnt/bigdisk/ibays/mp3 |
| + | |
| + | |
| + | 4.2 Apply the ownerships and permissions from the original directory |
| + | ls -l /home/e-smith/files/ibays |
| + | |
| + | drwxrwxr-x 18 admin allstaff 4096 Sep 23 14:48 mp3 |
| + | |
| + | 4.3 Change ownership |
| + | chown admin:allstaff /mnt/bigdisk/ibays/mp3 |
| + | |
| + | 4.4 Set permissions |
| + | chmod 775 /mnt/bigdisk/ibays/mp3 |
| + | |
| + | 4.5 Copy the content to your new disk |
| + | cp -rip /home/e-smith/files/ibays/mp3/* /mnt/bigdisk/ibays/mp3 |
| + | |
| + | 4.6 Check if all files have been copied correctly |
| + | diff -r /mnt/bigdisk/ibays/mp3 /home/e-smith/files/ibays/mp3 |
| + | |
| + | 4.7 Remove the original files |
| + | rm -rf /home/e-smith/files/ibays/mp3 |
| + | |
| + | 4.8 Create a symlink to the new location |
| + | ln -s /mnt/bigdisk/ibays/mp3 /home/e-smith/files/mp3 |
| + | |
| + | 4.9 Test the new location |
| + | ls /home/e-smith/files/ibays/mp3 |
| + | |
| + | 4.10 If you want the ibay to be accessible from the internet, you also need to enable "follow symlinks" in apache: |
| + | mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf |
| + | |
| + | echo Options FollowSymLinks >> /etc/e-smith/templates custom/etc/httpd/conf/httpd.conf/85DefaultAccess |
| + | |
| + | /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf |
| + | |
| + | /etc/init.d/httpd graceful |
| + | |
| + | === 5 Quota === |
| + | |
| + | Next you might want to activate the quota on the disk (optional). |
| + | This will only work if you activated quota management for at least one user (Server Manager > Collaboration > Quota Management). |
| | | |
| + | quotacheck -vugc /dev/hdc1 |
| | | |
| + | If quotachecks comes back to the command prompt without errors, you're ready. |
| + | |
| + | === 6 Final check === |
| + | |
| + | Reboot your machine |
| + | reboot |
| + | Check if the drive was mounted correctly with |
| + | df -T |
| + | and/or surf to your ibay. |
| + | |
| + | If it looks fine, relax and tell the world about it, you made it! |
| + | |
| | | |
| + | {| border="1" |
| + | |+Partition overwiev |
| + | |- |
| + | !Role |
| + | !IDE controller |
| + | !Device name |
| + | |- |
| + | |Master |
| + | |1 |
| + | |/dev/hda |
| + | |- |
| + | |Slave |
| + | |1 |
| + | |/dev/hdb |
| + | |- |
| + | |Master |
| + | |2 |
| + | |/dev/hdc |
| + | |- |
| + | |Slave |
| + | |2 |
| + | |/dev/hdd |
| + | |-} |
| | | |
| ---- | | ---- |
| [[Category:Howto]] | | [[Category:Howto]] |