diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2019-04-16 23:17:25 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2019-04-17 00:25:37 -0700 |
commit | 965220269a5b04a2aeb7061d8e69b62156bd9373 (patch) | |
tree | 32cb87aec6b4811768309d77332eb2b54fd23a5a | |
parent | sys-fs/lvm2: fix race condition with udev stopping in lvm rc service (diff) | |
download | gentoo-965220269a5b04a2aeb7061d8e69b62156bd9373.tar.gz gentoo-965220269a5b04a2aeb7061d8e69b62156bd9373.tar.bz2 gentoo-965220269a5b04a2aeb7061d8e69b62156bd9373.zip |
sys-fs/lvm2: don't get stuck with root-on-LVM
During system shutdown, init.d/lvm tries to run 'vgchange -a ln' to
close all LVs. It fails with root-on-LVM (or seperate /usr-on-LVM),
because those mountpoints are still in use. As a best-effort, consider
it done after the 'vgchange -a ln' pass. This is similar to localmount's
stop, which does not fail if a filesystem cannot be unmounted.
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r-- | sys-fs/lvm2/files/lvm.rc-2.02.183 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys-fs/lvm2/files/lvm.rc-2.02.183 b/sys-fs/lvm2/files/lvm.rc-2.02.183 index d431fc721382..ce499a6dd21b 100644 --- a/sys-fs/lvm2/files/lvm.rc-2.02.183 +++ b/sys-fs/lvm2/files/lvm.rc-2.02.183 @@ -138,7 +138,10 @@ stop() { lvm_commands="${lvm_commands}vgchange --config '${config}' --sysinit -a ln ${VGS}\n" # Order of this is important, have to work around dash and LVM readline printf "%b\n" "${lvm_commands}" | $lvm_path /proc/self/fd/0 --config "${config}" >/dev/null - ${_ending} $? "Failed (possibly some LVs still needed for /usr or root)" + rc=$? + msg="Failed (possibly some LVs still needed for /usr or root)" + [ "$RC_RUNLEVEL" = shutdown ] && msg="${msg} [rc=$rc]" && rc=0 + ${_ending} $rc "${msg}" fi einfo "Finished shutting down the Logical Volume Manager" |