File locking between Linux server and HP-UX 10.20 client

  • Permalink
  • submit to reddit
  • Email
  • Follow


We are running into odd file locking problems between our NFS server
which is running on Redhat 9.0 - kernel 2.4.20-8 and HP-UX 10.20
clients.  When a HP-UX 10.20 client requests a file lock on a mounted
directory that resides on Linux, we get the following error: No locks
available

The kernel parameter nflocks is set to 200 which seems like a
reasonable limit. I'm pretty certain this limit isn't being reached,
but it is some type of NFS problem. Has anyone else seen this problem
and fixed it?

I've written a small program that demonstrates the problem:

[madden@hacksaw locktest]$ ./locktest locktest.c
Locking locktest.c...
fcntl: No locks available

/* locktest.c - compiled as: gcc -Wall -O2 locktest.c  -o locktest */

#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

static void setlock(int fd, struct flock fl)
{
    if (fcntl(fd, F_SETLKW, &fl) == -1) {
        perror("fcntl");
        exit(EXIT_FAILURE);
    }
}

int main(int argc, char **argv)
{
    struct flock fl = { F_WRLCK, 0, 0, 0, 0 };
    int fd;

    if (argc != 2) {
        printf("Usage: %s file\n", argv[0]);
        exit(EXIT_FAILURE);
    }

    if ((fd = open(argv[1], O_RDWR)) == -1) {
        perror("open");
        exit(EXIT_FAILURE);
    }

    printf("Locking %s...\n", argv[1]);
    fl.l_type = F_RDLCK;
    setlock(fd, fl);
    printf("%s locked successfully.\n\n", argv[1]);

    printf("Unlocking %s...\n", argv[1]);
    fl.l_type = F_UNLCK;
    setlock(fd, fl);
    printf("%s unlocked successfully.\n\n", argv[1]);

    return (EXIT_SUCCESS);
}
0
Reply madden 5/21/2004 3:26:52 PM

See related articles to this posting

madden@cmsrtp.com (Michael Madden) writes:

> We are running into odd file locking problems between our NFS server
> which is running on Redhat 9.0 - kernel 2.4.20-8 and HP-UX 10.20
> clients.  When a HP-UX 10.20 client requests a file lock on a mounted
> directory that resides on Linux, we get the following error: No locks
> available

tcpdump output would probably shed some light. Also make sure rpc.lockd
is running on the redhat host. 

tim
0
Reply tbutler 5/22/2004 6:01:54 PM

> We are running into odd file locking problems between our NFS server
> which is running on Redhat 9.0 - kernel 2.4.20-8 and HP-UX 10.20
> clients.  When a HP-UX 10.20 client requests a file lock on a mounted
> directory that resides on Linux, we get the following error: No locks
> available

 I would run:

# rpcinfo -p <RH server> 

...from one of the HP clients. This would at lesat reveal if you can contact
the portmapper on the server and whether a lock service is available. The
relevant network status monitor services should be able communicate. Perhaps
you need to check if this is allowed by your firewall configuration.

DaveN.
0
Reply djn 5/24/2004 1:53:39 PM

We figured out the file locking problem.  Either do one of the
following:

1.) Ensure the directory permissions are set to 755 and the file
permissions are set to 644.  The file permissions were 640. Otherwise
the file cannot be locked.

2.) On the Linux server, add the insecure_locks option to
/etc/exports, re-export, and restart NFS.

Thanks,
Mike
0
Reply madden 5/25/2004 10:02:10 PM
comp.sys.hp.hpux 4384 articles. 6 followers. Post

3 Replies
426 Views

Similar Articles

[PageSpeed] 4

  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

Use Linux as NFS client with HP-UX 10.20 NFS server problem
Hello all, Does anybody has any experience setup Redhat 9.0 as NFS client to access HP-UX 10.20 NFS server? I got a lot of error messages said that NFS server is not respond. I setup the Linux box using autofs to connect to. Maybe there are some options that need to take care for this environment. Any hints are welcome. Thanks! Best regards, Y.H.Chen ...

