[LU-9462] "lfs setstripe" doesn't support --component-add/del on a directory Created: 08/May/17 Updated: 25/Oct/17 Resolved: 16/Oct/17 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.10.0 |
| Fix Version/s: | Lustre 2.11.0, Lustre 2.10.2 |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Emoly Liu | Assignee: | Emoly Liu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
"lfs setstripe" should support --component-add/del operations on a directory. |
| Comments |
| Comment by Niu Yawei (Inactive) [ 08/May/17 ] |
|
"--component-add/del" was introduced to modify file layout incrementally, so that user can change the file layout and preserve the existing data at the same time. I don't think it's necessary for default layout, because user can simply change the current default layout by 'lfs setstripe' without worrying data loss, and I personally think one call to "lfs setstripe $newlayout dir" is simpler than many calls to "lfs setstripe --component-add/del $deltalayout dir". I'm not totally against this feature, I think It's nice to have, but there is a problem needs be addressed beforehand: current component-del can only delete component by component ID or flags, that are not valid for a default layout, so what kind of argument should be specified for deleting a component of default layout? Using index of component (the index of component array in LOVEA) could be a solution, but it requires 'lfs getstripe' to print an 'index' for each component, and it needs we to put the array index in protocol, that looks not quite clean to me. Andreas, Bobi, any good idea? Thanks in advance. |
| Comment by Niu Yawei (Inactive) [ 09/May/17 ] |
|
Another solution is that when using 'lfs --component-del' to a directory, ignore other arguments, and we just always delete the last component internally. The bad side of this approach is that it complicated the usage and looks bit confusing. Both approaches need quite a few code changes in LOD to make the functions to support directory, so I tend to think that we shouldn't take effort to implement this. What we need to do is to explain it well in Lustre manual, so that user won't be confused, I think the comment in manual could be: "default layout in directory is like config, it can be arbitrarily changed by 'lfs setstripe', layout in file may have data (OST objects) attached, if user want to expand/shrink layout while preserving the data on untouched component, he can use 'lfs setstripe --component-add/del." Does it sound ok? If no objections, I'm going to close this ticket as 'won't fix'. Thanks. |
| Comment by Andreas Dilger [ 11/May/17 ] |
Sorry, I don't understand this. It isn't clear to me what --component-add/del on a regular file have to do with the same on a directory? I'm OK with not implementing this feature, now that I realize that "lfs setstripe" on the directory can be used to replace the entire layout immediately. I guess this is a bit more effort than editing the layout for a regular file, but with the --yaml option it should be enough. Definitely there needs to be some discussion of this in the lfs-setstripe.1 man page and in the user manual. |
| Comment by Niu Yawei (Inactive) [ 11/May/17 ] |
Yes, I didn't explain it well, my point is that if we explain the purpose of "--component-add/del" clearly in Lustre manual, user won't run into the confusion of "why can't I apply this command to directory?" |
| Comment by Andreas Dilger [ 11/May/17 ] |
|
I added some words to this effect into my patch https://review.whamcloud.com/27066 "
This could be expanded a bit further. That patch will likely need to be refreshed due to conflicts as other PFL patches land, so it can be added in one of the updates. |
| Comment by Eric Bergland (Inactive) [ 18/May/17 ] |
|
Is there an update on this? Just did not want it to get lost. Thanks! |
| Comment by Andreas Dilger [ 19/May/17 ] |
|
Minor documentation patch needed for this (which I just updated), not critical for the release. It also needs an update to the user manual to make it clear that changing the default layout on a directory cannot be done with "--component-add" or "--component-del", but rather the whole layout needs to be rewritten, or dumped and restored via "lfs getstripe --yaml" and "lfs setstripe --yaml" ( |
| Comment by Gerrit Updater [ 16/Oct/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/27066/ |
| Comment by Peter Jones [ 16/Oct/17 ] |
|
Landed for 2.11 |
| Comment by Gerrit Updater [ 16/Oct/17 ] |
|
Minh Diep (minh.diep@intel.com) uploaded a new patch: https://review.whamcloud.com/29627 |
| Comment by Gerrit Updater [ 25/Oct/17 ] |
|
John L. Hammond (john.hammond@intel.com) merged in patch https://review.whamcloud.com/29627/ |