LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-16-2012, 12:20 PM   #1
bweaver
Member
 
Registered: Nov 2010
Posts: 44

Rep: Reputation: 0
cluster-aware file locking using ocfs2 and Xen


We are running a Debian Squeeze cluster using ocfs2 and Xen, the
virtualisation technology. We want to enable locking such that once a VM
is created with xen xm create it cannot be created a 2nd time, either by
the creating node or by any other node in the cluster.

To implement locking of this kind, we installed ocfs2-tools 1.6.3.2, and
a Suse patch to Xen that enables lockage of VMs by means of a bash
script that executes flock().

The locking works fine locally--subsequent xm creates on the same node
are blocked, and a message returned saying 'VM already exists with ID
###, etc'.

But xm create run from a node other than the creating node creates,
erroniously, the VM. So we have local, but cluster-wide, flock()
functionality.


1. A cat /proc/mounts does not show that localflock() has been
accidentally activated.

2. I have double-checked that o2cb and ocfs2 processes are running on
both nodes in the cluster.

The documentation and commentary is not so clear: one page says that the default ocfs2 cluster management process, o2cb, does not handle cluster-aware locking.

But on the other hand, ocfs2 docs say 'cluster aware flock()' has been implemented as of ocfs2-tools 1.4.

do bugs remain in ocfs2-tools 1.4, or can cluster-aware locking be done? If so, can it be done running o2cb, or does a user-space cluster management system have to be used?


Any ideas? Any perspectives or comments are greatly appreciated!
 
Old 02-17-2012, 11:24 AM   #2
bweaver
Member
 
Registered: Nov 2010
Posts: 44

Original Poster
Rep: Reputation: 0
I think I figured it out. Cluster-aware locking requires use of a user-space cluster management tool.

The function flock() has indeed been made cluster-aware. But in order for this functionality to be realized it must be used in combination with a user-space tool (Heartbeat, Pacemaker). o2cb running alone will not do the trick.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Xen cluster (drbd, ocfs2, pacemaker) auto-recover problem IMNOboist Linux - Server 2 02-14-2012 12:25 PM
where is ocfs2 installed--SAN or on the cluster nodes? bweaver Linux - Virtualization and Cloud 2 05-17-2011 07:13 AM
Which is better XEN SAN strategy--Clustered File System (OCFS2/GFS) or use of CLVM? bweaver Linux - Virtualization and Cloud 2 05-06-2011 08:49 AM
NFS cluster with OCFS2 + Quota + DRBD jirikmik Linux - Server 2 04-04-2011 06:58 AM
OCFS2 at a Xen Guest Machine ThiagoMZ Linux - Server 3 07-30-2008 09:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration