I was playing with disk snapshot in 4.14 however after creating a snapshot and then reverting it to a particular snapshot the data does not show up in the disk. This seems to be a bug because it can be reproduced again and again.
Steps to reproduce -
– Create a persistent data disk
– Take a disk snapshot from vm storage tab.
– Add data to the disk.
– Take second snapshot
– delete the file/data from the disk.
– revert to second snapshot
– Now Check if the file exist but it does not show in the disk.
You need to gurantee the FS integrity before taking the snapshot (e.g.
unmounting it or sync’ing)
Even If I guarantee the integrity of the FS by umounting the disk, the revert option does not go to the previous state.
However checked on 4.12.1 and it is working fine without umounting.
Disk snapshots based on qcow2 (transfer manager) is new in 4.14… VM snapshot is different (incl. memory state) which is available in 4.12.x and before
Yes you are right, vm snapshot and disk snapshot are different however they serve same purpose. They capture the state of just disk or both disk and memory.
I am not sure if you have tried using disk snapshot, if you add/create a new file in a disk and take a snapshot and then delete the data inside it and revert to the previous snapshot then you will not find the file that was created earlier. So if the disk snapshot does not capture the state of the disk then what is the purpose of disk snapshot.
I can reproduce this issue again and again, May be I am missing something or misunderstanding the concept of disk snapshot.
Could you try at your end and check if it is working on your ONE 4.14 setup.
This could be also an issue with the hypervisor caching system, you may
need to use cache=writeback (be aware of performance issues) or poweroff
the VM before taking the snapshot to sync caches…
As I am testing this version, I am using nfs storage and cache=none. Can this be a problem?
we use cache=none on nfs shared filesystem with qcow2 transfer driver. I just verified on our setup that taking a snapshot on a disk with data on it, deleting the data, reverting to the snapshot (with data) shows the data. I.e. it works as expected.
@kiranranjane make sure you select the snapshot you want to revert to and click “revert”
I umounted the nfs share and remounted again and restarted nfs services and now it is working as expected.
I am not sure what caused this issue.