2007-04-12 16:59:17

by AK

[permalink] [raw]
Subject: POSIX I/O on NFS with noac option

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 thoughts on issues related to Solars hosting NFS server and Linux nfs client ..with noac options ???

Any idea ? Appreciate any feedback
~thanks - ak

#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);
}



---------------------------------
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.


Attachments:
(No filename) (345.00 B)
(No filename) (140.00 B)
Download all attachments

2007-04-12 17:10:30

by Trond Myklebust

[permalink] [raw]
Subject: Re: POSIX I/O on NFS with noac option

On Thu, 2007-04-12 at 09:59 -0700, AK wrote:
> 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 thoughts on issues related to Solars hosting NFS server and Linux
> nfs client ..with noac options ???
>
> Any idea ? Appreciate any feedback
> ~thanks - ak
>
> #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);
> }

1) Why would you need the 'noac' flag if you are using locking?

2) Have you checked that the portmapper, rpc.statd and rpc.lockd are
accessible from the client? You can probe that using the commands

rpcinfo -t <servername> status
and
rpcinfo -t <servername> nlockmgr

if you are using UDP mounts, you might want to use

rpcinfo -u <servername> status
and
rpcinfo -u <servername> nlockmgr

instead...

Trond


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2007-04-12 17:42:53

by AK

[permalink] [raw]
Subject: Re: POSIX I/O on NFS with noac option

Thank you Trond for your reply ...

>>1) Why would you need the 'noac' flag if you are using locking?
part of the requirement for MPI-IO to work correctly on NFS mounts.

>>2) Have you checked that the portmapper, rpc.statd and rpc.lockd are
>>accessible from the client? You can probe that using the commands

On Client I have checked that portmap(rpc) rpc.statd(rpcuser) and lockd(root) is running but not rpc.lockd

On server, there is no portmap, rpc.statd, rpc.lock nor lockd running.

Upon the following probes on CLIENT I get the following
>>
>>rpcinfo -t status
>>and
>>rpcinfo -t nlockmgr
>>
# rpcinfo -t <myserver> status
rpcinfo: RPC: Program not registered
program 100024 is not available

# rpcinfo -t <myserver> nlockmgr
rpcinfo: RPC: Program not registered
program 100021 is not available

>>if you are using UDP mounts, you might want to use
>>
>>rpcinfo -u status
>>and
>>rpcinfo -u nlockmgr

# rpcinfo -u <myserver> status
rpcinfo: RPC: Program not registered
program 100024 is not available

# rpcinfo -u <myserver> nlockmgr
rpcinfo: RPC: Program not registered
program 100021 is not available

>>instead...

Some info from SERVER
# rpcinfo -u localhost nfs
program 100003 version 2 ready and waiting
program 100003 version 3 ready and waiting

# rpcinfo -p | grep nfs
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100227 2 udp 2049 nfs_acl
100227 3 udp 2049 nfs_acl
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100227 2 tcp 2049 nfs_acl
100227 3 tcp 2049 nfs_acl
# modinfo | egrep "nfs|lock"
42 7828855a 1d3e 87 1 todds1287 (ds1287 clock driver 1.8)
156 78428000 2b018 106 1 nfs (NFS syscall, client, and common)
156 78428000 2b018 106 1 nfs (NFS syscall, client, and common)
156 78428000 2b018 16 1 nfs (network filesystem)
156 78428000 2b018 7 1 nfs (network filesystem version 2)
156 78428000 2b018 17 1 nfs (network filesystem version 3)
159 78458000 12881 - 1 nfssrv (NFS server module)

>>Trond
Form the above outputs it doesn't look like they are running. Is this required, if yes, then
how do I turn them ON. And Why didn't we requires it for general purpose NFS use ?? We have been running this server for about 2 years now.

~thanks -ak




---------------------------------
Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.


Attachments:
(No filename) (345.00 B)
(No filename) (140.00 B)
Download all attachments

2007-04-12 17:57:02

