Last active
March 23, 2021 07:23
-
-
Save wallentx/d1e3ef3792c8a529776c44d6270a19a0 to your computer and use it in GitHub Desktop.
Watch -d dir for completed plots, then exec a mv to other path
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# uses https://github.com/z3bra/wendy | |
# replace below value with path of your chia '-d' value | |
CHIA_D="/many/t7" | |
# replace below value with path of HDD | |
FINAL="/mnt/plots" | |
wendy -v -m 128 -w $CHIA_D/ \ | |
bash -c 'echo "Acquired land! Fencing in $(basename $WENDY_INODE) . . ." && mv $CHIA_D/$(basename $WENDY_INODE) $FINAL/ && [[ -f $FINAL/$(basename $WENDY_INODE) ]] && echo "$(basename $WENDY_INODE) is ready for farming!"' | \ | |
systemd-cat -t landBureau & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When any file that is in the
$CHIA_D
path gets renamed (inotify event 128), it triggers the command to:$FINAL
If
$CHIA_D
is a SSD - ideally one that is dedicated for-d
- then this will speed up the last part of the plot job, and unblock chia from moving on to subsequent-n
jobs. Meanwhile, another process is executed that moves the plot from your SSD to your HDD. It might not be super fast, but it only needs to complete this faster than you can write plots to the drive that would exceed it's total capacity