Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

health metrics freespace shows configured freespace and not actual freespace #1123

Closed
i5heu opened this issue May 13, 2020 · 5 comments
Closed
Labels
kind/enhancement A net-new feature or improvement to an existing feature status/wontfix This will not be addressed

Comments

@i5heu
Copy link

i5heu commented May 13, 2020

ipfs@ipfs-cluster-master:~/ipfs-cluster-ctl$ ./ipfs-cluster-ctl health metrics freespace
XXXX | freespace: 1000 GB | Expires in: 21 seconds from now

Additional information:

  • IPFS Cluster version: 0.12.1

Describe the bug:
My machine has only 20GB left, but freespace shows 1000GB free.
This is because 1000GB is configured (StorageMax) in IPFS, but the actual freespace (e.g. linux command df) is not considered.

https://github.com/glvd/cluster/blob/d0d3ea64c1d0994765d48d5efe4195c051bdd728/informer/disk/disk.go#L99-L104

@i5heu i5heu added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels May 13, 2020
@i5heu
Copy link
Author

i5heu commented May 13, 2020

@hsanjuan hsanjuan added kind/enhancement A net-new feature or improvement to an existing feature status/wontfix This will not be addressed and removed kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels May 13, 2020
@hsanjuan
Copy link
Collaborator

hsanjuan commented May 13, 2020

Hello,

we are not using actual disk space because it has too many pitfalls:

  • Need to figure out on what storage medium is the IPFS repository storing things
  • Does not work if the IPFS daemon is not running locally
  • Does not work if the IPFS daemon is running locally but with a remote datastore that needs some sort of authentication (S3)
  • Does not help if the user does not want to dedicate the full hard drive to IPFS things
  • Introduces additional complexities in code.

Therefore, using StorageMax is more convenient and provides a very clear way for users to indicate their available storage.

@i5heu
Copy link
Author

i5heu commented May 13, 2020

thanks to make this clear!

@frankTheTank72
Copy link

frankTheTank72 commented Jun 10, 2020

Hi all ,
was searching for the same question and understood the problems by setting StorageMax in an automated way. But still I think we can optimize this ...

My idea :

A user starts cluster-follower with a new attribute -ClusterStorageMax XXGB (default 10GB)
In this case we add a new tag in the IPFS config with ClusterStorageMax = xxGB
Now within the cluster-follower app we check in a given interval or on a trigger the size of the repo and calculate = StorageMax = Max(0, ClusterStorageMax- RepoSize)
StorageMax will be updated on the IPFS config.

If we introdcue this we would have a more clear picture on the cluster how much space is left on each cluster node. (Still we would have the problem if some put a fake value in, but in general it is more accurate.)

From my point fo view it also helps a cluster with set values for min and max replication to select the correct node list too.

Happy to hear your feedback....

FYI @hsanjuan

@RubenKelevra RubenKelevra changed the title health metrics freespace shows configuret freespace and not actual freespace health metrics freespace shows configured freespace and not actual freespace Jun 10, 2020
@RubenKelevra
Copy link
Collaborator

RubenKelevra commented Jun 10, 2020

@frankTheTank72 this is completely unrelated to the initial ticket. Please use a dedicated ticket for your feature request.

@ipfs-cluster ipfs-cluster locked as off-topic and limited conversation to collaborators Jun 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/enhancement A net-new feature or improvement to an existing feature status/wontfix This will not be addressed
Projects
None yet
Development

No branches or pull requests

4 participants