Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 27

Thread: RAID starting at md127 instead of md0

  1. #11
    Join Date
    Jul 2011
    Beans
    1

    Re: RAID starting at md127 instead of md0

    Worked for me too, thanks a lot

  2. #12
    Join Date
    Jun 2009
    Beans
    8

    Re: RAID starting at md127 instead of md0

    Worked for me as well.

    This is a great "feature". Just ate about 2 hours of my time.

  3. #13
    Join Date
    May 2009
    Location
    DC Metro Area, USA
    Beans
    3
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: RAID starting at md127 instead of md0

    Quote Originally Posted by YesWeCan View Post
    Hi all.
    This seems to be a "feature" of the mdadm in the newest kernel. There was another thread with similar symptoms recently.
    For reasons I do not yet understand, mdadm seems to invent an array device name out of thin air when there is a problem. This confuses everybody. md127 seems to be a common name it now chooses.

    Two things seem to be important:

    1) The ARRAY statement in mdadm.conf needs to be correct. I am not convinced the direct output of mdadm -Es is reliable anymore. Especially the name directive. Mine broke because I had a space in the name!
    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.
    Quote Originally Posted by nasha View Post
    Yep, that's correct.

    The new mdadm/kernel setup creates the default mdadm.conf file with --name=NAS:0 or equivalent.

    When a --name parameter is set, a random (seems to always be 127) md device is created that actually symlinks to /dev/md/NAS:0 or equivalent.

    Removing the name= from the mdadm.conf sets it back to normal
    Good answers. I dropped the name in my mdadm.conf and ran update-initramfs as described. System is now where I want it to be.

  4. #14
    Join Date
    Aug 2008
    Beans
    1

    Re: RAID starting at md127 instead of md0

    Quote Originally Posted by nasha View Post
    Yep, that's correct.

    The new mdadm/kernel setup creates the default mdadm.conf file with --name=NAS:0 or equivalent.

    When a --name parameter is set, a random (seems to always be 127) md device is created that actually symlinks to /dev/md/NAS:0 or equivalent.

    Removing the name= from the mdadm.conf sets it back to normal
    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"

  5. #15
    Join Date
    Jun 2008
    Location
    New York, USA
    Beans
    777
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: RAID starting at md127 instead of md0

    Quote Originally Posted by YesWeCan View Post
    Hi all.
    This seems to be a "feature" of the mdadm in the newest kernel. There was another thread with similar symptoms recently.
    For reasons I do not yet understand, mdadm seems to invent an array device name out of thin air when there is a problem. This confuses everybody. md127 seems to be a common name it now chooses.

    Two things seem to be important:

    1) The ARRAY statement in mdadm.conf needs to be correct. I am not convinced the direct output of mdadm -Es is reliable anymore. Especially the name directive. Mine broke because I had a space in the name!
    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.
    Ran into the same trouble here with a RAID-6 array coming up as /dev/MD127.

    Your tip worked! Thanks!!!
    Gentlemen may prefer Blondes, but Real Men prefer Redheads!

  6. #16
    Join Date
    Apr 2007
    Beans
    4

    Re: RAID starting at md127 instead of md0

    Hi, I posted already in another thread, but I figure I'll post here too in case anyone ran into this. After fixing the UUID in mdadm.conf running update-initramfs outputs the following error:

    Code:
    mdadm: cannot open /dev/md/0: No such file or directory
    However,I do have /dev/md0. I dont know what happened to mdadm so that it is expecting /dev/md/0 or why /dev/md0 is the device being created, but it seems to be keeping my array busted. If anyone knows how to solve this issue, I'd love to know.

    Thanks in advance!

  7. #17
    Join Date
    Jun 2008
    Location
    New York, USA
    Beans
    777
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: RAID starting at md127 instead of md0

    Quote Originally Posted by micahgalizia View Post
    However,I do have /dev/md0. I dont know what happened to mdadm so that it is expecting /dev/md/0 or why /dev/md0 is the device being created, but it seems to be keeping my array busted. If anyone knows how to solve this issue, I'd love to know.

    Thanks in advance!
    I have never seen or heard of a /dev/md/0... it's always been /dev/md0.

    FWIW.....
    Gentlemen may prefer Blondes, but Real Men prefer Redheads!

  8. #18
    Join Date
    Dec 2008
    Beans
    17

    Re: RAID starting at md127 instead of md0

    Quote Originally Posted by micahgalizia View Post
    Hi, I posted already in another thread, but I figure I'll post here too in case anyone ran into this. After fixing the UUID in mdadm.conf running update-initramfs outputs the following error:

    Code:
    mdadm: cannot open /dev/md/0: No such file or directory
    However,I do have /dev/md0. I dont know what happened to mdadm so that it is expecting /dev/md/0 or why /dev/md0 is the device being created, but it seems to be keeping my array busted. If anyone knows how to solve this issue, I'd love to know.

    Thanks in advance!
    I was having a similar issue with gparted saying something like "could not stat /dev/md/0" when my array is md0. Also, the array was not getting found by nautilus/showing up in the Devices section for mounting.



    I'm not sure if this is the correct thing to do but I made the /dev/md directory then made a symbolic link to /dev/md0 by running
    Code:
    sudo ln -s /dev/md0 /dev/md/0
    Not the array shows up in gparted in the drop down/select window as /dev/md0 and it also shows in the devices window in Nautilus and is mountable by clicking on it. Only quirk now is when you select /dev/md0 in the gparted drop down, the actual partition shows up as /dev/md0p1.

    So far it seems to be working - aside from gparted showing a wonky name...

    I'll keep playing with it...

  9. #19
    Join Date
    Dec 2008
    Beans
    17

    Re: RAID starting at md127 instead of md0

    Quote Originally Posted by CrazyMike View Post
    Only quirk now is when you select /dev/md0 in the gparted drop down, the actual partition shows up as /dev/md0p1.
    OK, nevermind /dev/md0p1 appears to be normal partition naming, so it appears I'm in good shape here...

  10. #20
    Join Date
    Oct 2009
    Beans
    2,199
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: RAID starting at md127 instead of md0

    FYI I have done some more research on this and I wanted to share with you how I think mdadm with metadata 1.2 actually deals with device naming. I CANNOT FIND ANY COMPLETE DOCUMENTATION so this may not be a complete picture.

    Each disk has a superblock that specifies a bunch of things but includes the array UUID and the array name.

    The default is to assemble the array under the device names
    /dev/md/<Name> and /dev/mdN where N is made up but seems to start at 127 and count down. Note, two device files are created for one device.

    It is as if at the /dev/md/ level it can use the name off disk but at the /dev/ level it has to use 'md' + a number.

    However, if the disk Name happens to be a number (no text) then it uses this number at the /dev level too.

    Ex1: If the on-disk Name=crazy8 the array device names will be /dev/md/crazy8 and /dev/md127

    Ex2: If the on-disk Name=8 the array device names will be /dev/md/8 and /dev/md8

    This had me very confused for a while.


    Now, a device name in an ARRAY statement in mdadm.conf will override (partially) the disk name.

    Ex3. ARRAY /dev/md2 UUID=ABCD... name=crazy8
    /dev/md/2 and /dev/md2

    Ex4. ARRAY /dev/md/pot UUID=ABCD... name=3
    /dev/md/pot and /dev/md3

    Notice that at the /dev level it will use a valid number from the name.


    Following this? It gets worse! When you give an array a name that is just a number (no text) mdadm prefixes it with your hostname when it displays it.

    Ex5. array name=88 and your hostname=tonys_pc
    mdadm -Es will output
    ARRAY /dev/md/88 ... name=tonys_pc:88

    So I think "88" is all that is written to the disk superblocks but mdadm adds your hostname prefix to it when it displays it. So you are not seeing what is actually in the superblocks. But it DOES NOT use the hostname prefix name when allocating a device name. In this case the device names are
    /dev/md/88 and /dev/md88



    The bottom line for me is that it is essential to define an ARRAY statement in mdadm.conf to tell it what to call things so that it doesn't just go off and make names up that will confuse the heck out of you.
    ASRock P67 Extreme6, Intel i5 2500K, 8GB RAM, nVidia 6600GT, 4x1TB RAID1+0

Page 2 of 3 FirstFirst 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •