Closed gh0st42 closed 6 years ago
Just because the result is assigned to a uint64_t, doesn't mean that the calculation is performed as a uint64_t. This is an easy mistake to make (that's my excuse). Which would suggest that the type of struct statvfs f_frsize and f_bavail in your statvfs.h is at most a uint32_t.
Freshly build and installed servald on a pi3.
Unable to add anything to rhizome store due to insufficient disk space.
Serval has its rhizome directory on / where plenty of disk space and inodes are available. A quick test with dd and writing a file larger than 100M revealed no disk related problems.
The log records
DEBUG:[11593] 08:20:47.859 rhizome_store.c:200:store_get_free_space() {rhizome} RHIZOME SPACE FREE bytes=72036352 (68.7MB)
After reducing rhizome.min_free_space from 100M to 50M it works again. All other config values are left to default, e.g. rhizome.database_size=18446744073709551615.
Never had this bug before, might be SD card or OS specific or related to statvfs() implementation.