Replacing a failing HDD in RAID1 in Ubuntu Server

I have a software RAID1 (mirrored) setup with four partitions on two 160GB SATA drives. Munin started emailing me reports that a drive was failing with bad sectors.

This is what I did to get the system up and running again.

From advosys.ca I completed the following steps first in the terminal:

To make Ubuntu Server automatically boot when one drive in a RAID array has failed do the following:

From a running server, do a package update to make sure you have the latest kernel and boot loader

sudo apt-get update && apt-get upgrade

Reboot the server to ensure any new kernel and bootloader packages are in place.
From the command line run

sudo grub-install /dev/md0

to ensure GRUB is installed on all members of the boot RAID device.

When asked “Should mdadm run monthly redundancy checks of the RAID arrays?”, select either Yes or No (read the warning about possible performance impact and decide. “Yes” is the safer choice)

From the command line run

sudo dpkg-reconfigure mdadm

When asked “Do you want to start the md monitoring daemon?” select Yes.

Enter a valid email address to send warning messages to.

When asked “Do you want to boot your system if your RAID becomes degraded?” select Yes. Continue reading Replacing a failing HDD in RAID1 in Ubuntu Server

Upgrading the blog

Words here at Mixedbredie.net has been upgraded to WordPress 2.3 and K2rc2. It wasn’t without its glitches and the installation had to be deleted twice before it all worked properly. Two plugins, Maintenance Mode and WP-DB-BACKUP, helped out. The first puts up a notice telling all users that you are doing something to your site. The other plugin, wp-db-backup, allows you to set up a scheduled backup of your wordpress database tables with the option of emailing the backup to an email address or to download onto your local computer as a tar archive. Installing the new K2rc2 worked fine unzipping the files into a “K2” directory in /wp-content/themes. The new tagging feature allows for the creation of tags for each post and K2 has a cloud widget for the sidebar. Continue reading Upgrading the blog