Merge "Deactivate LV's before disconnecting nbd device"

This commit is contained in:
Zuul 2021-11-12 02:40:11 +00:00 committed by Gerrit Code Review
commit 35ef969f7a
1 changed files with 4 additions and 0 deletions

View File

@ -156,6 +156,10 @@ unmount_image() {
unmount_volume $MOUNT_DIR
fi
# `--activate n` makes LVs inactive, they must be set
# inactive so that the nbd device can be disconnected.
# Ref bug: https://bugs.launchpad.net/tripleo/+bug/1950137
vgchange --activate n vg || true
qemu-nbd --disconnect $NBD_DEVICE
vgchange --refresh vg || true