Project

General

Profile

Actions

Bug #14939

open

Rename a file on NFSv3 create .nfsxxx files

Added by anil choudhary 3 months ago. Updated 3 months ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Category:
nfs - NFS server and client
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

one of our application use following code

#include <stdio.h>
#include <unistd.h>
int 
main(int argc, char **argv) 
{  
  printf("Renaming %s -> %s...\n",argv[1],argv[2]);  
  rename(argv[1],argv[2]);  
  printf("Done\n");  
  return 0;
}

whe we ran it it will create .nfsxx file every time it run and didn't flee it after its ececution competed.

/tmp/nfs_test $ ls -la
total 152
drwxrwxr-x   2 mfaiguen dilip       4096 Aug 24 15:10 ./
drwxr-xr-x  14 mfaiguen dilip      36864 Aug 24 09:13 ../
-rw-rw-r--   1 mfaiguen dilip          0 Aug 24 15:09 a
-rw-rw-r--   1 mfaiguen dilip          0 Aug 24 09:24 b
-rw-rw-r--   1 mfaiguen dilip        187 Aug 24 09:22 test.c
-rwxrwxr-x   1 mfaiguen dilip      16040 Aug 24 09:24 test.linux*
-rwxrwxr-x   1 mfaiguen dilip      10712 Aug 24 09:25 test.solaris*
mfaiguen@vskasumi ~/tmp/nfs_test $ test.solaris a b
Renaming a -> b...
Done
mfaiguen@vskasumi ~/tmp/nfs_test $ ls -la
total 152
drwxrwxr-x   2 mfaiguen dilip       4096 Aug 24 15:10 ./
drwxr-xr-x  14 mfaiguen dilip      36864 Aug 24 09:13 ../
-rw-rw-r--   1 mfaiguen dilip          0 Aug 24 09:24 .nfs0F0A
-rw-rw-r--   1 mfaiguen dilip          0 Aug 24 15:09 b
-rw-rw-r--   1 mfaiguen dilip        187 Aug 24 09:22 test.c
-rwxrwxr-x   1 mfaiguen dilip      16040 Aug 24 09:24 test.linux*
-rwxrwxr-x   1 mfaiguen dilip      10712 Aug 24 09:25 test.solaris*
mfaiguen@vskasumi ~/tmp/nfs_test $ rm -f .nfs0F0A
mfaiguen@vskasumi ~/tmp/nfs_test $ ls -la
total 152
drwxrwxr-x   2 mfaiguen dilip       4096 Aug 24 15:10 ./
drwxr-xr-x  14 mfaiguen dilip      36864 Aug 24 09:13 ../
-rw-rw-r--   1 mfaiguen dilip          0 Aug 24 15:09 b
-rw-rw-r--   1 mfaiguen dilip        187 Aug 24 09:22 test.c
-rwxrwxr-x   1 mfaiguen dilip      16040 Aug 24 09:24 test.linux*
-rwxrwxr-x   1 mfaiguen dilip      10712 Aug 24 09:25 test.solaris*

on Linus it is not happening


Related issues

Related to illumos gate - Bug #13665: rename with non-regular target over NFS generates .nfsXXXX filesNew

Actions
Actions #1

Updated by Marcel Telka 3 months ago

  • Description updated (diff)
  • Category changed from filesystems (not ZFS) to nfs - NFS server and client
Actions #2

Updated by Marcel Telka 3 months ago

  • Status changed from New to Feedback
  • Assignee changed from Dan McDonald to Marcel Telka
  • Priority changed from Urgent to Normal

Are you sure the file b in your example is not open by any other application when you do the rename?
I just tested this with NFSv4 and I'm unable to reproduce.

Actions #3

Updated by anil choudhary 3 months ago

Hi Marcel Telka,
we are using nfs v3 only on NFS V4 we also testing and its not happening.

In our production we are using nfsv3 with netapp.

can you test with nfsv3

Thanks,
Anil

Actions #4

Updated by anil choudhary 3 months ago

no other app is using file b
it is also happening with mv command

Thanks
Anil

Actions #5

Updated by Marcel Telka 3 months ago

  • Subject changed from rename a file on nfs create .nfsxxx files to Rename a file on NFSv3 create .nfsxxx files
  • Assignee deleted (Marcel Telka)

Yes. It happens on NFSv3, but not on NFSv4 and NFSv2.

Actions #6

Updated by Marcel Telka 3 months ago

  • Related to Bug #13665: rename with non-regular target over NFS generates .nfsXXXX files added
Actions

Also available in: Atom PDF