[libvirt-users] Researching why different cache modes result in 'some' guest filesystem corruption..

Michal Privoznik mprivozn at redhat.com
Fri Aug 2 07:20:48 UTC 2019


On 7/30/19 10:40 PM, vincent at cojot.name wrote:
> 
> Does anyone have any idea what's going on or what I may be doing wrong?

I don't think it is you doing something wrong. The way shutdown works is 
that libvirt tells qemu to shut down (or in case of guest initiated 
shutdown it is guest OS who says that), and then qemu starts flushing 
its own internal caches (note that these are on the top of host kernel 
FS caches). And once done, qemu sends libvirt an event to which libvirt 
reacts by killing the process.
However, if there is a bug in qemu so that the event is sent before all 
cahces were flushed it may lead to disk corruption. This also 
corresponds to your experience where cache='none' makes the bug go away 
because in that case qemu doesn't add any of its caches into the picture 
and thus no disk corruption is possible.
Unfortunatelly, I don't know enough about qemu to suggest where the bug 
might be, sorry.

Michal




More information about the libvirt-users mailing list