Fedora: Do not start the lvmetad service after Fedora 30

This deprecated service has been removed from lvm2 in Fedora 31:

0469456b35

Change-Id: I06d572a72969c5e5e8e038caef19e358e4f97b2b
This commit is contained in:
Lee Yarwood 2020-04-09 11:00:28 +01:00
parent 01826e1c5b
commit e16e925e12

12
lib/lvm
View File

@ -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