Posts

Showing posts from October, 2009

Linux Software RAID Nagios Monitoring & Failure Simulation

It's always nice to monitor to make sure your technology is working properly, it's nicer knowing that when it fails it will alert you to what happened so sometimes you need to test the scenarios. This is just an overview using Debian Lenny of how to use the Linux mdadm tool to create, destroy and rebuild a software RAID 1 (mirror) device. Throughout the process you will see the effects of the Nagios check_linux_raid plugin from the Nagios Plugins project. First I installed the Nagios plugins and mdadm: >apt-get install mdadm nagios-plugins I used fdisk to create two partitions: /dev/sdc1 & /dev/sdc2 (of equal size, in this case 40 MB, I know, I'm generous.) I then used the following command to create a RAID 1 array with the two disks. I happened to call it md0: >mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sdc1 /dev/sdc2 Created an ext3 filesystem on my array: >mkfs.ext3 /dev/md0 Mounted the new file system in an arbitrary location: ...