Automount software RAID array in Ubuntu

I’ve spent ages trying to get automounting of a RAID array to work; and after many failings I now have it working, so I figured now would be a good time to document the process.

Now i’ll assume you have a working software RAID array (or a standard RAID Array) which you can manually mount.

Step 1 – Get the correct UUID

A lot of the guides to this tell you to find the UUID of the RAID array by using ‘mdadm –detail -scan’ – this is WRONG! It took me a while to find that the correct UUID for your array can be found by using the blkid command (blkid is a command-line utility to locate/print block device attributes):

blkid /dev/md127

Once you have the correct UUID you can move on…

Step 2 – Find your current mount point

Open Disk Utility; mount your RAID array, and look in the lower right of the panel; it should tell you the current Mount Point (see screenshot – click to view large version):

Step 3 – Edit /etc/fstab

Fstab is the filesystem table; to open it use the following:

sudo nano /etc/fstab

(you can use whatever editor you prefer)

You’ll be presented with a mess like this:

# /etc/fstab: static file system information.
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
# proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=0cc63324-XXXX-46a4-XXXX-ba65c6db8e0b / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=901bd836-XXXX-4034-XXXX-586f78b7eae8 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 01

At the bottom of this file add the following (replace the UUID in the example below with you got from step 1, and the /media/Tumbler with the mount point from step 2):

#Personal RAID Array
UUID=9e391861-XXXX-411b-XXXX-6cf39ed9c8e9 /media/Array/ ext4 defaults 0 0

Ensure you remove the quotation marks from the UUID from step 1!

Save the changes; reboot and voila! your RAID array (should be automounted)


  1. Hey! First of all, this guide did solved my auto mount problem.

    BUT there’s a BUT… when starting my ubuntu desktop 12.04 x64, Im getting an “error occured while mounting static” error. I press S to skip it, and upon logging in… the RAID Array is auto mounted.

    So, the problem here is the occurence of the error, but the RAID Array is auto mounted anyway.

  2. Thank you. This worked great. I was able to see the UUID and the path in the disk manager. Opened fstab and added the line as you specified. Rebooted, and my Software Raid 5 array auto mounted. Which is really great because we loose power from time to time, and this way my Plex server will just come back online without me having to log in and re-mount the raid array.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.