Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 7253  / 2 Years ago, fri, october 28, 2022, 7:19:42

I have created a Raid0 and it works as I expect it. The the array file is created at /dev/md0. I want this to be mounted automatically by adding this line at the end of the /etc/fstab file :



/dev/md0 /mnt/storage ext4 noatime,commit=60,data=writeback,nodiratime,journal_async_commit,nouser_xattr 0 0


and this Line at the end of the /etc/mdadm/mdadm.conf:



ARRAY /dev/md0 metadata=1.2 name=lil-RIKO:lil-RIKO UUID=6016d5e4:6e42cb97:6b2a8e6e:098c1982


In Boot time, I saw that /mnt/storage was being waited to be mounted and provide two options : to Skip ... or to Ma... I forgot what its says. I waited so long that made think something is wrong. I went into the "maintenance mode" which is a root shell then I quickly checked presence of /dev/md0 file. The File wasn't there, only /dev/md127. I tried to mount that file instead and it complained about not finding a superblock. I manually mounted the raid via mdadm --assemble /md0after removing the /dev/md127 file via mdadm --stop /dev/md* and I continued booting. Next reboot, I experienced the same issue.



How come the raid wasn't get automatically mounted? There was no presence of /dev/md0 at boot time and I was able to mount it manually.



EDIT1: I have managed to "merge" it into one which is /dev/md127 by removing a disk , The problem still occurs but when I issue ths cat /proc/mdstat I got this:



md127 : inactive sdc[1](S) sdb[0](S)
7830528 blocks super 1.2


This means (I think ) the raid is not yet activated. But when I reattached it it comes active like this:



md127 : active raid0 sdc1[1] sdb1[0]
7830528 blocks super 1.2 512k chunks


What went wrong this time ?


More From » boot

 Answers
6

Hopefully you already found an answer; if not, I just went through this, and the short answer is to edit your array definitions at /etc/mdadm/mdadm.conf; basically remove anything other than the /dev/md* and UUID= info (delete metadata, name, etc). On reboot, you should no longer have the md127, md126, etc problem with your arrays.



So based on your line above, change



ARRAY /dev/md0 metadata=1.2 name=lil-RIKO:lil-RIKO UUID=6016d5e4:6e42cb97:6b2a8e6e


to



ARRAY /dev/md0 UUID=6016d5e4:6e42cb97:6b2a8e6e

[#29553] Saturday, October 29, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ligenvirt

Total Points: 238
Total Questions: 98
Total Answers: 100

Location: Senegal
Member since Fri, Aug 21, 2020
4 Years ago
ligenvirt questions
Tue, Aug 17, 21, 02:28, 3 Years ago
Thu, Sep 23, 21, 17:55, 3 Years ago
Mon, Oct 18, 21, 03:34, 3 Years ago
;