Skip to contentSkip to conversation

Strange initramfs+udev+raid interaction creating /dev/md/*

DISCUSSION Michael Guntsche 1 participant 2 messages Aug 5, 2010 MD RAID

lore
Share & tools
lore
#0 lore raw

Forwarding it to this list as well since I am not sure if it is a raid or udev problem

Date: Wed, 4 Aug 2010 21:42:16 +0200
From: Michael Guntsche <[email protected]>
To: [email protected]
Subject: Strange initramfs+udev+raid interaction creating /dev/md/*
User-Agent: Mutt/1.5.20 (2009-06-14)

Hi list,

I am facing a strange behaviour between udev and the raid code here and to be honest I do not know where the problem is.

The problem is the following. I have two md devices

ARRAY /dev/md0 metadata=0.90 UUID;9e371a:f651d170:2a42ebe3:f331026f ARRAY /dev/md/1 metadata=1.00 name=gibson:1 UUID/18e1fe:867d891e:501f93be:ea635188

/dev/md/1 is giving me troubles.
I am booting using an initramfs. Looking through the initramfs scripts I see that /dev/md/1 gets created by it. The syslog on the other hand shows me this during the boot process.

Aug  4 21:23:12 gibson mdadm[3606]: DeviceDisappeared event detected on
md device /dev/md/1
Aug  4 21:23:12 gibson mdadm[3606]: NewArray event detected on md device

/dev/md1

Apparently the device gets removed and then added as /dev/md1 as a result /dev/md/1 disappears.
If I then run mdadm -Ds I see this

KERNEL[1280949869.791242] change   /devices/virtual/block/md1 (block)
KERNEL[1280949869.792353] change   /devices/virtual/block/md0 (block)
UDEV  [1280949869.850176] change   /devices/virtual/block/md1 (block)
UDEV  [1280949870.044863] change   /devices/virtual/block/md0 (block)

and /dev/md/1 is re-created.

Now my question. Why does /dev/md/1 disappear and /dev/md1 gets created?

And even if /dev/md1 gets created shouldn't this trigger udev automatically resulting in the creation of /dev/md/1 like running mdadm -Ds does?
The problem I have is that I cannot rally debug this during boot.

FYI running:

udevadm test /sys/block/md1/

results in the symlink /dev/md/1 being created. So either this means that udev is really not triggered when /dev/md1 appears OR /dev/md/1 is still existing and therefor no symlink is created.

Kind regards,
Michael Guntsche