I have a linux guest with two disks for / and /home. /home is a write-through disk to keep data safe of snapshot restoring.
The problem is that the live snapshot corrupts /home data when restoring it. Probably this is caused by linux cache, because if I add some changes to /home and then I restart the machine, the changes are still there. I have tried to mount /home with the option sync, but this didn't solve the problem.
These are the steps to reproduce it:
- Start a guest linux with a write-through disk mounted as /home
- When you are logged in to your account, take a live snapshot
- Create a file in /home, e.g.
$ echo 1 > ~/test.txt
- Close the machine and restore the new created snapshot.
- Start again the machine.
$ ls -l ~/
- The file test.txt has disappeared...
- If you remount /home you will find it but corrupted. A
$ ls -l ~/
will show you something like-????????? ? ? ? ? ? test.txt
Is there any way to solve this problem?
Thank you.