Changes

From SME Server
Jump to navigationJump to search
1,532 bytes added ,  23:45, 18 October 2007
Line 92: Line 92:  
       255936 blocks [2/2] [UU]</pre>
 
       255936 blocks [2/2] [UU]</pre>
    +
To recover this raid, i.e. to get it back into sync, you need to use the raidhotadd command.
 +
 +
Make a note of the raid partition that has failed. In this case it is md2, the device being /dev/md2/. You will need to add the physical partition back into that raid partition. The missing physical partition in the above example is /dev/hda2
 +
 +
The command to run is then:
 +
 +
<pre>raidhotadd /dev/md2 /dev/hda2</pre>
 +
 +
Your devices are likely to be different, and you may have more than two disks, including a hot standby, but will always be determined from the mdstat file. Once the raid resync has been started, the progress will be noted in mtstat, for example:
 +
 +
<pre>[root@sme]# cat /proc/mdstat
 +
Personalities : [raid1]
 +
md1 : active raid1 hda3[0] hdb3[1]
 +
      38837056 blocks [2/2] [UU]
 +
 +
md2 : active raid1 hda2[2] hdb2[1]
 +
      1048704 blocks [2/1] [_U]
 +
      [=>...................]  recovery =  6.4% (67712/1048704) finish=1.2min speed=13542K/sec
 +
md0 : active raid1 hda1[0] hdb1[1]
 +
      255936 blocks [2/2] [UU]
 +
</pre>
 +
 +
When recovery is complete, the partitions will all be up:
 +
 +
<pre>[root@sme]# cat /proc/mdstat
 +
Personalities : [raid1]
 +
md1 : active raid1 hda3[0] hdb3[1]
 +
      38837056 blocks [2/2] [UU]
 +
 +
md2 : active raid1 hda2[0] hdb2[1]
 +
      1048704 blocks [2/2] [UU]
 +
 +
md0 : active raid1 hda1[0] hdb1[1]
 +
      255936 blocks [2/2] [UU]
 +
</pre>
 +
 +
If this action is required regularly, you should test your disks for SMART errors and physical errors, check your disk cables, and make sure no two hard drives share the same IDE port.
    
<noinclude>[[Category:Howto]]</noinclude>
 
<noinclude>[[Category:Howto]]</noinclude>
97

edits

Navigation menu