Disk quota exceeded

Trying to deploy a docker image on a vm with a mounted qsfs created with terraform but I always get the same problem:
ERROR: failed to register layer: ApplyLayer exit status 1 stdout: stderr: write /usr/lib/libicui18n.so.67.1: disk quota exceeded

Here is the output of the docker compose command and df -i for the inodes.

The terraform config:

    terraform {
  required_providers {
    grid = {
      source = "threefoldtech/grid"
    }
  }
}

provider "grid" {
}

locals {
  metas = ["meta1", "meta2", "meta3", "meta4"]
  datas = ["data1", "data2", "data3", "data4",
          "data5", "data6", "data7", "data8",
          "data9", "data10", "data11", "data12",
          "data13", "data14", "data15", "data16",
          "data17", "data18", "data19", "data20",
        ]
}

resource "grid_network" "net1" {
    nodes = [7]
    ip_range = "10.1.0.0/16"
    name = "network"
    description = "newer network"
    add_wg_access = true
}

resource "grid_deployment" "d1" {
    node = 7
    dynamic "zdbs" {
        for_each = local.metas
        content {
            name = zdbs.value
            description = "description"
            password = "password"
            size = 10
            mode = "user"
        }
    }
    dynamic "zdbs" {
        for_each = local.datas
        content {
            name = zdbs.value
            description = "description"
            password = "password"
            size = 10
            mode = "seq"
        }
    }
}

resource "grid_deployment" "qsfs" {
  node = 7
  network_name = grid_network.net1.name
  ip_range = lookup(grid_network.net1.nodes_ip_range, 7, "")
  qsfs {
    name = "qsfs"
    description = "description6"
    cache = 20480 # 10 GB
    minimal_shards = 16
    expected_shards = 20
    redundant_groups = 0
    redundant_nodes = 0
    max_zdb_data_dir_size = 1024 # 512 MB
    encryption_algorithm = "AES"
    encryption_key = "4d778ba3216e4da4231540c92a55f06157cabba802f9b68fb0f78375d2e825af"
    compression_algorithm = "snappy"
    metadata {
      type = "zdb"
      prefix = "hamada"
      encryption_algorithm = "AES"
      encryption_key = "4d778ba3216e4da4231540c92a55f06157cabba802f9b68fb0f78375d2e825af"
      dynamic "backends" {
          for_each = [for zdb in grid_deployment.d1.zdbs : zdb if zdb.mode != "seq"]
          content {
              address = format("[%s]:%d", backends.value.ips[1], backends.value.port)
              namespace = backends.value.namespace
              password = backends.value.password
          }
      }
    }
    groups {
      dynamic "backends" {
          for_each = [for zdb in grid_deployment.d1.zdbs : zdb if zdb.mode == "seq"]
          content {
              address = format("[%s]:%d", backends.value.ips[1], backends.value.port)
              namespace = backends.value.namespace
              password = backends.value.password
          }
      }
    }
  }
  vms {
    name = "vm"
    flist = "https://hub.grid.tf/tf-official-apps/base:latest.flist"
    cpu = 2
    memory = 2048
    entrypoint = "/sbin/zinit init"
    publicip = true
    planetary = true
    env_vars = {
      SSH_KEY = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIwVBFL95gmLMcck2XVlZIKNDDOEWq09q8xFtsiMb7JU toto@adastraindustries.com"
    }
    mounts {
        disk_name = "qsfs"
        mount_point = "/qsfs"
    }
  }
}
output "metrics" {
    value = grid_deployment.qsfs.qsfs[0].metrics_endpoint
}
output "ygg_ip" {
    value = grid_deployment.qsfs.vms[0].ygg_ip
}

output "public_ip" {
    value = grid_deployment.qsfs.vms[0].computedip
}

output "node1_zmachine1_ip" {
    value = grid_deployment.qsfs.vms[0].ip
}

output "wg_config" {
    value = grid_network.net1.access_wg_config
}

Anyone bumped into this problem before? Or know how to troubleshoot his?

1 Like

The issue is that you’ve filled the root filesystem quota, which is not reported by df. You can expand your quota by adding a rootfs_size line to your VM spec as shown below. This value is in megabytes, as seen in the relevant docs.

vms {
    name = "vm"
    flist = "https://hub.grid.tf/tf-official-apps/base:latest.flist"
    cpu = 2
    memory = 2048
    rootfs_size = 2048
...

You could store system files in the QSFS, but I don’t recommend this and they are disposable anyway. I also found this issue suggesting that Docker won’t work well if you try to put all of its data inside the fuse based QSFS mount. Attaching the directory to your container as a volume should work.

Thank you very much @scott.

Got the docker up and running correctly :slight_smile:

Sure thing, and glad to hear it :slight_smile: