<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.10.2">
</HEAD>
<BODY>
Perfect, thank you!!<BR>
<BR>
<TT>[root@net1 ~]# </TT><TT><B>cd /usr/local/etc/cachesys</B></TT><BR>
<TT>[root@net1 cachesys]# </TT><TT><B>ll</B></TT><BR>
<TT>total 68</TT><BR>
<TT>-rw-r-</TT><TT><B><FONT COLOR="#ff0000">S</FONT></B></TT><TT>r--  1 root root  3072 Oct 10 09:22 </TT><TT><FONT COLOR="#993300"><B>cache.reg</B></FONT></TT><BR>
<TT>-r-xr-xr-x  1 root root 35221 Oct 10 09:22 ccontrol</TT><BR>
<TT>-r-xr-xr-x  1 root root 16609 Oct 10 09:22 csession</TT><BR>
<TT>[root@net1 cachesys]# </TT><TT><B>chmod -s cache.reg</B></TT><BR>
<TT>[root@net1 cachesys]# </TT><TT><B>ll</B></TT><BR>
<TT>total 68</TT><BR>
<TT>-rw-r--r--  1 root root  3072 Oct 10 09:22 cache.reg</TT><BR>
<TT>-r-xr-xr-x  1 root root 35221 Oct 10 09:22 ccontrol</TT><BR>
<TT>-r-xr-xr-x  1 root root 16609 Oct 10 09:22 csession</TT><BR>
<TT>[root@net1 cachesys]# </TT><TT><B>ccontrol all</B></TT><BR>
<TT>    Configuration     Version ID        Port   Directory</TT><BR>
<TT>    ----------------  ----------------  -----  --------------------------------</TT><BR>
<TT>dn >TOBY              5.0.19.6202.3            /toby/sys</TT><BR>
<BR>
<BR>
On Fri, 2006-10-13 at 14:15 -0500, Abhijith Das wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Hi Robert,</FONT>

<FONT COLOR="#000000">> I am running InterSystems Caché 5.0.19 for AMD64, and an strace output </FONT>
<FONT COLOR="#000000">> from their utility reveals a problem with fcntl/flock on the GFS </FONT>
<FONT COLOR="#000000">> filesystem (mount -t gfs /dev/VGSHARE/lvol0 /usr/local):</FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">>     open("/usr/local/etc/cachesys/cache.reg", O_RDONLY|O_NONBLOCK) = 3</FONT>
<FONT COLOR="#000000">>     fcntl(3, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0,</FONT>
<FONT COLOR="#000000">>     len=0}) = -1 ENOLCK (No locks available)</FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">The only place GFS returns ENOLCK is when mandatory locking is turned </FONT>
<FONT COLOR="#000000">on. It looks like you have the flags for mandatory locking set on this </FONT>
<FONT COLOR="#000000">particular file. i.e. S_ISGID is set and S_IXGRP is not set. If you do </FONT>
<FONT COLOR="#000000">an 'ls -al' on this file, you should see something like</FONT>
<FONT COLOR="#000000">    [adas@radium locking]$ ls -al templock</FONT>
<FONT COLOR="#000000">    -rwxr-Sr-x  1 adas adas 6 Oct 13 13:50 templock</FONT>
<FONT COLOR="#000000">The 'S' in the permissions for the group indicate mandatory locking. GFS </FONT>
<FONT COLOR="#000000">does not support mandatory locking and will refuse to</FONT>
<FONT COLOR="#000000">apply fcntl() or flock() on such files.</FONT>
<FONT COLOR="#000000">You can try doing the same fcntl() with start=0 and len=0 on some other </FONT>
<FONT COLOR="#000000">regular file on gfs and see if that works for you.</FONT>

<FONT COLOR="#000000">> When I put their files on an ordinary ext3 filesystem, all works fine:</FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">>     open("/usr/local/etc/cachesys/cache.reg", O_RDONLY|O_NONBLOCK) = 3</FONT>
<FONT COLOR="#000000">>     fcntl(3, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0,</FONT>
<FONT COLOR="#000000">>     len=0}) = 0</FONT>
<FONT COLOR="#000000">></FONT>
<FONT COLOR="#000000">When you copied the files over, they might have lost these flags, or </FONT>
<FONT COLOR="#000000">your ext3 fs supports mandatory locking ('-o mand' mount option)</FONT>

<FONT COLOR="#000000">> The man page on fcntl states that when flock is setup with </FONT>
<FONT COLOR="#000000">> whence=SEEK_SET, start=0, and len=0, the lock will occur on the entire </FONT>
<FONT COLOR="#000000">> file... so locking zero bytes in this manner is acceptable.  Help?</FONT>

<FONT COLOR="#000000">This works correctly in my test environment.</FONT>

<FONT COLOR="#000000">Hope this helps.</FONT>

<FONT COLOR="#000000">Regards,</FONT>
<FONT COLOR="#000000">--Abhi</FONT>

<FONT COLOR="#000000">--</FONT>
<FONT COLOR="#000000">Linux-cluster mailing list</FONT>
<FONT COLOR="#000000"><A HREF="mailto:Linux-cluster@redhat.com">Linux-cluster@redhat.com</A></FONT>
<FONT COLOR="#000000"><A HREF="https://www.redhat.com/mailman/listinfo/linux-cluster">https://www.redhat.com/mailman/listinfo/linux-cluster</A></FONT>

</PRE>
</BLOCKQUOTE>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<BR>
<B><FONT SIZE="1"><FONT COLOR="#000066">Robert Hurst, Sr. Caché Administrator</FONT></FONT></B><BR>
<B><FONT SIZE="1"><FONT COLOR="#3333ff">Beth Israel Deaconess Medical Center</FONT></FONT></B><BR>
<B><FONT SIZE="1"><FONT COLOR="#6666ff">1135 Tremont Street, REN-7</FONT></FONT></B><BR>
<B><FONT SIZE="1"><FONT COLOR="#6666ff">Boston, Massachusetts   02120-2140</FONT></FONT></B><BR>
<B><FONT SIZE="1"><FONT COLOR="#6666ff">617-754-8754 ∙ Fax: 617-754-8730 ∙ Cell: 401-787-3154</FONT></FONT></B><BR>
<FONT SIZE="1"><FONT COLOR="#9999ff">Any technology distinguishable from magic is insufficiently advanced.</FONT></FONT>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>