[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: KVM: writethrough / writeback - data integrity



Hi Chris,

On Tue, 28 Jun 2016, Chris wrote:

This wholly depends on what kind of application and/or database you're hosting on your production server; and, it also depends on what kind of back-end infrastructure (SAN? Virtualized Lx? VMware, Xen, otherwise?)

it's a server RAID-5. One partition is a KVM raw image file (host uses ext4), the other a partition on the host system passed to KVM guest. Host and guest are Debian Jessie.

For the best protection against data loss in case of power failure, etc., you will want to consider setting the underlying host filesystem (ext4) to use 'data=ordered' (as well as the guest filesystem with same option). This will force writes to the ext4 fs prior to journal metadata updates.

Write-through, write-back and mixed-mode options have implications that
will affect the performance, redundancy, availability and time-to-recover
of your production applications.  Are you using any database software?

Dovecot with Maildir.

Performance shouldn't be much of a concern for this, unless high volume.

In example, production DB filesystems can have different mount options and
attributes as listed in /etc/fstab and based on production requirements.

The partitions have ext4 file system.

See above.

Also, you mentioned that you're using a hardware RAID controller. Many, but not all, hardware RAID controllers have on-board battery backup, which adds an important level of protection. For example, if the OS writes to the RAID controller, but the RAID controller doesn't flush to disk, it can live in the battery-backed cache until it can be flushed at a later time.

Hope this helps,


--
Visidon, LLC - http://www.visidon.com/ - support@visidon.com
Expert cloud, open source software, and Linux consulting services


Reply to: