As far as I can tell, the original error you had is a new bug that was introduced in Ubuntu 12.04. Since I am still on the older version, I can't replicated it (well... couldn't even if I tried since I am not at home).
Here is a quick description of it (in language that is hard to comprehend):
and here in language that is a little easier to follow:
Here is my interpretation (which could be wildly incorrect, it is only based on about 15 minutes of googling):
I think that the new version of mdadm only allows one monitoring process at a time. We tell mdadm explicitly to scan the arrays when we followed the following part of my tutorial:
The new version of mdadm will not do any additional scanning without the --no-sharing option turned on.We want to add the above line into the madadm.conf file. The easiest way to do this is to append the line to the end of the file and then edit it afterwards. Start by typing the following (note the pipe symbol after the word scan… it should be right above the enter key on your keyboard on U.S. keyboards):
sudo mdadm --detail --scan | sudo tee --append /etc/mdadm/mdadm.conf
Now, edit the /etc/mdadm/mdadm.conf file by typing:
sudo nano /etc/mdadm/mdadm.conf
The line you appended should be at the end of the file. While it is actually ok to just leave it there, the German in me wants it to live in the "correct" location. I just use cut and paste to move it just under the portions that reads:
# definitions of existing MD arrays
It appears that newer versions of mdadm don't like the "name=XXXXXX" or "metadata=NN" portions of this line. Remove both of those so that the line just reads (again, your UUID will be different):
ARRAY /dev/md0 UUID=77b695c4:32e5dd46:63dd7d16:17696e09
Save and close the file.
There are a couple ways of fixing this. The first, adding --no-sharing, should have done it for you (and I suspect it may have - more on this later). The second is to install an updated version of mdadm. You will have to use apt-get to download it (and you may have to use a different repository than the one built into Ubuntu - try googling on how to do that. I can try to help you if you run into trouble)
Apparently the bug has been fixed, but it isn't in Ubuntu yet as far as I can tell. If you can download and install the latest version of mdadm, that might solve it for you.
But according to what I have read, thatshould have fixed it for you.--no-sharing
And it may have.
mdadm will not stop until you hit ctrl-c. So that is normal.
It seems to me that the email portion is not working. I.e. mdadm is doing what it should, but it isn't actually sending you an email (or for some reason you are not receiving it). As far as I can tell, you have never received an email from mdadm, is that correct? If so, I would suspect that that is your issue now. Look to see whether you have properly set up that part of the tutorial (I forget exactly where it is and don't have time right now to look, but let me know if you still need help and I can do some research).
Here is one other thing you could try (add the --oneshot flag):
But I'm not sure that this is going to help at all. From the man pageCode:mdadm --monitor --scan --oneshot --no-sharing --test
we get this:
Which is a little cryptic.-oneshot
Check arrays only once. This will generate NewArray events and more significantly DegradedArray and SparesMissing events. Running
mdadm --monitor --scan -1
from a cron script will ensure regular notification of any degraded arrays.
But I suspect the issue is your email settings.
Oh, one more thing. Once you get this working in test mode, I'm not sure whether you need to somehow propagete the --no-sharing into the config file or something. That is another issue you may have to resolve.