[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 |
| 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. |
| 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 |
| Comment by Gerrit Updater [ 10/Apr/21 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/42116/ |
| Comment by Peter Jones [ 11/Apr/21 ] |
|
Landed for 2.15 |