How to detach fly volume

hi @jmuncaster

fly volumes destroy <volume id> is the correct command to destroy a volume. (You will lose all data stored on the volume when you do this.) To “unmount” a volume without destroying it, you would destroy the Machine it’s attached to.

I think the issue you’re having now stems from deploying without mounts first and that updated the machine/volume incorrectly. I can reproduce it. And wasn’t able to destroy the volume without destroying the machine first.

1. Destroy the machine:

fly m destroy <machine id>

2. Then destroy the volume:

fly vol destroy <volume id>

Note: If you have more than one machine with attached volume, you’ll need to repeat this with the second machine and volume.

3. Remove the mounts section from your fly.toml.

4. Then, run fly deploy and your app will deploy with new machines and no volumes attached.

I’m sorry this wasn’t an ideal experience, and we’ll look into making it better.

2 Likes