master - Remove init scripts related to clvm and lvmetad
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=81ca0cb1619b6ea22fa68f54783cd62dafbd2eaf Commit: 81ca0cb1619b6ea22fa68f54783cd62dafbd2eaf Parent: 297f6d51228d0f0d5debca9e95785f3623e0ef9d Author: David Teigland <[email protected]> AuthorDate: Thu Sep 13 10:08:03 2018 -0500 Committer: David Teigland <[email protected]> CommitterDate: Thu Sep 13 10:08:03 2018 -0500
Remove init scripts related to clvm and lvmetad
--- scripts/clvmd_fix_conf.sh | 161 ------- scripts/clvmd_init_red_hat.in | 214 --------- scripts/lvm2_cluster_activation_red_hat.sh.in | 62 --- ...2_cluster_activation_systemd_red_hat.service.in | 17 - scripts/lvm2_clvmd_systemd_red_hat.service.in | 23 - scripts/lvm2_lvmetad_init_red_hat.in | 110 ----- scripts/lvm2_lvmetad_systemd_red_hat.service.in | 15 - scripts/lvm2_lvmetad_systemd_red_hat.socket.in | 13 - scripts/lvm2_pvscan_systemd_red_hat at .service.in | 16 - scripts/lvmconf.sh | 459 -------------------- scripts/lvmconf_lockingtype2.sh | 259 ----------- 11 files changed, 0 insertions(+), 1349 deletions(-)
scripts/clvmd_fix_conf.sh deleted +0 -161
@@ -1,161 +0,0 @@ -#!/bin/bash -# -# Edit an lvm.conf file to enable cluster locking. -# -# $1 is the directory where the locking library is installed. -# $2 (optional) is the config file -# $3 (optional) is the locking library name -# -# -PREFIX=$1 -LVMCONF=$2 -LIB=$3 - -if [ -z "$PREFIX" ] -then - echo "usage: $0 <prefix> [<config file>] [<library>]" - echo "" - echo "<prefix>|UNDO location of the cluster locking shared library. (no default)" - echo " UNDO will reset the locking back to local" - echo "<config file> name of the LVM config file (default: /etc/lvm/lvm.conf)" - echo "<library> name of the shared library (default: liblvm2clusterlock.so)" - echo "" - exit 0 -fi - -[ -z "$LVMCONF" ] && LVMCONF="/etc/lvm/lvm.conf" -[ -z "$LIB" ] && LIB="liblvm2clusterlock.so" - -if [ "$PREFIX" = "UNDO" ] -then - locking_type="1" -else - locking_type="2" - - if [ "${PREFIX:0:1}" != "/" ] - then - echo "Prefix must be an absolute path name (starting with a /)" - exit 12 - fi - - if [ ! -f "$PREFIX/$LIB" ] - then - echo "$PREFIX/$LIB does not exist, did you do a \"make install\" ?" - exit 11 - fi -fi - -if [ ! -f "$LVMCONF" ] -then - echo "$LVMCONF does not exist" - exit 10 -fi - - -SCRIPTFILE=$(mktemp -t lvmscript.XXXXXXXXXX) -TMPFILE=$(mktemp -t lvmtmp.XXXXXXXXXX) - - -# Flags so we know which parts of the file we can replace and which need -# adding. These are return codes from grep, so zero means it IS present! -have_type=1 -have_dir=1 -have_library=1 -have_global=1 - -grep -q '^[[:blank:]]*locking_type[[:blank:]]*=' "$LVMCONF" -have_type=$? - -grep -q '^[[:blank:]]*library_dir[[:blank:]]*=' "$LVMCONF" -have_dir=$? - -grep -q '^[[:blank:]]*locking_library[[:blank:]]*=' "$LVMCONF" -have_library=$? - -# Those options are in section "global {" so we must have one if any are present. -if [ "$have_type" = 0 ] || [ "$have_dir" = 0 ] || [ "$have_library" = 0 ] ; then - - # See if we can find it... - grep -q '^[[:blank:]]*global[[:blank:]]*{' "$LVMCONF" - have_global=$? - - if [ "$have_global" = "1" ] - then - echo "global keys but no 'global {' found, can't edit file" - exit 12 - fi -fi - -# So if we don't have "global {" we need to create one and -# populate it - -if [ "$have_global" = "1" ] -then - cat "$LVMCONF" - <<EOF > "$TMPFILE" -global { - # Enable locking for cluster LVM - locking_type = $locking_type - library_dir = "$PREFIX" - locking_library = "$LIB" -} -EOF - if [ $? != 0 ] - then - echo "failed to create temporary config file, $LVMCONF not updated" - exit 1 - fi -else - # - # We have a "global {" section, so add or replace the - # locking entries as appropriate - # - - if [ "$have_type" = "0" ] - then - SEDCMD=" s/^[[:blank:]]*locking_type[[:blank:]]*=.*/\ \ \ \ locking_type = $locking_type/g" - else - SEDCMD=" /global[[:blank:]]*{/a\ \ \ \ locking_type = 2" - fi - - if [ "$have_dir" = "0" ] - then - SEDCMD="${SEDCMD}\ns'^[[:blank:]]*library_dir[[:blank:]]*=.*'\ \ \ \ library_dir = \"$PREFIX\"'g" - else - SEDCMD="${SEDCMD}\n/global[[:blank:]]*{/a\ \ \ \ library_dir = \"$PREFIX\"" - fi - - if [ "$have_library" = "0" ] - then - SEDCMD="${SEDCMD}\ns/^[[:blank:]]*locking_library[[:blank:]]*=.*/\ \ \ \ locking_library = \"$LIB\"/g" - else - SEDCMD="${SEDCMD}\n/global[[:blank:]]*{/a\ \ \ \ locking_library = \"$LIB\"" - fi - - echo -e "$SEDCMD" > "$SCRIPTFILE" - sed <"$LVMCONF" >"$TMPFILE" -f "$SCRIPTFILE" - if [ $? != 0 ] - then - echo "sed failed, $LVMCONF not updated" - exit 1 - fi -fi - -# Now we have a suitably editted config file in a temp place, -# backup the original and copy our new one into place. - -cp "$LVMCONF" "$LVMCONF.nocluster" -if [ $? != 0 ] - then - echo "failed to backup old config file, $LVMCONF not updated" - exit 2 -fi - -cp "$TMPFILE" "$LVMCONF" -if [ $? != 0 ] - then - echo "failed to copy new config file into place, check $LVMCONF is still OK" - exit 3 -fi - -rm -f "$SCRIPTFILE" "$TMPFILE" -
scripts/clvmd_init_red_hat.in deleted +0 -214
214 lines not on this page · raw message
scripts/lvm2_cluster_activation_red_hat.sh.in deleted +0 -62
62 lines not on this page · raw message
scripts/lvm2_cluster_activation_systemd_red_hat.service.in deleted +0 -17
@@ -1,17 +0,0 @@ -[Unit] -Description=Clustered LVM volumes activation service -Requires=lvm2-clvmd.service -After=lvm2-clvmd.service lvm2-cmirrord.service -OnFailure=lvm2-clvmd.service -DefaultDependencies=no -Conflicts=shutdown.target - -[Service] -Type=simple -RemainAfterExit=yes -EnvironmentFile=- at SYSCONFDIR@/sysconfig/clvmd -ExecStart=@systemdutildir@/lvm2-cluster-activation activate -ExecStop=@systemdutildir@/lvm2-cluster-activation deactivate - -[Install] -WantedBy=multi-user.target
scripts/lvm2_clvmd_systemd_red_hat.service.in deleted +0 -23
@@ -1,23 +0,0 @@ -[Unit] -Description=Clustered LVM daemon -Documentation=man:clvmd(8) -After=dlm.service corosync.service -Before=remote-fs-pre.target -Requires=network.target dlm.service corosync.service -RefuseManualStart=true -RefuseManualStop=true -StopWhenUnneeded=true -DefaultDependencies=no -Conflicts=shutdown.target - -[Service] -Type=forking -Environment=CLVMD_OPTS=-T30 -EnvironmentFile=- at SYSCONFDIR@/sysconfig/clvmd -ExecStart=@USRSBINDIR@/clvmd $CLVMD_OPTS -SuccessExitStatus=5 -TimeoutStartSec=30 -TimeoutStopSec=10 -OOMScoreAdjust=-1000 -Restart=on-abort -PIDFile=@CLVMD_PIDFILE@
scripts/lvm2_lvmetad_init_red_hat.in deleted +0 -110
110 lines not on this page · raw message
scripts/lvm2_lvmetad_systemd_red_hat.service.in deleted +0 -15
@@ -1,15 +0,0 @@ -[Unit] -Description=LVM2 metadata daemon -Documentation=man:lvmetad(8) -Requires=lvm2-lvmetad.socket -After=lvm2-lvmetad.socket -DefaultDependencies=no -Conflicts=shutdown.target - -[Service] -Type=simple -NonBlocking=true -ExecStart=@SBINDIR@/lvmetad -f -Environment=SD_ACTIVATION=1 -Restart=on-abort -PIDFile=@LVMETAD_PIDFILE@
scripts/lvm2_lvmetad_systemd_red_hat.socket.in deleted +0 -13
@@ -1,13 +0,0 @@ -[Unit] -Description=LVM2 metadata daemon socket -Documentation=man:lvmetad(8) -DefaultDependencies=no -Conflicts=shutdown.target - -[Socket] -ListenStream=@DEFAULT_RUN_DIR@/lvmetad.socket -SocketMode=0600 -RemoveOnStop=true - -[Install] -WantedBy=sysinit.target
scripts/lvm2_pvscan_systemd_red_hat at .service.in deleted +0 -16
@@ -1,16 +0,0 @@ -[Unit] -Description=LVM2 PV scan on device %i -Documentation=man:pvscan(8) -DefaultDependencies=no -StartLimitInterval=0 -BindsTo=dev-block-%i.device -Requires=lvm2-lvmetad.socket -After=lvm2-lvmetad.socket lvm2-lvmetad.service -Before=shutdown.target -Conflicts=shutdown.target - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=@SBINDIR@/lvm pvscan --cache --activate ay %i -ExecStop=@SBINDIR@/lvm pvscan --cache %i
scripts/lvmconf.sh deleted +0 -459
459 lines not on this page · raw message
scripts/lvmconf_lockingtype2.sh deleted +0 -259
259 lines not on this page · raw message