by Trond Myklebust

[permalink] [raw]
Subject: Re: POSIX I/O on NFS with noac option

On Thu, 2007-04-12 at 10:42 -0700, AK wrote:
> Thank you Trond for your reply ...
>
> >>1) Why would you need the 'noac' flag if you are using locking?
> part of the requirement for MPI-IO to work correctly on NFS mounts.

Hmm... That sounds extremely dodgy... 'noac' does nothing to ensure
cache consistency. All it does is to turn of caching of attributes
across system calls.

> >>2) Have you checked that the portmapper, rpc.statd and rpc.lockd are
> >>accessible from the client? You can probe that using the commands
>
> On Client I have checked that portmap(rpc) rpc.statd(rpcuser) and
> lockd(root) is running but not rpc.lockd

lockd is the kernel process that takes the place of rpc.lockd on Linux
machines. It sounds like your client setup is fine.

> On server, there is no portmap, rpc.statd, rpc.lock nor lockd
> running.
>
> Upon the following probes on CLIENT I get the following
> >>
> >>rpcinfo -t status
> >>and
> >>rpcinfo -t nlockmgr
> >>
> # rpcinfo -t <myserver> status
> rpcinfo: RPC: Program not registered
> program 100024 is not available
>
> # rpcinfo -t <myserver> nlockmgr
> rpcinfo: RPC: Program not registered
> program 100021 is not available
>
> >>if you are using UDP mounts, you might want to use
> >>
> >>rpcinfo -u status
> >>and
> >>rpcinfo -u nlockmgr
>
> # rpcinfo -u <myserver> status
> rpcinfo: RPC: Program not registered
> program 100024 is not available
>
> # rpcinfo -u <myserver> nlockmgr
> rpcinfo: RPC: Program not registered
> program 100021 is not available
>
> >>instead...
>
> Some info from SERVER
> # rpcinfo -u localhost nfs
> program 100003 version 2 ready and waiting
> program 100003 version 3 ready and waiting
>
> # rpcinfo -p | grep nfs
> 100003 2 udp 2049 nfs
> 100003 3 udp 2049 nfs
> 100227 2 udp 2049 nfs_acl
> 100227 3 udp 2049 nfs_acl
> 100003 2 tcp 2049 nfs
> 100003 3 tcp 2049 nfs
> 100227 2 tcp 2049 nfs_acl
> 100227 3 tcp 2049 nfs_acl
> # modinfo | egrep "nfs|lock"
> 42 7828855a 1d3e 87 1 todds1287 (ds1287 clock driver 1.8)
> 156 78428000 2b018 106 1 nfs (NFS syscall, client, and common)
> 156 78428000 2b018 106 1 nfs (NFS syscall, client, and common)
> 156 78428000 2b018 16 1 nfs (network filesystem)
> 156 78428000 2b018 7 1 nfs (network filesystem version 2)
> 156 78428000 2b018 17 1 nfs (network filesystem version 3)
> 159 78458000 12881 - 1 nfssrv (NFS server module)
>
> >>Trond
> Form the above outputs it doesn't look like they are running. Is this
> required, if yes, then
> how do I turn them ON. And Why didn't we requires it for general
> purpose NFS use ?? We have been running this server for about 2 years
> now.

If it has been running for 2 years, then I'd say you clearly haven't
been using locking over NFS against it.

Check your Solaris admin manual for details on how to turn on the
locking manager and lock status daemon.

Cheers
Trond


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2007-04-12 18:19:52

by AK

[permalink] [raw]
Subject: Re: POSIX I/O on NFS with noac option


If it has been running for 2 years, then I'd say you clearly haven't
been using locking over NFS against it.

Check your Solaris admin manual for details on how to turn on the
locking manager and lock status daemon.

Cheers
Trond


~ thanks Trond, will try that and get back!!! -al



---------------------------------
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.


Attachments:
(No filename) (345.00 B)
(No filename) (140.00 B)
Download all attachments