Cannot detach, storage is singular

Hello

I have a charm where I have storage configured but I would like to remove it from the charm. When I try to refresh a deployed charm I get: ERROR cannot upgrade application “geth” to charm “local:jammy/geth-3”: required storage “data” removed So I tried to detach it with juju detach-storage data/0 --force and get: failed to detach data/0: cannot destroy storage attachment data/0:geth/0: cannot detach, storage is singular.

Can someone explain how to detach this kind of storage?

1 Like

Step by step

  1. Deploy charm with storage configured.
  2. Remove the storage config from the charm
  3. Refresh with new charm where storage is removed.
juju refresh geth --path=./geth_ubuntu-22.04-amd64.charm
Added local charm "geth", revision 3, to the model ERROR cannot upgrade application "geth" to charm "local:jammy/geth-3": required storage "data" removed
  1. Try to remove or detach storage with or without --force results in
failed to detach data/0: cannot destroy storage attachment data/0:geth/0: cannot detach, storage is singular