<div dir="ltr"><div>But when I check it from the host, it is still showing incorrect usage:</div><div><br></div><div>---</div><div> du -sh /var/lib/lxc/example_repo_container-237946ab/rootfs/root/<br>36K /var/lib/lxc/example_repo_container-237946ab/rootfs/root/</div><div>--</div><div><br></div><div>How to get its correct usage then ?<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 5, 2023 at 5:15 PM Dmitriy Rabotyagov <<a href="mailto:noonedeadpunk@gmail.com">noonedeadpunk@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I don't think this is possible.<br>
Disk usage of containers should be performed from the host rather then<br>
container. Unfortunately, with current default backing store (which is<br>
`dir`), there's no neat way of doing that. So you'd need to use smth<br>
like `du -sh /var/lib/lxc/<container_name>/rootfs/` to check how much<br>
diskspace it's consuming. Though, backing store is customizable. So<br>
you can set `lxc_container_backing_store` variable to "lvm" or "zfs"<br>
and check diskspace consumption per lvm/zfs volume.<br>
<br>
пн, 5 июн. 2023 г. в 09:56, Gk Gk <<a href="mailto:ygk.kmr@gmail.com" target="_blank">ygk.kmr@gmail.com</a>>:<br>
><br>
> Hi All,<br>
><br>
> We have an OSA setup. When I check the usage of filesystem of any container using "df" command, it shows the lvm partitions of the underlying host as well as shown below:<br>
> --<br>
> Filesystem Size Used Avail Use% Mounted on<br>
> /dev/mapper/lxc1-lv_root 86G 60G 22G 74% /<br>
> none 492K 4.0K 488K 1% /dev<br>
> /dev/mapper/lxc-openstack 493G 136G 334G 29% /var/log<br>
> tmpfs 252G 0 252G 0% /dev/shm<br>
> tmpfs 51G 88K 51G 1% /run<br>
> tmpfs 5.0M 0 5.0M 0% /run/lock<br>
> tmpfs 252G 0 252G 0% /sys/fs/cgroup<br>
> example:gfs-repo 86G 67G 16G 82% /var/www/repo<br>
> ---<br>
><br>
> How to exclude the host partitions such that df only reports the container usage only ?<br>
><br>
> Thanks<br>
> Kumar<br>
</blockquote></div>