juju status --storage
...
Storage Unit Storage ID Type Pool Mountpoint Size Status Message
nextcloud/0 datadir/0 filesystem data /var/nextcloud/data 1000GiB attaching attaching filesystem 0 to machine 0: container "juju-b8aeb2-0" already has a device "filesystem-0"
postgresql/0 pgdata/1 filesystem rootfs /srv/pgdata 2.9TiB attached
Somehow, the database files has gone away.
There seem to be some other directory names “main” for postgresql, is this some kind of backup ?
We use lxd as the underlying cloud and have zfs as the underlying storage pools.
After restarting the container multiple times, we suddenly get the files back!
mount
...
default/containers/juju-b8aeb2-2 on /srv/pgdata type zfs (rw,relatime,xattr,posixacl)
This is something we encounter ALOT and we dont know exactly why.
This is scary. Mostly we can resolve these situations by restarting the container multiple times, but sometimes not… @joakimnyman would also be able to chip in to this discussion.
We have managed to recover the database (rebooting until the mount worked), but yes, this situation is scary. This happens to us alot for other systems using juju storage.