Go-ethereum: Graceful shutdown if disk is full

Created on 23 Apr 2020  路  6Comments  路  Source: ethereum/go-ethereum

this is a follow up of #20845

we should periodically monitor the free space on the disk we are operating on and if we fall under a certain limit we should gracefully shutdown the node to prevent database corruption

good first issue help wanted feature

Most helpful comment

Let me take a look, and try to implement it!

All 6 comments

Is this a good first issue?

I think this is a fairly good first issue. The feature should:

  • Every N seconds, check the disk where the datadir resides,
  • If available space is < some limit, maybe 500Mb, then start printing warnings

Let me take a look, and try to implement it!

I think this is a fairly good first issue. The feature should:

  • Every N seconds, check the disk where the datadir resides,
  • If available space is < some limit, maybe 500Mb, then start printing warnings

@holiman So does this be two stage operation? Once the free space is under stage 1 limit then geth will start to print warnings. If the free space is keeping dropping until the stage 2 limit, then geth will graceful shutdown

I made a pull request that implements this: https://github.com/ethereum/go-ethereum/pull/21884.

Would appreciate some review comments and guidance, I'm new to this repository and still learning, thx. 鉁岋笍

Please review a new implementation: #22103

Was this page helpful?
0 / 5 - 0 ratings