LXD - VM - write error: No space left on device


From one day to another my LXD Virtual Machine crashed without reason.
VM mainly used to host docker swarm which was up and running for more than 3 months without any issues.

See below, creating a file of 1 byte crashes :

 # echo "1" > $(mktemp)
-bash: echo: write error: No space left on device

Still I have plenty of disk space available.

# zfs list
NAME                                                USED  AVAIL     REFER  MOUNTPOINT
rpool                                               130G  94.9G       96K  /rpool
rpool/lxd/virtual-machines                         2.18G  94.9G       96K  legacy
rpool/lxd/virtual-machines/app-xxx-yyy-vm          7.24M  92.8M     7.28M  legacy
rpool/lxd/virtual-machines/app-xxx-yyy.block       2.17G  94.9G     2.58G  -
rpool/swap                                         8.50G  96.5G     6.88G  -

# lxc storage info default
  description: ""
  driver: zfs
  name: default
  space used: 56.69GiB
  total space: 151.60GiB

I do not know if it is linked or not but after this crash, I tried to create another VM, installed docker on it and the first docker command hangs and gives me no console return, just hanging forever awaiting I do not know what. And same result when creating a container with docker installed (even by following the video posted in another topic)

Thanks for the help,

Answering myself : I didn’t run the df -h command initially.
Once done I saw that I used 4Gb of the VM initiale size.

Forced to a bigger size using lxc config device override app-xxx-yyy root size=10GB
In the VM itself, installed the packages required to run growpart /dev/sda 2 ; resize2fs /dev/sda2

1 Like