Re: How is calculate the lock with lockd_manager

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

 



On Thu, Mar 31, 2016 at 12:05:07PM +0200, villeneu@xxxxxxxxxxxxxxxxxxxx wrote:
> Hello
> 
> I use lock_manager with libvirt 1.3 and
> I would like to know how is exactly calculate the hash SHA256. I would
> create a table
> to retreive the name with the hash in case of crash to release manualy the
> lock.

Do you mean in the case of a host crash, and if so what filesystem ?  If
you are using NFS at lesat so you shouldn't need to know the file names,
there is the ability to tell the NFS server to release all locks associated
with a dead host.

> I do an  sha256 hash from /var/lib/libvirt/images/lock/MyVM.img but I
> don't get the same hash code form virtlockd ?

It uses the sha256 has of the filename. How did you generate your hash ?
If using shell make sure you don't include a newline

ie you want

   echo -n /var/lib/libvirt/images/lock/MyVM.img | sha256sum

not a plain 'echo' as that includes a newline

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

_______________________________________________
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