Den ons 31 juli 2019 kl 06:55 skrev Muhammad Junaid <junaid.fsd.pk@xxxxxxxxx>:
The question is about RBD Cache in write-back mode using KVM/libvirt. If we enable this, it uses local KVM Host's RAM as cache for VM's write requests. And KVM Host immediately responds to VM's OS that data has been written to Disk (Actually it is still not on OSD's yet). Then how can be it power failure safe?
It is not. Nothing is power-failure safe. However you design things, you will always have the possibility of some long write being almost done when the power goes away, and that write (and perhaps others in caches) will be lost. Different filesystems handle losses good or bad, databases running on those filesystems will have their I/O interrupted and not acknowledged which may be not-so-bad or very bad.
The write-caches you have in the KVM guest and this KVM RBD cache will make the guest I/Os faster, at the expense of higher risk of losing data in a power outage, but there will be some kind of roll-back, some kind of fsck/trash somewhere to clean up if a KVM host dies with guests running.
In 99% of the cases, this is ok, the only lost things are "last lines to this log file" or "those 3 temp files for the program that ran" and in the last 1% you need to pull out your backups like when the physical disks die.
If someone promises "power failure safe" then I think they are misguided. Chances may be super small for bad things to happen, but it will just never be 0%. Also, I think the guest VMs have the possibility to ask kvm-rbd to flush data out, and as such take the "pain" of waiting for real completion when it is actually needed, so that other operation can go fast (and slightly less safe) and the IO that needs harder guarantees can call for flushing and know when data actually is on disk for real.
May the most significant bit of your life be positive.
_______________________________________________ ceph-users mailing list ceph-users@xxxxxxxxxxxxxx http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com