WORD PTR

Pointed Development

I Didn’t Read the Docs – MDADM and Hostname

| Comments

A quick post and lesson learned: I’m new to this whole software RAID thing. I should have read all of the mdadm documentation before creating a RAID.

Here’s a bit of back story: Over the last couple of months, my computer (see 1, 2, 3, 4) has built up quite a lot of dust around the fan intakes.

No big deal, but I need to ensure everything runs tip-top and I don’t want to stress the fans or anything like that. Today, I decided to give it a good cleaning. I shut down the machine, unplugged the Important Stuff and applied copious amounts of canned air to every porous surface of the box inside and out. In about five minutes, everything looked great.

I booted back up expecting sunshine and roses.

Except my RAID was missing.

Oh no.

Let me start out by saying, I should have known better!

By the way, this is the first time I’ve shut this machine down in about a month…

My current RAID is established as two 2 TB drives in a RAID 0 configuration. I use the raw block devices (/dev/sdb and /dev/sdc) for the array and the array is configured with a single XFS partition. It’s been stable and it performs very well.

When you create an array with mdadm, you specify the block devices or partitions you want participating. mdadm then creates a RAID superblock on the devices.

What I didn’t know – and what bit me – was that mdadm adds the hostname to the superblock.

Between rebooting my machine today and establishing the array over a month ago, I changed my hostname and didn’t alter my mdadm superblock.

That was stupid.

Lesson Learned: Know everything about everything and read all of the documentation.

Here’s a quick overview of the issue I ran into.

Comments