Root directory show different size from lxc config

Hi,
I found that there was something wrong with the container that I created. I have setup a root size of 150GB

But when i tried to check with

df -h

, it shows 48GB size and 100GB was gone.

I’ve tried restarting the container and it still doesn’t work.
Thanks in advance

Please show lxc storage show <pool name> (I cant copy and paste it as you provided an image screenshot rather than text, please try to provide text output where possible).

Also please show lxc storage volume show <pool name> <instance name>

Hi,
Thanks for the reply and sorry for the output in screenshot. Here are the results:

lxc storage show usetyenziso

lxc storage show usetyenziso
config:
     source: attatbiqat/lxd
     volatile.initial_source: attatbiqat/lxd
      zfs.pool_name: attatbiqat/lxd
     description: For services
     name: usetyenziso
     driver: zfs
     used_by:

  • /1.0/instances/api-gateway-second
  • /1.0/instances/datamart-sync-second
  • /1.0/instances/queue-notification-primary
    status: Created
    locations:
  • none

lxc storage volume show usetyenziso queue-notification-primary

Error: Not Found

Hmm, this is unusual. Why does an error appear even though this instance (queue-notification-primary) is registered in the pool name (usetyenziso). Please correct me, maybe i missed something.
Thank you

Please show output of lxc storage volume ls usetyenziso

Also please show output of sudo zfs list

lxc storage volume ls usetyenziso

 
±---------------------±---------------------------------±------------±-------------±--------+
|         TYPE         |               NAME               | DESCRIPTION | CONTENT-TYPE | USED BY |
±---------------------±---------------------------------±------------±-------------±--------+
| container            | api-gateway-second               |             | filesystem   | 1       |
±---------------------±---------------------------------±------------±-------------±--------+
| container (snapshot) | api-gateway-second/snap0         |             | filesystem   | 1       |
±---------------------±---------------------------------±------------±-------------±--------+
| container            | datamart-sync-second             |             | filesystem   | 1       |
±---------------------±---------------------------------±------------±-------------±--------+
| container (snapshot) | datamart-sync-second/snap0       |             | filesystem   | 1       |
±---------------------±---------------------------------±------------±-------------±--------+
| container            | queue-notification-primary       |             | filesystem   | 1       |
±---------------------±---------------------------------±------------±-------------±--------+
| container (snapshot) | queue-notification-primary/snap0 |             | filesystem   | 1       |
±---------------------±---------------------------------±------------±-------------±--------+

Ah so its:

