diff --git a/ethd b/ethd index f4549fc5..0ec290e8 100755 --- a/ethd +++ b/ethd @@ -1440,6 +1440,17 @@ resync-consensus() { else __cl_volume="$(basename "$(realpath .)")_${__cl_volume}" dodocker volume rm "$(dodocker volume ls -q -f "name=${__cl_volume}")" + __volume_id="" + if [[ "${__cl_volume}" =~ lhconsensus-data ]]; then + __legacy_volume="$(basename "$(realpath .)")_lhbeacon-data" + __volume_id="$(dodocker volume ls -q -f "name=${__legacy_volume}")" + elif [[ "${__cl_volume}" =~ prysmconsensus-data ]]; then + __legacy_volume="$(basename "$(realpath .)")_prysmbeacon-data" + __volume_id="$(dodocker volume ls -q -f "name=${__legacy_volume}")" + fi + if [ -n "${__volume_id}" ]; then + dodocker volume rm "${__volume_id}" + fi fi echo echo "${__cl_client} stopped and database deleted." diff --git a/lighthouse/docker-entrypoint.sh b/lighthouse/docker-entrypoint.sh index c0b0aa0c..324f21ef 100755 --- a/lighthouse/docker-entrypoint.sh +++ b/lighthouse/docker-entrypoint.sh @@ -10,8 +10,9 @@ fi if [[ -d /var/lib/lighthouse-og/beacon && ! -f /var/lib/lighthouse-og/beacon/migrationdone \ && $(ls -A /var/lib/lighthouse-og/beacon/) ]]; then echo "Migrating from old Lighthouse volume to new one" - echo "This may take 10 minutes on a fast drive. Please be patient" - rsync -a --remove-source-files --exclude='ee-secret' /var/lib/lighthouse-og/beacon/ /var/lib/lighthouse/beacon/ + echo "This may take 10 minutes on a fast drive, or hours if the Lighthouse DB is very large. Please be patient" + echo "If your Lighthouse DB is well over 200 GiB in size, please consider \"./ethd resync-consensus\"" + rsync -a --remove-source-files --exclude='ee-secret' --info=progress2 /var/lib/lighthouse-og/beacon/ /var/lib/lighthouse/beacon/ touch /var/lib/lighthouse-og/beacon/migrationdone echo "Migration completed, data is now in volume \"lhconsensus-data\"" fi diff --git a/prysm/docker-entrypoint.sh b/prysm/docker-entrypoint.sh index 2d3dffcf..69f859a6 100755 --- a/prysm/docker-entrypoint.sh +++ b/prysm/docker-entrypoint.sh @@ -10,8 +10,9 @@ fi if [[ -d /var/lib/prysm-og && ! -f /var/lib/prysm-og/migrationdone \ && $(ls -A /var/lib/prysm-og/) ]]; then echo "Migrating from old Prysm volume to new one" - echo "This may take 10 minutes on a fast drive. Please be patient" - rsync -a --remove-source-files --exclude='ee-secret' /var/lib/prysm-og/ /var/lib/prysm/ + echo "This may take 10 minutes on a fast drive, or hours if the Prysm DB is very large. Please be patient" + echo "If your Prysm DB is well over 200 GiB in size, please consider \"./ethd resync-consensus\"" + rsync -a --remove-source-files --exclude='ee-secret' --info=progress2 /var/lib/prysm-og/ /var/lib/prysm/ touch /var/lib/prysm-og/migrationdone echo "Migration completed, data is now in volume \"prysmconsensus-data\"" fi