P.S. That was weird because I remembered trying renaming mdadm and stopping all md devices before shutdown (which you suggested at your blog), but that didn't work the first time I tried it. Maybe the key was totally re-creating the array (which I thought I did) using "missing" (ah, the "missing" part could be the key here?!). The only thing I think I did differently is use "missing" when I re-created the array. I even remember using "missing" before, but apparently, I just didn't get the right six numbers. Cheers, Jake On Sun, Aug 12, 2012 at 11:45 PM, Jake Thomas <thomasj10@xxxxxxxxxxxxx> wrote: > Neil, you wouldn't believe it! I got it working! > > Here's what I did: > I got to the Grub menu, hit "e" to temporarily edit my menu entry, and > added "break=premount" to the kernel (linux) line. This causes Linux > to drop you to a recovery shell before the real root is mounted (still > in the initial ramdisk). From there I did "mdadm -R /dev/md127". That > started /dev/md127. Then I entered "exit" to continue the booting > process. > > Once fully booted, /dev/md127 no longer was active, even though I got > it active in the pre-mount environment. > > From a "regular" (after the real root is mounted) environment, I ran > "sudo mdadm -R /dev/md127". This resulted in: > mdadm: failed to run array /dev/md127: Invalid argument > > Then I restarted without doing a break, and "sudo mdadm -R /dev/md127" > resulted with the same error as last time. > > Then I re-created the raid device with: > sudo mdadm --stop /dev/md127 > (note that the file /dev/md127 still exists, it's just stopped, which > I find interesting.) > sudo mdadm --create /dev/md127 --level=1 --raid-devices=2 /dev/sda2 missing > > Then I stopped all devices: > > sudo mdadm --stop /dev/md127 > > (I only had that one device. I probably could have done "sudo mdadm > --stop /dev/md* if I really wanted to wipe them all out, if I had > more.) > > Then I renamed mdadm to mdadm.moved: > sudo mv /sbin/mdadm /sbin/mdadm.moved > > Then I restarted: > sudo shutdown -r 0 > > And my ramdisk hybrid raid device was up and running after startup! > > One time I didn't stop /dev/md127 and restarted. That corrupted it. > > I remade it, and as long as I stopped the device before shutdown, I was good. > > Going into the pre-mount environment does not seem to be needed to > make it _NOT_ corrupted, but I wanted to tell the story how it was. > > > I changed fstab to use the raid device for /usr (specifying by uuid!), > added "/sbin/mdadm.moved --stop /dev/md*" very early in > /etc/rc.shutdown, and added "/sbin/mdadm.moved /dev/disk/by-uuid/[uuid > of my hybrid md device] -a /dev/ram0" to /etc/rc.local. > > And now it works! > > Yey!!!! Thanks so much Neil Brown and Mr. Green and all y'all! > > Super Cheers, > Jake -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html