Closed ptvirgo closed 1 month ago
Hey @ptvirgo ! Thank you for the detailed bug report. I think this PR https://github.com/maidsafe/safe_network/pull/1925 should fix the above issue. Instead of using starts with /
, we now use ends with /
. This would return true only if mount point is /
and not if they're say /run
or /run/
That's a screenshot from a vanilla Raspberry PI, with 54 Gigs on the root partition.
I'm not specifically familiar with Rust, so it's possible I'm way off, but it looks like
manage_nodes.rs
has a functionget_available_disk_space_b
that looks at every disk and, on a Unix system, returns the first one with a name that starts with '/'.If that's true, it's only going to get hit the root path if the iterator happens to hit the desired path first, because all normal mount-points on Linux match the "starts with '/'" criteria. Based on the output I'm guessing that in the case of the vanilla RPI image, it hit the boot partition first and that's how it came up with 1GB.
Best guess is that you could fix that by determining available space from the actual location of the node data.