Locking files on non-HP-UX servers
Good $TIME! I'm having problems with the CAD program CATIA v4 R24 on a HP-UX 11.00 workstation. Because of what I'll explain further below, I suppose that this is a HP-UX NFS client problem. When I try to save a file from CATIA on a NFS export which is hosted by a non-HP-UX NFS server (ie. Linux, Solaris, Windows (Services for Unix)), Catia simply hangs. I suppose this is a problem with file locking over NFS. To verify this, I've written a small testprogram in C which basically just does "fcntl(fd, F_SETLK, &fl)". Because of the outputs of this test program, I see ...

HP-UX 10.20 Network Install from Linux
Hi, I'm trying to network install HP-UX 10.20 on a 712/80i (32MBytes ram) (I don't have a SCSI CD drive) Unfortunately this is the only HPPA box I have, therefor I can't just use the boot daemons from HP-UX (IgniteUX?). So I'm currently trying to boot from a linux box. So far I've got bootp/tftp daemons installed on the linux box, and have the 700INSTALL, 700INSTALLFS, unistlf.hppa, config, instcmds and syscmds files (I think these are what i need) in the tftp directory. The files are from the Install+CoreOS disc, /HPUX-Install/BOOT-KRN-700/usr/lib/sw/hpux.install and /HP...

Create/Comnvert PDF-Files on HP-UX 10.20
Hi, I'm searching a way to convert text/ascii-files directly to PDF-Files on a HP-UX Server. Can you help me ? Thanks You Thierry "TSD" <tsd-nospam@online.fr> writes: > I'm searching a way to convert text/ascii-files directly to PDF-Files on a > HP-UX Server. a2ps -> ps2pdf -> done Look for ghostscript. Roman ...

Anyone have the Depot file for Emacs for HP-UX 10.20?
The porting archive no longer lists any versions of Emacs for 10.20! :( In fact, most of the old 10.20 software is missing... what's with that? Bob (very unhappy) ...

Xlib: Maximum number of clients... HP UX Version 10.20. Request for patch
Hi, We are using a very old (and thus unsupported) version of HP UX v10.20 in a production environment. For quite some time now we are having problem with loading a graphics application on the platform. The search for cause has led us to an error in the log files 'Xlib: Maximum number of clients reached'. Searching the web turns out a lot of problems without any definite answers. Is there any patch for Xserver for this particular version? And does anyone happen to have it? It is unlikely that I'll find patches for such an old platform in HP's site. Regards, Avik Avik Chatte...

Anyone Know Where to Get HP-UX 10.20 Install/Core CD-ROM for Server?
Hi Folks, I need to take a K Series (server) system that's had HP-UX 11.0 for years back to HP-UX 10.20 for a short term project. We tried ordering the HP-UX 10.20 Media Kit B5448AA. It has the server applications CD-ROMs, but lacks the essential Install/Core CD-ROM. The part number for this CD is B3920-13941. HP no longer makes or sells it, and their reseller, Forsythe, doesn't have it. I've tried an Ebay and Google and haven't had any luck so far. Does anyone know where this item is available? We have the licenses, but the media is long gone. Thanks for any poin...

LVM Problems
To LVM & HP UX Gurus I'm not an Unix administrator so my questions may appear to be ridiculous .... to some experts. However, I do have a serious problem with 2 external disks. The 2 disks were connected to a C160 HP UX 10.20. As the C160 fails on memory problems and was very instable, I do have connected these 2 disks on a C360 HP UX 11.00. Using SAM, the disks were mounted automatically in VxFS, but I can't see any data on them ! Back on the C160, one disk has been mounted. It is seen, but no data on it ! The second disk has not yet been mounted as I do not want ...

HP-UX 10.20 on an HP 2600?
Hi everyone, Has anybody successfully managed to load 10.20 on an HP2600? If so, can someone tell me which media they used? Assuming there is a version that works with a 2600 (and I'm pretty certain that there is) has anyone got any ideas where I might get the media? HP can't supply it apparently. Best Regards Guy Guy Shepherd wrote: > Has anybody successfully managed to load 10.20 on an HP2600? If so, > can someone tell me which media they used? What is an "HP2600"? If You mean an HP b2600 then forget it, it's not supported by 10.20 and won't run it. &...

how to use hp color laserjet 3500 from HP-UX 10.20?
Dear HP-UX friends how can I use the hp color laserjet printer 3500 from HP-UX 10.20 (hp 712)? Using sam to configure a remote printer I must write the remote host (I put the IP address of the printer) and then I must write the printer name. What shall I write there? I suppose 2 pieces of hp hardware and hp OS should be able to talk to each other, shouldn't they? And how about other unix systems? In Mandrake Linux 10 (hp Compaq d530) I get "Failed to configure printer". Thanks for any help -- Pavel Pokorny Math Dept, Prague Institute of Chemical Technology http://www.v...

install ignite-UX 5.4.x on HP-UX 10.20
hi we used until today ignite-UX 4.2 which runs without any problems both on server and client-side. our systems run due to some vendors on different HP-UX versions, 10.20, 11.0 and 11i. some 10.20-clients MUST NOT be upgraded to a newer OS. are there any readers who succeeded to install ignite-UX 5.4 on a client running HP-UX 10.20? on HP-UX 11 and 11i it suceeded without any problems ... thanx in advance andre ...

any Linux == HP-10.20?
I am looking for a linux which install over the HP hardware. Is there such a thing? Thanks. light_wt@hotmail.com wrote: > I am looking for a linux which install over the HP hardware. Is there > such a thing? Thanks. Debian has a PA-RISC version so do some of the *BSDs, I think that Gentoo Linux now also has a PA-RISC port. Hope this helps! Sean <light_wt@hotmail.com> wrote in message news:1257617d.0311181542.31cd7b1c@posting.google.com... > I am looking for a linux which install over the HP hardware. Is there > such a thing? Thanks. I have a HP Workstation, a ...

HP-UX 10.20
Hi to everyone in this NG ... Sorry for the silly questions... I'm new to HP-UX ... I rescued an HP/9000 (735/99) and installed through console HP-UX 10.20. Now I've three little questions 1) logged as root (serial console) I can't "shutdown 0" the machine. I need to log out to runlevel 0 2) in inetd.conf are activated ftpd and telnetd. But inetd is not started at boot. I need to login from console, start inetd an then have telnet access. In which file must I insert inetd in order to be activated at boot time ? 3) I have no graphic card on the 735. Can I obtain a...

[LONG] HP 9000/735, HP-UX 10.20, remote desktop login and Xnest
Sorry for this almost-newbie question. Can't get a remote desktop login through Xnest. Brief summary: 1) CDE support is installed (there's also local graphics, unused) 2) enabled the font server on the 735, xfs is running 3) the network is configured (I can ftp and telnet correctly) 4) dtconfig -e has been issued 5) issuing Xnest :1 -query 192.168.1.131 on the Linux side ends up with a black screen and after a loooooong time I get an hourglass, still on the black background and nothing else. 6) a dtgreet process is running, sleeping, while Xnest is active. 7) system load is...

I need to add a new backup server line to the config file on 100 linux servers and then restart the client.
We use veritas backup client. I need to add a new backup server line to the config file on 100 linux servers and then restart the client. I do not want to do by hand. help! list of servers L.txt #cat L.txt config file is /var/bkupexec/agent.cfg need to add "tell epobackup" to bottom of file # cat "tell epobackup" >> /var/bkupexec/agent.cfg agent is /etc/init.d/agent.ini stop (and then start) # /etc/init.d/agent.init stop # /etc/init.d/agent.init start os=3Dredhat ent 4ES I intend to use root password which is same for all 100 servers. #now I'm stuck=20 Reply =...

automate? I need to add a new backup server line to the config file on 100 linux servers and then restart the client.
We use veritas backup client. I need to add a new backup server line to the config file on 100 linux servers and then restart the client. I do not want to do by hand. help! list of servers L.txt #cat L.txt config file is /var/bkupexec/agent.cfg need to add "tell epobackup" to bottom of file # cat "tell epobackup" >> /var/bkupexec/agent.cfg agent is /etc/init.d/agent.ini stop (and then start) # /etc/init.d/agent.init stop # /etc/init.d/agent.init start os=redhat ent 4ES I intend to use root password which is same for all 100 servers. #now I'm stuck gavino wrot...

