VMs, Guest-to-Host Writes & bcache

parityboy

Limp Gawd
Joined
Nov 13, 2010
Messages
390
Background
My workstation serves as a VirtualBox host for several Linux desktop VMs. The workstation has a Samsung 970 Pro as its boot device, with two Samsung 850 EVOs as a RAID 0 scratch drive. I have an external drive (two 1TB mechanicals in RAID 1) connected to the host which exposes its directories to the guests using the Shared Folders feature of VirtualBox. I use this to backup the home directories in each of the guests using Deja-dup. This is all very stable and works nicely.


Proposal
I would like to augment this by using TimeShift inside each guest to back up each guest in its entirety, so that if I lose a guest, I can create a clean install and then restore it to its previous state (including all applications and settings). I am considering TimeShift because it seems a lot easier than dealing with live VMs from the host.

However, one of the requirements of TimeShift is (or seems to be) that it requires access to an ext4-formatted block device to store its snapshots. I have already tested this by creating an LVM volume on the SSD scratch drive and attaching it to a guest. TimeShift can see the volume as a plain block device inside the guest and can successfully use it to store its snapshots.


Problem & Questions
In the above test, TimeShift completed its backup in a timely manner, no surprise considering the storage media. However, the external drive is mechanical and I am concerned that having to deal with lots of small files will make the backups unbearably slow, to the point where backup windows will overlap between guest VMs.

So my question is this: if I were to configure the host with bcache to accelerate writes to an LVM volume on the mechanical backup drive (attached to the guest VMs, one LVM volume per guest VM), would guest writes to that LVM volume take advantage of bcache on the host, or would bcache have to run inside the guest for this to work?

Many thanks. :)
 
Top