.nfsXXXXXX file location. - NFS

This is a discussion on .nfsXXXXXX file location. - NFS ; Hi all, As per my knowledge, in nfs mounted file system, when a file is removed in, .nfsXXXXXX file is generated in same dir if some one has that file still open. Is there any way, and how valid that ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: .nfsXXXXXX file location.

  1. .nfsXXXXXX file location.

    Hi all,

    As per my knowledge, in nfs mounted file system, when a file is removed
    in, .nfsXXXXXX file is generated in same dir if some one has that file
    still open.

    Is there any way, and how valid that would be, if the .nfsXXXXX can be
    generated in some specific dir instead of same dir? Please let me know
    your comments about this.

    Recently I encountered a bug, where a file was open, and a try was made
    to remove dir containing it. It failed, and because of that lots of
    others error occurred. While searching on Google, I found many similar
    bugs.

    This can be solved if there is a way where we can specify a dir where
    all such .nfsXXXXX files will be moved instead of in same dir. This
    should make semantics of rmdir more close to traditional unix when a
    file in that dir is open.


    Thanks and
    Regards,
    Tushar Adeshara


  2. Re: .nfsXXXXXX file location.

    Tushar Adeshara wrote:

    > As per my knowledge, in nfs mounted file system, when a file is removed
    > in, .nfsXXXXXX file is generated in same dir if some one has that file
    > still open.


    > Is there any way, and how valid that would be, if the .nfsXXXXX can be
    > generated in some specific dir instead of same dir? Please let me know
    > your comments about this.


    I think the .nfs* files are created (renamed) by the client, which
    wouldn't know which directories are on the same file system.

    > Recently I encountered a bug, where a file was open, and a try was made
    > to remove dir containing it. It failed, and because of that lots of
    > others error occurred. While searching on Google, I found many similar
    > bugs.


    Well, the program could move it before removing the directory.

    -- glen


  3. Re: .nfsXXXXXX file location.

    glen herrmannsfeldt wrote:
    > Tushar Adeshara wrote:
    >
    > > As per my knowledge, in nfs mounted file system, when a file is removed
    > > in, .nfsXXXXXX file is generated in same Dir if some one has that file
    > > still open.

    >
    > > Is there any way, and how valid that would be, if the .nfsXXXXX can be
    > > generated in some specific Dir instead of same Dir? Please let me know
    > > your comments about this.

    >
    > I think the .nfs* files are created (renamed) by the client, which
    > wouldn't know which directories are on the same file system.


    Correct. How about modifying client to let it know where such a dir is
    ? Can there be any design problems with this approach ?

    >
    > > Recently I encountered a bug, where a file was open, and a try was made
    > > to remove Dir containing it. It failed, and because of that lots of
    > > others error occurred. While searching on Google, I found many similar
    > > bugs.

    >
    > Well, the program could move it before removing the directory.


    I have fixed the bug for now by ensuring that all files gets closed.
    However, there can be lots of programs that will need modifications, to
    be used correctly with nfs. My idea is to change nfs client itself
    instead of chaning all programs.

    Thanks and
    Regards,
    Tushar Adeshara


    >
    > -- glen



  4. Re: .nfsXXXXXX file location.

    Tushar Adeshara wrote:
    (snip)

    >>I think the .nfs* files are created (renamed) by the client, which
    >>wouldn't know which directories are on the same file system.


    > Correct. How about modifying client to let it know where such a dir is
    > ? Can there be any design problems with this approach ?


    It would probably have to be a new version of the protocol.


    (snip)

    > I have fixed the bug for now by ensuring that all files gets closed.
    > However, there can be lots of programs that will need modifications, to
    > be used correctly with nfs. My idea is to change nfs client itself
    > instead of chaning all programs.


    If you

    rm -rf

    the directory, it will remove any files in it along the way.

    The usual solution for .nfs file is a cron job that removes files
    older than some number of days.

    -- glen


+ Reply to Thread