Re: failed to mount root on raid1 after upgrade

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 04/03/13 15:31, Krzysztof Warzecha wrote:
2013/4/2 Łukasz Michalski <lm@xxxxxxx>:
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



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux