[SOLVED] writeback vs writeback (unsafe)

adamb

Famous Member
Mar 1, 2012
1,329
77
113
The wiki's seem to be missing anything related to the "writeback (unsafe)" cache options. Could someone explain the difference between just normal writeback and writeback (unsafe)? I am thinking there is a difference.

Am I also correct in thinking that cache=writeback is now safe so long your guest is using a file system which supports write barriers?

I appreciate the input!
 
Last edited:
>>The wiki's seem to be missing anything related to the "writeback (unsafe)" cache options. Could someone explain the difference between just normal writeback and writeback (unsafe)? I am thinking there is a difference.

unsafe : when the qemu vm is doing the fsync, to flush the datas to disk, the host acknowledge before datas is really writen. If you have a power loss, you'll have data corruption.


>>Am I also correct in thinking that cache=writeback is now safe so long your guest is using a file system which supports write barriers?

yes. barrier enabled , or > kernel 2.6.37 with fua support

http://monolight.cc/2011/06/barriers-caches-filesystems/
 
>> unsafe : when the qemu vm is doing the fsync, to flush the datas to disk, the host acknowledge before datas is really writen. If you have a power loss, you'll have data corruption.

So if host itself do have UPS - it's ok to use unsafe instead of writeback, right? (setup: regular lvm, no zfs)
 
it's ok to use unsafe instead of writeback, right? (setup: regular lvm, no zfs)
no, some precious data can be easy lost if there is system crash too. unsafe (even regular writecache) is only recommended for temporary VM, do not use writecache with 24/7 VM.
I already had corruption, Windows boot but error loading some apps or DB corrupt, with Lvmthin on Datacenter SSD.
 
no, some precious data can be easy lost if there is system crash too. unsafe (even regular writecache) is only recommended for temporary VM, do not use writecache with 24/7 VM.
I already had corruption, Windows boot but error loading some apps or DB corrupt, with Lvmthin on Datacenter SSD.
So you suggest using No cache in VM settings?(I do have daily backups but losing day is something I like to avoid). Did you host crash or VM crash?
 
It depends on the storage you're using. Run tests with write-through, no cache, and write-back modes, and choose the one that provides the best performance. Ideally, one of the first two would be better for safe reasons.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!