[Virtio-fs] Kudos: productivity boost using virtio-fs

Harry G. Coin hgcoin at gmail.com
Thu Oct 1 14:12:17 UTC 2020


On 10/1/20 8:51 AM, Dr. David Alan Gilbert wrote:
> * Harry G. Coin (hgcoin at gmail.com) wrote:
>> Though it's likely been written before:
>>
>> Virtio-fs is a wonderful productivity boost in development environments
>> in which unrelated deadlocks, crashes and hard-lockups happen.   Why? 
>> Because the underlying file system is never corrupted (though individual
>> file contents may be, the file system itself is protected).   For
>> example, using btrfs' snapshot ability in the underlying file system and
>> comparing 'before and after' crashes creates a powerful debugging tool.
> Thanks!
>
> I'm curious, can you describe a bit more about how you're using it with
> btrfs - I don't think we've had anyone describe that before.
> (We mostly use it with overlayfs via the various container tools).
>
> Dave

The 3 host chassis I've set up so far to work with this has a  btrfs
file system in a raid-1 setup.  Btrfs does a good job with xattr support
which virtio-fs can be set to use well.

I have several vm's running on each chassis, each using virtio-fs.  On
the host, there is a sub-volume for each vm.  The vms  use kernel
booting, and huge pages.  So, on the bare-metal host, a simple 'btrfs su
snapshot <vm sub volume> <snap name> generates an 'almost free' (from a
resource perspective) look at the entire vm.  Various risky experimental
things go on in the vm, which could lead to file system corruption owing
to deadlocks and hard freezes and race conditions.  However with
virtio-fs, when that happens, all I need to do on the host is make a
another snapshot of the 'frozen' vm, stop the vm.  Then I can compare
the exact state of the files at the time of the freeze with the 'known
good' versions at the snapshot time.   Delete the 'frozen' state
snapshot, make a new  snapshot of the known good snapshot, reboot the vm
and the dev cycle can continue. 

Even if the cause of the freeze wasn't evident in the file system
deltas, knowing there isn't corruption in the underlying fs is a big
time saver.

I expect when dax makes it out of the development bubble this
configuration will be a very high performance, easy to maintain, high
security arrangement.  Much harder to 'break out' of a vm than the
various container options.





>> I suspect most folks involved in virtio-fs know this, but it's worth
>> putting in the record for new folks.
>>
>> Harry
>>
>>
>>
>>
>> _______________________________________________
>> Virtio-fs mailing list
>> Virtio-fs at redhat.com
>> https://www.redhat.com/mailman/listinfo/virtio-fs





More information about the Virtio-fs mailing list