Score:0

Error: Storage pool "default" unavailable on this server (losetup command fail)

by flag

I can't start my lxc/lxd containers anymore. I get the error : Error: Storage pool "default" unavailable on this server.

I am on debian sid.

The root issue seems to be that the command losetup --find --nooverlap --direct-io=on --show /var/snap/lxd/common/lxd/disks/default.img fail saying that default.img doesn't exist (but it does).

See this terminal session :

root@debian-pocket3:~# lxc list
+----------------------+---------+------+------+-----------+-----------+
|         NAME         |  STATE  | IPV4 | IPV6 |   TYPE    | SNAPSHOTS |
+----------------------+---------+------+------+-----------+-----------+
| SiteWebACL           | STOPPED |      |      | CONTAINER | 0         |
+----------------------+---------+------+------+-----------+-----------+
| sitesVitrinesOne-dev | STOPPED |      |      | CONTAINER | 0         |
+----------------------+---------+------+------+-----------+-----------+
| sitesVitrinesTwo-dev | STOPPED |      |      | CONTAINER | 0         |
+----------------------+---------+------+------+-----------+-----------+
| testWoocommerce-dev  | STOPPED |      |      | CONTAINER | 0         |
+----------------------+---------+------+------+-----------+-----------+


root@mydebianbox:~# lxc start sitesVitrinesTwo-dev 
Error: Storage pool "default" unavailable on this server

root@mydebianbox:~# lxc storage info default
info:
  description: ""
  driver: btrfs
  name: default
  space used: 40.46GiB
  total space: 133.56GiB
used by:
  instances:
  - SiteWebACL
  - sitesVitrinesOne-dev
  - sitesVitrinesTwo-dev
  - testWoocommerce-dev
  profiles:
  - default

root@mydebianbox:~# cat /var/snap/lxd/common/lxd/logs/lxd.log
time="2023-07-23T17:57:19+02:00" level=warning msg=" - Couldn't find the CGroup network priority controller, network priority will be ignored"
time="2023-07-23T17:57:21+02:00" level=error msg="Failed mounting storage pool" err="Failed to run: losetup --find --nooverlap --direct-io=on --show /var/snap/lxd/common/lxd/disks/default.img: exit status 1 (losetup: /var/snap/lxd/common/lxd/disks/default.img: failed to set up loop device: No such file or directory)" pool=default
time="2023-07-23T17:57:21+02:00" level=error msg="Error getting disk usage" err="Storage pool is unavailable on this server" instance=sitesVitrinesTwo-dev instanceType=container project=default
time="2023-07-23T17:57:21+02:00" level=error msg="Error getting disk usage" err="Storage pool is unavailable on this server" instance=testWoocommerce-dev instanceType=container project=default
time="2023-07-23T17:57:21+02:00" level=error msg="Error getting disk usage" err="Storage pool is unavailable on this server" instance=sitesVitrinesOne-dev instanceType=container project=default
time="2023-07-23T17:57:21+02:00" level=error msg="Error getting disk usage" err="Storage pool is unavailable on this server" instance=SiteWebACL instanceType=container project=default
time="2023-07-23T17:58:21+02:00" level=error msg="Failed mounting storage pool" err="Failed to run: losetup --find --nooverlap --direct-io=on --show /var/snap/lxd/common/lxd/disks/default.img: exit status 1 (losetup: /var/snap/lxd/common/lxd/disks/default.img: failed to set up loop device: No such file or directory)" pool=default
time="2023-07-23T17:59:22+02:00" level=error msg="Failed mounting storage pool" err="Failed to run: losetup --find --nooverlap --direct-io=on --show /var/snap/lxd/common/lxd/disks/default.img: exit status 1 (losetup: /var/snap/lxd/common/lxd/disks/default.img: failed to set up loop device: No such file or directory)" pool=default
time="2023-07-23T18:00:22+02:00" level=error msg="Failed mounting storage pool" err="Failed to run: losetup --find --nooverlap --direct-io=on --show /var/snap/lxd/common/lxd/disks/default.img: exit status 1 (losetup: /var/snap/lxd/common/lxd/disks/default.img: failed to set up loop device: No such file or directory)" pool=default
time="2023-07-23T18:01:22+02:00" level=error msg="Failed mounting storage pool" err="Failed to run: losetup --find --nooverlap --direct-io=on --show /var/snap/lxd/common/lxd/disks/default.img: exit status 1 (losetup: /var/snap/lxd/common/lxd/disks/default.img: failed to set up loop device: No such file or directory)" pool=default
time="2023-07-23T18:02:23+02:00" level=error msg="Failed mounting storage pool" err="Failed to run: losetup --find --nooverlap --direct-io=on --show /var/snap/lxd/common/lxd/disks/default.img: exit status 1 (losetup: /var/snap/lxd/common/lxd/disks/default.img: failed to set up loop device: No such file or directory)" pool=default
time="2023-07-23T18:03:16+02:00" level=error msg="Error getting disk usage" err="Storage pool is unavailable on this server" instance=testWoocommerce-dev instanceType=container project=default
time="2023-07-23T18:03:16+02:00" level=error msg="Error getting disk usage" err="Storage pool is unavailable on this server" instance=sitesVitrinesOne-dev instanceType=container project=default
time="2023-07-23T18:03:16+02:00" level=error msg="Error getting disk usage" err="Storage pool is unavailable on this server" instance=sitesVitrinesTwo-dev instanceType=container project=default
time="2023-07-23T18:03:16+02:00" level=error msg="Error getting disk usage" err="Storage pool is unavailable on this server" instance=SiteWebACL instanceType=container project=default
time="2023-07-23T18:03:23+02:00" level=error msg="Failed mounting storage pool" err="Failed to run: losetup --find --nooverlap --direct-io=on --show /var/snap/lxd/common/lxd/disks/default.img: exit status 1 (losetup: /var/snap/lxd/common/lxd/disks/default.img: failed to set up loop device: No such file or directory)" pool=default

root@mydebianbox:~# ls -lh /var/snap/lxd/common/lxd/disks/default.img 
-rw------- 1 root root 14G 21 juil. 10:30 /var/snap/lxd/common/lxd/disks/default.img

root@mydebianbox:~# losetup --find --nooverlap --direct-io=on --show /var/snap/lxd/common/lxd/disks/default.img
losetup: /var/snap/lxd/common/lxd/disks/default.img: failed to set up loop device: No such file or directory

How could I debug further and/or solve the issue ?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.