Line 1: |
Line 1: |
| {{Languages|AddExtraHardDisk}} | | {{Languages|AddExtraHardDisk}} |
| {{Level|Advanced}} | | {{Level|Advanced}} |
| + | {{usefulnote}} |
| | | |
| This HowTo are based on [http://mirror.contribs.org/smeserver/contribs/mblotwijk/HowToGuides/AddExtraHardDisk.htm Michiel Blotwijk original]. | | This HowTo are based on [http://mirror.contribs.org/smeserver/contribs/mblotwijk/HowToGuides/AddExtraHardDisk.htm Michiel Blotwijk original]. |
| | | |
| == Description == | | == Description == |
− | How to add an extra hard disk to an existing (running) SME server | + | How to add an extra hard disk to an existing (running) SME server 7.x. |
| | | |
| {{Warning box|If you were looking for the details of Adding a larger Hard Disk Drive (HDD) to an existing Raid or Upgrading the HDD of an existing RAID array - Look Here: http://wiki.contribs.org/Raid#Upgrading_the_Hard_Drive_Size}} | | {{Warning box|If you were looking for the details of Adding a larger Hard Disk Drive (HDD) to an existing Raid or Upgrading the HDD of an existing RAID array - Look Here: http://wiki.contribs.org/Raid#Upgrading_the_Hard_Drive_Size}} |
Line 215: |
Line 216: |
| Similar to alternative 1, you can simply mount the disk for a specific iBay. If you need multiple iBays covered though it implies you have to create multiple partitions on the disk. The benefit like alternative one is simplicity of standard SME processes while limiting waste on your primary disk. The down side is inflexibility and waste on the secondary disk. | | Similar to alternative 1, you can simply mount the disk for a specific iBay. If you need multiple iBays covered though it implies you have to create multiple partitions on the disk. The benefit like alternative one is simplicity of standard SME processes while limiting waste on your primary disk. The down side is inflexibility and waste on the secondary disk. |
| | | |
− | ====Alternative 3: Mounting and Symlinking==== | + | ==== Alternative 3: Mounting and Symlinking ==== |
| A much better approach is to leave the second disk mounted at /mnt/newdisk and to create symlinks (symbolic links) for specific ibays or user folders. The benefit is flexibility and efficient usage of the all disks. The down side is that you may have to make more modifications to ensure SME services and contribs work as expected (see also Optional Steps). | | A much better approach is to leave the second disk mounted at /mnt/newdisk and to create symlinks (symbolic links) for specific ibays or user folders. The benefit is flexibility and efficient usage of the all disks. The down side is that you may have to make more modifications to ensure SME services and contribs work as expected (see also Optional Steps). |
| | | |
| The following example shows you how to place the IBAYNAME ibay on the second disk using Alternative (3). | | The following example shows you how to place the IBAYNAME ibay on the second disk using Alternative (3). |
| | | |
− | 4.1 Create the necessary subdirectories on your second disk
| + | ===== Create the necessary subdirectories on your second disk ===== |
| mkdir -p /mnt/newdisk/ibays/IBAYNAME | | mkdir -p /mnt/newdisk/ibays/IBAYNAME |
| | | |
− | | + | ===== Check the ownerships and permissions on the original directory ===== |
− | 4.2 Check the ownerships and permissions on the original directory
| |
| ls -l /home/e-smith/files/ibays/IBAYNAME | | ls -l /home/e-smith/files/ibays/IBAYNAME |
| | | |
| drwxrwxr-x 18 admin allstaff 4096 Sep 23 14:48 IBAYNAME | | drwxrwxr-x 18 admin allstaff 4096 Sep 23 14:48 IBAYNAME |
| | | |
− | 4.3 Change ownership as in the original. The "-R" (optional) means recursive, subdirectorys will be included in the command.
| + | ===== Change ownership as in the original ===== |
| + | The "-R" (optional) means recursive, subdirectorys will be included in the command. |
| chown -R originaluser:originalgroup /mnt/newdisk/ibays/IBAYNAME | | chown -R originaluser:originalgroup /mnt/newdisk/ibays/IBAYNAME |
| | | |
− | 4.4 Set permissions to the ibay IBAYNAME as in the original. For help on this, look at bottom of this page. The "-R" (optional) means recursive, subdirectorys will be included in the command.
| + | ===== Set permissions to the ibay IBAYNAME as in the original ===== |
| + | For help on this, look at bottom of this page. The "-R" (optional) means recursive, subdirectorys will be included in the command: |
| chmod 775 -R /mnt/newdisk/ibays/IBAYNAME | | chmod 775 -R /mnt/newdisk/ibays/IBAYNAME |
| | | |
− | 4.5 Copy the content to your new disk (a=archive option to preserve owner/group/permissions/links; i=interactive):
| + | ===== Copy the content to your new disk ===== |
− | cp -ai /home/e-smith/files/ibays/IBAYNAME/* /mnt/newdisk/ibays/IBAYNAME | + | a=archive option to preserve owner/group/permissions/links; i=interactive: |
| + | cp -ai /home/e-smith/files/ibays/IBAYNAME/* /mnt/newdisk/ibays/IBAYNAME |
| | | |
− | 4.6 Check if all files have been copied correctly
| + | ===== Check if all files have been copied correctly ===== |
| diff -r /mnt/newdisk/ibays/IBAYNAME /home/e-smith/files/ibays/IBAYNAME | | diff -r /mnt/newdisk/ibays/IBAYNAME /home/e-smith/files/ibays/IBAYNAME |
| | | |
− | 4.7 Remove the original files
| + | ===== Remove the original files ===== |
| rm -rf /home/e-smith/files/ibays/IBAYNAME | | rm -rf /home/e-smith/files/ibays/IBAYNAME |
| | | |
− | 4.8 Create a symlink to the new location
| + | ===== Create a symlink to the new location |
| ln -s /mnt/newdisk/ibays/IBAYNAME /home/e-smith/files/ibays/IBAYNAME | | ln -s /mnt/newdisk/ibays/IBAYNAME /home/e-smith/files/ibays/IBAYNAME |
| | | |
− | 4.9 Test the new location
| + | ===== Enable Wide Links for Samba (SME9) ===== |
| + | |
| + | config setprop smb WideLinks yes |
| + | expand-template /etc/samba/smb.conf |
| + | service smb restart |
| + | |
| + | ===== Test the new location ===== |
| ls /home/e-smith/files/ibays/IBAYNAME | | ls /home/e-smith/files/ibays/IBAYNAME |
| | | |