I don't see where you did a simple "ls -l /dev/md0" to verify the device exists. The error you're getting suggests it doesn't (or that it is excluded by filtering). Since you say you did the create multiple times there's no reason to assume it doesn't exist but its always best to start with the simplest things in troubleshooting. (You'd be amazed how many computer problems I've solved by asking someone "is the plug secure in the wall socket").
The "filtering" part of your message may however be the issue. On setting up some hardware RAID from an EMC Clariion I had ugly error messages because LVM didn't recognize the devices. This required me to modify /etc/lvm/lvm.conf to filter them out. Perhaps your lvm.conf filters out software raid devices?
So in my lvm.conf on RHEL5 I have the following information:
Code:
# By default we accept every block device:
# filter = [ "a/.*/" ]
# Commented out default - added below line - jlightner
filter = [ "a|/dev/sda.*|", "a|/dev/sdb.*|", "r/.*/" ]
#
# Modified filer accepts /dev/sda & /dev/sdb which are PERC RAID LUNs
# It restricts all other /dev/sd* and /dev/emcpower* which are presumed to
# be Clariion LUNs
# It also restricts /dev/disk* which are just links back to /dev/sd*.
Also on my RHEL5 system I find the following:
Code:
# By default, LVM2 will ignore devices used as components of
# software RAID (md) devices by looking for md superblocks.
# 1 enables; 0 disables.
md_component_detection = 1
I read the latter to mean that it will ignore the 4 devices you used as components but NOT ignore the md0 unless your filter line ignores them.
Note that if you change this file you have to make a new initrd that includes the modified version otherwise it won't be picked up during the boot. (See mkinitrd) Also it may be in a slightly different location depending on your distro.