Skip to content

IPFS not respecting StorageMax #6242

@koalalorenzo

Description

@koalalorenzo

Version information:

go-ipfs version: 0.4.20-
Repo version: 7
System version: amd64/linux
Golang version: go1.12.4

Type: Bug

Description:

After a while or running 0.4.20 in production and serving content, the system seems to not respect the StorageMax rule in the configuration.

I currently have these settings in the configuration:

[...]
  "Datastore": {
    "BloomFilterSize": 0,
    "GCPeriod": "1h",
    "HashOnRead": false,
    "Spec": {
      "mounts": [
        {
          "child": {
            "path": "blocks",
            "shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
            "sync": true,
            "type": "flatfs"
          },
          "mountpoint": "/blocks",
          "prefix": "flatfs.datastore",
          "type": "measure"
        },
        {
          "child": {
            "compression": "none",
            "path": "datastore",
            "type": "levelds"
          },
          "mountpoint": "/",
          "prefix": "leveldb.datastore",
          "type": "measure"
        }
      ],
      "type": "mount"
    },
    "StorageGCWatermark": 90,
    "StorageMax": "8GB"
  },
[...]

But the size of the ipfs directory is 15GB

user@eu-helsinki1:/opt/ipfs# du -h --max-depth=1
15G	./blocks
4.0K	./keystore
61M	./datastore
15G	.
user@eu-helsinki1:/opt/ipfs# ipfs repo stat
NumObjects: 72290
RepoSize:   15456415465
StorageMax: 8000000000
RepoPath:   /opt/ipfs/
Version:    fs-repo@7

The GC is enabled when starting the daemon (using the args). Is there any way to enforce the GC via the configuration? That might be an issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugA bug in existing code (including security flaws)status/duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions