claudyus / LXC-Web-Panel

LXC Web Panel improved for lxc 1.0+
http://claudyus.github.io/LXC-Web-Panel/
Other
221 stars 68 forks source link

"Disk usage" calculated wrong and not using the right location #61

Closed psarossy closed 9 years ago

psarossy commented 9 years ago

Hello!

I've just installed LWP, and so far I'm quite happy with it (was giving up on it before I found your fork).

One issue I ran into is that the "Disk usage" part is using not taking into account the location of the containers and just shows the df of /. Given that my containers are not located there, it's not helpful, but what I thought of is even in case it would use the right device, it would not be useful as it's a raid array that just happens to have the LXC folder too.

I think a better way would be to read lxc.lxcpath from the config, and do the free/used space calculation based on that.

Cheers, Peter

claudyus commented 9 years ago

This make absolutely sense, among other things I also discover, reading this part of code that there is an undocumented option to override the default behaviors.