Re: Locking without virtlockd (nor sanlock)?

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

 



Il 03-01-2020 11:26 Daniel P. Berrangé ha scritto:
virtlockd also uses fcntl(), however, it doesn't have to acquire locks on the file/block device directly. It can use a look-aside file for locking. For example a path under /var/lib/libvirt/lock. This means that locks on
block devices for /dev/sda1 would be held as
/var/lib/libvirt/lock/$HASH(/dev/sda1)

If you mount /var/lib/libvirt/lock on NFS, these locks now apply across
all machines which use the same block devices. This is useful when your
block device storage is network based (iSCSI, RBD, etc).

Hi Daniel,
if I understand the docs correctly, this locking scheme is really useful for raw block devices, right?

Now that Qemu automatically locks file-based vdisks, what is the main advantage of virtlockd locking?

There are some issues with libvirt's locking though where we haven't
always released/re-acquired locks at the correct time when dealing
with block jobs. As long as your not using snapshots, block rebase,
block mirror APIs, it'll be ok though.

While I am not an heavy user of external snapshot and other block-related operation, I occasionally use them (and, in these cases, I found them very useful).

Does it means that I should avoid relying on virtlockd for locking? Should I rely on Qemu locks only?

Thanks.

--
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: g.danti@xxxxxxxxxx - info@xxxxxxxxxx
GPG public key ID: FF5F32A8


_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users




[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux