Mounting RAID array device in /etc/fstab in Debian GNU/Linux

May be helpful for you while mounting RAID array device in /etc/fstab

While making entry in /etc/fstab for newly created RAID device,  we need either device name (/dev/md7) or UUID. I got the UUID using the command

#mdadm –detail /dev/md7

and made the entry in fstab. But it did not worked as per  expectation

Searched Google about the problem as usual. I found that we have to use the UUID provided by the following command

#blkid /dev/md7

not by the command mdadm. Both UUID are different. It works. I have no idea why they are different. So please if you find please tell me as well.

Have FUN! again


2 Comments on “Mounting RAID array device in /etc/fstab in Debian GNU/Linux”

  1. The “blkid” command gives the filesystem (block device) UUID, whereas “mdadm –detail” command gives the device UUID.

    The two are different. You can picture one as being the actual device driver (or in the case of RAID, a virtual device driver) and the other being the logical block device that is mountable (ext4, xfs, etc).

    It’s actually convenient that the UUID’s use different delimiters (‘:’ vs ‘-‘) so you can tell what you’re looking at.

  2. shahzaib says:

    I created software raid md0 using cli mode but on rebooting the machine, raid name got changed to md127 instead of md0. So i thought to be on safer side, lets just use UUID in /etc/fstab but in-vain and fall onto your guide and found the same issue that ‘I was using wrong UUID’. 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s