Following the announcement to decommission Europe-north-1 and US2 satellites, manually deleting the remaining data of these satellites from the node can be a tedious task as it requires finding the blobs folder name for each satellite, so we wanted to improve the storagenode CLI to semi-automate cleaning up a satellite data after it is marked as untrusted.
The storagenode CLI (versions from 1.88.0) provides a forget-satellite
subcommand to remove satellites from the trust cache and clean up the available data.
-
General Usage
storagenode forget-satellite [satelliteID] --config-dir <config-dir> --identity-dir <identity-dir>
-
You can specify multiple satellite IDs to remove multiple satellites at once.
storagenode forget-satellite [satelliteID1] [satelliteID2] [satelliteID3] --config-dir <config-dir> --identity-dir <identity-dir>
-
To remove all untrusted satellites, you can use the
--all-untrusted
flag.storagenode forget-satellite --all-untrusted --config-dir <config-dir> --identity-dir <identity-dir>
Docker nodes
For storagenodes running in a docker container, you can use the following command to remove all untrusted satellites.
docker exec -it storagenode /app/config/bin/storagenode forget-satellite --all-untrusted --config-dir <config-dir> --identity-dir <identity-dir>
Or specify the satellite IDs to remove.
docker exec -it container_name /app/config/bin/storagenode forget-satellite [satelliteID1] [satelliteID2] [satelliteID3] ...
Cleaning Up Data for the Decommissioned Satellites
Method 1
-
Add the satellites (Europe-north-1 and US2) to the exclusions list in your storagenode’s
config.yaml
file.storage2.trust.exclusions: "12rfG3sh9NCWiX3ivPjq2HtdLmbqCrvHVEzJubnzFzosMuawymB@europe-north-1.tardigrade.io:7777,12tRQrMTWUWwzwGh18i7Fqs67kmdhH9t6aToeiwbo5mfS2rUmo@us2.storj.io:7777"
-
Run the
storagenode forget-satellite
commandstoragenode forget-satellite --all-untrusted --config-dir /path/to/config --identity-dir /path/to/identity
Or for docker nodes:
docker exec -it storagenode /app/config/bin/storagenode forget-satellite --all-untrusted --config-dir config --identity-dir identity
-
Restart the node
Method 2
You can directly specify the satellite IDs of the decommissioned satellites as arguments and --force
flag to force cleanup
storagenode forget-satellite --force 12rfG3sh9NCWiX3ivPjq2HtdLmbqCrvHVEzJubnzFzosMuawymB 12tRQrMTWUWwzwGh18i7Fqs67kmdhH9t6aToeiwbo5mfS2rUmo --config-dir /path/to/config --identity-dir /path/to/identity
For docker nodes:
docker exec -it storagenode /app/config/bin/storagenode forget-satellite --force 12rfG3sh9NCWiX3ivPjq2HtdLmbqCrvHVEzJubnzFzosMuawymB 12tRQrMTWUWwzwGh18i7Fqs67kmdhH9t6aToeiwbo5mfS2rUmo --config-dir config --identity-dir identity