rjsears / chia_plot_manager

Python scripts to manage Chia plots and drive space, providing full reports. Also monitors the number of chia coins you have. Auto Drive helps to automate the addition of new hard drives to your system and to the chia config.
MIT License
334 stars 52 forks source link

receive_plot.sh empty with non-standard file structure (no front/rear) #53

Closed rglastra closed 1 year ago

rglastra commented 3 years ago

Hi,

As alluded to in my earlier issue (https://github.com/rjsears/chia_plot_manager/issues/52), my drive structure doesn't include a front/rear because all my enclosures are front-facing. As such, I removed this from my drive_structures file. I also go by rows rather than column (but I expected there to be minor issues with that), so that required some minor work.

However it appears drive_manager.py is hardcoded to look for the front/rear mountpoint pattern, failing to create a working receive_plot.sh upon first run of python3 drive_manager.py. Which in turn leads to unsuccessful plot transfers (I was getting "Remote NC kill!"). It would be fantastic if it could deduce the pattern from the drive_structures file instead.

To manually fix this for now I had to:

    elif info == 'column':
        return (mountpoint.split("/")[5])

To:

    elif info == 'row':
        return (mountpoint.split("/")[4])
rjsears commented 3 years ago

That is a great idea! I am not sure using the drive_structure file is the best way as I was using that as example structures (for example we could add your structure as one of the possible structures) but there should be a way to alter the elif info == 'column`: part to work with the scripts.

I am going to work on that when I have some time to see if I can make it easier. In the meantime I added notes to the script itself which may better help others.