[arch-general] failed to mount root on raid1 after upgrade
Hi, I am a new arch user and this is my first post on this list, so welcome everyone :-) 29th I upgraded my system using pacman -Syu and after that my system does not boot. The problem is that I have root partition on software raid1 and for some reason scripts from initramfs are not able to create /dev/md device and mount it on /new_root. I am using mdadm hook. Now during booting I need to wait for "emergency shell" and mount root partition manually this way: # mdassemble # mount /dev/md2 /new_root # exit I am using lilo as bootloader, not grub. My revelant part of mdadm.conf looks like this: ARRAY /dev/md2 metadata=0.90 UUID=bdfacff7:ab87d057:56b4b521:970a1f14 ARRAY /dev/md3 metadata=1.2 name=serenity:3 UUID=1c4f1323:dc8291ca:79423de8:04e93f2e ARRAY /dev/md1 metadata=0.90 UUID=57c89626:270d4c7b:dedbdb45:3a92e6da (md1 is swap, md2 is root, md3 is home). Hooks that I use in /etc/mkinitcpio.conf HOOKS="base udev autodetect modconf block mdadm filesystems keyboard fsck" This is my lilo.conf: boot=/dev/md2 raid-extra-boot="/dev/sda,/dev/sdb" read-only lba32 prompt timeout=100 default=arch image=/boot/vmlinuz-linux label=arch root=/dev/md2 initrd=/boot/initramfs-linux.img image=/boot/vmlinuz-linux label=arch-fallback root=/dev/md2 initrd=/boot/initramfs-linux-fallback.img I am not sure what hooks/mdadm is supposed to do, for me it looks like it I have to add md=/dev/md2 to command line when booting? I would appreciate any help to resolve this issue. Thanks, Łukasz
On 04/02/13 at 09:54am, Łukasz Michalski wrote:
Hi,
I am a new arch user and this is my first post on this list, so welcome everyone :-)
29th I upgraded my system using pacman -Syu and after that my system does not boot.
The problem is that I have root partition on software raid1 and for some reason scripts from initramfs are not able to create /dev/md device and mount it on /new_root.
I am using mdadm hook.
Have you tried using the mdadm_udev hook? I think this is the better way to go. In my experience in the past, it was certainly the faster more reliable hook. -- Curtis Shimamoto sugar.and.scruffy [at] gmail.com
W dniu 4/2/2013 7:40 PM, Curtis Shimamoto pisze:
On 04/02/13 at 09:54am, Łukasz Michalski wrote:
Hi,
I am a new arch user and this is my first post on this list, so welcome everyone :-)
29th I upgraded my system using pacman -Syu and after that my system does not boot.
The problem is that I have root partition on software raid1 and for some reason scripts from initramfs are not able to create /dev/md device and mount it on /new_root.
I am using mdadm hook.
Have you tried using the mdadm_udev hook? I think this is the better way to go. In my experience in the past, it was certainly the faster more reliable hook.
Yes, I tried, but effect was the same. I only checked it once and reverted back to mdadm hoping that would be easier to make work something that was already working in the past. Regards, Łukasz
2013/4/2 Łukasz Michalski <lm@zork.pl>:
I am not sure what hooks/mdadm is supposed to do, for me it looks like it I have to add md=/dev/md2 to command line when booting?
Do you have mdadm.conf in your initcpio? mdadm hook uses /etc/mdadm.conf or partitions from command line, not both.
Now during booting I need to wait for "emergency shell" and mount root partition manually this way:
# mdassemble # mount /dev/md2 /new_root # exit
This hook is defined in /usr/lib/initcpio/hooks/mdadm, it should start mdassemble if /etc/mdadm.conf exists and have size > 0. -- Krzysztof Warzecha
On 04/03/13 15:31, Krzysztof Warzecha wrote:
2013/4/2 Łukasz Michalski <lm@zork.pl>:
I am not sure what hooks/mdadm is supposed to do, for me it looks like it I have to add md=/dev/md2 to command line when booting?
Do you have mdadm.conf in your initcpio? mdadm hook uses /etc/mdadm.conf or partitions from command line, not both.
Yes, my /etc/mdadm.conf is copied there. I can call mdassemble from emergency shell and my raid devices are created.
Now during booting I need to wait for "emergency shell" and mount root partition manually this way:
# mdassemble # mount /dev/md2 /new_root # exit
This hook is defined in /usr/lib/initcpio/hooks/mdadm, it should start mdassemble if /etc/mdadm.conf exists and have size > 0.
I added run_hook at the end of this script and it works with my /etc/mdadm.conf on already running system: [root@serenity initcpi]# set -x [root@serenity initcpi]# source ./mdadm ++ run_hook ++ local i= mdconfig=/etc/mdadm.conf ++ modprobe md_mod ++ '[' -n '' ']' ++ '[' -s /etc/mdadm.conf ']' ++ /sbin/mdassemble mdadm: failed to set writable for /dev/md2: Device or resource busy mdadm: failed to set writable for /dev/md3: Device or resource busy mdadm: failed to set writable for /dev/md1: Device or resource busy ++ printf '\033]0;%s@%s:%s\007' root serenity /home/zork/tmp/initcpi The question is why it does not call mdassemble in initcpio environment. I will try to debug it at next maintenance window. Regards, Łukasz
participants (3)
-
Curtis Shimamoto
-
Krzysztof Warzecha
-
Łukasz Michalski