Hi,
I'm trying to put in place a KVM cluster (using clvm and gfs2), but I'm
running into some issues with either sanlock or virtlockd. All virtual
machines are handled via the cluster (in /etc/cluser/cluster.conf) but I
want some kind of locking to be in place as extra security measurement.
Sanlock
=======
At first I tried sanlock, but it seems if one node goes down
unexpectedly, sanlock sometimes blocks everything on the other node. So
I can't start any VM's there, so cluster failover is not working for the
VM's.
The locking dir for sanlock is on a shared dir (GFS2), so this might be
the problem: sanlock recommends using a shared device (doing everything
yourself) and don't recommend the locking dir to be on GFS2, but libvirt
config suggest using a shared dir. Redhat even suggests that GFS2 is a
good solution there,
So: is there a hint on how to format/mount the GFS2 partition for
sanlock usage?
This thread
(
http://web.archiveorange.com/archive/v/fZfKniEdO4ZFyIhhNbzU )
recommends against GFS2+sanlock, but maybe using the "no_lock" gfs2
option might help? Any kind of advice?
Virtlockd
=========
Since sanlock was not working as expected, I tried virtlockd. This
seems to be working well, but: live migration fails because the file on
the shared disk (used for locking) is being locked by the original
server running the VM. So when trying to do live migration, this fails
and leaves the VM paused on the original server. Trying to migrate a
paused server then works ok, but that's of course not live migration.
So: is there a hint on how to format/mount the GFS2 partition for
virtlock usage?
Of course: since every VM is being started/stopped via the cluster, I
could just leave out locking all together and trust on the cluster
software ...
Any insights/tips are greatly appreciated!
Franky