“machine e784e299cd97d8 [app] does not have a volume configured and fly.toml expects one with destination /var/www/html/storage; remove the [mounts] configuration in fly.toml or use the machines API to add a volume to this machine”
I must be missing something obvious but would love some help with this
➜ git:(main) ✗ fly m clone e784e299cd97d8 --attach-volume storage_volume:/var/www/html/storage
Cloning machine e784e299cd97d8 into region ams
Error: Can’t attach the volume as the source machine doesn’t have any volumes configured
I’m not in a hurry, I am just exploring how easy it will be to migrate our apps to v2, and I feel like volumes in v2 are not polished enough yet for me to consider switching those apps
This community post also describes some of the rough edges, I think it’s worth looking at by Fly team
I migrated a couple apps with volumes yesterday. Since the volumes only containing caches, I tried to avoid downtime by removing them manually, migrating then adding new volumes. I ran into the same problem at the last step.
I found it difficult to understand what to do, and after trying the attach-volume switch (which I couldn’t get to work) and some investigation into the scary-looking machines API I found
So I followed that and scaled them down to 0 (so much for no downtime!), then ran a deploy and it created a new machine with the volume attached. I could then clone it to scale back up. It all seems to be ok now.
@thewilkybarkid Yea this volume thing has some rough edges on v2 I’ve also talked to Fly email support about this and got this reply:
Believe it or not, this triggered a big discussion internally, and we are working on a better volumes experience – so thank you for that! The situation where a user might want to get from no volumes to one volume is something that we didn’t account for in a good way.
The team is working on some related improvements in the pull requests below.
Once things have been stabilized, the documentation should be updated to reflect the processes. I will keep you updated on the progress, as it sounds like you’re looking for volumes with Apps V2 to get more stable before using them in production.