]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-scripts: Drop support for CTDB_DBDIR=tmpfs
authorMartin Schwenke <martin@meltin.net>
Thu, 19 Apr 2018 11:54:11 +0000 (21:54 +1000)
committerMartin Schwenke <martins@samba.org>
Tue, 1 May 2018 11:31:21 +0000 (13:31 +0200)
CTDB has no business mounting filesystems.  Instead, documentation
for the new configuration system will include a recommendation that a
tmpfs be mounted on the volatile database directory.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/config/ctdbd_wrapper
ctdb/doc/ctdbd.conf.5.xml

index 6473a3eddd6555412c930b1f6f05d6f436d11732..320e02cf0782094ab52a9dc1a6a522767cfe44e4 100755 (executable)
@@ -26,39 +26,6 @@ ctdbd="${CTDBD:-/usr/local/sbin/ctdbd}"
 
 ############################################################
 
-# If necessary, mount volatile database directory on tmpfs
-dbdir_tmpfs_start ()
-{
-    if [ -z "$CTDB_DBDIR_TMPFS_OPTIONS" ] ; then
-       return
-    fi
-
-    # Shortcut for readability
-    _opts="$CTDB_DBDIR_TMPFS_OPTIONS"
-
-    mkdir -p "$CTDB_DBDIR" || exit $?
-
-    # If already mounted then remount, otherwise mount
-    if findmnt -t tmpfs "$CTDB_DBDIR" >/dev/null ; then
-       mount -t tmpfs -o "remount,$_opts" none "$CTDB_DBDIR" || \
-           exit $?
-    else
-       mount -t tmpfs -o "$_opts" none "$CTDB_DBDIR" || exit $?
-    fi
-}
-
-# If necessary, unmount volatile database tmpfs directory on exit
-dbdir_tmpfs_stop ()
-{
-    if [ -z "$CTDB_DBDIR_TMPFS_OPTIONS" ] ; then
-       return
-    fi
-
-    if [ -d "$CTDB_DBDIR" ] && findmnt -t tmpfs "$CTDB_DBDIR" >/dev/null ; then
-       umount "$CTDB_DBDIR"
-    fi
-}
-
 # Only the nested function references its arguments
 # shellcheck disable=SC2120
 build_ctdb_options ()
@@ -115,8 +82,6 @@ export_debug_variables ()
 
 start()
 {
-    dbdir_tmpfs_start
-
     # build_ctdb_options() takes no arguments
     # shellcheck disable=SC2119
     build_ctdb_options
@@ -171,8 +136,6 @@ stop()
                return 1
        fi
 
-       dbdir_tmpfs_stop
-
        return 0
 }
 
index 3452f84047e4896b4c5c6d5d248bc583d095d1ab..dc530749b2cebd26fe8a1ee1a7d39e4504f9e9b4 100644 (file)
          <para>
            Defaults to <filename>/usr/local/var/lib/ctdb/volatile</filename>.
          </para>
-         <para>
-           Apart from a DIRECTORY, this can take a special value of
-           the form
-           <option>tmpfs</option><optional>:<parameter>OPTIONS</parameter></optional>.
-           OPTIONS is a comma-separated list of any permissible
-           options to the tmpfs filesystem.  The only pre-specified
-           default is <option>mode=700</option>, which can
-           overridden by specifying <option>mode</option> in
-           OPTIONS.  It probably makes sense to specify a maximum
-           <option>size</option>.
-         </para>
          <para>
            Corresponds to <option>--dbdir</option>.
          </para>