-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Add a check for free disk space at first startup. #15848
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
Conversation
promag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK.
|
If this is actually something we want to do, we should also include a flag that disables this check since there are situations where users may want to run |
138bf9a to
1dd1289
Compare
|
@promag I addressed the changes (renamed |
|
@jamesob could we make it an argument, like |
|
Does this work with reindex? |
1dd1289 to
9001b43
Compare
…t in validation.h
9001b43 to
776f66b
Compare
|
@MarcoFalke this caused a segfault with |
| if (!CheckDiskSpace(GetDataDir())) { | ||
| InitError(strprintf(_("Error: Disk space is low for %s"), GetDataDir())); | ||
| return false; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May as well leave this check out of the locked section, as it has no need for the related info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the review. I tested outside of the lock and it makes bitcoind hanging forever on error.
|
IMO this is too much hand-holding for a server. |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
As mentioned in #15813, there is a check for available disk space at startup in bitcoin-qt. This PR adds it to bitcoind too, at least for the first startup.