Changes

From SME Server
Jump to navigationJump to search
no edit summary
Line 43: Line 43:  
===Creating the array===
 
===Creating the array===
 
Check which ''md'' numbers are in use by running the command ''cat /proc/mdstat'' select the highest number md number and add one we will us md3.
 
Check which ''md'' numbers are in use by running the command ''cat /proc/mdstat'' select the highest number md number and add one we will us md3.
   
  mdadm --create /dev/md3  --level=raid5 --raid-devices=6 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/hda1 /dev/hdb1
 
  mdadm --create /dev/md3  --level=raid5 --raid-devices=6 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/hda1 /dev/hdb1
   
Change the md3 number to the one you have selected, you will also need to change the number of raid devices and list each of the devices to use in the array.
 
Change the md3 number to the one you have selected, you will also need to change the number of raid devices and list each of the devices to use in the array.
    +
{{Note box|Be Advised this command will process quickly but in the background it will be conducted a re-sync of the RAID array you can monitor this by running cat /proc/mdstat.  It highly advisable to wait for the re-sync to be completed before proceeding.}}
   −
{{Note box|Be Advised this command will process quickly but in the background it will be conducted a re-sync of the RAID array you can monitor this by running cat /proc/mdstatIt highly advisable to wait for the re-sync to be completed before proceeding.}}
+
===Save raid array structure===
 +
Next we need to save array structure to the mdadm.conf file in order for the SME Server to continue working with the array on reboot of the system.
 +
  mdadm --detail --scan | grep md3 >> /etc/mdadm.conf
    +
Once that command is run it would be a good idea to look inside it. You should only see one new line in that file.
   −
When new disks are added, existing raid partitions can be grown to use the new disks. After the new disk has been partitioned, the RAID array 1/4/5 may be grown. Assuming that before growing, it contains four drives in Raid5 and therefore an array of 3 drives (3*10G) and 1 spare drive(10G). See this [[Raid#Hard_Drives_.E2.80.93_Raid|HowTo]] for understanding the automatic raid construction of SME Server
+
It is the then advisable to create a copy of the mdadm.conf run the following
 +
cp /etc/mdadm.conf /etc/mdadm.conf.bak
 +
Keep this file permanently as it is possible in the future something may occur on your sme server to cause the mdadm.conf file to be trashed or reset, in that case you can use this backup file to rewrite your required raid information.
   −
This is how your array should look before changing.
     −
[root@smeraid5 ~]# cat /proc/mdstat
  −
Personalities : [raid6] [raid5] [raid4] [raid1]
  −
md1 : '''active raid1''' sda1[0] sdb1[1] sdc1[2] sdd1[3]
  −
      104320 blocks [4/4] [UUUU]
  −
     
  −
md2 : '''active raid5''' sdd2[8](S) sdc2[2] sdb2[1] sda2[0]
  −
      72644096 blocks level 5, 256k chunk, algorithm 2 [8/8] [UUU]
     −
===Partition the new drive===
      
for example using this command to partition the new drive
 
for example using this command to partition the new drive
Line 74: Line 69:  
{{Warning box|Be aware that dd is called data-destroyer, be certaing of the partition you want zeroed.}}
 
{{Warning box|Be aware that dd is called data-destroyer, be certaing of the partition you want zeroed.}}
 
  #dd if=/dev/zero of=/dev/sdX bs=512 count=1
 
  #dd if=/dev/zero of=/dev/sdX bs=512 count=1
 +
 +
    
===Adding partitions===
 
===Adding partitions===
20

edits

Navigation menu