LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-14-2016, 10:57 PM   #1
rolly4444
Member
 
Registered: Sep 2012
Posts: 46

Rep: Reputation: Disabled
RAID drivers changed from /dev/md[0-2] to /dev/md12[5-7]


i have 2 disks /dev/sdd & /dev/sde each contains 4 logical partitions
sd[de][5-8]
i created raid 0 array from 2 partitions /dev/sdd5 and /dev/sde5 and mounted it in /dev/md0
and raid 1 in 2 other partitions /dev/sd[de]6 and mounted it in /dev/md1
and the last 4 partition raid 5 and mounted it in /dev/md2
every thing was good and appeared ok when i ran mdadm --query /dev/md[0-2]
but i found that i don't have /etc/mdadm.conf file
then i rebooted the machine but after that i found /dev/md[0-2] changed to /dev/md12[5-7]
i don't know what happed and what should i do?!!!
 
Old 02-14-2016, 11:43 PM   #2
MrTux
Member
 
Registered: Dec 2015
Posts: 131

Rep: Reputation: Disabled
You need to create a /etc/mdadm.conf file and output your configuration there.

So first, set it up as if it was from zero right when everything was OK

then output the data of mdadm command to the mdadm.conf file

mdadm --examine --scan >> /etc/mdadm.conf
 
Old 02-15-2016, 05:23 AM   #3
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,704

Rep: Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270
It sounds like something slowed down the disk scan, which reordered the discovery.

Mine comes up as md127, and there is only one. I also gave up on using the /dev device names for mounting purposes - there are just too many different ways for disks/partitions to come up ready.

I use volume labels now as they are easy to deal with, easily configured, and just as reliable as UUIDs.
The mdadm.conf is nice to have, but isn't necessary. The information is recorded in each partition and is used to rebuild the md devices.

Last edited by jpollard; 02-15-2016 at 05:32 AM.
 
Old 02-15-2016, 09:37 AM   #4
rolly4444
Member
 
Registered: Sep 2012
Posts: 46

Original Poster
Rep: Reputation: Disabled
i removed all my RAID devices and try to start a new RAID creation
--level=0 was ok
--level=1 was not
[root@rollyRHEL6 Desktop]# mdadm --create /dev/md0 --level=0 --raid-device=2 /dev/sdd5 /dev/sde5
mdadm: Defaulting to version 1.2 metadata
[root@rollyRHEL6 Desktop]# mdadm --create /dev/md1 --level=1 --raid-device=2 /dev/sdd6 /dev/sde6
mdadm: Note: this array has metadata at the start and
may not be suitable as a boot device. If you plan to
store '/boot' on this device please ensure that
your boot-loader understands md/v1.x metadata, or use
--metadata=0.90
Continue creating array?

what is that mean?!!
 
Old 02-15-2016, 09:57 AM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,520

Rep: Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106
I'm not sure I understand what the problem is. Your arrays are still there, still working, they just have different device names, correct? You shouldn't be using device names for mounting anyway, so what's the harm?

As for your latest output, it's pretty self-explanatory. Do you plan to store /boot on your level 1 array? If so, make sure your boot loader can use md/v1.x metadata. If not, then it doesn't matter.

Last edited by suicidaleggroll; 02-15-2016 at 09:59 AM.
 
Old 02-15-2016, 10:29 AM   #6
rolly4444
Member
 
Registered: Sep 2012
Posts: 46

Original Poster
Rep: Reputation: Disabled
i write that to the /etc/mdadm.conf file
DEVICE /dev/sdd[5678] /dev/sde[5678]
ARRAY /dev/md0 devices=/dev/sdd5,/dev/sde5
ARRAY /dev/md1 devices=/dev/sdd6,/dev/sde6
ARRAY /dev/md2 devices=/dev/sdd7,/dev/sdd8,/dev/sde7,/dev/sde8

and reboot the machine, every thing still good; nothing changed
thank you
 
Old 02-15-2016, 10:57 AM   #7
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,704

Rep: Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270
Quote:
Originally Posted by rolly4444 View Post
i write that to the /etc/mdadm.conf file
DEVICE /dev/sdd[5678] /dev/sde[5678]
ARRAY /dev/md0 devices=/dev/sdd5,/dev/sde5
ARRAY /dev/md1 devices=/dev/sdd6,/dev/sde6
ARRAY /dev/md2 devices=/dev/sdd7,/dev/sdd8,/dev/sde7,/dev/sde8

and reboot the machine, every thing still good; nothing changed
thank you
Well, using device names is STRONGLY not recommended. They can change from boot to boot. It all depends on which disk spins up first and responds first. That is how the order of the /dev/sd* names are set. Adding/moving a disk can change the list of names.

If you used the --detail it will report the UUIDs to be used instead. Those will remain until the disk gets wiped and reinitialized, no matter where they are plugged in.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Recovery from RAID failure. Device names changed eg. /dev/md2 to /dev/md/2 sierrajam Linux - Server 3 01-18-2016 06:20 PM
My pendrive suddenly changed from /dev/sda1 to /dev/sdb1! stf92 Slackware 10 08-08-2012 05:02 PM
pseudo terminals: /dev/ptmx <-> /dev/pts/ vs. /dev/ptyp <-> /dev/ttyp rtspitz Linux - Software 2 12-02-2011 02:07 PM
How To Clone Single Drive To Raid 1+0 (copy /dev/sde to /dev/md0)? alfista Linux - Server 2 03-17-2008 10:26 PM
How To Clone Single Drive To Raid 1+0 (copy /dev/sde to /dev/md0)? alfista Linux - Server 2 03-13-2008 04:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration