[LU-16284] 'lfs getstripe' follows symlink by default Created: 01/Nov/22  Updated: 20/Dec/23  Resolved: 13/Jan/23

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.0.0
Fix Version/s: Lustre 2.16.0, Lustre 2.15.4

Type: Improvement Priority: Minor
Reporter: Feng Lei Assignee: Feng Lei
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-5170 lfs usability Open
Rank (Obsolete): 9223372036854775807

 Description   

From DDN-3436, by Andreas:

It makes sense that getstripe should print the target information (assuming it is in Lustre at all). This is complicated a bit by the fact that getstripe looks up the name of the symlink on the MDS and it has no striping info, and never opens the symlink at all.

What makes sense is for the "lfs getstripe" code on the client to detect this is a symlink (the file type is already known during traversal) and do a separate lookup of the target file/dir, unless a "--no-follow" option is given.



 Comments   
Comment by Gerrit Updater [ 01/Nov/22 ]

"Feng Lei <flei@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49003
Subject: LU-16284 utils: lfs getstripe follows symlink
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: b1753379b9a8a2df628fa931a4d3dbeeba632924

Comment by Feng Lei [ 01/Nov/22 ]

adilger 

It seems that changing the default behavior from "no-follow" to "follow" causes other problems (sanity test_56k in https://review.whamcloud.com/c/fs/lustre-release/+/49003).

Is it OK to add "–follow" option to follow symlink and keep the original behavior (no-follow)?

Comment by Gerrit Updater [ 13/Jan/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49003/
Subject: LU-16284 utils: lfs getstripe follows symlink
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: af32b516593dbf2a8e7a85d885c33fd017926ada

Comment by Peter Jones [ 13/Jan/23 ]

Landed for 2.16

Comment by Gerrit Updater [ 17/Nov/23 ]

"Xing Huang <hxing@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53162
Subject: LU-16284 utils: lfs getstripe follows symlink
Project: fs/lustre-release
Branch: b2_15
Current Patch Set: 1
Commit: 4ec135bde26872ebfd59b81537822710730d86c7

Comment by Gerrit Updater [ 23/Nov/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/53162/
Subject: LU-16284 utils: lfs getstripe follows symlink
Project: fs/lustre-release
Branch: b2_15
Current Patch Set:
Commit: 6f2b56e0fd8e60137b8fcacd82ce1bea4c07f9a6

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