[libvirt-users] Mounting VM filesystem on host while VM running
Patrick PICHON
patrick at pichon.me
Mon Aug 8 08:37:58 UTC 2016
Just found virt-df ( libguestfs package) which seems doing what I need.
Just need to integrate the result in an collectd/rrd format
On , Michal Privoznik wrote:
> On 08.08.2016 09:33, Patrick PICHON wrote:
>> Hello,
>>
>>
>> All my VMs are using LVs created on the host side.
>>
>> I'm using collectd to monitor some of the ressources of my host as
>> well
>> as the libvirt pluging to monitor my VMs.
>>
>> Collectd has an interesting plugin ( df ) which can monitor the
>> filesystem usage.
>>
>> I would like to use it to monitor the VMs filesytsem usage.
>>
>> As it is obvious that if I mount the VM filesystem on the host while
>> the
>> VM is running, I'm wondering if I could mount it in READONLY without
>> expecting any panic/corruption problem.
>>
>>
>> Any advices ?
>
> I don't think it is a good idea. Mostly because of caching - you
> probably won't get consistent results. Moreover, some filesystems (e.g.
> ext4) replay journal even if mounted as RO (frankly, I haven't found a
> way how to mount ext really RO). I don't know of any filesystem that
> would support being mounted multiple times from two different hosts
> (except network FS obviously).
>
> What you could do is to write small guest agent that will report disk
> usage to host (e.g. via virito serial console).
>
> Michal
>
> _______________________________________________
> libvirt-users mailing list
> libvirt-users at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-users
More information about the libvirt-users
mailing list