Resize disk after init

One of my instance’s disk is full. So I need to resize it. It seems 5GB and I want grow it to 10GB.

lxc exec frappe12-dev -- df -h
Filesystem                       Size  Used Avail Use% Mounted on
default/containers/frappe12-dev  4.9G  4.0G  954M  81% /

lxc stop frappe12-dev
lxc config device override frappe12-dev root size=10GB
lxc config device set frappe12-dev root size 10GB

lxc exec frappe12-dev -- df -h
Filesystem                       Size  Used Avail Use% Mounted on
default/containers/frappe12-dev  4.9G  4.0G  954M  81% /

It doesn’t changed but

lxc config show frappe12-dev

Shows

architecture: x86_64
config:
  boot.autostart: "0"
  image.architecture: amd64
  image.description: ubuntu 20.04 LTS amd64 (release) (20210119.1)
  image.label: release
  image.os: ubuntu
  image.release: focal
  image.serial: "20210119.1"
  image.type: squashfs
  image.version: "20.04"
  limits.cpu.allowance: 20%
  limits.memory: 4096MB
  limits.memory.enforce: soft
  volatile.base_image: 690801402e1d4e02c07ba2d1a29bb9a9b4825f037c12ccad8cb4d062d2450d2c
  volatile.eth0.hwaddr: 00:16:3e:e3:ff:16
  volatile.idmap.base: "0"
  volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
  volatile.idmap.next: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
  volatile.last_state.idmap: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
  volatile.last_state.power: STOPPED
  volatile.uuid: 7fb76eea-e5ec-48e6-90d1-9008d9d1cc99
devices:
  myport80:
    connect: tcp:127.0.0.1:80
    listen: tcp:0.0.0.0:80
    type: proxy
  root:
    path: /
    pool: default
    size: 10GB
    type: disk
ephemeral: false
profiles:
- default
stateful: false
description: ""

root size as 10GB.

This answer states that

And also, there is a limitation of LVM, if there are snapshots from this volume, you can not resize it, until they are removed.

Does still the case?

Hi Turker,
Which lxd version are you using? I have tested with the version number 4.20 and it works, but you should restart the container which in this case frappe12-dev.
Regards.

4.0.8 . I’ve installed LXD via snap. How can I upgrade it?

sudo snap refresh --channel=latest/stable lxd
did the trick.