Hello Peter,

On Monday, 28 January 2019 16:56:57 GMT Peter Humphrey wrote:
> Hello list,

> When I run "mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda2
> /dev/ sdb2", this is what I get:
> 
> # mdadm --stop /dev/md0
> mdadm: stopped /dev/md0
> # mdadm: /dev/sda2 appears to contain an ext2fs file system
>        size=524288000K  mtime=Thu Jan  1 01:00:00 1970
> mdadm: /dev/sdb2 appears to contain an ext2fs file system
>        size=524288000K  mtime=Thu Jan  1 01:00:00 1970
> Continue creating array? y
> mdadm: RUN_ARRAY failed: Invalid argument

Do you have CONFIG_MD_RAID1 (or whatever it should be these days) built in 
your kernel?


> If I boot from SysRescCD I also get "device /dev/sda2 exists but is not an
> md device." I also had to "mdadm --stop /dev/md127" since that OS calls the
> first array that.

The SysRescueCD kernel you boot with does not (yet) have access to an 
mdadm.conf and is automatically compiling the RAID array with default 
settings.


> I've tried with a GPT disk header and with an MSDOS one, with similar
> results. Also with /etc/init.d/mdraid not running, with it started on my
> command and with it in the boot runlevel. Each time I changed anything I
> rebooted before trying anything else.
> 
> I must be missing something, in spite of following the wiki instructions.
> Can someone help an old duffer out?

You need to update your initramfs after you configure your array, so your 
kernel knows what to assemble at boot time when it doesn't yet have access to 
your mdadm.conf.

It could help if you examined/posted the contents of your:

cat /etc/mdadm/mdadm.conf
cat /proc/mdstat
dmesg |grep md
mdadm --detail --scan
ls -l /dev/md*

I haven't worked with RAID for some years now, but going from memory the above 
should reveal any discrepancies.

-- 
Regards,
Mick

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to