NebraLtd / hm-miner

Helium Miner Container
https://nebra.io/hnt
MIT License
16 stars 16 forks source link

Miner running out of storage #17

Closed vpetersson closed 3 years ago

vpetersson commented 3 years ago

Just discovered that this miner is out of storage. We need to add some kind of checks for this.

vpetersson commented 3 years ago

The problem is the following from within the helium-miner container:

/ # du -hs  /var/data/
25.9G   /var/data/

Technically speaking, this is the "miner-storage" volume.

vpetersson commented 3 years ago

@robputt wiped the miner storage on this one but we need a more long term solution here.

shawaj commented 3 years ago

What about find /var/data/blockchain.db/ -type f -mtime +7 -delete until we have something based on blessed block?

vpetersson commented 3 years ago

Potentially yeah, but need to be careful with because there might be older files that are still needed. Also ctime is probably better than mtime in case the miner touches some files on start.

shawaj commented 3 years ago

Fair. Yeah maybe better to just wait and do it properly. But be good to get it sorted soon

shawaj commented 3 years ago

FYI https://github.com/helium/miner/issues/984 and https://github.com/helium/blockchain-core/pull/808

shawaj commented 3 years ago

FYI @robputt

shawaj commented 3 years ago

@vpetersson @robputt basically if we delete files in /var/data/blockchain.db with file ending .sst that are older than 7 days old it basically achieves what we want

vpetersson commented 3 years ago

It's not that simple apparently. @robputt already tested that and the miner breaks if you do that as old files are still referenced. Work begun in https://github.com/NebraLtd/hm-disk-purger as a temporary workaround.

vpetersson commented 3 years ago

Closing this one out as we think this is under control atm.