Remove Failing Disk from MDADM Array

If you need to stop a resync of an MD array, the easiest way to do it is:

echo “idle” > /sys/block/md0/md/sync_action && mdadm –manage /dev/md0 –fail /dev/sda1

Revise the above based on the number of your array and the device that you want to mark as failed. Without the &&, the resync will resume right away. The above will stop the sync and mark the other disk as failed, which can be fixed later.

 

Simple (Non-System) Raid 1 Setup in Ubuntu Using MDADM

I had trouble finding tutorials on setting up a simple filesystem raid 1 setup. Most were geared towards setting up Ubuntu on a Raid 1 array.

List your disks:

$ sudo fdisk -l

This will give an output like:

Disk /dev/sdd: 240.1 GB, 240057409536 bytes
81 heads, 63 sectors/track, 91879 cylinders, total 468862128 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x211bbf32

Device Boot Start End Blocks Id System
/dev/sdd1 2048 468862127 234430040 fd Linux raid autodetect

Disk /dev/sde: 240.1 GB, 240057409536 bytes
81 heads, 63 sectors/track, 91879 cylinders, total 468862128 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x22e6d1f2

Device Boot Start End Blocks Id System
/dev/sde1 2048 468862127 234430040 fd Linux raid autodetect

Continue reading “Simple (Non-System) Raid 1 Setup in Ubuntu Using MDADM”