2

I have several libvirt VMs stored on xfs partitions and am using gluster to replicate the storage. The VMs use qcow2 for storage.

Some of the partitions where the VMs are located indicate high file fragmentation when I run xfs_fb. But the VMs show almost no fragmentation if I run "e4defrag -c /" from their command line.

Does this mean it is safe to ignore what is reported by xfs_db on the host system?

1 Answers1

3

The correct, yet partial, view of the backing file is the one provided by the host system. In other words: if host reports a file as fragmented, it is really fragmented, whatever the guest say.

Moreover, as your backing file is a qcow2 image which by itself uses two layers of indirection table, the disk file probably is even more fragmented than what xfs_db reports.

I suggest you to check your files with qemu-img check to have a better understanding of the fragmentation level of each virtual disk.

shodanshok
  • 44,038
  • 6
  • 98
  • 162