substrate
substrate copied to clipboard
Observe disk usage and shutdown on <1GB space left
We should have some kind of service running in the node that can observe given paths. For each of the given paths we should ensure that Xbytes is left. Where X
is configurable and could be set to 1GB
by default. The service should run as essential task, so that the node shuts down when the service ends. The service should also directly return an error on startup if we are already below the configured limits. We should also introduce some CLI flag to ignore the limit or to set the limit.
This service should be running with the path of the db and in Polkadot also of with the path of the Parachains db. It would ensure that we are not running out of space and thus, may breaking the database.
There is still some job to be done in polkadot node: https://github.com/paritytech/polkadot/pull/6619