Bug 822361 - Lookup of files with gfid's (created from backend) on nfs mount are not force merged
Summary: Lookup of files with gfid's (created from backend) on nfs mount are not force...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: GlusterFS
Classification: Community
Component: nfs
Version: mainline
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: GlusterFS Bugs list
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-17 07:19 UTC by Shwetha Panduranga
Modified: 2014-10-25 17:40 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-10-25 17:40:34 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)
Automation test run result (13.51 KB, application/octet-stream)
2012-05-17 07:19 UTC, Shwetha Panduranga
no flags Details
nfs server log (29.28 KB, text/x-log)
2012-05-17 07:20 UTC, Shwetha Panduranga
no flags Details

Description Shwetha Panduranga 2012-05-17 07:19:58 UTC
Created attachment 585124 [details]
Automation test run result

Description of problem:
-------------------------
files are created and are assigned gfid's on the bricks from the backed.Create a volume with the same bricks where the files were created.Create a nfs mount to the volume and look up on mount point should force merge these files onto the bricks. But the lookup is returning "No such file or directory" Error. 

Version-Release number of selected component (if applicable):
3.3.0qa41

How reproducible:
often

Steps to Reproduce:
1. create a file 'f1' on brick1 and 'f2' on brick2 from the backend
2. assign gfid's to the files 'f1' and 'f2'
3. create a replicate volume (1x2) with brick1 and brick2
4. create a nfs mount. 
5. execute 'ls -l' from nfs mount
  
Actual results:
--------------
2012-05-17 11:16:18,216 DEBUG  : /home/tester/Testing/automation/libs/utils/hostutils.py execute_command 184 - '192.168.1.124: Executing Command: cd /mnt/nfsc1 ; ls -l'
2012-05-17 11:16:18,343 DEBUG  : /home/tester/Testing/automation/libs/utils/atfutils.py print_stdout 154 - 'total 0
'
2012-05-17 11:16:18,343 DEBUG  : /home/tester/Testing/automation/libs/utils/atfutils.py print_stdout 154 - '-????????? ? ? ? ?            ? f1
'
2012-05-17 11:16:18,344 DEBUG  : /home/tester/Testing/automation/libs/utils/atfutils.py print_stderr 160 - 'ls: cannot access f1: No such file or directory

Expected results:
-------------------
Should force merge of files f1 and f2. 

Additional Info:-
--------------------
The same test works fine on fuse mount.

Comment 1 Shwetha Panduranga 2012-05-17 07:20:53 UTC
Created attachment 585126 [details]
nfs server log

Comment 2 Pranith Kumar K 2012-12-11 08:38:33 UTC
happens on distribute as well. Assigning to Rajesh.
gluster --mode=script volume create d1  192.168.122.1:/gfs/d1_0
volume create: d1: success: please start the volume to access data
gluster --mode=script volume start d1
volume start: d1: success
gluster --mode=script volume set d1 client-log-level DEBUG
volume set: success
gluster --mode=script volume set d1 brick-log-level DEBUG
volume set: success
mkdir: cannot create directory `/mnt/d1': File exists

mount -t glusterfs 192.168.122.1:/d1 /mnt/d1


root - ~ 
14:07:48 :) ⚡ 

root - ~ 
14:08:00 :) ⚡ mount -t nfs 192.168.122.1:/d1 /mnt/client -o vers=3

root - ~ 
14:08:09 :) ⚡ touch /gfs/d1_0/a

root - ~ 
14:08:18 :) ⚡ ls -l /mnt/client
ls: /mnt/client/a: No such file or directory
total 0
-rw-r--r-- 0 root root 0 Dec 11 14:08 a

root - ~ 
14:08:22 :) ⚡ ls -l /mnt/client
ls: /mnt/client/a: No such file or directory
total 0
-rw-r--r-- 0 root root 0 Dec 11 14:08 a

root - ~ 
14:08:22 :) ⚡ ls -l /mnt/client
ls: /mnt/client/a: No such file or directory
total 0
-rw-r--r-- 0 root root 0 Dec 11 14:08 a

Comment 3 Rajesh 2013-07-01 10:22:23 UTC
To force merge a file created in the backend directly for use in NFS, we need to have the exact hard/soft link in the backend .glusterfs directory, since NFS uses anonymous fds to operate on files.

Comment 4 Niels de Vos 2014-10-25 17:40:34 UTC
I'll close this as NOTABUG because this is not a valid use-case in current versions. We expect that the .glusterfs directory on the bricks have hardlinks to the files. NFS uses these hardlinks to stat() a file, if these links are missing, things tend to got wrong.

Please re-open if this still is an issue and you have a real-world use-case.


Note You need to log in before you can comment on or make changes to this bug.