Changes

From SME Server
Jump to navigationJump to search
985 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 6: Line 7:  
== Description ==
 
== Description ==
 
How to add an extra hard disk to an existing (running) SME server 7.x.
 
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|'''Adding a Single Disk (or non-raid disks):''' If you are adding only a single or non-raid disk then please note that the added harddrive will NOT take part of a RAID-array and hence get no redundancy.  
 
{{Warning box|'''Adding a Single Disk (or non-raid disks):''' If you are adding only a single or non-raid disk then please note that the added harddrive will NOT take part of a RAID-array and hence get no redundancy.  
Line 16: Line 19:     
== Assumptions ==
 
== Assumptions ==
 +
{{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 45: 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 84: Line 91:  
{{Note box|If you are setting up a raid array, it is a really good idea to eliminate single points of failure. For example try to avoid putting to disks of the same raid array on the same ribbon cable. }}
 
{{Note box|If you are setting up a raid array, it is a really good idea to eliminate single points of failure. For example try to avoid putting to disks of the same raid array on the same ribbon cable. }}
   −
====Paritioning the disk====
+
====Partitioning the disk====
 
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.
 
<br>This means you have to partition /dev/hdc
 
<br>This means you have to partition /dev/hdc
Line 93: Line 100:     
  n (to add a new partition)
 
  n (to add a new partition)
  p (to make a primary partion)
+
  p (to make a primary partition)
 
  1 (that's the number one, the number you want to assign to the partition)
 
  1 (that's the number one, the number you want to assign to the partition)
    
Only if you will be adding this disk to to a RAID set, then you will also need to change the partition type.
 
Only if you will be adding this disk to to a RAID set, then you will also need to change the partition type.
  t (to change partion type)
+
  t (to change partition type)
  L (within t's prompt to list available parition type)
+
  L (within t's prompt to list available partition type)
  fd (normally the parition type is fd but verify from the L command and look for "Linux raid autodetect"
+
  fd (normally the partition type is fd but verify from the L command and look for "Linux raid autodetect"
    
Accept the suggested first & last cylinder values
 
Accept the suggested first & last cylinder values
Line 158: Line 165:  
This entry assumes among other things that you will be running user and group quota, the "1" indicates it is a disk that should be backed up with dump, the "2" indicates fsck should be run as a second priority. If you wish to modify these parameters, ensure you fully understand them as these are crucial to your system's operation.
 
This entry assumes among other things that you will be running user and group quota, the "1" indicates it is a disk that should be backed up with dump, the "2" indicates fsck should be run as a second priority. If you wish to modify these parameters, ensure you fully understand them as these are crucial to your system's operation.
   −
It can be done in the text editor Pico
+
It can be done in the text editor nano for SME8 and pico SME7
   −
  pico /etc/fstab
+
  nano /etc/fstab
 
Add the following data to the file for a SINGLE disk (separate columns with a hit on the space-bar):
 
Add the following data to the file for a SINGLE disk (separate columns with a hit on the space-bar):
 
  /dev/hdc1 /mnt/newdisk ext3 usrquota,grpquota 1 2  
 
  /dev/hdc1 /mnt/newdisk ext3 usrquota,grpquota 1 2  
Line 209: 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