0

I have setup a LXC container with LVM as backingstore. On the host the command lvs --units m outputs the following:

 LV               VG    Attr      LSize   Pool Origin Data%  Move Log Copy%  Convert
 vm               dvg   -wi-a---- 1000.00m

When I'm inside the container the command df -h -B M prints this:

Filesystem     1M-blocks  Used Available Use% Mounted on
/dev/dvg/vm         969M  407M      513M  45% /
none                  1M    0M        1M   0% /sys/fs/cgroup
none                396M    1M      396M   1% /run
none                  5M    1M        5M   1% /run/lock
none               1977M    0M     1977M   0% /run/shm
none                100M    0M      100M   0% /run/user

Both outputs are in Mebibytes (MiB).

Now the question arises what files/metadata reserve the 1000-969=31MiB? Is it possible to display them?

Thanks!

J. Pee
  • 42
  • 6

1 Answers1

3

The lost space is due to guests filesystem metadata, rather then to host LVM settings. Are you using XFS as guest filesystem, right? XFS reserves ~32 MB of disk space for its internal working, so this number fits quite nicely with your data.

On the other side, If you issue lsblk inside your guest you will notice that block device size is exactly the same as the backing logical volumes. So, on the guest side, no space is lost due to LVM alone.

shodanshok
  • 47,711
  • 7
  • 111
  • 180