When I try to deploy using flyctl deploy I am getting
Failed to update machines: failed to update machine 28650e5f119968: machine in group 'app' needs an unattached volume named 'rapidforge_data' in region 'lhr'
What do I need to do. I followed doc even watched a video but still no use
Hey,
Can you SSH into your machine and check if the volume is mounted in the directory that you specified in the destination field?
You can do this by running fly ssh console -s -C df.
I’m assuming you created your machine through fly launch and your adding a volume to this machine.
In that case, i don’t see any issue in fly.toml however you need to make sure your volume is running in the same region as your machine.
@ashitag I was not able to see the volume there. At the end what I did was I had to destroy my machine and recreate it from scratch. Does this mean I can’t attach volume after I create machine ? That does not sound very practical for me if that is the case. Thanks for you help
I think what might have happened is that you had 2 Machines in your app (this is the default when you launch an app with services). If you only create one volume, and then run fly deploy, the second Machine doesn’t have the volume it needs.
You can definitely have a existing Machine, create a volume in the same region, add mounts to fly.toml, and then run fly deploy to attach it. But you need to create a volume for each Machine (and the volumes don’t automatically replicate). See Add volume storage to a Fly Launch app · Fly Docs.
Extra optional info: Machines are pretty “disposable” since they’re so easy to spin up and destroy. Machines and volumes need to be on the same physical host. So when you have a Machine and then add a volume as described in the docs above, we actually create a new Machine on the same physical host as your volume so that they can attach.