From: Colin Guthrie <colin-iHtYJnzJly4@public.gmane.org>
To: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/6] lvm: Ensure LVM is initialised in non-hostonly mode.
Date: Thu, 24 Jan 2013 11:40:54 +0000 [thread overview]
Message-ID: <51011DC6.2040304@guthr.ie> (raw)
In-Reply-To: <51011BB2.3010409-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
'Twas brillig, and Harald Hoyer at 24/01/13 11:32 did gyre and gimble:
> Am 23.01.2013 21:15, schrieb Colin Guthrie:
>> This is a bit of a hack, but it's needed if /usr is on LVM.
>> ---
>> modules.d/90lvm/module-setup.sh | 3 +++
>> modules.d/90lvm/non-hostonly-init-lvm.sh | 8 ++++++++
>> 2 files changed, 11 insertions(+)
>> create mode 100644 modules.d/90lvm/non-hostonly-init-lvm.sh
>>
>> diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
>> index a537b1a..611379a 100755
>> --- a/modules.d/90lvm/module-setup.sh
>> +++ b/modules.d/90lvm/module-setup.sh
>> @@ -49,6 +49,9 @@ install() {
>> sed -i -e 's/\(^[[:space:]]*\)use_lvmetad[[:space:]]*=[[:space:]]*[[:digit:]]/\1use_lvmetad = 0/' ${initdir}/etc/lvm/lvm.conf
>> fi
>> fi
>> + if ! [[ $hostonly ]]; then
>> + inst_hook pre-udev 30 "$moddir/non-hostonly-init-lvm.sh"
>> + fi
>>
>> inst_rules 11-dm-lvm.rules
>> # Gentoo ebuild for LVM2 prior to 2.02.63-r1 doesn't install above rules
>> diff --git a/modules.d/90lvm/non-hostonly-init-lvm.sh b/modules.d/90lvm/non-hostonly-init-lvm.sh
>> new file mode 100644
>> index 0000000..2e9212c
>> --- /dev/null
>> +++ b/modules.d/90lvm/non-hostonly-init-lvm.sh
>> @@ -0,0 +1,8 @@
>> +#!/bin/sh
>> +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
>> +# ex: ts=8 sw=4 sts=4 et filetype=sh
>> +
>> +printf 'cancel_wait_for_dev /dev/non-hostonly-lvm; rm "$job";' \
>> + "$hookdir" >> $hookdir/initqueue/timeout/non-hostonly-lvm.sh
>> +
>> +wait_for_dev "/dev/non-hostonly-lvm"
>>
>
> huh? what does this try to do? This only ensures, that the timeout is reached.
Well..... it's been a while, so my memory is fuzzy, but this was meant
to "solve" the problem of a non-hostonly initrd (i.e. one without
etc/cmdline.d/90lvm.conf), but where the system has a /usr on LVM but /
on a normal partition. i.e. it should initialise all volume groups it
finds in order to mount /usr.
In that setup I don't think lvm was initialised properly because the
initqueue loop was never entered at all and thus nothing actually
triggered the lvm vgchange.
So all this does is ensure the loop is run at least once, which triggers
the LVM init.
I'm going from memory here so a bit hazy - the explanation might not be
totally bang on. I'll see if I can test a non-hostonly initrd with that
kind of disk layout in my VMs to confirm it's still needed as I guess
there is a chance the "never run the initqueue" issue has been factored
out since 017 which is when I think I wrote this :)
Cheers
Col
--
Colin Guthrie
http://colin.guthr.ie/
next prev parent reply other threads:[~2013-01-24 11:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-23 20:15 Various patches applied on Mageia that might be good for upstream Colin Guthrie
[not found] ` <1358972106-2395-1-git-send-email-colin-odJJhXpcy38dnm+yROfE0A@public.gmane.org>
2013-01-23 20:15 ` [PATCH 1/6] dm/md: Only include UUIDs once in the command line Colin Guthrie
[not found] ` <1358972106-2395-2-git-send-email-colin-odJJhXpcy38dnm+yROfE0A@public.gmane.org>
2013-01-24 11:26 ` Harald Hoyer
2013-01-23 20:15 ` [PATCH 2/6] lvm: Ensure LVM is initialised in non-hostonly mode Colin Guthrie
[not found] ` <1358972106-2395-3-git-send-email-colin-odJJhXpcy38dnm+yROfE0A@public.gmane.org>
2013-01-24 11:32 ` Harald Hoyer
[not found] ` <51011BB2.3010409-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-01-24 11:40 ` Colin Guthrie [this message]
2013-01-23 20:15 ` [PATCH 3/6] resume: Ensure we remove the timout job when we find the resume device Colin Guthrie
2013-01-23 20:15 ` [PATCH 4/6] rootfs-block: Support lilo style device numbers Colin Guthrie
[not found] ` <1358972106-2395-5-git-send-email-colin-odJJhXpcy38dnm+yROfE0A@public.gmane.org>
2013-01-24 11:40 ` Harald Hoyer
[not found] ` <51011D9C.4080901-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-01-24 12:30 ` Colin Guthrie
2013-01-23 20:15 ` [PATCH 5/6] i18n: Run console_init prior to udev startup Colin Guthrie
[not found] ` <1358972106-2395-6-git-send-email-colin-odJJhXpcy38dnm+yROfE0A@public.gmane.org>
2013-01-24 12:03 ` Harald Hoyer
2013-01-23 20:15 ` [PATCH 6/6] kernel-modules: Add ehci support for kernel 3.8+ Colin Guthrie
[not found] ` <1358972106-2395-7-git-send-email-colin-odJJhXpcy38dnm+yROfE0A@public.gmane.org>
2013-02-13 16:42 ` Harald Hoyer
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=51011DC6.2040304@guthr.ie \
--to=colin-ihtyjnzjly4@public.gmane.org \
--cc=harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.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