[Bug 541058] Re: [->UUIDudev] mdadm fails to automatically assemble raid during boot (without mdadm.conf)
Just an update for everyone interested. I solved my issue by one(or multiple) of the following steps. Failing my sdc disk, pasting new superblock, writing new boot sector, partitioning again and adding the disk back. So I am still not sure what caused my problem except I am fairly sure that my 2nd disk had a previous superblock that confused things. Disk was used in another system as part of a md array. What showed me the issue was "mdadm -Es". It showed me two arrays that can be assembled. Sorry I can not be more helpful except you should run mdadm -Es early on and avoid a lot of tail chasing. If you are seeing an array you did not expect that will cause the problems with "--incremental" when booting up. Before I fixed the issue I was seeing this: root@jamaica:~# mdadm --examine --scan ARRAY /dev/md0 UUID=5551e210:6dbc9e1b:2aa365fc:c3f97a4c ARRAY /dev/md0 UUID=4795c86a:79111507:dbd3f904:98c17f24 After: root@jamaica:~# mdadm --examine --scan ARRAY /dev/md0 UUID=4795c86a:79111507:dbd3f904:98c17f24 Also worth noting is my superblock is 0.90. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/541058 Title: [->UUIDudev] mdadm fails to automatically assemble raid during boot (without mdadm.conf) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mdadm/+bug/541058/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 541058] Re: [->UUIDudev] mdadm fails to automatically assemble raid during boot (without mdadm.conf)
Sorry I forgot it might be helpful to knowthe following also root@jamaica:~# cat /etc/issue Ubuntu 11.10 \n \l root@jamaica:~# uname -a Linux jamaica 3.0.0-16-generic #28-Ubuntu SMP Fri Jan 27 17:44:39 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux root@jamaica:~# mdadm -V mdadm - v3.1.4 - 31st August 2010 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/541058 Title: [->UUIDudev] mdadm fails to automatically assemble raid during boot (without mdadm.conf) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mdadm/+bug/541058/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 541058] Re: [->UUIDudev] mdadm fails to automatically assemble raid during boot (without mdadm.conf)
For me no amount of settings in mdadm.conf worked. --examine looks fine on both my partitions participating in a raid 1 volume. I played with DEVICE, HOMEHOST, ARRAY and tried all kind of suggestions. The only way I could get my raid1 array to assemble on bootup was doing this: root@jamaica:~# cat /lib/udev/rules.d/85-mdadm.rules | grep mdadm # This file causes block devices with Linux RAID (mdadm) signatures to # automatically cause mdadm to be run. RUN+="/sbin/mdadm /dev/md0 --assemble --add /dev/sdb2 /dev/sdc2" #RUN+="/sbin/mdadm --incremental $env{DEVNAME}" Plus: root@jamaica:~# update-initramfs -u -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/541058 Title: [->UUIDudev] mdadm fails to automatically assemble raid during boot (without mdadm.conf) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mdadm/+bug/541058/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 541058] Re: [->UUIDudev] mdadm fails to automatically assemble raid during boot (without mdadm.conf)
@tombert, and any one else who is seeing a similar bug, I hope that the following helps you in resolving this bug. Please do let us know if you do happen to try it out. --- Call for testing mdadm 2.7.1 autoassembly. JFYI, for hitherto Ubuntu releases the mdadm package shall stay at 2.7.1 However Natty would have mdadm at 3.4.1. This document is intended to test the mdadm fixes for 2.7.1. Here is the rough procedure that needs to be followed: Testing auto-assembly of your md array when your rootfs lies on it: 1)Install the mdadm package and initramfs package kept at: https://edge.launchpad.net/~csurbhi/+archive/mdadm-autoassembly 2)Run /usr/share/mdadm/mkconf and ensure that your /etc/mdadm/mdadm.conf has the array definition. a) Save your original initramfs in /boot itself by say /boot/initrd-old.img. b) Then run update-initramfs -c -k . Store this iniramfs as /boot/initrd-new.img. We shall use this initramfs as a safety net. If you cannot boot with the auto-assembly fixes, then you should not land in a foot in your mouth situation. Through grub's edit menu, you can then resort to this safety net by editing the initrd=initrd-new.img (or if this does not work for some random reason then resort back to your older initrd=initrd-old.img) This way you will be sure that you can still boot your precious system. c) Now comment or remove the ARRAY definitions from your /etc/mdadm/mdadm.conf and once again run the same “update-initramfs -c -k ” to generate a brand new initramfs. 3)Run mdadm –detail –scan and note the UUIDs in the array. Note the hostname stored in your array. Does it not match with your real hostname? Then we can fix that at the initramfs prompt that you inevitably will land at if you try auto-assembly. Also note the device components that form the root md-device. Keep this paper for cross checking when you reboot 4)Reboot. 5)If you are at the initramfs prompt here are the things that you should first ensure: a) ls /bin/hostname /etc/hostname - are these files present? b) run “hostname”. Does this show you the hostname that your system is intended to have? Is it the same as the contents of /etc/hostname. c) ls /var/run – Is this dir there? If you answer yes to the above three questions, then things are so far so good. Now run the following command: mdadm –assemble -U uuid /dev/ Your mdadm –detail –scan that you ran previously should have given you the component names if you dont know it right now. Hopefully you have them listed on your paper. Eg in my case I ran: mdadm –assemble -U uuid /dev/md0 /dev/sda1 /dev/sdb1 Again run: mdadm –detail –scan and verify that the uuids are indeed updated and the hostname reflects the hostname that is stored /etc/hostname. You can now press Ctr+D and you should come back to the root prompt. However you still need to test auto-assembly of your root md device. To do that simple reboot and you should not see the face of initramfs this time. You should land gently on your root prompt as you expected. If you do not see the light of the rootfs prompt this way or using this initramfs, then as mentioned earlier, please avail your saved initrd images through grub. Skip the further steps in this case. Update the launchpad bugs, saying you could not get to the root prompt with manual assembly as well. First we need to get manual assembly fixed for you before worrying about auto-assembly. But hopefully this wont be the case. 6)If in the first place your uuid matched with that of the hostname, because you already had updated the array meta data with the -U uuid command, then with these packages, ideally, you should directly see the root prompt without any problem. 7)If either way, you still see initramfs and are not seeing the root prompt, then kindly upload the following on the respective launchpad bugs related to mdadm: a) output of /var/run/mdadm.map b) output of /proc/mdstat. c) output of hostname (in initramfs) d) output of mdadm –detail –scan (once you have assembled the array manually and have got at the root prompt) In order to save this output when you are the initramfs prompt you should copy these files in /dev/ and then manually assemble your array. Once you get to the root prompt, you would find these files in /dev/. Please attach these to the launchpad bugs and we can start debugging from there. For auto-assembly of your non root devices, this should not bring you to initramfs, unless you have the device mounted with a fs using fstab and are not using “nobootwait” in the options section for your fs. Once you are in the root fs, and your non -root array is not up with auto-assembly, then you can very easily attach the output of the /var/run/mdadm.map and /proc/mdstat. If needed, I will also post a mdadm package which will output a lot of verbose information, to find out what is exactly going wrong. Thanks very much for your help. Remember tha
[Bug 541058] Re: [->UUIDudev] mdadm fails to automatically assemble raid during boot (without mdadm.conf)
** Description changed: Binary package hint: mdadm Creating an mdadm array works fine: mdadm --create /dev/md0 -n 3 -l5 /dev/sdb1 /dev/sdc1 /dev/sdd1 Now when booting the array is assembled correctly. Delete the array and zero-superblock, create new partition and mark as "fd", create the same array again with command above. Now the system tries to assemble a single device into /dev/md_d0 - when other devices are missing. I checked each device with -examine and each reports the same uuid, the same host and the same name. In order to get it working one has to stop the md_d0 and assemble manually: mdadm --stop /dev/md_d0 mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdc1 /dev/sdd1 To overcome this problem one has to remove the homehost from mdadm.conf and assemble the array manually during boot. What helps ist to reinstall the system ... This bug is pretty often found when googling around. Possible hints are udev and dmraid, whereas I already deinstalled dmraid but didn't help. Ubuntu 9.10 Linux 2.6.31-14-generic-pae mdadm 2.6.7.1 * The array gets configured when mdadm.conf reflects the array - definitions. But it does not get assemble automatically + definitions. But it does not get assembled automatically -- [->UUIDudev] mdadm fails to automatically assemble raid during boot (without mdadm.conf) https://bugs.launchpad.net/bugs/541058 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs