Hi,
I’m trying to set up litefs for the first time.
I’m stuck at attaching consul where it looks to me the app and consul is trying to claim the same volume?
litefs.yml
fuse:
dir: "${LITEFS_DIR}"
data:
dir: "/data/sqlite"
lease:
# Use Consul for distributed lease management
type: "consul"
# Consul server address (provided by Fly.io)
consul:
url: "${FLY_CONSUL_URL}"
# Key prefix in Consul KV store - use the same key across all nodes
key: "litefs/my-db"
candidate: true
# The hostname to advertise to other nodes
advertise-url: "http://${FLY_APP_NAME}.internal:20202"
exec:
- cmd: "path-to-binary"
#fly.toml
[mounts]
source = "my_volume"
destination = "/data"
[env]
LITEFS_DIR = "/data/litefs"
I tried
- fly volumes create
- deploy with the new fly.toml (mounting persistent volume)
- fly consul attach
Error: failed to launch VM: failed_precondition: volume already claimed by machine {current_app_blue_machine}
So I tried to scale down to 0 then run consul
- fly consul attach
- fly deploy
Error: failed to launch VM: failed_precondition: volume already claimed by machine {current_app_blue_machine}
The issue may be related to bluegreen strategy and persistent volume rather then litefs and consul I’m not sure.