<div class="gmail_quote">On Mon, Jul 11, 2011 at 12:57 AM, martin f krafft <span dir="ltr"><<a href="mailto:madduck@debian.org">madduck@debian.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
also sprach Yury Polyanskiy <<a href="mailto:yp@mit.edu">yp@mit.edu</a>> [2011.07.11.0304 +0200]:<br>
<div class="im">> * startup proceeds to execute /etc/init.d/mdadm-raid which runs "mdadm<br>
> --assemble --scan".<br>
> * mdadm --assemble --scan discovers the description of /dev/md/data in<br>
> mdadm.conf and finds a lonely /dev/sda with a matching UUID; /dev/md126 is<br>
> created out of a single /dev/sda<br>
<br>
</div>Why would it create a second MD with the same UUID as an existing<br>
one? I have never seen this behaviour in 7 years of mdadm<br>
development. Which version are you running?<br></blockquote><div><br>Hi Martin! I was as surprised as you are. What happens is mdadm scans config file, finds /dev/md/data, scans all drives and finds /dev/sda has a matching UUID and is not busy (others are busy, since they are already part of the assembled array). <br>
<br>Perhaps, this was overlooked because usually a dead drive is physically removed (in my case it was not dead, so stayed inside with a lagging events counter).<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
I appreciate your work on the patch. It seems a bit large. Do you<br>
need to factor our __load_superblock? Or would it be possible to<br>
create a minimal version?<br></blockquote><div><br>I factored out __load_superblock() to avoid code duplication. I thought how to make a smaller version, but the thing is we need to read the  superblock from a physical drive, so something like __load_superblock() must be called from md_check_uuid(). Then I looked for the code that does it, found it in Detail() and separated into a separate function.<br>
<br>Best,<br>Yury<br></div></div><br>