lxc storage volume show usetyenziso container/queue-notification-primary
attatbiqat                                                                                       510G  6.27T      112K  /attatbiqat
attatbiqat/api_gateway_second                                                                   12.6G   487G     12.6G  /attatbiqat/api_gateway_second
attatbiqat/lxd                                                                                   147G  6.27T       96K  none
attatbiqat/lxd/containers                                                                        145G  6.27T       96K  none
attatbiqat/lxd/containers/api-gateway-second                                                     410M  46.2G      790M  /var/snap/lxd/common/lxd/storage-pools/usetyenziso/containers/api-gateway-second
attatbiqat/lxd/containers/datamart-sync-second                                                  1.11G  45.5G     1.12G  /var/snap/lxd/common/lxd/storage-pools/usetyenziso/containers/datamart-sync-second
attatbiqat/lxd/containers/queue-notification-primary                                            97.6G  42.1G     5.61G  /var/snap/lxd/common/lxd/storage-pools/usetyenziso/containers/queue-notification-primary
attatbiqat/lxd/custom                                                                             96K  6.27T       96K  none
attatbiqat/lxd/deleted                                                                          1.79G  6.27T       96K  none
attatbiqat/lxd/deleted/containers                                                                 96K  6.27T       96K  none
attatbiqat/lxd/deleted/custom                                                                     96K  6.27T       96K  none
attatbiqat/lxd/deleted/images                                                                   1.79G  6.27T       96K  none
attatbiqat/lxd/deleted/images/5de046b0a308cf627e108ae36b47d5e7beff438c9a5c9cc5bb15024988a09e22   619M  6.27T      619M  /var/snap/lxd/common/lxd/storage-pools/usetyenziso/images/5de046b0a308cf627e108ae36b47d5e7beff438c9a5c9cc5bb15024988a09e22
attatbiqat/lxd/deleted/images/87dfb80c737fcb1c0cea3b4ea2342ae58137dde37b3f65eea34fbfb74ad94de2   247M  6.27T      247M  /var/snap/lxd/common/lxd/storage-pools/usetyenziso/images/87dfb80c737fcb1c0cea3b4ea2342ae58137dde37b3f65eea34fbfb74ad94de2
attatbiqat/lxd/deleted/images/ab6afbfa77670f7c2f94a0c67c54d21e6ebeb2ff6216931a73de3c7b8171d91a   236M  6.27T      236M  /var/snap/lxd/common/lxd/storage-pools/usetyenziso/images/ab6afbfa77670f7c2f94a0c67c54d21e6ebeb2ff6216931a73de3c7b8171d91a
attatbiqat/lxd/deleted/images/d05a797f190c3721442f7fa0a8151c7a079f4d9edcf94131a66b935169dd12a1   247M  6.27T      247M  /var/snap/lxd/common/lxd/storage-pools/usetyenziso/images/d05a797f190c3721442f7fa0a8151c7a079f4d9edcf94131a66b935169dd12a1
attatbiqat/lxd/deleted/images/ede546817f0a77fca5514cfe29098cfd78a1a19763fabb2ab9a3620e71767ad5   239M  6.27T      239M  /var/snap/lxd/common/lxd/storage-pools/usetyenziso/images/ede546817f0a77fca5514cfe29098cfd78a1a19763fabb2ab9a3620e71767ad5
attatbiqat/lxd/deleted/images/f603184f60a0f9cfe6641b33596edcb27e7852e6795cbd3cc06cfc3fdd647512   247M  6.27T      247M  /var/snap/lxd/common/lxd/storage-pools/usetyenziso/images/f603184f60a0f9cfe6641b33596edcb27e7852e6795cbd3cc06cfc3fdd647512
attatbiqat/lxd/deleted/virtual-machines                                                           96K  6.27T       96K  none
attatbiqat/lxd/images                                                                             96K  6.27T       96K  none
attatbiqat/lxd/virtual-machines                                                                   96K  6.27T       96K  none
attatbiqat/service_datamart_sync_second                                                         1.55G   248G     1.54G  /attatbiqat/service_datamart_sync_second
attatbiqat/service_datamart_sync_third                                                          95.9G   154G     95.9G  /attatbiqat/service_datamart_sync_third

Ah alright,
Here is the result

config: {}
description: ""
name: queue-notification-primary
type: container
used_by:
- /1.0/instances/queue-notification-primary
location: none
content_type: filesystem

OK so looking at your zfs list output:

NAME                                                                                        USED  AVAIL     REFER  MOUNTPOINT
attatbiqat/lxd/containers/queue-notification-primary                                            97.6G  42.1G     5.61G  /var/snap/lxd/common/lxd/storage-pools/usetyenziso/containers/queue-notification-primary

You can see its used almost 100GB, and has 42GB left - which aligns with what you see in df inside the container.

lxc storage volume ls usetyenziso shows it has 1 snapshot volume.

So this likely means that of the 150GB you originally set, the snapshot is consuming 100GB of space - likely because there have been lots of changes inside your container since you took the snapshot.

That’s true.

So this likely means that of the 150GB you originally set, the snapshot is consuming 100GB of space - likely because there have been lots of changes inside your container since you took the snapshot.

Ah, thanks a lot. Finally, I can find where the 100GB value is missing.
You rock!

1 Like