Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fails when cp to mounted dir #3

Open
wushengzhang opened this issue Jun 26, 2021 · 9 comments
Open

fails when cp to mounted dir #3

wushengzhang opened this issue Jun 26, 2021 · 9 comments

Comments

@wushengzhang
Copy link

when I execute
cp /tmp/nfs-utils-2.5.4.tar.xz /mnt1/
It say:
cp: cannot stat '/mnt1/nfs-utils-2.5.4.tar.xz': Input/output error

I have tracked the execution path, It fails on LOOKUP operation, this operation further call
the lookup method in LocalVFS, method call sequence is as following:
lookup->path2fh->fNameToHandleAt.invokeExact(fd, str.address(), bytes.address(), mntId.address(), flags)
the fNameToHandleAt returns -1
therefor the code fails on checkError(rc == 0), because of the target file nfs-utils-2.5.4.tar.xz dose not exists.
Are there any idea to fix this?

@kofemann
Copy link
Owner

Hi. This can be the result of migration to java 16 FFI, some methods doesn't work as expected. Can you please check with last pre java 16 commit 12a71b9?

@wushengzhang
Copy link
Author

Thanks for reply.

I have use the JDK-16, it version is as following:

java 16.0.1 2021-04-20
Java(TM) SE Runtime Environment (build 16.0.1+9-24)
Java HotSpot(TM) 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)

and I have recognized that, when I use centos-7.6 as nfs client,
[root@mu01 ~]# mount -V
mount from util-linux 2.23.2 (libmount 2.23.0: selinux, debug, assert)

this can work fine.

When I use centos-8.2 as nfs client,

[root@app05 vfs4j]# mount.nfs4 -V
mount.nfs4: (linux nfs-utils 2.3.3)

this will get the I/O error

Hi. This can be the result of migration to java 16 FFI, some methods doesn't work as expected. Can you please check with last pre java 16 commit 12a71b9?

@wushengzhang
Copy link
Author

This may caused by the server not replied the LOOKUP operation properly?

@kofemann
Copy link
Owner

Hm. Sounds weird. I will check. Did you have tried earlier commit?

@wushengzhang
Copy link
Author

I tried with 300c918, it seems work fine.
except It warn:
[OncRpcSvc (1)] INFO org.dcache.nfs.v4.NFSServerV41 - NFS operation failed: NFS4ERR_MINOR_VERS_MISMATCH : Unsupported minor version [2]

@kofemann
Copy link
Owner

Great. The warning is ok. It tells you that the client have tried to use nfsv4.2 before switching to v4.1.

@wushengzhang
Copy link
Author

wushengzhang commented Jul 19, 2021

Great. The warning is ok. It tells you that the client have tried to use nfsv4.2 before switching to v4.1.

I have tested more commits, and finally find out that, it may work until 0bb7a6d, since ed0f0e8 the bug appears.

@kofemann
Copy link
Owner

Thanks for looking at it. Yeh, the FFI interface it still work-in-progress. To be honest, I didn't expect that someone will use vfs4j. Shall I branch it at pre-java16 commit? Or may be add a stable tag...

@wushengzhang
Copy link
Author

I think Java-16 is OK, except some interfaces, such as MemorySegment, may behave in unknown way (I am not sure).
I just want lookup a lightweight nfs implementation to test with linux distributions with NFSROOT, this project give me greate help, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants