[LU-14521] delete FLR mirrors without volatile files Created: 13/Mar/21  Updated: 24/Jun/21  Resolved: 11/Apr/21

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

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: Zhenyu Xu
Resolution: Fixed Votes: 0
Labels: bjhpflr

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

As noted on https://review.whamcloud.com/#/c/41906/2/src/lpurge.c@765:

(suggestion) Rather than opening a volatile file just to delete the mirror, it might be useful to have some "magic" fd that just means "delete the mirror" that can be handled directly by the MDS? That would avoid at least 2 RPCs per split.



 Comments   
Comment by John Hammond [ 13/Mar/21 ]

bobijam could you look at this? We want a way to do lfs mirror split d without a volatile file. Can the -component-del code be adapeted? It would be good to have a mini-design before we implement.

Comment by Zhenyu Xu [ 15/Mar/21 ]

My thought about mirror deleting is that we still use the mdd_xattr_split(), but in the case of mirror deleting, we'd create a new interface unto LOD layer, telling lod to delete all objects in the to-be-deleted mirror. Also we'd take care of mirror-deleting case in mdt_close_handle_layouts(), we don't need to create the temporary file object in the mirror-deleting case.

Comment by John Hammond [ 15/Mar/21 ]

Seems fine to me.

bzzz, adilger any ideas or comments?

Comment by Andreas Dilger [ 15/Mar/21 ]

No objection from me as long as we don't duplicate too much code.

Looking at mdd_xattr_split() it looks like it will return -EPERM if you try to "split" the layout into the same FID as the source. One option would be to use this behavior to do the "delete the mirror directly" case, so that userspace can determine whether the server deleted the mirror (i.e. no error returned), or if it needs to do that itself via volatile file (i.e. -EPERM returned). On the minus side, if users specify the source file as the target file for the split they may be surprised at this behavior, but this could be checked in lfs rather than on the MDS?

Comment by Gerrit Updater [ 20/Mar/21 ]

Bobi Jam (bobijam@hotmail.com) uploaded a new patch: https://review.whamcloud.com/42116
Subject: LU-14521 flr: delete mirror without volatile file
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 496231e86aa4b14c4709778589ba92026e67d26c

Comment by Gerrit Updater [ 10/Apr/21 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/42116/
Subject: LU-14521 flr: delete mirror without volatile file
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: b2d73351e64677cb8ff650d92a8744634f73e0fd

Comment by Peter Jones [ 11/Apr/21 ]

Landed for 2.15

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