ERROR getting details for storage database/0: filesystem for storage instance "database/0" not found

when I run some juju commands, the following errors happend:

$ juju status keystone --format yaml
{}
ERROR getting details for storage database/0: filesystem for storage instance "database/0" not found

$ juju storage --debug
10:21:44 INFO  juju.cmd supercommand.go:56 running juju [2.9.32 917a8f1033561ce28a73ff81d71da75aec6e0785 gc go1.18.3]
10:21:44 DEBUG juju.cmd supercommand.go:57   args: []string{"/snap/juju/19681/bin/juju", "storage", "--debug"}
10:21:44 INFO  juju.juju api.go:78 connecting to API addresses: [10.0.0.124:17070]
10:21:44 DEBUG juju.api apiclient.go:1153 successfully dialed "wss://10.0.0.124:17070/model/d31a52c8-f3a1-413c-8f67-7399438a832e/api"
10:21:44 INFO  juju.api apiclient.go:688 connection established to "wss://10.0.0.124:17070/model/d31a52c8-f3a1-413c-8f67-7399438a832e/api"
10:21:44 DEBUG juju.api monitor.go:35 RPC connection died
ERROR getting details for storage database/0: filesystem for storage instance "database/0" not found
10:21:44 DEBUG cmd supercommand.go:537 error stack:
getting details for storage database/0: filesystem for storage instance "database/0" not found
/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/api/client/storage/client.go:58:
/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/cmd/juju/storage/list.go:161:
/build/snapcraft-juju-a284566302ade03f36071a6fe755224b/parts/juju/src/cmd/juju/storage/list.go:142:

what’s the problem it is and how to fix it? Thanks very much if someone can give a hand!

In case someone else stumbles upon this issue, the fix in [1] may help. The issue seems related to the fact that some storage remnants are not getting cleaned up properly. Removing the orphan storage fixes it.

[1] Bug #2031931 “`juju remove-application --force --no-wait` remove...” : Bugs : Canonical Juju