Can't find volume after SSH into machine

Hi,

I’ve attached volumes to my machines and have mounted them to /data. I run flyctl volumes list and it shows a list of volumes attached to machines. I then SSH into the machine to check the volume and type ls after running flyctl ssh console --machine [MACHINE_ID] -

No sign of the folder. I was under the impression it would be in the root of the project folder accessible via /data. During runtime my logs are filling up with errors.

ENOENT: no such file or directory, open 'data/cache.json'

Left my fly.toml file below to see settings. Any help would be much appreciated.

app = "c-service"
primary_region = "lhr"

[build]

[http_service]
  internal_port = 9002
  force_https = true
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 1
  processes = ["app"]

[mounts]
  source="service_data"
  destination="/data"

[[vm]]
  cpu_kind = "shared"
  cpus = 1
  memory_mb = 1024

/data means it is at the root of the file-system, not your project (which is at /usr/src/app).

Reconfigure your app to point to /data (the leading slash is critical), or change your fly.toml to mount it in your project folder destination="/usr/src/app/data" (note this will overwrite anything there).

Thanks for quick response! I’ll try this out now

@pb30 - Thanks PB, I was missing the ‘/’ before the data folder that was the issue.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.