Talk:Two Node Fedora 13 Cluster - Xen-Based Virtual Machine Host on DRBD+CLVM

From Alteeve Wiki
Jump to navigation Jump to search

We'll remove the yum -y before the document goes live. For now, I want it there to save time while (repeatedly) rebuilding the clusters as it saves a lot of time.

--Digimer 18:58, 13 October 2010 (UTC)


Dealing with Raid 5/6

Under raid 5/6 if you follow these instruction to closely you'll end up with bad config data in mdadm.conf

cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4] 
md3 : active raid5 sdd5[4] sdc5[2] sdb5[1] sda5[0]
      1395170304 blocks super 1.2 level 5, 512k chunk, algorithm 2 [4/3] [UUU_]
      [=====>...............]  recovery = 26.5% (123522028/465056768) finish=126.7min speed=44896K/sec
      
md2 : active raid5 sda1[0] sdd1[4] sdc1[2] sdb1[1]
      62909952 blocks super 1.1 level 5, 512k chunk, algorithm 2 [4/4] [UUUU]
      bitmap: 0/1 pages [0KB], 65536KB chunk

md1 : active raid5 sda2[0] sdd2[4] sdc2[2] sdb2[1]
      6286848 blocks super 1.1 level 5, 512k chunk, algorithm 2 [4/4] [UUUU]
      
md0 : active raid1 sda3[0] sdd3[3] sdc3[2] sdb3[1]
      255988 blocks super 1.0 [4/4] [UUUU]
      
unused devices: <none>

You will notice the [UUU_]. The default, and this is not in the documentation for mdadm, is to build the array with a degraded spare and then resync it. This is faster, but produces false data for the next step if it is done before the array completes it resync.

Ref: [1]

mdadm --detail --scan | grep md3 >> /etc/mdadm.conf
cat /etc/mdadm.conf

Will produce:

ARRAY /dev/md3 metadata=1.2 spares=1 name=localhost.localdomain:3 UUID=b4fc7771:bef0b6a5:c4c40550:ab3bff42

Which should actually be the following (with out the spares=1)

ARRAY /dev/md3 metadata=1.2 name=localhost.localdomain:3 UUID=b4fc7771:bef0b6a5:c4c40550:ab3bff42