星期日, 8月 28, 2011

mdadm

50k
echo 50000 >/proc/sys/dev/raid/speed_limit_min
50M
echo 50000000 >/proc/sys/dev/raid/speed_limit_min
echo 50000000 >/proc/sys/dev/raid/speed_limit_max


Bitmap Option

Bitmaps optimize rebuild time after a crash, or after removing and re-adding a device. Turn it on by typing the following command:
# mdadm --grow --bitmap=internal /dev/md0
Once array rebuild or fully synced, disable bitmaps:
# mdadm --grow --bitmap=none /dev/md0
vi /boot/grub/menu.lst
/boot/grub/device.map
grub>root (hd0,0)
grub>setup (hd0)
 mkinitrd /boot/initrd-`uname -r`.img `uname -r` # 將 Software RAID Module 載入 initrd.img
vi /etc/fstab # 編輯 fstab 檔
 mdadm –examine –scan >> /etc/mdadm.conf # RAID的文件配置
※ 監控管理
# mdadm –monitor –scan –mail= your-email@address.com /dev/md0 -t -1 #手動測試監控發信通知
# crontab -e  # 加入 crontab 每隔一段時間監控發信通知
*/5 * * * * /sbin/mdadm –monitor –scan –mail= your-email@address.com /dev/md0 -1
./configure --prefix=/opt/usr --with-default-path=/opt/usr/bin:/usr/bin:/bin --with-mantype=man