Print

Print


On Thu, Sep 6, 2012 at 12:21 AM, Neil Millar <[log in to unmask]> wrote:
> Hi,
>
> We're running starlink from an nfs share that is exported
> read-only. We've noticed recently that running the following
> commands gives an error on Redhat 6 but not Redhat 5:
>

So nfs4 server with redhat 5 client works? nfs4 server with redhat 6
client fails? nfs3 server works all the time?

> setenv STARLINK_DIR /opt/star-dev

What Starlink are you using? We run Centos 6 but I'm guessing we don't run nfs4.


> !! SUBPAR: Failed to open interface file /opt/star-dev/bin/smurf/makemap.ifc
> !  Not a directory
> !

ENOTDIR is what interests me.


> The strace output for nfs 3 and nfs 4 is below:

> nfs3, ro
> ========
>

> stat("./makemap.ifc", {st_mode=S_IFREG|0644, st_size=8830, ...}) = 0
> open("./makemap.ifc", O_RDONLY|O_CREAT, 0666) = 3

Looks fine.


>
> nfs4,ro
> =======
>

> stat("./makemap.ifc", {st_mode=S_IFREG|0644, st_size=8830, ...}) = 0
> open("./makemap.ifc", O_RDONLY|O_CREAT, 0666) = -1 ENOTDIR (Not a directory)

Exactly the same call but now ENOTDIR. This error is triggered when

  "A component used as a directory in pathname is not, in fact, a directory"

which is trying to tell you that "./" is not a directory. Hard to
believe that nfs4 would think that.

What happens if you have a short C program that does the open call itself?

I think the O_CREAT is a red-herring since it seems that it would fail
anyhow if the file is missing and is superfluous given the previous
stat() call. I'm guessing this is simply how g95 implements OPEN with
STATUS='OLD'.

-- 
Tim Jenness

----
Starlink User Support list
For list configuration, including subscribing to and unsubscribing from the list, see
https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=STARLINK