Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to create a soft RAID-5 and use UUIDs im the mdadm config file. So I have four disks with 1 partition each that spans the whole disk. But since the partitons don'5 have a filesystem, blkid does not give a UUID. Is there a way to do that?

share|improve this question
up vote 4 down vote accepted

You use the UUID of the RAID5 device on your mdadm.conf, not the UUID for a filesystem.

# mdadmin --detail /dev/md0
        Version : 1.2
           Name : enterprise:0  (local to host enterprise)
           UUID : 7d2bf7e5:dc6edd5c:3ca12e46:8c9e5d4b
         Events : 48

    Number   Major   Minor   RaidDevice State

So I have a mdadm.conf of

ARRAY /dev/md/0 metadata=1.2 UUID=7d2bf7e5:dc6edd5c:3ca12e46:8c9e5d4b name=enterprise:0
share|improve this answer
wow thanks a lot. really good answer! – Daniel Dec 21 '12 at 21:05
From man mdadm.conf there's also a DEVICE section which identifies block devices members of the array. So DEVICE seems deprecated? – davide Jun 4 '15 at 13:47
I am not aware of it being deprecated. It just isn't necessary. The kernel will auto-discover a lot. AFAIK 99% of the time you don't need to use that. But I am sure there are situations where it wouldbe useful. – Zoredache Jun 5 '15 at 5:52

First create your desired raid array with mdadm command. As soon as this is done you will have a UUID for the md. Then you can create a mdadm.conf with

mdadm --examine --scan > /etc/mdadm.conf

Verify later on with ls -l /dev/disk/by-uuid/

share|improve this answer
On some distributions, the config file is on /dev/mdadm/mdadm.conf. Second, I think you meant >>, which would append to the file (just as a comment for other readers here) – Daniel Dec 21 '12 at 21:20
@Daniel youre right thanks for your input – rhasti Dec 26 '12 at 17:16

Use the entries in /dev/disk/by-id to reference the parts of the RAID. For example:


share|improve this answer

Your Answer


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.