I have created an md array like so:
mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/sdc /dev/sdd
Then I used the resulting device in a ZFS pool:
zpool attach tank sdb md0
That worked great. ZFS was happy, I was happy.
Now after rebooting the system the md0 device was gone and I don't know how to bring it back. I recreated and resilvered it once, only to face the same situation after reboot.
I am booting my system off of another ZFS pool, but I mount directories from the one I want to attach this device as a mirror to. I'd like that array to come online during boot so ZFS can find it.
I tried doing so with mdadm.conf, but I can't really understand how to set this up. I thought that maybe creating an array would save it's configuration there so it will persist between reboots, but looks like that's not the case.
When I try to recreate the array I get this:
# mdadm --create tank-mirror --level=0 --raid-devices=2 /dev/sdc /dev/sdd mdadm: /dev/sdc appears to be part of a raid array: level=raid0 devices=0 ctime=Thu Jan 1 01:00:00 1970 mdadm: partition table exists on /dev/sdc but will be lost or meaningless after creating array mdadm: /dev/sdd appears to be part of a raid array: level=raid0 devices=0 ctime=Thu Jan 1 01:00:00 1970 mdadm: partition table exists on /dev/sdd but will be lost or meaningless after creating array Continue creating array?
I guess that tells me md should be able to bring this array online after reboot, so I'm not sure why it doesn't do that. It's probably dead simple.
However when I do
mdadm --assemble --scan I get:
mdadm: No arrays found in config file or automatically
PS: Original question this one popped out form: How to attach a 2-device striped mirror to a pool?