All of lore.kernel.org
 help / color / mirror / Atom feed
From: Georges Giralt <georges.giralt@free.fr>
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] Sorry to ask here ...
Date: Fri, 24 Feb 2017 18:00:13 +0100	[thread overview]
Message-ID: <3bd2fb7a-d287-7704-2bf8-ee9e844890fc@free.fr> (raw)
In-Reply-To: <8e009a96764979131283584ca8695b7d@dds.nl>

Thank you Xen,

Your trick is working fine.

As far as I can tell, the two md are properly working during boot.

Now, I've to analyze the boot and update logs to try to find what was 
the cause. But, the PC is booting fine. The wife won't complain. ;-) I'm 
happy ;-)

Thank you.


Le 23/02/2017 � 21:23, Xen a �crit :
> Georges Giralt schreef op 23-02-2017 20:25:
>
>> Lastly, I bet the cause is an upgrade of some packages, the machine
>> refuses to boot. It drops onto initramfs shell because the vg0 volume
>> group is not activated. Launching lvm and doing a vgchange -a y does
>> the trick and the system boots fine afterwards.
>
> I don't know what is the cause, but...
>
>
> The /boot is on the same partition so it should be no problem right.
>
> In the initrd the root is opened but it fails?
>
> The quickest thing to do is to go to:
>
> /usr/share/initramfs-tools/scripts/local-top
>
> And edit lvm2
>
> You must add a call to "/sbin/lvm vgchange -ay" at the bottom. If this 
> works it will try to activate everything while still being in the initrd.
>
> Normally only root and swap are activated. I assume the mdX array will 
> be assembled just fine, but I am not sure. However I think the chance 
> is high that it would work.
>
> There is a call in there I think to activate only $ROOT and $RESUME. 
> Maybe it will work if you just vgchange -ay.
>
> If you can enter the system in a chroot and edit this file, and then 
> regenerate the initramfs, it will be included in the new initramfs.
>
> If "lvm2" is upgraded this file will be overwritten.
>
> I assume you can override it in 
> /etc/initramfs-tools/scripts/local-top/lvm2
>
> You could need to copy lvm2 there and edit it there, for that:
>
> mkdir -p /etc/initramfs-tools/scripts/local-top
>
> cp /usr/share/initramfs-tools/scripts/local-top/lvm2 
> /etc/initramfs-tools/scripts/local-top
>
> But I am not 100% sure of that.
>
>
>
> In any case that would definitely add a call to "vgchange -ay" to the 
> initramfs, so that the entire volume group can be activated prior to 
> passing control to systemd.
>
> Good luck.
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>

-- 
"If a man empties his purse into his head, no man can take it away from him.
An investment in knowledge always pays the best interest"


Benjamin Franklin.

  reply	other threads:[~2017-02-24 17:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-23 19:25 [linux-lvm] Sorry to ask here Georges Giralt
2017-02-23 20:23 ` Xen
2017-02-24 17:00   ` Georges Giralt [this message]
2017-03-02  5:44 ` Eric Ren

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=3bd2fb7a-d287-7704-2bf8-ee9e844890fc@free.fr \
    --to=georges.giralt@free.fr \
    --cc=linux-lvm@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.