This alert is related to the InterPlanetary File System (IPFS) distributed file system. It calculates the percentage of used IPFS datastore space. When you receive this alert, it means that your IPFS storage repository space is highly utilized.
High datastore usage means your IPFS storage is close to its capacity. This can affect the system's performance and stability. It is essential to keep an eye on IPFS storage usage to ensure smooth functioning and avoid running out of storage.
To check the current IPFS datastore storage utilization, use the ipfs repo stat
command:
ipfs repo stat
To find the largest files and folders within your IPFS datastore, use the following command:
ipfs pin ls --type=recursive | xargs -n1 -I {} echo -n "{} " && ipfs object stat {} | head -n1 | awk '{print $2}'
You can clean up and remove files that are no longer needed from your datastore using ipfs pin rm
and ipfs repo gc
commands. Be cautious while removing data to avoid losing any essential files.
For example:
ipfs pin rm <CID>
ipfs repo gc
If your datastore is continuously getting filled, you might need to increase its capacity to ensure smooth operation. This can be done by adjusting the Datastore.StorageMax
configuration setting in the config
file, which is typically located in the .ipfs
folder.
ipfs config Datastore.StorageMax <new size>
Regularly monitor your IPFS datastore usage using ipfs repo stat
command to stay informed about its storage utilization and plan for any necessary adjustments.