🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Jeff Bauer Tue, 15 Sep 1992 14:18
How to get around lack of statd/lockd on UNICOS
#121
Author: Jeff Bauer
Date: Tue, 15 Sep 1992 14:18
59 lines
2385 bytes
Cray apparently chose not to support the statd/lockd daemon on UNICOS.

We have a third party application running on an RS/6000 using a data file
that is NFS mounted from the Cray.  It behaves VERY slowly and the RS/6000
console whines about not being able to talk to statd/lockd on the Cray.

It is the flock() call causing the problem.  This program
runs immediately when locking a file on a local disk as well as a file system
mounted from an AIX host and SunOS NFS server.  It hangs at
the "Locking file..." message when using a file NFS-mounted from the Cray.
The absence or presence of the local lockd/statd daemons makes no difference.  
It does, however, cause the other NFS cases (AIX and Sun) to hang until they
are running.

Does anybody know of a work around for this?  I can either spoof the Cray
with a dummy statd/lockd daemon(s) or somehow tell AIX not to use statd/lockd
and ignore any file locks.

Any help or pointers would be greatly appreciated!

-- flock.c --
#include <stdio.h>
#include <fcntl.h>
#include <sys/file.h>

main(argc, argv)
int argc;
char **argv;
{
        int fd;

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

        printf("Opening file...\n");
        if ((fd = open(argv[1], O_RDWR)) < 0) {
          fprintf(stderr, "Cannot open file `%s'\n", argv[1]);
          perror("open");
          exit(1);
        }

        printf("Locking file...\n");
        if (flock(fd, LOCK_EX) < 0) {
          perror("flock lock");
          exit(1);
        }
        printf("Unlocking file...\n");
        if (flock(fd, LOCK_UN) < 0) {
          perror("flock unlock");
          exit(1);
        }
        close(fd);
        printf("All done!\n");
}
--
Jeff Bauer				   jtbauer@cc.fsu.edu
FSU Academic Computing & Network Services  (904) 644-2591 x. 113
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads