[libvirt-users] Does libvirt-sanlock support network disk?

Hello, As we know, libvirt sanlock support file type storage. I wonder *if it supports network storage.* I tried *iSCSI*, but found it didn't generate any resource file: Version: *qemu-2.10 libvirt-3.9 sanlock-3.5* 1. Set configuration: qemu.conf: *lock_manager = "sanlock"* qemu-sanlock.conf: *auto_disk_leases = 1disk_lease_dir = "/var/lib/libvirt/sanlock"host_id = 1user = "sanlock"group = "sanlock"* # systemctl restart sanlock # systemctl restart libvirtd 2. Start a VM with iSCSI disk and check *resource file* VM disk xml: <disk type='network' device='disk'> <driver name='qemu' type='raw'/> <source protocol='iscsi' name='iqn.2003-01.org.linux-iscsi.localhost.x8664:sn.cb4bfb00df2f/0'> <host name='xx.xx.xx.xx' port='3260'/> </source> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </disk> Start VM: # virsh start iscsi Domain iscsi started Check resource file: # ls /var/lib/libvirt/sanlock __LIBVIRT__DISKS__ No resource file generated. So, does libvirt sanlock only support file or block type storage? -- Han Han Quality Engineer Redhat. Email: hhan@redhat.com Phone: +861065339333

On Wed, Nov 08, 2017 at 02:42:35PM +0800, Han Han wrote:
Hello, As we know, libvirt sanlock support file type storage. I wonder *if it supports network storage.* I tried *iSCSI*, but found it didn't generate any resource file:
Correct, the code currently ignores locking for any non-local disk. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

Thanks for your reply. On Wed, Nov 8, 2017 at 4:58 PM, Daniel P. Berrange <berrange@redhat.com> wrote:
On Wed, Nov 08, 2017 at 02:42:35PM +0800, Han Han wrote:
Hello, As we know, libvirt sanlock support file type storage. I wonder *if it supports network storage.* I tried *iSCSI*, but found it didn't generate any resource file:
Correct, the code currently ignores locking for any non-local disk.
Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/ dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/ dberrange :|
-- Han Han Quality Engineer Redhat. Email: hhan@redhat.com Phone: +861065339333
participants (2)
-
Daniel P. Berrange
-
Han Han