Comments (4)
Are you running this across a network? what client are you using to mount the share?
Any errors you see on either side?
Likely this has to do with fragmentation. On a local machine, i made a directory with 200 files with long names, and was able to view and work with it without problems. However, the mac client made the directory read request specifying it could handle a large response size of 32k bytes so the entire response was provided in one response. You likely have a case where the requested response size results in cursor fragmentation. It would be helpful to know what client that is.
from go-nfs.
@willscott I do the tests locally on Ubuntu 20.04.2 LTS, just mount with command like sudo mount -o port=39263,mountport=39263,nfsvers=3,noacl,tcp -t nfs localhost:/mount /mnt/goserver
Checked in the debugger that directory content obtained successfully on server, so probably something in response handling/size.
from go-nfs.
How to reproduce with Docker:
Dockerfile
FROM python:3.9.1-buster
RUN apt update && apt install git wget nfs-common -y
RUN wget https://golang.org/dl/go1.16.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.16.linux-amd64.tar.gz
ENV PATH="/usr/local/go/bin:${PATH}"
RUN git clone https://github.com/willscott/go-nfs.git
# patch to provide port
COPY main.go /go-nfs/example/osview/main.go
RUN cat /go-nfs/example/osview/main.go
RUN mkdir /go-nfs/1K/ && python -c "import os; [os.makedirs(f'broken_catalog/sub_catalog_{i:03}', exist_ok=True) for i in range(1000)]"
RUN cd /go-nfs && go get && cd /go-nfs/example/osview && go build
WORKDIR /go-nfs
RUN mkdir /mnt/goserver
CMD ./example/osview/osview . 39263
Then run docker run -it --rm --name=gonfs --privileged=true gonfs
Try to mount:
docker exec -it gonfs bash mount -t nfs -o port=39263,mountport=39263,nolock,nfsvers=3,noacl,tcp localhost:39263:/mount /mnt/goserver
So ls /mnt/goserver
works.
But for ls /mnt/goserver/1K
I see ls: reading directory '1K': Input/output error
from go-nfs.
@willscott It seems that issue still presents, after the fix #24 now I see in server logs messages like 2021/03/11 12:02:45 call to 0x5fb7a0 failed: Cookie is Stale
when accessing directory with 1K files.
from go-nfs.
Related Issues (20)
- There are still places where FileID zero is returned, which confuses linux HOT 9
- Still getting stale file handle issues: see #100 HOT 3
- `onRename` errors out with "comparing uncomparable type" HOT 4
- if `fs.Remove` fails with `non-empty directory`, the server should forward that. HOT 1
- Incorrect handling of an open file's `Name()` HOT 1
- If `Read` is above a certain size, it will return nothing HOT 1
- onReadDirPlus with small cache yields no results, but no error HOT 2
- Some Write calls leads to data loss HOT 30
- A git clone will lead to the server displaying files with corrupted permissions HOT 9
- Unnecessary error messages for non-errors HOT 8
- make `onlookup` use stat rather than readdir HOT 1
- Removing directory leads to `Stale file handle` HOT 3
- Symbolic Links Cause Stale NFS File Handles HOT 1
- tagged releases
- fs.Stat is called when fs.Lstat should be called HOT 5
- support backing systems without exposed fileids
- Sockets don't work through mount HOT 11
- "Illegal instruction" when trying to run `su user` in chroot in mount HOT 29
- `flock` hangs HOT 3
- GETATTR does not set fhandle in returned struct HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-nfs.