linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zdenek.kabelac@gmail.com>
To: cd <cd@terminal.space>,
	LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Creating/restoring snapshots in early userspace
Date: Mon, 8 Aug 2022 12:57:47 +0200	[thread overview]
Message-ID: <05af76bc-f2e5-e048-4cee-046a7a3fff6c@gmail.com> (raw)
In-Reply-To: <37yG0UFnzHTZ7-GIuAOuBTpDHSZJcVJ4ptbi_8EqOtSEECEfjYVz6XXafSGqH7Xh2NeCgynDhaXOdwakzIZp4WN-nGyyXmky3nZu2IP-5Jg=@terminal.space>

Dne 07. 08. 22 v 22:38 cd napsal(a):
> Hello,
> 
> I have created some scripts which runs in the initramfs during the boot process. Very specifically, it's an initcpio runtime hook https://man.archlinux.org/man/mkinitcpio.8#ABOUT_RUNTIME_HOOKS
> Question: Is this a supported environment which to create/restore snapshots?
> 
> When my script runs lvm lvconvert --merge testvg/lvmautosnap-root-1659902622-good
> it appears to succeed (exit code is 0, and the restore appears to work properly). However, the following warnings appear in stderr as part of the restore process:
> 
> /usr/bin/dmeventd: stat failed: No such file or directory
> WARNING: Failed to unmonitor testvg/lvmautosnap-root-1659902622-good.
> /usr/bin/dmeventd: stat failed: No such file or directory

Hi

Your initramfs likely needs to contain  'modified' version of your system's 
lvm.conf where 'monitoring'  will be disabled  (set to 0) - as you do not want 
to start your monitoring while you are operating in your ramdisk.

Once you flip to your rootfs with your regular /etc/lvm/lvm.conf  - you need 
to start monitoring of you activated LVs  (vgchange --monitor y)

> Merging of volume testvg/lvmautosnap-root-1659902622-good started.
> /run/lvm/lvmpolld.socket: connect failed: No such file or directory

Again a thing you do not want to run in your ramdisk - lvmpolld is another 
service/daemon you should run while you are in your rootfs.

fully removed.
> 
> And I get similar errors when trying to create new volumes with lvm lvcreate --permission=r --snapshot --monitor n --name my_snapshot
>   /usr/bin/dmeventd: stat failed: No such file or directory
> 
> In summary, I'm happy to just ignore the warning messages. I just want to make sure I'm not risking the integrity of the lvm volumes by modifying them during this part of the boot process.

It looks like you are trying to do something in your ramdisk you really should 
be doing once you flip to your rootfs  -   ramdisk is purely meant to be used 
to  get things  'booting' and flip to rootfs  ASAP -  doing things in your 
ramdisk which is really not a 'working environment'  sounds like you are 
asking yourself  for some big troubles with resolving error paths  (i.e. using 
unmonitored devices like 'snapshot/mirror/raids/thin...' for longer period of 
time is simply 'bad design/plan' - switch to rootfs should happen quickly 
after you initiate things in your initramdfs...

Regards

Zdenek

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


  reply	other threads:[~2022-08-08 10:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-07 20:38 [linux-lvm] Creating/restoring snapshots in early userspace cd
2022-08-08 10:57 ` Zdenek Kabelac [this message]
2022-08-08 18:14   ` cd
2022-08-08 19:17     ` Zdenek Kabelac

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=05af76bc-f2e5-e048-4cee-046a7a3fff6c@gmail.com \
    --to=zdenek.kabelac@gmail.com \
    --cc=cd@terminal.space \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).