linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Emond Papegaaij <emond.papegaaij@topicus.nl>
To: linux-lvm@redhat.com
Subject: [linux-lvm] Timeout at shutdown after merging an open snapshot volume
Date: Wed, 18 Jul 2018 14:59:49 +0200	[thread overview]
Message-ID: <14592984.mkSHKjXs8G@papegaaij> (raw)

Hi,

On a CentOS 7.5 based virtual appliance we are developing, I want to use LVM 
snapshots to be able to rollback failed upgrades. Prior to the upgrade, I 
create a snapshot volume with:

  lvcreate -s /dev/tkhsystem01/root -l100%FREE -nroot_snap

On a failed upgrade, I merge this snapshot and reboot with:

  lvconvert -y --merge /dev/tkhsystem01/root_snap
  reboot

This works fine, except it causes a 90 second delay in shutdown where systemd 
waits for lvm2-lvmetad.service to shtudown. This fails and the process is 
killed after which shutdown continues. After boot, the snapshot is restored 
correctly. Reading through some reports, I found that monitoring of the 
snapshot volume might cause lvmetad to not shutdown, so I added the following 
command just prior to lvconvert:

  lvchange --monitor n /dev/tkhsystem01/root_snap

This fixes the 90 second timeout at shutdown, but it is unclear to me what 
possible side effects it may have. To be clear, the lvchange, lvconvert and 
reboot commands are executed in a script in direct succession. Does it pose 
any danger to stop monitoring just before a reboot? Is this a bug in LVM2 or 
CentOS or am I doing something wrong?

Best regards,
Emond Papegaaij

                 reply	other threads:[~2018-07-18 12:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=14592984.mkSHKjXs8G@papegaaij \
    --to=emond.papegaaij@topicus.nl \
    --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).