From 3a6d2b405a9a1bd6a9735cb3b2c27ff2206b6709 Mon Sep 17 00:00:00 2001 From: deajan Date: Thu, 4 Aug 2016 00:02:20 +0200 Subject: [PATCH] Made disk space tests non mandatory --- dev/n_osync.sh | 5 +++++ sync.conf | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dev/n_osync.sh b/dev/n_osync.sh index 226701e..e4c3813 100755 --- a/dev/n_osync.sh +++ b/dev/n_osync.sh @@ -292,6 +292,11 @@ function _CheckDiskSpaceRemote { function CheckDiskSpace { __CheckArguments 0 $# ${FUNCNAME[0]} "$@" #__WITH_PARANOIA_DEBUG + if [ $MINIMUM_SPACE -eq 0 ]; then + Logger "Skipped minimum space check." "NOTICE" + return 0 + fi + local pids _CheckDiskSpaceLocal "${INITIATOR[1]}" & diff --git a/sync.conf b/sync.conf index f62dbe8..90a5845 100644 --- a/sync.conf +++ b/sync.conf @@ -2,7 +2,7 @@ ###### osync - Rsync based two way sync engine with fault tolerance ###### (C) 2013-2016 by Orsiris de Jong (www.netpower.fr) -###### osync v1.1x config file rev 2016071801 +###### osync v1.1x / v1.2x config file rev 2016080301 ## ---------- GENERAL OPTIONS @@ -26,7 +26,7 @@ CREATE_DIRS=no ## Log file location. Leaving this empty will create a logfile at /var/log/osync_version_SYNC_ID.log (or current directory if /var/log doesn't exist) LOGFILE="" -## Generate an alert if initiator or target replicas have less free space than given value in KB. +## Generate an alert if initiator or target replicas have less free space than given value in KB. Set this to zero to skip disk space tests. MINIMUM_SPACE=10240 ## Bandwidth limit Kbytes / second. Leave 0 to disable limitation