mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-01 04:26:48 +00:00
We have problem to run fstrim with nomerges=2, so we need to change the parameter to 1 during fstrim execution. To do this, this fix changes follow things: - revert dropping scylla_fstrim on Ubuntu 16.04/CentOS - disable distribution provided fstrim script - enable scylla_fstrim on all distributions - introduce --set-nomerges on scylla-blocktune - scylla_fstrim call scylla-blocktune by following order: - 'scylla-blocktune --set-nomerges 1' - 'fstrim' for each devices - 'scylla-blocktune --set-nomerges 2' Fixes #2649 Signed-off-by: Takuya ASADA <syuu@scylladb.com> Message-Id: <1501531393-21109-1-git-send-email-syuu@scylladb.com>
31 lines
1018 B
Bash
Executable File
31 lines
1018 B
Bash
Executable File
#!/bin/bash -e
|
|
#
|
|
# Copyright (C) 2017 ScyllaDB
|
|
|
|
#
|
|
# This file is part of Scylla.
|
|
#
|
|
# Scylla is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# Scylla is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with Scylla. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
. /usr/lib/scylla/scylla_lib.sh
|
|
|
|
# We need to disable distribution provided fstrim scripts for each distribution
|
|
|
|
if is_redhat_variant; then
|
|
systemctl disable fstrim.timer
|
|
fi
|
|
if [ "$ID" = "ubuntu" ] && [ -f /etc/cron.weekly/fstrim ]; then
|
|
mv -fv /etc/cron.weekly/fstrim /etc/cron.weekly/fstrim.old
|
|
fi
|