Skip to content

plot-mover.sh - Drive full check is not accurate for large drives. #2

@johnbiggs

Description

@johnbiggs

Drive full at 100% is not sufficient. On my drives the drive reports 100% full although there is room for one more plot.

/dev/sdb1 13T 13T 121G 100% /mnt/chia/chia-6
/dev/sdd1 13T 13T 121G 100% /mnt/chia/chia-8
/dev/sde1 13T 13T 121G 100% /mnt/chia/chia-9

Fix is looking for XXG in free space instead of 100% usage to determine fullness. Not foolproof because 99G could be considered full but plot could be much less with compression. But much better for my situation as all my drives (8T, 12T, 14T, 16T) report over 100G while usage is 100%.

- if ! df -h "$drive" | awk '{print $5}' | tail -1 | grep -q "^100"; then
+ if ! df -h "$drive" | awk '{print $4}' | tail -1 | grep -q "^[0-9]\{2\}G$"; then

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions