Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

'Used Space' goes through the 'Allocated Space' barrier #315

Closed
pvdl opened this issue Jul 29, 2016 · 5 comments
Closed

'Used Space' goes through the 'Allocated Space' barrier #315

pvdl opened this issue Jul 29, 2016 · 5 comments
Assignees
Labels

Comments

@pvdl
Copy link

pvdl commented Jul 29, 2016

Versions

  • GUI Version: v1.0.3
  • Operating System: Linux Mint 18

Expected Behavior

It may not occur that the Used Space exceeds the Allocate Space limit.

Actual Behavior

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

If you set the Allocated Space, the Used Space doesn't respect this setting.
It exceeds this limit.

Maybe it's worth to mention: I used the option 'Launch Storj at user login'

Steps to Reproduce

Please include the steps the reproduce the issue, numbered below. Include as
much detail as possible.

  1. Set a Allocated Space
  2. Wait when the Used Space exceeds the limit

Screenshots (Optional)

If the error is graphical in nature it is helpful to provide a screenshot.
selectie_005

@super3
Copy link
Contributor

super3 commented Aug 1, 2016

This is been discussed in detail on https://github.com/Storj/storjshare-cli/issues/92.
Has to deal with how the OS interprets space. If it used GiB = 1024 MB or GB = 1000 MB.

@super3
Copy link
Contributor

super3 commented Aug 1, 2016

Might be a while before we fix this. Just note that it may go just a little bit over, and in some OSes it doesn't actually go over it just reports incorrectly.

@pvdl
Copy link
Author

pvdl commented Aug 1, 2016

I'll try if your interpretation of 40x1024x1024x1024 = 42949672960 works in this case.
So in my case the Used Space should stop at 42.950.
I'll let you know the outcome.

Definition: https://en.wikipedia.org/wiki/Gibibyte

@pvdl
Copy link
Author

pvdl commented Aug 2, 2016

It seems that in my case of 40 GB the Used Space stopped at 42.969 GB with 27499 contracts in total.

So we can conclude the Allocated Space mechanism works.
The Allocated Space uses GiB ('1024'), and Used Space uses GB ('1000')

If you look at the folder properties:
selection_006
It shows the total amount in GiB

To make it consistent, the Allocated Space should be calculate with the factor 1024 in stead of 1000.

@pvdl
Copy link
Author

pvdl commented Aug 3, 2016

A solution is to change this switch case:

            switch (tab.storage.unit) {
              case 'MB':
                totalSpace = totalSpace * Math.pow(1024, 2);
                break;
              case 'GB':
                totalSpace = totalSpace * Math.pow(1024, 3);
                break;
              case 'TB':
                totalSpace = totalSpace * Math.pow(1024, 4);

Change '1024' to '1000'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants