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

Configurable storage path storage limit #5624

Merged
merged 3 commits into from
Mar 10, 2021
Merged

Conversation

magik6k
Copy link
Contributor

@magik6k magik6k commented Feb 18, 2021

This adds a new MaxStorage field to sectorstore.json files, which allows setting maximum number of bytes to use in a storage path.

TODO:

  • Test on a miner
  • Add max-storage param to storage-attach commands
$ lotus-miner storage list
09b4f94d-b548-4382-92d1-551676289e3e:
        [###################################               ] 38.92 TiB/54.57 TiB 71%
        Unsealed: 180; Sealed: 867; Caches: 867; Reserved: 0 B
        Weight: 10; Use: Store
        Local: /data/1/store
        URL: http://[...]:2345/remote

92da064d-c2ee-4be1-802f-adbbabf1a06b:
        [#####################################             ] 1.367 TiB/1.818 TiB 75% (filesystem)
        [####################                              ] 64 GiB/153.6 GiB 41% (limit)
        Unsealed: 2; Sealed: 0; Caches: 0; Reserved: 0 B
        Weight: 10; Use: Seal 
        Local: /data/nvme/store
        URL: http://[...]:2345/remote

@magik6k magik6k changed the base branch from master to next March 8, 2021 19:28
@magik6k magik6k force-pushed the feat/miner-storage-limit branch from 491fffa to 7c7b107 Compare March 8, 2021 20:00
@magik6k magik6k marked this pull request as ready for review March 8, 2021 20:00
@magik6k magik6k requested a review from arajasek March 8, 2021 20:20
Copy link
Contributor

@arajasek arajasek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

stat.Available = avail
}
}

return stat, err
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it's possible to have stat.Used > stat.Max, but that's fine, right? You just can't safely assume that Available + Used = Max?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct

@magik6k magik6k merged commit 40fdf6c into next Mar 10, 2021
@magik6k magik6k deleted the feat/miner-storage-limit branch March 10, 2021 10:15
bibibong pushed a commit to EpiK-Protocol/go-epik that referenced this pull request Mar 22, 2021
…iner-storage-limit

Configurable storage path storage limit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants