Changes

From SME Server
Jump to navigationJump to search
394 bytes added ,  14:34, 1 October 2017
m
Corrected typo "expand-templates" to "expand-template"
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].
Line 18: Line 19:     
== Assumptions ==
 
== Assumptions ==
{{Note box|This HowTo uses the denomination of Hard Disks with PATA (IDE), when you have Sata Hard Disks the names of these drives are '''sda (/dev/sda)''' for the first, '''sdb (/dev/sdb)''' for the second, '''sdc (/dev/sdc)''' for the third...etc. You have to adjust these command lines to the good name of your drives}}
+
{{Note box|This HowTo uses the default naming of Hard Disks with PATA (IDE), when you have Sata Hard Disks the names of these drives are '''sda (/dev/sda)''' for the first, '''sdb (/dev/sdb)''' for the second, '''sdc (/dev/sdc)''' for the third...etc. You have to adjust these command lines to match the naming of your drives.}}
    
*It assumes adding one PATA (IDE) harddrive as master on the second IDE controller, but the process will be similar in other situations. More on that in step 2.1.
 
*It assumes adding one PATA (IDE) harddrive as master on the second IDE controller, but the process will be similar in other situations. More on that in step 2.1.
Line 49: Line 50:     
This will make you loose connection if you working through an ssh-client (like Putty). You need direct access to the shell to proceed.
 
This will make you loose connection if you working through an ssh-client (like Putty). You need direct access to the shell to proceed.
 +
 +
{{Note box| All these operations should work through a remote SSH connexion, so you doesn't need a direct access to the server, except to mount a new hard disk}}
    
=== Partition ===
 
=== Partition ===
Line 213: 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
  
9

edits

Navigation menu