Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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 22.214.171.124, 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
But xm create run from a node other than the creating node creates,
erroniously, the VM. So we have local, but cluster-wide, flock()
1. A cat /proc/mounts does not show that localflock() has been
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!
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.