How to replace a broken mirror on a Supermicro X8DTT

Dilemma.

One of the mirrors on your Supermicro has gone. No SNMP management to pick this up? See another article on this website.

It’s evident from the output of mdstat that something is wrong if you look below at [U_]:

cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdb1[0]
9766303680 blocks super 1.2 [2/1] [U_]

On a working server this should be [UU]:

 cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdb1[0] sdc1[1]
3906885440 blocks super 1.2 [2/2] [UU]

So you’ve zeroed the drive, which took around 24 hours, and now you have replaced it. But what next?

Partition the Disk: If your RAID array requires partitions rather than using entire disks, you will need to partition the new disk similarly to the other disks in the array. You can use fdisk or parted to create the partitions. For a simple RAID setup, you might mirror the partition layout of another disk in the array.”

My network engineer suggested gdisk instead, so these instructions will use that:

gdisk /dev/sdx
  • Type n to create a new partition.
  • Enter the partition number (or press Enter to use the default).
  • Specify the first and last sectors (or press Enter to use the default full disk).
  • For the partition type, type fd00 which stands for Linux RAID.
  • Finally, type w to write the new partition table to the disk and confirm the changes.

Add partition to mirror

sudo mdadm –manage /dev/md0 –add /dev/sdx1

Monitor RAID

cat /proc/mdstat

Monitor with more Detail

mdadm -D /dev/m
mdadm --detail /dev/md0

Check Sync Action

cat /sys/block/md0/md/sync_action
check

More information

Lots of goodies here: https://unix.stackexchange.com/questions/28636/how-to-check-mdadm-raids-while-running

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top