[LU-13748] 'lfs setstripe -C -1' stripes too widely Created: 03/Jul/20  Updated: 15/Dec/23  Resolved: 20/Jul/23

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

Type: Bug Priority: Minor
Reporter: Andreas Dilger Assignee: Andreas Dilger
Resolution: Fixed Votes: 0
Labels: easy

Issue Links:
Duplicate
is duplicated by LU-17199 'lfs setstripe -C -1' can be set beyo... Resolved
Related
is related to LU-9162 Option to set max stripe count per fi... Resolved
is related to LU-16420 sanity test_51d: FAIL: stripecount=3:... Resolved
is related to LU-16938 "lfs setstripe -C -1" stripes too wid... Open
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Creating a file with overstriping using "-C -1" exceeds the maximum stripe count of 2000, resulting in a file that has an excessively-large xattr, which the client may have difficulty accessing:

# lfs setstripe -E 128M -c 1 --comp-flags=prefer -E eof -C -1 /mnt/lustre/file0

# lfs getstripe /lustre/fs0a92/client/file129
/lustre/fs0a92/client/file129
  lcm_layout_gen:	3
  lcm_mirror_count:  1
  lcm_entry_count:   2
	lcme_id:         	1
	lcme_mirror_id:  	0
	lcme_flags:      	init,prefer
	lcme_extent.e_start: 0
	lcme_extent.e_end:   134217728
  	lmm_stripe_count:  1
  	lmm_stripe_size:   1048576
  	lmm_pattern:   	raid0
  	lmm_layout_gen:	0
  	lmm_stripe_offset: 7
  	lmm_objects:
  	- 0: { l_ost_idx: 7, l_fid: [0x100070000:0xcef:0x0] }

	lcme_id:         	2
	lcme_mirror_id:  	0
	lcme_flags:      	init
	lcme_extent.e_start: 134217728
	lcme_extent.e_end:   EOF
  	lmm_stripe_count:  2719
  	lmm_stripe_size:   1048576
  	lmm_pattern:   	raid0,overstriped
  	lmm_layout_gen:	0
  	lmm_stripe_offset: 9
  	lmm_objects:
  	- 0: { l_ost_idx: 9, l_fid: [0x100090000:0xe5:0x0] }
  	- 1: { l_ost_idx: 10, l_fid: [0x1000a0000:0xc5:0x0] }
  	- 2: { l_ost_idx: 11, l_fid: [0x1000b0000:0xc5:0x0] }
  	- 3: { l_ost_idx: 12, l_fid: [0x1000c0000:0xe5:0x0] }
  	- 4: { l_ost_idx: 13, l_fid: [0x1000d0000:0xe5:0x0] }
...

In some cases, running "lfs getstripe -v" on the file causes the client to crash.



 Comments   
Comment by Andreas Dilger [ 03/Jul/20 ]

The MDS should impose a stripe count limit of LOV_MAX_STRIPE_COUNT = 2000 on a component. It also makes sense to limit the total xattr size below OBD_MAX_EA_SIZE.

Comment by Andreas Dilger [ 05/Oct/22 ]

There was a maximum stripe_count limit added in LU-9162 "lod.*.max_stripecount=N" and it would make sense to have a similar tunable like "lod.*.max_overstripecount=N" to limit the "-C -1" count (if it doesn't already).

Comment by Gerrit Updater [ 05/Apr/23 ]

"Andreas Dilger <adilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/50532
Subject: LU-13748 mdt: remove LASSERT in mdt_dump_lmm()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 559fe09e160625621166005b66e30c784febf44c

Comment by Gerrit Updater [ 19/May/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/50532/
Subject: LU-13748 mdt: remove LASSERT in mdt_dump_lmm()
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 97d29eb800e8d9faba04f0744376cb50b239e2e9

Comment by Peter Jones [ 19/May/23 ]

Landed for 2.16

Comment by Andreas Dilger [ 20/May/23 ]

This was only half the fix (to avoid crashing), still need to limit stripe count for -1.

Comment by Andreas Dilger [ 20/Jul/23 ]

The "-C -1" stripe count was limited to LOV_MAX_STRIPE_COUNT by patch https://review.whamcloud.com/50250 "LU-16623 lod: handle object allocation consistently" that landed as commit v2_15_56-1-gced540165e.

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