Skip to content

Commit

Permalink
Add ethd space (#1656)
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdowne committed Dec 4, 2023
1 parent e958ae2 commit 2ccfabe
Showing 1 changed file with 44 additions and 2 deletions.
46 changes: 44 additions & 2 deletions ethd
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,20 @@ Full\". Free space:"
echo ""
df -h "${__docker_dir}"
echo ""
if [ -z "$(dodocker volume ls -q -f "name=^$(basename "$(realpath .)")_[^_]+")" ]; then
echo "There are no Docker volumes for this copy of ${__project_name}"
echo
else
echo "Here are the Docker volumes used by this copy of ${__project_name} and their space usage:"
dodocker system df -v | grep -A 50 "VOLUME NAME" | grep "^$(basename "$(dirname "$(realpath "${BASH_SOURCE[0]}")")")"
echo
echo "If your Consensus Layer client takes more than 200 GiB, you can resync it with"
echo "\"${__me} resync-consensus\"."
echo
fi
echo
echo "If there is some mystery space being taken up, try \"sudo ncdu /\"."
echo
elif [[ "${value}" =~ "geth.yml" ]] && [[ "${__free_space}" -lt 104857600 ]]; then
echo ""
echo "You are running Geth and have less than 100 GiB of free disk space."
Expand All @@ -397,16 +411,44 @@ with \"$__me prune-geth\"."
echo ""
df -h "${__docker_dir}"
echo ""
if [ -z "$(dodocker volume ls -q -f "name=^$(basename "$(realpath .)")_[^_]+")" ]; then
echo "There are no Docker volumes for this copy of ${__project_name}"
echo
else
echo "Here are the Docker volumes used by this copy of ${__project_name} and their space usage:"
dodocker system df -v | grep -A 50 "VOLUME NAME" | grep "^$(basename "$(dirname "$(realpath "${BASH_SOURCE[0]}")")")"
echo
echo "If your Consensus Layer client takes more than 200 GiB, you can resync it with"
echo "\"${__me} resync-consensus\"."
echo
fi
echo
echo "If there is some mystery space being taken up, try \"sudo ncdu /\"."
echo
elif [[ "${__free_space}" -lt 52428800 ]]; then
echo ""
echo "You have less than 50 GiB of free disk space:"
echo ""
df -h "${__docker_dir}"
echo ""
echo "Pruning does not appear an option for your client mix."
echo "For Besu, Erigon or Reth, consider a resync."
echo "If total space is less than 1.5 TiB, consider cloning to a larger drive."
echo "For Besu, consider a resync."
echo "If total space is less than 1.8 TiB, consider cloning to a larger drive."
echo ""
if [ -z "$(dodocker volume ls -q -f "name=^$(basename "$(realpath .)")_[^_]+")" ]; then
echo "There are no Docker volumes for this copy of ${__project_name}"
echo
else
echo "Here are the Docker volumes used by this copy of ${__project_name} and their space usage:"
dodocker system df -v | grep -A 50 "VOLUME NAME" | grep "^$(basename "$(dirname "$(realpath "${BASH_SOURCE[0]}")")")"
echo
echo "If your Consensus Layer client takes more than 200 GiB, you can resync it with"
echo "\"${__me} resync-consensus\"."
echo
fi
echo
echo "If there is some mystery space being taken up, try \"sudo ncdu /\"."
echo
fi
}

Expand Down

0 comments on commit 2ccfabe

Please sign in to comment.