From 32e51ef6c3bef2ae6afe6a872fb50f46f06fc1e4 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Thu, 5 Nov 2020 00:40:47 -0700 Subject: [PATCH] LU-930 utils: document 'lfs getstripe -N' option Add the '--mirror-count|-N' option to the usage message for "lfs getstripe" and its man page. Fixes: 818340364d51 ("LU-11124 utils: add 'lfs getstripe -N' option") Test-Parameters: trivial Signed-off-by: Andreas Dilger Change-Id: I89ffb2661a48336c37b8bdd784e5f9e942cbd798 Reviewed-on: https://review.whamcloud.com/40545 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin --- lustre/doc/lfs-getstripe.1 | 71 ++++++++++++++++++++++++---------------------- lustre/utils/lfs.c | 4 +-- 2 files changed, 39 insertions(+), 36 deletions(-) diff --git a/lustre/doc/lfs-getstripe.1 b/lustre/doc/lfs-getstripe.1 index 9321c69..3dea938 100644 --- a/lustre/doc/lfs-getstripe.1 +++ b/lustre/doc/lfs-getstripe.1 @@ -21,7 +21,7 @@ lfs getstripe \- Lustre client command to print layout parameters of a file [\fB--raw\fR|\fB-R\fR] [\fB--stripe-count\fR|\fB-c\fR] [\fB--stripe-index\fR|\fB-i\fR] - [\fB--stripe-size\fR|\fB-S\fR] + [\fB--stripe-size\fR|\fB-S\fR] [\fB--mirror-count\fR|\fB-N\fR] [[\fB!\fR] \fB--mirror-index\fR=[\fB+-\fR]\fI\fR | [\fB!\fR] \fB--mirror-id\fR=[\fB+-\fR]\fI\fR] [\fB--verbose\fR|\fB-v\fR] [\fB--yaml\fR|\fB-y\fR] @@ -145,15 +145,45 @@ is used, print components with respectively a larger or smaller .I start offset. .TP +.BR --directory | -d +Get striping information for only the specified directory, like +.RB ' "ls -d" '. +.TP +.BR --fid | -F +Show only the 128-bit unique Lustre File Identifier (FID). +.TP +.B --generation | -g +Print only the layout generation number. +.TP +.BR --layout +Show only the file layout, which is one of: +.RS 1.2i +.TP +.B raid0 +Traditional Lustre RAID-0 striping format. +.TP +.B released +HSM-archived files that are not resident in the filesystem. +.TP +.B mdt +Files that have the first data component on an MDT. +.RE +.TP +.BR --mdt | --mdt-index | -m +Show the MDT index on which the file or directory inode is located. +.TP +.BR --mirror-count | -N +Print the number of mirrors on the file. +.TP .BR --mirror-index = [\fB+-\fR]\fR<\fIindex\fR> Print only the components of \fI\fR-th mirror, based on the order -that the mirror components are stored in the file layout, The \fIindex\fR +that the mirror components are stored in the file layout. The \fIindex\fR starts at 1. If .BI + index or .BI - index -is used, print components of mirror(s) respectively a later or earlier -\fIindex\fR-th mirror. +is used, print components of mirror(s) respectively later or earlier than +the \fIindex\fR-th mirror. .RS 1.2i .TP .B ! @@ -164,9 +194,9 @@ neither is used, it means 'equal to \fIindex\fR'. .RE .TP .BR --mirror-id = [\fB+-\fR]\fR<\fIid\fR> -Print only the component s of the mirror with ID of \fIid\fR. The mirror IDs -are assigned to new mirrors as they are created, but may not be sequential if -some mirrors are removed. If +Print only the components of the mirror with ID of \fIid\fR. The mirror IDs +are assigned to new mirrors as they are created, but may not be sequential +if some mirrors are removed. If .BI + id or .BI - id @@ -182,33 +212,6 @@ than \fIid\fR', - before \fIid\fR means mirror with ID 'smaller than \fIid\fR'. If neither is used, it means 'equal to \fIid\fR'. .RE .TP -.BR --directory | -d -Get striping information for only the specified directory, like -.RB ' "ls -d" '. -.TP -.BR --fid | -F -Show only the 128-bit unique Lustre File Identifier (FID). -.TP -.B --generation | -g -Print only the layout generation number. -.TP -.BR --layout -Show only the file layout, which is one of: -.RS 1.2i -.TP -.B raid0 -Traditional Lustre RAID-0 striping format. -.TP -.B released -HSM-archived files that are not resident in the filesystem. -.TP -.B mdt -Files that have the first data component on an MDT. -.RE -.TP -.BR --mdt | --mdt-index | -m -Show the MDT index on which the file or directory inode is located. -.TP .BR --ost | -O Print the starting OST index for the file layout. .TP diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c index 9076991..299bf3e 100644 --- a/lustre/utils/lfs.c +++ b/lustre/utils/lfs.c @@ -190,7 +190,7 @@ static inline int lfs_mirror_delete(int argc, char **argv) " [--stripe-size|-S ]\n" \ " [--extension-size|--ext-size|-z]\n" \ " [--layout|-L ]\n" \ - " [--mirror_count|-N[mirror_count]]\n" \ + " [--mirror-count|-N[mirror_count]]\n" \ " [--ost|-o ]\n" \ " [--pool|-p ]\n" \ " [--yaml|-y ]\n" \ @@ -436,7 +436,7 @@ command_t cmdlist[] = { " [--component-start[=[+-]comp_start]]\n" " [--component-end[=[+-]comp_end]|-E[[+-]comp_end]]\n" " [[!] --mirror-index=[+-] |\n" - " [!] --mirror-id=[+-]]\n" + " [!] --mirror-id=[+-]] [--mirror-count|-N]\n" " ..."}, {"setdirstripe", lfs_setdirstripe, 0, "Create striped directory on specified MDT, same as mkdir.\n" -- 1.8.3.1