Monday, July 21, 2008

Hotswap Cages suck

Damn it, I can't find one that has a good enough airflow. ICY-DOCK sucks, the air hole for 4 drives is the size of a nickel, and has a circuit board in front of it!

Linux RAID Tips

Lost a disk in your RAID?
# mdadm /dev/md2 -a /dev/sdb3

mdadm: re-added /dev/sdb3

cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sdb2[0] sda2[1]
1003968 blocks [2/2] [UU]
md2 : active raid1 sdb3[2] sda3[1]
48837504 blocks [2/1] [_U]
[>....................] recovery = 0.7% (345600/48837504) finish=14.0min speed=57600K/sec

Data Scrubbing :

# echo check >> /sys/block/mdX/md/sync_action

You can monitor the progress of the check with:
# watch -n .1 cat /proc/mdstat

Check for mismatch post the 'check' :
# cat /sys/block/mdX/md/mismatch_cnt

To repair (NOTE: Without parity, a bit will be taken at random.)
# echo repair >> /sys/block/mdX/md/sync_action