[LU-13893] Attempt to add PCC with param 'size>{1M}&size<{500G} reports Invalid argument (22) Created: 07/Aug/20 Updated: 08/Aug/20 |
|
| Status: | Open |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.14.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Vikentsi Lapa | Assignee: | Qian Yingjin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
Step to to reproduce: Use combination of parameters size with both M and G affix Add cache: /usr/sbin/lctl pcc add /mnt/lustre /mnt/pccro --param '*size>\{1M}&size<\{500G}* roid=7 ropcc=1'
lctl pcc pcc: error: setting llite.lustre-ffff92c83864f000.pcc='add /mnt/pccro size>\{1M}&size<\{500G} roid=7 ropcc=1': *Invalid argument (22)*
/usr/sbin/lctl pcc add /mnt/lustre /mnt/pccro --param 'size>*{100M}&size<\{500G}* roid=7 ropcc=1'
lctl pcc pcc: error: setting llite.lustre-ffff92c83864f000.pcc='add /mnt/pccro size>\{100M}&size<\{500G} roid=7 ropcc=1': *Invalid argument (22)*
Also is it support for K postfix? it also reports Invalid argument |
| Comments |
| Comment by Andreas Dilger [ 07/Aug/20 ] |
|
Honestly, the syntax for these rules is not very easy to parse and write, and would have been better done differently IMHO. For example, separating the configuration of the PCC device from the setting of rules, avoiding the use of complex separators for values (e.g. why do we need '' around every value), etc. Hopefully this can be improved as part of the landing for 2.15. According to the "lfs-pcc.1" man page on master, there is no need for "–param", just specify the list of parameters , but maybe that is changed by the patches? The man page says: # lfs pcc add /mnt/lustre /mnt/pcc "projid=\{500,1000}&fname=\{*.h5},uid=1001 rwid=1"
Add HSM root and Archive ID (referenced by rwid name-value pair)
mapping for RW-PCC. Where "&" represents the logical conjunction
operator while "," represents the logical disjunction operator.
The example rule means that new files are only auto cached if
the project ID is either 500 or 1000 and the suffix of the file
name is ah5a or the user ID is 1001.
|
| Comment by Qian Yingjin [ 08/Aug/20 ] |
|
It worked on my testing: [root@qian tests]# ../utils/lctl pcc add /mnt/lustre /mnt/pcc -p "size>{100M}&size<{500G} roid=7 ropcc=1" [root@qian tests]# ../utils/lctl pcc list /mnt/lustre pcc: - pccpath: /mnt/pcc hsmtool: posix rwid: 0 roid: 7 flags: 2e autocache: size>{100M}&size<{500G} [root@qian tests]# ../utils/lctl pcc clear /mnt/lustre [root@qian tests]# ../utils/lctl pcc add /mnt/lustre /mnt/pcc -p "size>{100K}&size<{500G} roid=7 ropcc=1" [root@qian tests]# ../utils/lctl pcc list /mnt/lustre pcc: - pccpath: /mnt/pcc hsmtool: posix rwid: 0 roid: 7 flags: 2e autocache: size>{100K}&size<{500G} [root@qian tests]# ../utils/lctl pcc list /mnt/lustre [root@qian tests]# ../utils/lctl pcc clear /mnt/lustre [root@qian tests]# ../utils/lctl pcc add /mnt/lustre /mnt/pcc -p "size<{100K}&size>{500K} roid=7 ropcc=1" I think you did not use the latest patch for testing, please download the latest Jenkins build to test it again. |
| Comment by Qian Yingjin [ 08/Aug/20 ] |
|
Hi Andreas, I will update the man page accordingly. Qian |