HPSBMA02590 SSRT100182 rev.1
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 SUPPORT COMMUNICATION - SECURITY BULLETIN Document ID: c02548231 Version: 1 HPSBMA02590 SSRT100182 rev.1 - HP Systems Insight Manager (SIM) for HP-UX, Linux, and Windows, Remote Arbitrary File Download NOTICE: The information in this Security Bulletin should be acted upon as soon as possible. Release Date: 2010-10-13 Last Updated: 2010-10-13 Potential Security Impact: Remote arbitrary file download Source: Hewlett-Packard Company, HP Software Security Response Team VULNERABILITY SUMMARY A potential security vulnerability...

Looking for HP-UX 10.20
Could you some please help me with this? I need to get the software 10.20 for testing and so far I couldn't find any where. Thanks in Advance BN ...

IGNITE for HP-UX 10.20
Hi admins, from where can I download IGNITE-UX A.3.7.95 or the latest one for HP-UX 10.20 since I lost the Application CD. Can somebody provide a .tar file? THX in advance! Rainer B. Rainer.Blaes@space.eads.net schrieb: > Hi admins, > > from where can I download IGNITE-UX A.3.7.95 or the latest > one for HP-UX 10.20 since I lost the Application CD. > Can somebody provide a .tar file? > > THX in advance! > > Rainer B. > I once located sth like that at ftp://hpat951.external.hp.com/pub2/softlib/software1/wk165/wk165en it is not quite the same as on the A...

how to aquire hp-ux 10.20?
Hi, I'm about to graduate with a unix degree. I am experienced with BSD, and have had a chance to use sunos now and then. I would really like to learn HP-UX, or at least have some familiarity with it. I purchased an hp 715/80 ("King Gecko") on ebay. The disk had 10.20 installed, but a lot of bad sectors. I replaced the disk and am now using OpenBSD on this system. I've purchased a memory upgrade and this machine run beautifuly. However, I'd really like to learn HP-UX! I think 10.20 is the best fit for this model (according to www.openpa.net). But I can't find any wa...

HP-UX 10.20 and PPP
Hello there, I am trying to connect a good old 712/80 with HP-UX 10.20 to the Internet using a modem (Motorola Premier 33.6) and a normal access provider (<http://www.free.fr/>). Well ... I was a bit astonished yesterday when I noticed that there is no PPP stuff included in 10.20. :) But of course this isn't much of a reason to give up, so I looked around and saw on <http://www.interex.org/~borg/ppp.html> that there is (or at least was) some commercial PPP software (Morningstar PPP), which seems to be somehow difficult to obtain though, and an open-source alternative, ...

OpenSSH on HP-UX 10.20
I just put OpenSSH (from thewrittenword depot, er, depository) onto our aging 745i workstation running 10.20. It seems to have set everything up properly, including PRNGd, so I rebooted the machine. It's now been sitting there at the "Start OpenSSH daemon" stage of startup for about 15 minutes now. Is this normal, at first I thought it must be taking it's time generating the keys, now I'm not so sure. I'm not hugely experienced with system administration, I just use it to run instrumentation and need ssh to get files on and off the system. Any help, advic...

HP-UX 10.20 and licensing
Hi all, I'm kinda new to the group, and have a few questions about HP-UX. I have an old HP 712/60 machine (that my brother brought home from work), and it has HP-UX 9.07 on it. It has two hard disks - one internal and one external. If I boot from the internal one, then I can log in using a name like 'rod' or 'gary', as no password is required, but if I boot from the external drive, I can't log in at all, as I have no passwords. In either case, I can't log in as root. So... I was wondering if I get a copy of (for example HP-UX 10.20), will it install and run OK, or...

mkfs on HP-UX 10.20
Hi, I would like to reuse a partition but impossible to mount or create a new fs. I try to mount a partition but I have this message : # mount /altroot mount : /dev/vgaltroot/lvol1 needs to be fsck'ed before mounting mount : warning : if device /dev/vgaltroot/lvol1 is mounted to another system then do not run fsck I check with fsck if the disk is mounted or not : # fsck -F hfs -m /dev/vgaltroot/rlvol1 fsck : sanity check, /dev/vgaltroot/rlvol1 is already mounted I try to unmout : # umount /dev/vgaltroot/lvol1 umount: cannot find /dev/vgaltroot/lvol1 in /etc/mnttab cannot ...