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
diff --git a/lib/lvm b/lib/lvm
index d9e78a0..92265f2 100644
--- a/lib/lvm
+++ b/lib/lvm
@@ -124,13 +124,15 @@
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