Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have three disks that make up a RAID-5. Mdadm repeatedly spat out the third disk (even after replacing it), so I took a closer look. After checking the cables, I eventually decided to label the disks with their UUID as reported by blkid. (and (originally) used in mdadm.conf to identify the disks. This was replaced by the /dev/sdX because the third UUID stopped showing up)

Leaving only one disk plugged in, I rebooted, labeled the disk with what blkid told me, removed the disk, plugged in a different one, rebooted...

The second disk's UUID looked very similar to the first one, so I plugged them all in again, and asked blkid their UUIDs again.

It looked like this on the server:

/dev/sdb: UUID="32c8da8b-e6d5-9a85-5cfc-1a8b59535263" TYPE="linux_raid_member"
/dev/sdc: UUID="32c8da8b-e6d5-9a85-5cfc-1a8b59535263" TYPE="linux_raid_member"
/dev/sdd: UUID="32c8da8b-e6d5-9a85-5cfc-1a8b59535263" TYPE="linux_raid_member"

Popping them each into an external cradle and attaching them to my laptop confirms that these are their actual UUIDs.

I've tried changing the UUIDs, but I can only find information about changing partition's UUIDs, but these belong to the disks themselves.

Every time a disk is removed or added, the BIOS shows the new configuration and asks you to accept this before rebooting, so I suspect that the BIOS/SATA driver is at fault here.

share|improve this question
    
I am pretty sure that having the same UUID on each member is what is supposed to happen. From what I see on my home box the UUID is identical on all member drives on both arrays. Did you have an actual question? Because I don't actually see one in your post. –  Zoredache Nov 24 '10 at 22:46
    
Well, mdadm started refusing the disks at the same time their UUIDs became identical, so I thought that was the cause. If the UUIDs are supposed to become identical, how can you use them in mdadm.conf to select the disks to use? –  AI0867 Nov 25 '10 at 8:17
add comment

2 Answers

up vote 0 down vote accepted

The duplicate UUIDs are normal.

Here's what mine look like:

$ stat /dev/disk/by-uuid/* | grep md
  File: `/dev/disk/by-uuid/4047dc03-xxxx-xxxx-xxxx-xxxxxxxxxxxx' -> `../../md1'
  File: `/dev/disk/by-uuid/78aeced1-xxxx-xxxx-xxxx-xxxxxxxxxxxx' -> `../../md0'
  File: `/dev/disk/by-uuid/aec72c9f-xxxx-xxxx-xxxx-xxxxxxxxxxxx' -> `../../md2'

mdadm gives:

$ sudo mdadm -D /dev/md{0,1,2} | grep UUID
       UUID : cb706582:xxxxxxxx:xxxxxxxx:xxxxxxxx
       UUID : 4033316c:xxxxxxxx:xxxxxxxx:xxxxxxxx
       UUID : e7ae2c88:xxxxxxxx:xxxxxxxx:xxxxxxxx

mdadm and vol_id give the same UIDs for the partitions (vol_id output omitted for brevity, but I haven't tried pulling the disks and checking while not in an array):

$ sudo mdadm -E /dev/sd{a,b,c,d}{1,2} 2> /dev/null | grep UUID
       UUID : cb706582:xxxxxxxx:xxxxxxxx:xxxxxxxx
       UUID : 4033316c:xxxxxxxx:xxxxxxxx:xxxxxxxx
       UUID : e7ae2c88:xxxxxxxx:xxxxxxxx:xxxxxxxx
       UUID : 4033316c:xxxxxxxx:xxxxxxxx:xxxxxxxx
       UUID : e7ae2c88:xxxxxxxx:xxxxxxxx:xxxxxxxx
       UUID : cb706582:xxxxxxxx:xxxxxxxx:xxxxxxxx

blkid gives me a different set of UUIDs, but they are still duplicated across mirrored partitions:

$ sudo blkid /dev/sd{a,b,c,d}{1,2} 2> /dev/null
/dev/sda1: UUID="826570cb-xxxx-xxxx-xxxx-xxxxxxxxxxxx" TYPE="mdraid" 
/dev/sdb1: UUID="6c313340-xxxx-xxxx-xxxx-xxxxxxxxxxxx" TYPE="mdraid" 
/dev/sdb2: UUID="882caee7-xxxx-xxxx-xxxx-xxxxxxxxxxxx" TYPE="mdraid" 
/dev/sdc1: UUID="6c313340-xxxx-xxxx-xxxx-xxxxxxxxxxxx" TYPE="mdraid" 
/dev/sdc2: UUID="882caee7-xxxx-xxxx-xxxx-xxxxxxxxxxxx" TYPE="mdraid" 
/dev/sdd1: UUID="826570cb-xxxx-xxxx-xxxx-xxxxxxxxxxxx" TYPE="mdraid"

Assuming you've tested the disks with hdparm, smartctl, or some other tool, feel free to blame the next cheapest component to replace (assuming the disks were the cheapest).

share|improve this answer
    
This wasn't exactly the answer I was looking for, but it is the answer to the question I asked, so I'll accept this one and ask a better question when I can/need to. –  AI0867 Nov 26 '10 at 7:44
    
As for your question, /dev/disks/by-uuid did not correspond to blkid's output. The disks weren't listed at all. –  AI0867 Nov 26 '10 at 7:53
add comment

Does your /dev/disks/by-uuid correspond with the uuid given by blkid?

I dont think harddrives have uuid only partitions

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.