From e16e925e120100156a08a0436040f42b901b361a Mon Sep 17 00:00:00 2001 From: Lee Yarwood Date: Thu, 9 Apr 2020 11:00:28 +0100 Subject: [PATCH] Fedora: Do not start the lvmetad service after Fedora 30 This deprecated service has been removed from lvm2 in Fedora 31: https://src.fedoraproject.org/rpms/lvm2/c/0469456b352530d9f507f2515e674bfb03671f48 Change-Id: I06d572a72969c5e5e8e038caef19e358e4f97b2b --- lib/lvm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/lvm b/lib/lvm index d9e78a016f..92265f2af2 100644 --- a/lib/lvm +++ b/lib/lvm @@ -124,13 +124,15 @@ function init_lvm_volume_group { local vg=$1 local size=$2 - # Start the lvmetad and tgtd services - if is_fedora || is_suse; then + # Start the lvmetad on f30 (dropped from f31) or SUSE + if [[ $DISTRO =~ f30 ]] || is_suse; then # services is not started by default start_service lvm2-lvmetad - if [ "$CINDER_ISCSI_HELPER" = "tgtadm" ]; then - start_service tgtd - fi + fi + + # Start the tgtd service on Fedora and SUSE if tgtadm is used + if is_fedora || is_suse && [[ "$CINDER_ISCSI_HELPER" = "tgtadm" ]]; then + start_service tgtd fi # Start with a clean volume group