Talk:Raid

From SME Server
Jump to navigationJump to search

from bug 5665 The newer e2fs tools are smart enough that if you use the resize2fs tool to do the resizing with a mounted filesystem it will do the same thing ext2online used to do. They just made it so instead of having two tools you have one smart tool.

That being said the documentation may need to be updated to handle the sme8 case. However there are a lot of enhanced things you can do with the new tools in 8 that you can't do in 7. I'd like to see an entire new page explaining how to expand/grow your filesystem on 8 instead of just adding notes for where things are different.

2011-03-06: added a warning box to RAID1 -> RAID5 conversion: note taken from http://www.arkf.net/blog/?p=47


Stephdl (talk) 05:50, 4 February 2013 (MST) i need your help for correcting my english grammar, please be indulgent... i have tested all the command in a virtualbox, it works as expected.

Adding another Hard Drive Later (Raid 1 array only)

ENSURE THAT THE NEW DRIVE IS THE SAME SIZE OR LARGER AS THE CURRENT DRIVE(S)

  • Shut down the machine
  • Install drive as master on the second IDE channel (hdc)
  • Boot up
  • Log on as admin to get to the admin console
  • Go to #5 Manage disk redundancy

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.


Important.png Note:
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



Important.png Note:
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.


first we need to give to sdc the same table of partition as sda or sdb


sfdisk -d /dev/sda > sfdisk_sda.output
sfdisk /dev/sdc < sfdisk_sda.output

then we need to add the news partitions to the existings arrays

mdadm --add /dev/md1 /dev/sdc1
mdadm --add /dev/md2 /dev/sdc2

to verify, you can see the return of commands below

mdadm --detail /dev/md1
mdadm --detail /dev/md2
/dev/md1:
        Version : 0.90
  Creation Time : Sat Feb  2 22:24:38 2013
     Raid Level : raid1
     Array Size : 104320 (101.89 MiB 106.82 MB)
  Used Dev Size : 104320 (101.89 MiB 106.82 MB)
   Raid Devices : 2
  Total Devices : 3
Preferred Minor : 1
    Persistence : Superblock is persistent 

    Update Time : Mon Feb  4 13:28:43 2013
          State : clean
 Active Devices : 2
Working Devices : 3
 Failed Devices : 0
  Spare Devices : 1 

           UUID : f97a86c5:8bb46daa:6854855e:558a3e16
         Events : 0.6

    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       1       8       17        1      active sync   /dev/sdb1

       2       8       33        -      spare   /dev/sdc1

else you can try this.

cat /proc/mdstat
cat /proc/mdstat
Personalities : [raid1] 
md1 : active raid1 sdc1[2](S) sdb1[1] sda1[0]
      104320 blocks [2/2] [UU]
      
md2 : active raid1 sdc2[2](S) sdb2[1] sda2[0]
      52323584 blocks [2/2] [UU]

(S)= Spare (F)= Fail [0]= number of the disk