[LU-16831] "lfs setstripe" should limit stripe count for component size Created: 15/May/23 Updated: 23/Jan/24 Resolved: 20/Jul/23 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.16.0 |
| Fix Version/s: | Lustre 2.16.0 |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Andreas Dilger | Assignee: | Zhenyu Xu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | easy | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
It appears that if "lfs setstripe" requests a stripe count that is larger than component_size / stripe_size then the requested number of OST objects will be created, but the ones at the end of the component will be inaccessible. For example, creating a 1MiB component with 4x 1MiB stripes will create 3 OST objects that cannot be used: # lfs setstripe -E 1M -c 4 -E eof -c 4 /mnt/testfs/badstripe
# lfs getstripe /mnt/testfs/badstripe
lcm_entry_count: 2
lcme_id: 1
lcme_flags: init
lcme_extent.e_start: 0
lcme_extent.e_end: 1048576
lmm_stripe_count: 4
lmm_stripe_size: 1048576
lmm_stripe_offset: 1
lmm_objects:
- 0: { l_ost_idx: 1, l_fid: [0x340000403:0x163:0x0] }
- 1: { l_ost_idx: 2, l_fid: [0x380000403:0x163:0x0] }
- 2: { l_ost_idx: 3, l_fid: [0x3c0000403:0x1cd:0x0] }
- 3: { l_ost_idx: 0, l_fid: [0x300000403:0x1a3:0x0] }
lcme_id: 2
lcme_flags: 0
lcme_extent.e_start: 1048576
lcme_extent.e_end: EOF
lmm_stripe_count: 4
lmm_stripe_size: 1048576
lmm_stripe_offset: -1
In this case, the MDS should limit the stripe count to:
stripe_count = min(requested_stripe_count, (comp_end - comp_start) / stripe_size);
|
| Comments |
| Comment by Gerrit Updater [ 26/May/23 ] |
|
"Zhenyu Xu <bobijam@hotmail.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51143 |
| Comment by Gerrit Updater [ 19/Jul/23 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51143/ |
| Comment by Andreas Dilger [ 20/Jul/23 ] |
|
landed for 2.16.0 |
| Comment by Gerrit Updater [ 11/Aug/23 ] |
|
"Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51930 |
| Comment by Gerrit Updater [ 23/Aug/23 ] |
|
"Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52055 |
| Comment by Gerrit Updater [ 24/Aug/23 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51930/ |
| Comment by Gerrit Updater [ 06/Sep/23 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52055/ |
| Comment by Gerrit Updater [ 23/Jan/24 ] |
|
"Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53775 |