Changes

From SME Server
Jump to navigationJump to search
277 bytes added ,  01:29, 5 February 2013
m
Line 28: Line 28:  
It should tell you there if the drives are syncing up. Don't turn off the server until the sync is complete or it will start from the beginning again. When it is done syncing it will show a good working raid1.
 
It should tell you there if the drives are syncing up. Don't turn off the server until the sync is complete or it will start from the beginning again. When it is done syncing it will show a good working raid1.
   −
If the Manage disk redundancy page gives the message "The free disk count must equal one" and "Manual intervention may be required", then you likely will have additional hard drives that need to be disconnected while the RAID is set up. An external USB drive will have this effect, and should be unplugged.
+
If the Manage disk redundancy page gives the message "The free disk count must equal one" and "Manual intervention may be required", then you probably have additional hard drives that need to be disconnected while the RAID is set up. An external USB drive will have this effect, and should be unplugged.
   −
{{Note box| the addition of another drive is restricted to a RAID 1 degraded, i.e. when the system has been installed with a single drive (/dev/hda and /dev/hdc or their SATA equivalent). The addition of a third drive to a RAID 1 '''(i.e. a spare)''' is not recognized by the system. therefore you need to use the '''mdadm''' command line}}
+
{{Note box| the addition of another drive is restricted to a RAID 1 degraded, i.e. when the system has been installed with a single drive (/dev/hda and /dev/hdc or their SATA equivalent). The addition of a third drive to a RAID 1 '''(i.e. a spare)''' is not recognized by the system. To add a spare you need to use '''mdadm''' at the command line}}
   −
{{Note box|I suppose the system is installed with a Raid1 functional on two disk sda and sdb and you want to add another disk sdc as a spare (for use automatically if one disk of the array will fail).This howto can be adapted to other types of Raid as long as you want to add a spare disk.}}
+
{{Note box|I will assume the system is installed with a RAID 1 array functioning on two disks sda and sdb and you want to add another disk sdc as a spare (for use automatically if one disk of the array will fail). This howto can be adapted to other types of RAID as long as you want to add a spare disk.}}
   −
first we need to give to sdc the same table of partition as sda or sdb
+
First we need write the partition table from  sda (or sdb) to sdc :
      Line 40: Line 40:  
  sfdisk /dev/sdc < sfdisk_sda.output
 
  sfdisk /dev/sdc < sfdisk_sda.output
   −
then we need to add the news partitions to the existings arrays
+
Then we need to add the new partitions to the existings arrays :
    
  mdadm --add /dev/md1 /dev/sdc1
 
  mdadm --add /dev/md1 /dev/sdc1
 
  mdadm --add /dev/md2 /dev/sdc2
 
  mdadm --add /dev/md2 /dev/sdc2
   −
to verify, you can see the return of commands below
+
Verify this with :
    
  mdadm --detail /dev/md1
 
  mdadm --detail /dev/md1
Line 77: Line 77:  
         2      8      33        -      spare  /dev/sdc1
 
         2      8      33        -      spare  /dev/sdc1
   −
else you can try this.
+
Alternatively you can try this.
    
  cat /proc/mdstat
 
  cat /proc/mdstat
Line 93: Line 93:  
[0]= number of the disk
 
[0]= number of the disk
   −
you might be interested to install grub on your spare disk for securing the boot process.
+
You should ensure that grub is correctly written to spare disk to ensure it will boot correctly.
   −
in a terminal with the  administrator privilege.
+
From within a terminal with the  administrator privileges :
    
  grub
 
  grub
Line 101: Line 101:  
  root (hd2,0)
 
  root (hd2,0)
 
  setup (hd2)
 
  setup (hd2)
 +
 +
Last of all, try forcing a failure of one of the first two drives and ensure that the server boots, and the RAID rebuilds corectly. You may then have to the repeat this exercise to get the drives n the correct order (i.e sda/sdb in the array with sdc as the spare)

Navigation menu