Re: RAID starting at md127 instead of md0
Quote:
Originally Posted by
CrazyMike
OK, nevermind /dev/md0p1 appears to be normal partition naming, so it appears I'm in good shape here...
Sort of normal. mdadm can create sub-partitions within a single md device. I have never used this "feature" and my brief experiments failed when trying to use normal tools to recognize the sub partitions. Anyhow, the naming style "mdxpy" is used to denote partition y of array x.
BTW when I want to have multiple partitions on a single md device I use LVM. Some folks avoid the issue by creating separate md devices for each partition they need.
Re: RAID starting at md127 instead of md0
Quote:
Originally Posted by
dougnaka
FYI, if you are trying to use a large drive (2TB in my case) your problem is not simply mis-numbered RAID devices, it's the partition table on large drives are not the same. You have to use a GUID partition table (GPT) instead of the legacy MBR in all drives larger than 2TB.
Google "GUID partition table (GPT) grub linux howto"
When I create a new md# of a GPT partition on 12.04 LTS I do not have an "ARRAY" entry in /etc/mdadm/mdadm.conf for that md# auto-generated for me.
If I run
Code:
sudo mdadm --detail --scan
the output line for "md127" is
ARRAY /dev/md/myhostname:2 metadata=1.2 name=myhostname:2 UUID=xx77xxf7:xx53xx89:acxxa4xx:xx33xxf9
but when I put
ARRAY /dev/md2 metadata=1.2 UUID=xx77xxf7:xx53xx89:acxxa4xx:xx33xxf9
into /etc/mdadm/mdadm.conf the array still comes up as md127
If I go to the trouble of using
Code:
mdadm --stop /dev/md127
mdadm --assemble /dev/md2 /dev/sdc1 /dev/sdd1
before running the mdscan I still get:
ARRAY /dev/md2 metadata=1.2 name=myhostname:2 UUID=xx77xxf7:xx53xx89:acxxa4xx:xx33xxf9
Which doesn't help me a bit.
Re: RAID starting at md127 instead of md0
I suspect this is mostly related to the default device mapping changing from /dev/sdXX to /dev/xvdXXX
See my write up on page 5 over here:
http://ubuntuforums.org/showthread.php?t=1468064&page=5
simply try changing the device line in mdadm.conf, adjust for your devices obviously:
#DEVICE /dev/sdh[1-8]
DEVICE /dev/xvdh[1-8]
As I say in the other thread - I pulled my hair out today on this one and I think the device naming problem makes some sense. AS soon as I fed mdadm the correct device names all my problems cleared up - and the default output of mdadm --detail --scan works fine in mdadm.conf
Re: RAID starting at md127 instead of md0
Thanks , yes we can. That solved my problem as well.
Re: RAID starting at md127 instead of md0
Quote:
Originally Posted by
YesWeCan
Hi all.
This seems to be a "feature" of the mdadm in the newest kernel.
[...]
So I would try minimizing the specifiers in your ARRAY statements: all you normally need is device name and UUID:
Code:
ARRAY /dev/md0 UUID=e4665ceb:15f8e4b6:b186d497:7d365254
And there seems to be some change to do with /dev/md/* and /dev/md* which I don't yet understand.
2) You need to update initramfs so it contains your mdadm.conf settings during boot.
Code:
sudo update-initramfs -u
Try those and report back. :)
I was tearing my hair out on this one. Was migrating a RAID 1 array from a 10.04 box in which the system drive failed, so didn't have access to its mdadm.conf file. mdadm in 12.04 seems to "find" the array a little more easily than 10.04, but was also getting the md127 ("foreign") array crap happening.
What I did:
Note: The following was all done logged in as root.
1) Get device names for array:2) In my case, my RAID 1 devices are sdb1 and sdc1, so I ran:
Code:
mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdc1
mdadm --detail --scan
3) Output from scan - with extraneous info removed - was used to update /etc/mdadm/mdadm.conf:
Code:
ARRAY /dev/md0 UUID=af4*****:d39*****:998*****:82e*****
4) Then I ran:
Code:
update-initramfs -u
and rebooted.
Problem solved.
Thanks, YesWeCan! :D
Dirk
Re: RAID starting at md127 instead of md0
Create !!!
Got it working too.
Thanks.
Re: RAID starting at md127 instead of md0