Colo: Put NVMe disks to use (#6357)

automerge
This commit is contained in:
Trent Nelson
2019-10-17 15:44:45 -06:00
committed by Grimes
parent 9e52d11ad0
commit 1759968c1e
7 changed files with 42 additions and 42 deletions

View File

@ -1,19 +0,0 @@
#!/usr/bin/env bash
#
# Clear the current cluster configuration
#
here=$(dirname "$0")
# shellcheck source=multinode-demo/common.sh
source "$here"/common.sh
set -e
(
set -x
rm -rf "${SOLANA_CONFIG_DIR:?}/" # <-- $i might be a symlink, rm the other side of it first
rm -rf "$SOLANA_CONFIG_DIR"
mkdir -p "$SOLANA_CONFIG_DIR"
)
setup_secondary_mount

View File

@ -7,7 +7,8 @@
# shellcheck disable=2034
#
SOLANA_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. || exit 1; pwd)"
# shellcheck source=net/common.sh
source "$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. || exit 1; pwd)"/net/common.sh
if [[ $(uname) != Linux ]]; then
# Protect against unsupported configurations to prevent non-obvious errors
@ -62,21 +63,6 @@ solana_replicator=$(solana_program replicator)
export RUST_BACKTRACE=1
# shellcheck source=scripts/configure-metrics.sh
source "$SOLANA_ROOT"/scripts/configure-metrics.sh
SOLANA_CONFIG_DIR=$SOLANA_ROOT/config
SECONDARY_DISK_MOUNT_POINT=/mnt/extra-disk
setup_secondary_mount() {
# If there is a secondary disk, symlink the config/ dir there
if [[ -d $SECONDARY_DISK_MOUNT_POINT ]]; then
mkdir -p $SECONDARY_DISK_MOUNT_POINT/config
rm -rf "$SOLANA_CONFIG_DIR"
ln -sfT $SECONDARY_DISK_MOUNT_POINT/config "$SOLANA_CONFIG_DIR"
fi
}
default_arg() {
declare name=$1
declare value=$2