From: Tero Marttila <tero.marttila@paivola.fi>
To: linux-bcache@vger.kernel.org
Subject: initramfs issues with mdraid/bcache-tools/lvm2 on debian wheezy-backports 3.16
Date: Sat, 11 Oct 2014 18:42:09 +0300 [thread overview]
Message-ID: <54394FD1.4090708@paivola.fi> (raw)
Hi,
I had some difficulty getting an md-raid1 / bcache / lvm stack to boot up
succesfully on the recent debian wheezy-backports 3.16-0.bpo.2-amd64 kernel
with the rootfs on bcache (and a separate /boot).
I ended up having to patch two parts of the initramfs to get it working.
The bcache-tools patch is probably not the correct solution, but I'm not sure
what the exact issue is which causes bcache-register to fail for a newly added
md device..
1)
In bcache-tools, the /dev/md0 udev rule to invoke
/lib/udev/bcache-register /dev/md0
has some timing constraint; namely, during initramfs bootup the
echo "$1" > /sys/fs/bcache/register_quiet
part seems to give (based on udev_log="debug" output):
write error: Invalid arument
without any additional info in dmesg.
However, running the identical command:
/lib/udev/bcache-register /dev/md0
by hand a short while later from within the initramfs prompts works..
I modified bcache-register to include include a sleep, and now the
/dev/bcache0 device registers during boot.
2)
This exposes a related bug within the mdadm initramfs scripts, as per
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=644876#85
So the mdadm part of local-top has to wait for udev to settle and the /dev/bcache0
devices to show up before attempting to activate the lvm VGs.
Not a bcache issues, but part of the workaround...
-- Tero Marttila
--- bcache-tools-1.0.7/bcache-register 2014-05-10 16:38:21.000000000 +0300
+++ /lib/udev/bcache-register 2014-10-11 18:27:42.641482307 +0300
@@ -1,4 +1,7 @@
#!/bin/sh
/sbin/modprobe -qba bcache
+
+echo "$0 sleeping for $1 to settle, while we have:" /dev/bcache* >&2; sleep 5
+
test -f /sys/fs/bcache/register_quiet && echo "$1" > /sys/fs/bcache/register_quiet
--- mdadm-3.2.5/debian/initramfs/script.local-top 2012-08-25 22:29:05.000000000 +0300
+++ /usr/share/initramfs-tools/scripts/local-top/mdadm 2014-10-11 18:15:23.804520521 +0300
@@ -97,11 +97,8 @@
done
fi
-if [ -x "$(command -v udevsettle)" ]; then
- verbose && log_begin_msg "Waiting for udev to process events"
- udevsettle 10
- verbose && log_end_msg
-fi
+# XXX: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=644876
+wait_for_udev 10
maybe_break post-mdadm
next reply other threads:[~2014-10-11 15:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-11 15:42 Tero Marttila [this message]
2014-10-16 22:06 ` initramfs issues with mdraid/bcache-tools/lvm2 on debian wheezy-backports 3.16 Ian Pilcher
2014-10-20 9:46 ` Tero Marttila
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54394FD1.4090708@paivola.fi \
--to=tero.marttila@paivola.fi \
--cc=linux-bcache@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox