Operating System - Linux
1832374 Members
3094 Online
110041 Solutions
New Discussion

Re: HP-UX 11.0 NFS Client Problem with Linux 2.6 NFS Server

 
Scott F. Crosby
New Member

HP-UX 11.0 NFS Client Problem with Linux 2.6 NFS Server

I have a number of HP-UX 11.0 clients attempting to mount an NFS volume from a SLES 9 server (kernel 2.6.5-7.147, though I've successfully demonstrated the problem with every 2.6 based distribution I've tried.) The mount succeeds, and files can be accessed, but applications cannot obtain locks on files in any directory unless the directories are given world read permission.

The filesystem is exported as follows:

/export/data/proj_test *(rw,insecure,no_auth_nlm,no_root_squash,sync)

I've read a number of threads on this, including a nearly identical problem on ITRC that suggested adding the no_auth_nlm flag for linux 2.4.x kernels. As you can see, I've tried this with no effect. I've also tried loading the capability module, as suggested elsewhere, but this also has no effect.

I've been using the following code to test whether file locking works:

#include
#include
#include
#include
#include
#include

int main ( int argc, char **argv)
{
// Open the file specified on the command line.

int fd;

struct flock fl;



fl.l_type = F_WRLCK;
fl.l_whence = SEEK_SET; /* SEEK_SET, SEEK_CUR, SEEK_END */
fl.l_start = 0; /* Offset from l_whence */
fl.l_len = 0; /* length, 0 = to EOF */
fl.l_pid = getpid(); /* our PID */

fd = open ( argv[1], O_WRONLY );

// Lock
if ( fcntl(fd, F_SETLKW, &fl) ) {
printf ("Cannot get write lock on %s.\n", argv[1]);
} else {
printf ("Obtained write lock on %s.\n", argv[1]);
}

// unlock
fl.l_type = F_UNLCK;

if ( fcntl(fd, F_SETLK, &fl) ) {
printf ("Cannot releae lock on %s.\n", argv[1]);
} else {
printf ("Released lock on %s.\n", argv[1]);
}

close (fd);
}

7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: HP-UX 11.0 NFS Client Problem with Linux 2.6 NFS Server

Are you current on HP-UX nfs patches (its hard to be current).

I have two HP-UX servers 11i D class that nfs connect to a Fedora Core 3 server with the 2.6.5.1 kernel and do not encounter any issues.

Due to the horrific way that RH implemented samba and cifs, I have to use NFS to access common web content.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Scott F. Crosby
New Member

Re: HP-UX 11.0 NFS Client Problem with Linux 2.6 NFS Server

I have installed the latest quality pack for 11.0 (March 2004) with no effect. I've also run the patch manager for HP reccommended patches and applied the generated bundle, also with no effect. Do you know of any applicable NFS patches that wouldn't be included in these two patch locations?
RAC_1
Honored Contributor

Re: HP-UX 11.0 NFS Client Problem with Linux 2.6 NFS Server

On hp-ux side, send -usr2 signal to rpc.mountd. This would put it in debug mode. Try running your application. Check the debug log file now.

Unless we get something, we can not get started on the problem.

For debugging, you may want to use ethreal, hp-ux nettl.

Anil
There is no substitute to HARDWORK
Scott F. Crosby
New Member

Re: HP-UX 11.0 NFS Client Problem with Linux 2.6 NFS Server

Turning on debugging for rpc.mountd didn't produce any useful output; the log just indicates that debugging was turned on.

rpc.lockd, however, is a different story. Attached are tcpdumps and rpc.lockd logs for a failed attempt (directory set to 770) and a successful attempt (directory set to 775.)
Steven E. Protter
Exalted Contributor

Re: HP-UX 11.0 NFS Client Problem with Linux 2.6 NFS Server

There are lots of NFS patches not included in the quarterly updates. They have not been widely tested enough to make three star status, or they made three star status after the last quarterly update.

http://www6.itrc.hp.com/service/patch/search.do

Search by keyword NFS

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Florian Heigl (new acc)
Honored Contributor

Re: HP-UX 11.0 NFS Client Problem with Linux 2.6 NFS Server

Do You run rpc.lockd on the SLES box?
Is it seen as registered via rpcinfo -p linux_box from hp-ux?
yesterday I stood at the edge. Today I'm one step ahead.
Scott F. Crosby
New Member

Re: HP-UX 11.0 NFS Client Problem with Linux 2.6 NFS Server

Absolutely, though SLES9 uses the kernel lock daemon. I wouldn't be able to obtain a lock with the directories wide open if it weren't running.