Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graceful shutdown if disk is full #20965

Closed
ligi opened this issue Apr 23, 2020 · 7 comments
Closed

Graceful shutdown if disk is full #20965

ligi opened this issue Apr 23, 2020 · 7 comments

Comments

@ligi
Copy link
Member

ligi commented Apr 23, 2020

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

@howjmay
Copy link
Contributor

howjmay commented Jun 10, 2020

Is this a good first issue?

@holiman
Copy link
Contributor

holiman commented Oct 8, 2020

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

@howjmay
Copy link
Contributor

howjmay commented Oct 8, 2020

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

@howjmay
Copy link
Contributor

howjmay commented Oct 11, 2020

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

@vyrwu
Copy link

vyrwu commented Nov 21, 2020

I made a pull request that implements this: #21884.

Would appreciate some review comments and guidance, I'm new to this repository and still learning, thx. ✌️

@alex347
Copy link
Contributor

alex347 commented Jan 4, 2021

Please review a new implementation: #22103

@holiman
Copy link
Contributor

holiman commented Jan 20, 2021

Fixed via #22103

@holiman holiman closed this as completed Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants