Confused, deploying with storage and LXD

I’ve got a charm that makes use of storage.

Here is the code:

I deploy it to my lxd cloud, requesting a 2G disk.

juju deploy ./scp_ubuntu-20.04-amd64.charm --storage data=lxd,2G,1 --constraints "cores=2 mem=1G"

It looks good through: juju storage

But when the unit comes online, it makes no sense at all! It seems to have a 134G disk with 18GB used.

root@juju-a9629a-17:/srv/scponly/data# df . -lh Filesystem Size Used Avail Use% Mounted on /dev/mapper/ubuntu–vg-ubuntu–lv 134G 18G 110G 14% /srv/scponly/data

This is how it looks.

Further more, its not at all respecting the 2G constraint since I’m totally able to write a 4GB file inside of the container.

root@juju-a9629a-17:/srv/scponly/data# dd if=/dev/zero of=out bs=4M count=1000 
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 21.7764 s, 193 MB/s
root@juju-a9629a-17:/srv/scponly/data# du . -sh
4.0G	.

… and juju keeps telling me all is good. (Which it obviously isn’t)

erik@pixel:~/keytest$ juju storage
Unit    Storage id  Type        Pool  Size    Status    Message
scp/12  data/14     filesystem  lxd   2.0GiB  attached  

I’m super confused about what goes on here.

1 Like

Interested to find out why.