Open denisgranha opened 4 years ago
+1. Having an option to stop the node if it is running out of disk is both lifesaving and rational. Why corrupt the state while it can be easily avoided. Why drive right into the wall. Our node ran out of disk and got us into trouble. Resyncing from scratch takes a long time if it ever succeeds.
Right now, the node will run forever if everything is ok, but in the case of disk growth, rockDB can enter into corrupted DB state if the system runs Out of Disk.
In order to avoid that, I would propose to add a check that runs periodically and in case of low disk, it fails with a warning.
What is low disk, it pretty much depends on the chain I guess, but as a default value we can define it as 5 GB or 5% disk.