A Debian Virtual machine runs as a Guest VirtualBox VM. It's filesystem is EXT3. The host system loses power and after booting up the host system and guest VM, I find that the VM's filesystem has been rolled back to a previous state, losing changes made to the filesystem some time before losing power. The operations that were rolled back had been fully completed before the loss of power (files fully copied, file handles closed, etc.), but it's possible and even likely that other write operations were occuring on the VM at the point of the crash.
So I am trying to figure out if it's the filesystem recovery process that rolls back filesystem operations after encountering corruption post power loss, or is it possibly related to VirtualBox and the way it ignores flush requests for performance gains by default (discussed here)
Are there any other factors that would result in the filesystem being rolled back after losing power?
Edit: tested a simplified scenario with the same VM on a Windows host by booting it up, creating a pair of files on the filesystem and killing the VirtualBox.exe process running the VM. After booting up the VM the files created before killing the process are gone. I have varied the time between writing the files and killing the VirtualBox process between a few seconds to a few minutes with the same results. There was no IO activity on the test VM in that peroid of time, except of course for the usual Linux activity, whatever that may be. Also tried the same test on a Debian VM with ext2 instead of ext3 with the exact same results. Looks like it is more VirtualBox related than filesystem related.
Also, during the tests, VirtualBox was configured with the following additional settings:
"VBoxInternal/Devices/piix3ide/0/LUN#[x]/Config/FlushInterval" 1 "VBoxInternal/Devices/piix3ide/0/LUN#[x]/Config/IgnoreFlush" 0
So it looks like they don't have any effect on this particular problem.