storj-archived/storjshare-daemon

KFS Bucket Negative Free Values

Hisdad opened this issue · 4 comments

Package Versions

``
daemon: 5.1.0, core: 8.1.0, protocol: 1.2.0

6.11.4

Expected Behavior

Please describe the program's expected behavior.

Weird error and logging not enough free space with 30Gb free on node.
This log message might be relevant.

Actual Behavior

Please describe the program's actual behavior. Please include any stack traces
or log output in the back ticks below.


{"level":"debug","message":"max KFS bucket size 405612740, used 553408809, free -147796069, shard size 255924","timestamp":"2017-10-09T11:27:50.723Z"}

Steps to Reproduce

Please include the steps the reproduce the issue, numbered below. Include as
much detail as possible.
Seen in normal operation.
Linux 64 bit, dedicated VM
1 CPU, 4Gb RAM
100Gb partition for storj

Did you happen to reduce your total shared space in the config at some point?

Yes, when I first created it in a 100Gb filesystem.
I had to keep reducing the amount available in the config file.
Got down to 97Gb and it accepted that.
Subsequently there have been no changes.

So, what happened here is likely this. When you first create your share, the system divides the free space by 256 and assigns that to each bucket. (Your node has 256 buckets) So let's say you have 512gb of free space when you setup your node. Each bucket can hold a maximum of 2gb of shards. So let's say you had a bucket that got its 2gb. Then you shrank the size to 400gb. So now each bucket can only hold appx 1.5gb. But you have one that still has 2gb in it. You would see the error above. That the bucket has gone over by 500mb.

This would only impact the buckets that are at maximum capacity after you shrank the drive. AFAIK it should not prevent your node from operating normally, and after 90 days those large shards will be purged as per normal. So other than the warnings, it shouldn't prevent your node from working properly. (Based on my understanding of this all, which is always subject to change)

Interesting. I'm a bit surprised as it never actually started started until the 97Gb mark was reached.
I also thought it might give insight to the "not enough space" for shards when I have 30Gb free.

No matter, i'm happy. I'll see if anyone else has a comment and close it in a few days.

Thank you for your efforts on my behalf.
--dad