Deploy error: needs volumes with name 'data', but I created it already in the app region

As I see on configuration page there is no [mounts], but it’s in my file.

is this because free account? Why there is no any information about this behavior and no any mention on pricing page about paid volumes? Any way, I do create volumes, but cannot attach them.

fly scale count 1
fly volume create data -r arn -n 1
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = 'psy-froggy-bot'
primary_region = 'arn'

[mounts]
  source='data'
  destination='/data'
  processes = ['app']

[http_service]
  internal_port = 3000
  force_https = true
  auto_stop_machines = 'stop'
  auto_start_machines = true
  min_machines_running = 0
  processes = ['app']

[checks]
  [checks.my_health_check]
    type = 'http'
    interval = '15s'
    timeout = '10s'
    grace_period = '30s'
    method = 'get'
    path = '/status'

    [checks.my_health_check.headers]
      Content-Type = 'application/json'

[[vm]]
  memory = '1gb'
  cpu_kind = 'shared'
  cpus = 1
  memory_mb = 256

end of deploy log:

==> Building image
Searching for image 'registry.fly.io/psy-froggy-bot:deployment-be6d54633aa6ef4599507655c50d755f' remotely...
image found: img_19gm46q6rkmqvx0j
Watch your deployment at https://fly.io/apps/psy-froggy-bot/monitoring
Error: Process group 'app' needs volumes with name 'data' to fulfill mounts defined in fly.toml; Run `fly volume create data -r REGION -n COUNT` for the following regions and counts: arn=1
unsuccessful command 'flyctl deploy -a psy-froggy-bot --image registry.fly.io/psy-froggy-bot:deployment-be6d54633aa6ef4599507655c50d755f --depot-scope=app --config fly.toml'

I can confirm that volumes and mounts work on the “free” tier (there isn’t really a free tier any more, but I know what you mean).

I wonder if I would suggest blatting your existing volumes in this app, and then recreating them. I wonder if that would re-register them in a way that would make the app play more nicely.

1 Like

Thank you for reply, @halfer!
Sadly, I tried to recreate 3 times…

OK.

Next, I would try trimming down your command and/or the TOML config to the bare essentials, in case there is a nuance to an option that is stopping things working. I’d say -a psy-froggy-bot is redundant if your config is in your project root, and --config fly.toml is redundant because that’s the default config name anyway. I’d remove --depot-scope=app, at least temporarily, to see whether that makes a difference.

This option is interesting; one does not automatically need it. If you have a Dockerfile in your project, I’d drop this and rely on a remote build.

Finally, try creating a mount in a different region, and then the app also in that same region. Maybe there is an oddity with arn that would not happen elsewhere.

arn and otp are both relatively short of free capacity lately—down to ~4% of what ams has available…

1 Like