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