[LU-7059] Multiple hard link file cannot be accessed after migration Created: 28/Aug/15  Updated: 09/Sep/16  Resolved: 04/Sep/15

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.8.0
Fix Version/s: Lustre 2.8.0

Type: Bug Priority: Minor
Reporter: Sarah Liu Assignee: Di Wang
Resolution: Fixed Votes: 0
Labels: dne2
Environment:

lustre-master build # 3142 RHEL6.6
mdtcount=4 ostcount=4 client=1


Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Here is what I did
1. create 2 dirs: test1 and other-dir2 on MDT0
2. create some file under test1;
3. in other-dir2, create hard link and soft link to the files in test1
4. migrate test1, no errors

[root@onyx-27 lustre]# lfs migrate -m 1 /mnt/lustre/test1
[root@onyx-27 lustre]# ls -al test1
total 8
drwxr-xr-x  2 root root 4096 Aug 28 15:28 .
drwxr-xr-x 12 root root 4096 Aug 28 15:23 ..
-rw-r--r--  2 root root    0 Aug 28 15:23 t1
-rw-r--r--  1 root root    0 Aug 28 15:24 t2
-rw-r--r--  1 root root    0 Aug 28 15:24 t3
[root@onyx-27 lustre]# ls -al other-dir2/
total 8
drwxr-xr-x  2 root root 4096 Aug 28 15:27 .
drwxr-xr-x 12 root root 4096 Aug 28 15:23 ..
-rw-r--r--  2 root root    0 Aug 28 15:23 t1-t1
lrwxrwxrwx  1 root root   11 Aug 28 15:27 t2-t1 -> ../test2/t1
[root@onyx-27 lustre]# lfs getstripe -M test1
1
[root@onyx-27 lustre]# lfs getstripe -M test1/t1
0
[root@onyx-27 lustre]# lfs getstripe -M test1/t2
1
[root@onyx-27 lustre]# lfs getstripe -M test1/t3
1

5. migrate other-dir2, the multiple hard link file cannot be accessed:

[root@onyx-27 lustre]# lfs migrate -m 1 /mnt/lustre/other-dir2
[root@onyx-27 lustre]# ls -al test1
ls: cannot access test1/t1: No such file or directory
total 8
drwxr-xr-x  2 root root 4096 Aug 28 15:28 .
drwxr-xr-x 12 root root 4096 Aug 28 15:28 ..
-?????????  ? ?    ?       ?            ? t1
-rw-r--r--  1 root root    0 Aug 28 15:24 t2
-rw-r--r--  1 root root    0 Aug 28 15:24 t3
[root@onyx-27 lustre]# cat test1/t1
cat: test1/t1: No such file or directory
[root@onyx-27 lustre]# cat test1/t2
[root@onyx-27 lustre]# ls -al other-dir2
ls: cannot access other-dir2/t1-t1: No such file or directory
total 8
drwxr-xr-x  2 root root 4096 Aug 28 15:32 .
drwxr-xr-x 12 root root 4096 Aug 28 15:28 ..
-?????????  ? ?    ?       ?            ? t1-t1
lrwxrwxrwx  1 root root   11 Aug 28 15:27 t2-t1 -> ../test2/t1


 Comments   
Comment by Gerrit Updater [ 29/Aug/15 ]

wangdi (di.wang@intel.com) uploaded a new patch: http://review.whamcloud.com/16131
Subject: LU-7059 mdt: reset rc=0 in mdt_lock_objects_in_linkea
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 914e603656369c6e20627dc75a8f400af873234e

Comment by Gerrit Updater [ 04/Sep/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16131/
Subject: LU-7059 mdt: reset rc=0 in mdt_lock_objects_in_linkea
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 0ab2b5f93442f6c4844fadcbca981646624f6474

Comment by Joseph Gmitter (Inactive) [ 04/Sep/15 ]

Landed for 2.8.

Generated at Sat Feb 10 02:05:38 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.