StorageMax in the config

Hi, I have a question for limitation of storage.
In the config file($IPFS_PATH/config), there is the field, “StorageMax”.
Can it be used as the limitation of Storage? or Other params?

I set the value as very small value(i.e “StorageMax”: “2MB”). and checked repo stat.
After that,
I added a bigger file than this value,
and this file was added without any problem(any error log).
(the results is below)

Is there any methods to solve it?

------------------------------------(results)-----------------------------------------------------------------------
edvr@edvrVb3:~/ipfsPerfTest$ ipfs repo stat
NumObjects: 15
RepoSize: 114484
StorageMax: 2000000
RepoPath: /home/edvr/temp/ipfs
Version: fs-repo@7
edvr@edvrVb3:~/ipfsPerfTest$ ipfs add go1.10.3.windows-amd64.msi
added QmWttFxuShbFFDRqM91Qt9rtskFCtHsdgRAHoWeEPKjDUi go1.10.3.windows-amd64.msi
114.46 MiB / 114.46 MiB [============================================================] 100.00%
edvr@edvrVb3:~/ipfsPerfTest$ ipfs repo stat
NumObjects: 480
RepoSize: 121781895
StorageMax: 2000000
RepoPath: /home/edvr/temp/ipfs
Version: fs-repo@7

That setting is not currently a hard limit. AFAIK it’s only currently used to to determine whether to run automatic garbage collection (if enabled).

1 Like