I have 4 working RAID5 installed on Ubuntu 16 and cannot find out HOW to option them to mount on boot. They are both DOS and GPT and work fine when mounted manually.
-
Have you entered them into the /etc/fstab file? – Gordster Jun 28 '19 at 17:03
-
Can I use format directly from blkid ? /dev/md0p1: LABEL="DOC" UUID="92f91148-a6dd-4d06-9276-83ba2e39ec07" TYPE="ext4" PARTUUID="6a551d9f-01" /dev/md0p2: LABEL="DEV_ORIGINAL" UUID="506d7ca6-b09c-415b-a681-f7f71ec62513" TYPE="ext4" PARTUUID="6a551d9f-02" /dev/md0p3: LABEL="MISC" UUID="922f42e6-6ab1-4cd0-bc82-2aee9868187f" TYPE="ext4" PARTUUID="6a551d9f-03" /dev/md0p4: LABEL="BACK" UUID="d2af4a0a-ecaa-48bc-a80c-5dae8b20e5af" TYPE="ext4" PARTUUID="6a551d9f-04" – Jun 29 '19 at 18:43
-
Do I have to add each /dev/sdx ? Or can I just add /dev/md0 ? – Jun 29 '19 at 18:46
-
@JanHus you only add the md0 device. Did you get it to work? – Gordster Jul 01 '19 at 20:47
-
Yes, but only when I use LABEL (only) instead of UUID or /dev – Jul 03 '19 at 01:40
-
@JanHus I am glad you were able to get it to work. Would you say this question has been "answered"? – Gordster Jul 05 '19 at 22:21
-
Yes and no. It seems that "LABEL" has replaced UUID , however fstab does nor seems to work using other symbols like "TYPE". fstab needs better documentation. Cannot honestly say my original question has been clearly answered. – Jul 06 '19 at 23:13
1 Answers
You have to edit the file /etc/fstab in order to have them mounted at boot
first do ls -l /dev/disk/by-uuid/
in order to get the uuid associated with the various raid devices. You can also use the command blkid
to accomplish the same goal.
add the entries into /etc/fstab using whichever text editor you'd like. The format is
<file system> <mount point> <type> <options> <dump> <pass>
so it will look like
UUID=(Put uuid here) /target-directory filesystem defaults 0 0
I have a raid 5 device mounted to a directory at /mnt/raid5 with an xfs filesystem so my /etc/fstab file has this entry
UUID=d1bcc3e6-a211-409c-b6b7-e86652c5fb54 /mnt/raid5 xfs defaults 0 0
replace "target-directory" with the actual directory you are targeting and the filesystem with whatever kind of filesystem you have on those raid devices (ext4, xfs, etc....).

- 1,719