Unix Programming - POSIX I/O on NFS with noac option

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > April 2007 > POSIX I/O on NFS with noac option





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author POSIX I/O on NFS with noac option
lakdawala.a@gmail.com

2007-04-12, 1:45 pm

Trying to get this POSIX I/O code to work on our machines.

Running it from a NFS v3 mounted scratch sapce, with 'noac' option: no
caching attribute option.
It fails to run: gives me err= -1 and errno = 5

Although this works without error on my NFS v3 mounted home
directories. Which are mounted from the head node of our cluster(Linux
based head node and compute nodes).
Where as the scratch sapce is mounted of our storage server(Solaris).

Any idea ?
~thanks - al

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

main()
{
struct flock lock;
int fd, err;

lock.l_type = F_WRLCK;
lock.l_start = 0;
lock.l_whence = SEEK_SET;
lock.l_len = 100;

fd = open("test", O_RDWR | O_CREAT, 0644);

err = fcntl(fd, F_SETLKW, &lock);

printf("err = %d, errno = %d\n", err, errno);
close(fd);
}

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com