1

Every reboot on my server results in a halt due to a degraded RAID5 (software) array. The same drive /dev/sdc appears to be dropping out each time. I ignore and boot with a degraded array any ways. To get the array rebuilding again with the drive I issue the command:

sudo mdadm /dev/md0 --add /dev/sdc

and with this I can see:

cat /proc/mdstat 
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md0 : active raid5 sdc[4] sdd[3] sdb[1]
  2930014752 blocks super 1.2 level 5, 4k chunk, algorithm 2 [3/2] [_UU]
  [====>................]  recovery = 24.8% (363686144/1465007376) finish=213.2min speed=86050K/sec

 unused devices: <none>

During the rebuild process I can see the ARRAY UUID is different on the /dev/sdc drive and the third drive partition is not listed:

sudo mdadm --examine /dev/sd[bcd]1 | egrep 'UUID|dev'
/dev/sdb1:
 Array UUID : 1a000a97:9257df81:4a6ccde8:c6b9b3f5
Device UUID : f7dd3752:8e28c48e:ae389924:9f42b503
Device Role : Active device 1
/dev/sdd1:
 Array UUID : 1a000a97:9257df81:4a6ccde8:c6b9b3f5
Device UUID : 63031869:ecade3ac:2738fbdf:3f1af144
Device Role : Active device 2

Third drive is listed here though,

sudo mdadm --examine /dev/sd[bcd] | egrep 'UUID|dev'
/dev/sdb:
 Array UUID : 4918dc9c:b21aa70f:21db4067:388cc3a3
Device UUID : 5f9355e9:c370e7e2:fb03fe3d:969fda6e
Device Role : Active device 1
/dev/sdc:
 Array UUID : 4918dc9c:b21aa70f:21db4067:388cc3a3
Device UUID : 10f27f1c:7c00915a:cb1a9c17:e3722644
Device Role : Active device 0
/dev/sdd:
 Array UUID : 4918dc9c:b21aa70f:21db4067:388cc3a3
Device UUID : 16879ff2:02f73bc3:d2bd7b04:86fd8098
Device Role : Active device 2

I have also noticed that the ARRAY UUID of /dev/sdc is the same as what is in /etc/mdadm/mdadm.conf

grep ARRAY /etc/mdadm/mdadm.conf 
ARRAY /dev/md/0 metadata=1.2 UUID=4918dc9c:b21aa70f:21db4067:388cc3a3 name=ubuntu-nas:0

sudo mdadm --detail --scan
ARRAY /dev/md/0 metadata=1.2 spares=1 name=ubuntu-nas:0 UUID=4918dc9c:b21aa70f:21db4067:388cc3a3

sudo blkid returns the UUID of the other two drives in the array as the same UUID:

sudo blkid
/dev/sdd1: UUID="1a000a97-9257-df81-4a6c-cde8c6b9b3f5" UUID_SUB="63031869-ecad-e3ac-2738-fbdf3f1af144" LABEL="ubuntu-nas:0" TYPE="linux_raid_member" 
/dev/sdb1: UUID="1a000a97-9257-df81-4a6c-cde8c6b9b3f5" UUID_SUB="f7dd3752-8e28-c48e-ae38-99249f42b503" LABEL="ubuntu-nas:0" TYPE="linux_raid_member" 
/dev/sdc: UUID="4918dc9c-b21a-a70f-21db-4067388cc3a3" UUID_SUB="cb23ee6c-3bd6-7ade-272c-b3808162cbd0" LABEL="ubuntu-nas:0" TYPE="linux_raid_member" 
/dev/md0: UUID="6a5fffe8-aba0-4ee2-b74b-20f7d735eedd" TYPE="ext4"

Is there something wrong with my UUID of the ARRAY? Why is the ARRAY UUID of the dropped drive showing up as what is in /etc/mdadm/mdadm.conf? What should the UUID of my array say for all of my drives? What should I put in the /etc/fstab?

grep /dev/md0 /etc/fstab
/dev/md0 /media/nas/ ext4 defaults,noatime,nobootwait 0 2

I have also discovered that the array may have assembled incorrectly. My data is there and I can access it but when I run sudo mdadm --examine --scan -v I show two different arrays with the same /dev/md/0 and differnt UUIDs. Looks like one array is created with the whole disk and the other is with the partitions. How do I fix this without losing my data??

sudo mdadm --examine --scan -v
ARRAY /dev/md/0 level=raid5 metadata=1.2 num-devices=3 UUID=4918dc9c:b21aa70f:21db4067:388cc3a3 name=ubuntu-nas:0
   devices=/dev/sdd,/dev/sdc,/dev/sdb
ARRAY /dev/md/0 level=raid5 metadata=1.2 num-devices=3 UUID=1a000a97:9257df81:4a6ccde8:c6b9b3f5 name=ubuntu-nas:0
   devices=/dev/sdd1,/dev/sdb1

0

You must log in to answer this question.

Browse other questions tagged .