Details
-
Improvement
-
Resolution: Fixed
-
Minor
-
Lustre 2.16.0
-
3
-
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);