Welcome to http://www.marssoft.de/
 
Monday, 16th September 2019 10:32:40 (GMT+1) 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
guides:debianraid [2007/04/27 13:03]
mario removed raidtools, added section on faulty disks
guides:debianraid [2014/04/02 22:39] (current)
Line 199: Line 199:
 mdadm: re-added /dev/sdc6 mdadm: re-added /dev/sdc6
 </​code>​ </​code>​
 +
 +====Having fun: some Raid-Tests====
 +
 +So you want to see if everything is working as expected? You can make mdadm think the raid is faulty, and see how it reacts to that. Obviously it makes sense to set your email address in mdadm.conf:
 +
 +<​code>​
 +root(strassen) ~> cat /​etc/​mdadm/​mdadm.conf|grep MAILADDR
 +MAILADDR user@domain.org
 +</​code>​
 +
 +Now you can set one of the partitions or disks as faulty:
 +
 +<​code>​
 +root(strassen) ~> mdadm /dev/md1 --manage --set-faulty /dev/sdc6
 +# now you should get an email saying "A Fail event had been detected on md device /​dev/​md1."​
 +root(strassen) ~> cat /​proc/​mdstat|grep -A1 md1
 +md1 : active raid1 sdc6[2](F) sda6[0]
 +      29302464 blocks [2/1] [U_]
 +</​code>​
 +
 +Finally remove the faulty disk and re-add it again (as in the section about raid-recovery above):
 +
 +<​code>​
 +root(strassen) ~> mdadm /dev/md1 --manage --remove /dev/sdc6
 +mdadm: hot removed /dev/sdc6
 +root(strassen) ~> mdadm /dev/md1 --add /dev/sdc6
 +mdadm: re-added /dev/sdc6
 +</​code>​
 +
 +To re-add a stopped array (maybe after re-partitioning),​ use mdadm --assemble:
 +
 +<​code>​
 +root(strassen) ~> mdadm --assemble /dev/md9 /​dev/​sd[ab]14
 +mdadm: /dev/md9 has been started with 2 drives.
 +</​code>​
 +
  
 ====Going further: installing a new Linux==== ====Going further: installing a new Linux====
Line 466: Line 502:
 mount -o bind /sys $NEWLIN/sys mount -o bind /sys $NEWLIN/sys
 </​code>​ </​code>​
 +
guides/debianraid.txt · Last modified: 2014/04/02 22:39 (external edit)