All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerry Reno <greno@verizon.net>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] F7 will not boot after running backup w/snapshot
Date: Thu, 01 May 2008 22:03:26 -0400	[thread overview]
Message-ID: <481A766E.1060001@verizon.net> (raw)
In-Reply-To: <Pine.LNX.4.44.0805012041160.26700-100000@bmsred.bmsi.com>

[-- Attachment #1: Type: text/plain, Size: 2154 bytes --]

Stuart D. Gathman wrote:
> ZZZZOn Thu, 1 May 2008, Charles Marcus wrote:
>
>   
>> In Gerry's scenario here, if the snapshot volume had NOT been on a ram 
>> disk, would he have had the problem he had or not?
>>     
>
> Here is the snip from Fedora/RHEL for activating the VG containing
> the root filesystem (note: kernel modules and lvm command are contained in
> initrd filesystem, and do not depend on /lib/modules/...):
>
> ...
> echo "Loading dm-mod.ko module"
> insmod /lib/dm-mod.ko
> echo "Loading dm-mirror.ko module"
> insmod /lib/dm-mirror.ko
> echo "Loading dm-zero.ko module"
> insmod /lib/dm-zero.ko
> echo "Loading dm-snapshot.ko module"
> insmod /lib/dm-snapshot.ko
> echo Making device-mapper control node
> mkdmnod
> mkblkdevs
> echo Scanning logical volumes
> lvm vgscan --ignorelockingfailure
>   
So right ^^^here^^^ is where we need to test if old snapshot was 
read-only or read-write (how to do that? grep vgdisplay -v for some value?)
So maybe something like this?:

set removemissing flag false
if old snapshot is the only PV missing:
--if old snapshot was read-write:
------stop boot sequence
------show user some info about old snapshot
------prompt whether to remove the old snapshot from the VG so it can be 
activated
------if response yes:
----------set removemissing flag true
------else
----------alert user that manual action is required to correct problem 
related to old snapshot before VG can be activated
----------abort boot
--elsif old snapshot was read-only:
------set removemissing flag true
if removemissing flag true:
----vgreduce --removemissing VG PV(old snapshot)

Gerry

> echo Activating logical volumes
> lvm vgchange -ay --ignorelockingfailure  rootvg
> ...
>
> This will fail if any of the physical volumes are missing.  More logic
> in initrd is required to boot with missing PVs.
>
> So yes, a ram disk is guaranteed to be missing on reboot, and thus to 
> fail in the RH/Fedora distros.  There is no problem taking snapshots
> of the root fs otherwise.  If there is a robust way to reduce 
> missing PVs automagically in the above script from initrd, Fedora could
> use the contribution.
>
>   


[-- Attachment #2: Type: text/html, Size: 2729 bytes --]

  reply	other threads:[~2008-05-02  2:04 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-30  0:53 [linux-lvm] F7 will not boot after running backup w/snapshot Gerry Reno
2008-04-30  2:29 ` Gerry Reno
2008-04-30  3:51   ` Gerry Reno
2008-04-30 14:00     ` Gerry Reno
2008-04-30 15:09       ` Larry Dickson
2008-04-30 17:23         ` Gerry Reno
2008-04-30 18:19           ` Gerry Reno
2008-04-30 18:28           ` Charles Marcus
2008-04-30 20:24             ` Gerry Reno
2008-04-30 21:19               ` Milan Broz
2008-04-30 22:30                 ` Gerry Reno
2008-05-01 15:48                   ` malahal
2008-05-01 16:30                     ` Mikulas Patocka
2008-05-01 18:15                       ` Gerry Reno
2008-05-01 18:38                         ` Charles Marcus
2008-05-01 19:37                           ` Gerry Reno
2008-05-01 19:42                             ` Charles Marcus
2008-05-01 19:53                               ` Gerry Reno
2008-05-01 20:03                                 ` Charles Marcus
2008-05-01 20:21                                   ` Gerry Reno
2008-05-01 20:25                                     ` Alasdair G Kergon
2008-05-01 20:30                                       ` Gerry Reno
2008-05-01 20:34                                         ` Charles Marcus
2008-05-01 20:36                                           ` Gerry Reno
2008-05-01 20:44                                             ` Charles Marcus
2008-05-01 20:57                                               ` Gerry Reno
2008-05-01 21:59                                                 ` Alasdair G Kergon
2008-05-01 22:12                                                   ` Gerry Reno
2008-05-01 23:50                                                     ` Gerry Reno
2008-05-02  0:38                                                       ` Stuart D. Gathman
2008-05-02  0:47                                           ` Stuart D. Gathman
2008-05-02  2:03                                             ` Gerry Reno [this message]
2008-05-02  8:14                                     ` Marek Podmaka
2008-05-02 14:00                                       ` Gerry Reno
2008-05-02 14:14                                         ` Charles Marcus
2008-05-02 14:25                                         ` Larry Dickson
2008-05-02 14:45                                         ` Marek Podmaka
2008-05-02 14:38                                       ` Stuart D. Gathman
2008-05-02 14:47                                         ` Bryn M. Reeves
2008-05-02 15:05                                           ` Marek Podmaka
2008-05-02 15:17                                           ` Stuart D. Gathman
2008-05-02 15:30                                             ` Gerry Reno
2008-05-02 15:36                                               ` Bryn M. Reeves
2008-05-03  2:27                         ` Mikulas Patocka
2008-05-04  0:45                           ` [linux-lvm] Temporary shapshots Stuart D. Gathman
2008-05-05 14:30                             ` Larry Dickson
2008-05-05 14:45                               ` Charles Marcus

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=481A766E.1060001@verizon.net \
    --to=greno@verizon.net \
    --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.