linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Mairhofer <63832452@gmx.net>
To: linux-raid@vger.kernel.org
Subject: BUG?: MD UUIDs changed?
Date: Sun, 03 May 2009 13:49:19 +0200	[thread overview]
Message-ID: <gtk0c2$in4$1@ger.gmane.org> (raw)

Hi,

I have a Software RAID 1 with Debian lenny (2.6.26) on the top if two 
1GB RAID disks (Promise SATA300 TX2). I build three MDs (all RAID1) with 
the following commands:

# mdadm --create /dev/md0 --verbose --level=1 --raid-devices=2 /dev/sda1 
/dev/sdb1
# mdadm --create /dev/md1 --verbose --level=1 --raid-devices=2 /dev/sda2 
/dev/sdb2
# mdadm --create /dev/md2 --verbose --level=1 --raid-devices=2 /dev/sda3 
/dev/sdb3

(md0 = Linux root, md1 = data (LVM), md2=swap)
Finally, I saved the configuration with:

# mdadm --examine --scan >> /etc/mdadm/mdadm.conf
# cat /etc/mdadm/mdadm.conf
[...]
ARRAY /dev/md0 level=raid1 num-devices=2 
UUID=a17a69b8:8fffe883:f742d439:f75daca2
ARRAY /dev/md1 level=raid1 num-devices=2 
UUID=97b4ff9d:246a656e:27cc7924:96506d18
ARRAY /dev/md2 level=raid1 num-devices=2 
UUID=b9b6b4d8:ad052c30:dde8335f:840c6bd3

Well, everything worked fine.

But then I wanted to test my SATA RAID and did the following:

1.) Just plugged off one drive (sda)
2.) MDs were in the [_U]-state (/proc/mdstat)
3.) I made an SCSI bus-rescan

Now I wanted to readd the the "failed" drive:

4.) plugged in the drive again
5.) I made an SCSI bus-rescan
6.) the drive appeared as sdd
7.) Removed the failed drives:
     # mdadm --manage /dev/md0 --remove failed
     # mdadm --manage /dev/md1 --remove failed
     # mdadm --manage /dev/md2 --remove failed
8.) added the new (old) ones:
     # mdadm --manage /dev/md0 --add /dev/hdd1
     # mdadm --manage /dev/md1 --add /dev/hdd2
     # mdadm --manage /dev/md2 --add /dev/hdd3

The MDs were rebuilt successfully and now I have [UU]-states again.

But suddenly the UUIDs have changed! In my optinion this should not 
happen because I did not recreate the MDs! I just removed and added 
devices. As you can see, the UUID changed compared to the output above:

# mdadm --examine --scan
ARRAY /dev/md0 level=raid1 num-devices=2 
UUID=ecd91936:b1a55e83:84db6932:6eb15673
ARRAY /dev/md1 level=raid1 num-devices=2 
UUID=97b4ff9d:246a656e:27cc7924:96506d18
ARRAY /dev/md2 level=raid1 num-devices=2 
UUID=8e413e87:bd062cc3:82a1dfb2:c7b8d31a

The very vers strange thing: Only the UUIDs from md0 and md2 changed!

The first question: Why did this happen? Should this ever happen? What 
went wrong? Is this a bug?

The second question: Should I rewrite the mdadm.conf with the new UUIDs?

Regards,
Peter



                 reply	other threads:[~2009-05-03 11:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='gtk0c2$in4$1@ger.gmane.org' \
    --to=63832452@gmx.net \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).