-
Notifications
You must be signed in to change notification settings - Fork 280
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
Check free space available in dst before commencing plot #968
base: development
Are you sure you want to change the base?
Conversation
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.
As I recall, the basic problem is that by the time the plot is done a transfer may have completed and freed up space. Maybe this needs to be optional? Also, dst
is tmp
for me so if we're checking space we need enough space for both things to avoid the general case of failing a plot for being out of space.
src/plotman/manager.py
Outdated
if plotting_cfg.bladebit is None: | ||
raise Exception( | ||
"bladebit plotter selected but not configured, report this as a plotman bug", | ||
if plot_util.df_b(dstdir) > plot_util.get_plotsize(32): |
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.
What if we invert this check and just return in that case and then avoid indenting everything else?
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.
Makes sense. Have also added a check for tmp/dst and space required.
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.
re: your first comment - the newly freed space will be detected on a subsequent check (after the appropriate refresh time)?
A small tweak to check that there is sufficient space free in the dst folder to receive a new plot.
This prevents the loop where a new plot is started only to fail because of a lack of space for the output and then repeats endlessly wasting power etc.