Giter VIP home page Giter VIP logo

Comments (4)

willscott avatar willscott commented on June 18, 2024

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.

AleksandrIakhnev avatar AleksandrIakhnev commented on June 18, 2024

@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.

AleksandrIakhnev avatar AleksandrIakhnev commented on June 18, 2024

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.

AleksandrIakhnev avatar AleksandrIakhnev commented on June 18, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.