Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions reth/check_reth_datadir.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
set -euo pipefail

# Small helper to inspect disk usage of a Base Reth data directory.
#
# This can be used before upgrades or when planning storage for a new node.
#
# Usage:
# BASE_RETH_DATADIR=/data/reth ./reth/check_reth_datadir.sh

DATADIR="${BASE_RETH_DATADIR:-/data/reth}"

if [ ! -d "${DATADIR}" ]; then
echo "[reth] Data directory does not exist:"
echo " ${DATADIR}"
echo
echo "Set BASE_RETH_DATADIR to the correct path before running this script."
exit 1
fi

echo "== Base Reth datadir disk usage =="
echo "Path: ${DATADIR}"
echo

if command -v du >/dev/null 2>&1; then
du -sh "${DATADIR}"
echo
echo "Top-level subdirectories:"
du -sh "${DATADIR}"/* 2>/dev/null | sort -h
else
echo "The 'du' command is not available on this system."
fi

echo
echo "Tip: keep this directory on a fast local NVMe SSD for best performance."