From: Frederick Dilger Date: Thu, 15 Aug 2024 07:03:19 +0000 (-0600) Subject: LU-4315 doc: updating lfs-[c-g] man page style X-Git-Tag: 2.15.91~13 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F72%2F56072%2F6;p=fs%2Flustre-release.git LU-4315 doc: updating lfs-[c-g] man page style Updating files to match the new code style for Lustre manual pages as enforced by 'contrib/scripts/checkpatch-man.pl'. This also includes other changes like removing < > or { } for singular required arguments and placing [ ] around optional ones as well as making all arguments CAPITAL and italicized, literal arguments are bolded. Lines over 80 characters should be split at the natural line end rather than the word that goes over the limit as fewer lines will need to be modified when making changes if each sentence is on it's own line. Only using features that appear in groff 1.22.3 as this is the available version is CentOS 8. Checked files: - lfs-changelog.1 - lfs-changelog_clear.1 - lfs-df.1 - lfs-fid2path.1 - lfs-find.1 - lfs-flushctx.1 - lfs-getdirstripe.1 - lfs-getname.1 - lfs-getsom.1 - lfs-getstripe.1 Test-Parameters: trivial Signed-off-by: Frederick Dilger Change-Id: I238e137b3d85972229d256e09f620ec8112fd5ea Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56072 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Arshad Hussain Reviewed-by: Oleg Drokin --- diff --git a/lustre/doc/lfs-changelog.1 b/lustre/doc/lfs-changelog.1 index 4c71f88..93d0846 100644 --- a/lustre/doc/lfs-changelog.1 +++ b/lustre/doc/lfs-changelog.1 @@ -1,16 +1,21 @@ -.TH lfs-changelog 1 "2022-11-22" Lustre "user utilities" +.TH LFS-CHANGELOG 1 2024-08-15 Lustre "Lustre User Utilities" .SH NAME lfs-changelog, lfs-changelog_clear \- client utility to read and clear Lustre changelogs .SH SYNOPSIS -.br -.B lfs changelog \fR[\fB--follow\fR] \fIMDTNAME\fR [\fISTARTREC \fR[\fIENDREC\fR]] -.br -.B lfs changelog_clear \fIMDTNAME\fR \fIID\fR \fIENDREC\fR -.br +.SY "lfs changelog" +.RB [ --follow ] +.I MDTNAME +.RI [ STARTREC +.RI [ ENDREC ]] +.SY "lfs changelog_clear" +.I MDTNAME +.I ID +.I ENDREC +.YS .SH DESCRIPTION .TP .B lfs changelog -Show the metadata changes on an MDT. Start point +Show the metadata changes on an MDT. Start point .I STARTREC and end point .I ENDREC @@ -35,21 +40,20 @@ MDT node using: .br .BI "lctl --device " MDT_NAME " changelog_register" .SH RETURN VALUES -.PP Return 0 on success or a errno value on failure. .SH ERRORS .TP 15 -.SM EINVAL +.B EINVAL One or more invalid arguments are given. .TP -.SM ENOENT +.B ENOENT MDT's changelog char device or changelog user not found. .TP -.SM EACCES +.B EACCES Not enough permissions to open the changelog char device. By default, the device is only accessible to the root user. .TP -.SM EIO +.B EIO Failed to read the changelog record on the MDT. .SH NOTES Certain userspace tools might rely on past Lustre behavior of displaying the @@ -57,55 +61,61 @@ shard's parent FID instead of the real parent FID, in changelog records related to striped directories or filesystem objects contained within them; if this behavior is needed for compatibility, please set mdd.*.enable_shard_pfid=1. This tunable might be deprecated in a future Lustre release. -.SH EXAMPLE -.TP -Register 2 changelog consumers on the MDT0000 -.br -[root@mds]: lctl --device lustrefs-MDT0000 changelog_register -.br +.SH EXAMPLES +Register 2 changelog consumers on the MDT0000: +.RS +.EX +.B [root@mds]# lctl --device lustrefs-MDT0000 changelog_register lustrefs-MDT0000: Registered changelog userid 'cl1' -.br -[root@mds]: lctl --device lustrefs-MDT0000 changelog_register -.br +.B [root@mds]# lctl --device lustrefs-MDT0000 changelog_register lustrefs-MDT0000: Registered changelog userid 'cl2' -.TP -Set changelog mask to generate changelogs for file creations -.br -[root@mds]: lctl set_param mdd.lustrefs-MDT0000.changelog_mask=CREAT -.br +.RE +.PP +Set changelog mask to generate changelogs for file creations: +.RS +.B [root@mds]# lctl set_param mdd.lustrefs-MDT0000.changelog_mask=CREAT mdd.lustrefs-MDT0000.changelog_mask=CREAT -.TP -Generate changelogs by creating some files on the fs -.br -[root@client]: touch /mnt/lustrefs/test{1..101} -.TP -Read changelog from number 0 to 99 on MDT0000 -.br -[root@client]: lfs changelog lustrefs-MDT0000 0 99 -.nf -0 01CREAT 11:03:54.129724442 2022.11.22 ... p=[0x200000007:0x1:0x0] test1 +.RE +Generate changelogs by creating some files on the fs: +.RS +.B [root@client]# touch /mnt/lustrefs/test{1..101} +.RE +Read changelog from number 0 to 99 on MDT0000: +.RS +.B [root@client]# lfs changelog lustrefs-MDT0000 0 99 +0 01CREAT 11:03:54.129724442 2022.11.22 ... p=[0x200000007:0x1:0x0] test1 .... -99 01CREAT 11:03:54.129724465 2022.11.22 ... p=[0x200000007:0x1:0x0] test100 -.fi -.TP -Indicate to MDT0000 that the changelogs lower than 100 are not needed for cl1 -.br -[root@client]: lfs changelog_clear lustrefs-MDT0000 cl1 99 -.br -.TP -Indicate to MDT0000 that the changelogs lower than 100 are not needed for cl2 -.br -[root@client]: lfs changelog_clear lustrefs-MDT0000 cl2 99 -.br -.TP +99 01CREAT 11:03:54.129724465 2022.11.22 ... p=[0x200000007:0x1:0x0] test100 +.RE +.PP +Indicate to MDT0000 that the changelogs lower than 100 are not needed for cl1: +.RS +.B [root@client]# lfs changelog_clear lustrefs-MDT0000 cl1 99 +.RE +.PP +Indicate to MDT0000 that the changelogs lower than 100 are not needed for cl2: +.RS +.B [root@client]# lfs changelog_clear lustrefs-MDT0000 cl2 99 +.RE +.PP The changelogs from 0 to 99 are cleared by the MDT: -[root@client]: lfs changelog lustrefs-MDT0000 0 -.br -100 01CREAT 11:03:54.129724492 2022.11.22 ... p=[0x200000007:0x1:0x0] test101 +.RS +.B [root@client]# lfs changelog lustrefs-MDT0000 0 +100 01CREAT 11:03:54.129724492 2022.11.22 ... p=[0x200000007:0x1:0x0] test101 +.EE +.RE +.SH AVAILABILITY +.B lfs changelog +and +.B lfs changelog_clear +are part of the +.BR lustre (7) +filesystem package since release 2.0.0 +.\" Added in commit 1.6.0-2259-g0e660eab78 .SH SEE ALSO .BR lfs (1), -.BR llapi_changelog_clear (3) -.BR llapi_changelog_recv (3) -.BR llapi_changelog_start (3) +.BR llapi_changelog_clear (3), +.BR llapi_changelog_recv (3), +.BR llapi_changelog_start (3), +.BR lctl-changelog_deregister (8), .BR lctl-changelog_register (8) -.BR lctl-changelog_deregister (8) diff --git a/lustre/doc/lfs-df.1 b/lustre/doc/lfs-df.1 index bbd3b50..e462532 100644 --- a/lustre/doc/lfs-df.1 +++ b/lustre/doc/lfs-df.1 @@ -1,21 +1,25 @@ -.TH lfs-df 1 "2016 Dec 7" Lustre "user utilities" +.so lustre/doc/lgroff-macros +.TH LFS-DF 1 2024-08-15 Lustre "Lustre User Utilities" .SH NAME lfs-df \- report Lustre filesystem disk usage .SH SYNOPSIS -.BR "lfs df" " [" -i "] [" -h | -H ] +.SY "lfs df" +.RB [ -i ] +.RB [ -h | -H ] .RB [ --lazy | -l ] .RB [ --pool | -p -.IR [. ]] +.IR FSNAME [. POOL ]] .RB [ --mdt | -m ] .RB [ --ost | -o ] .RB [ --verbose | -v ] .RI [ path ] +.YS .SH DESCRIPTION .B lfs df displays filesystem usage information by default for each Lustre filesystem currently mounted on that node, or for the filesystem that contains -.I path +.I PATH if given. It displays the current usage and totals for each MDT and OST separately, as well as a per-filesystem summary that matches .BR df (1) @@ -24,11 +28,11 @@ output for each filesystem. By default .B lfs df reports the -.I space +.I SPACE usage of the OSTs (the MDT space usage is shown only for reference). With .B -i it reports the -.I inode +.I INODE (object) usage for each target and in the summary. For ZFS-backed targets, the .B IUsed @@ -38,7 +42,7 @@ but the total and .B Free inode counts are -.I estimated +.I ESTIMATED based on the current average (mean) space used per object on each target, and may fluctuate over time to reflect the current usage pattern of the target. The estimate becomes more accurate as the target becomes @@ -55,14 +59,14 @@ RAID reconstruction. This state is marked on the server automatically for ZFS targets via .BR zed (8), or a (user-supplied) script that monitors the target device and sets -.B 'lctl set_param obdfilter.\fI\fB.degraded=1' +.BI "'lctl set_param obdfilter." TARGET ".degraded=1'" on the OST. This target will be avoided for new allocations, but will still be used for existing files located there or if there are not enough non-degraded OSTs to make up a widely-striped file. .TP .B N: no-precreate The target is configured to deny object precreation by the -.B 'lctl set_param obdfilter.\fI\fB.no_precreate=1' +.BI "'lctl set_param obdfilter." TARGET ".no_precreate=1'" parameter or .B '-o no_precreate' mount option. This may be done to add an OST to the filesystem without @@ -114,7 +118,7 @@ total, and .B IFree counts typically reflect the -.I sum +.I SUM of values from the MDTs. If the total number of objects available on the OSTs is smaller (factoring in the filesystem default .BR stripe_count , @@ -124,7 +128,7 @@ then the reported and .B IFree values will be reduced to reflect the -.I minimum +.I MINIMUM number of files that could potentially be created with the default stripe count. The actual total number of files that can be created may be different. @@ -145,27 +149,27 @@ to show both types of devices, which is equivalent to having neither option. .TP .BR -o ", " --ost Filter output to show information on -.B OST +.B OSTc devices. Can be used with .BR -m to show both types of devices, which is equivalent to having neither option. .TP .BR -p ", " --pool= [ \fIfsname\fR .] \fIpool\fR Limit the usage to report only MDTs and OSTs that are in the specified -.IR pool . +.IR POOL . If multiple filesystems are mounted, list OSTs in -.I pool +.I POOL for every filesystem, or limit the display to only a pool for a specific filesystem if -.I fsname.pool +.I FSNAME.POOL is given. Specifying both the fsname and pool like: .br -.BI "lfs df --pool=" fsname.pool +.BI "lfs df --pool=" FSNAME.POOL .br is equivalent to specifying the mountpoint for the given -.IR fsname : +.IR FSNAME : .br -.BI "lfs df --pool=" "pool /mnt/fsname" +.BI "lfs df --pool=" "pool /mnt/FSNAME" .TP .BR -v ", " --verbose Show deactivated MDTs and OSTs in the listing, along with any @@ -173,30 +177,22 @@ additional status flags for each MDT and OST. By default, any MDTs and OSTs that are deactivated by the administrator are not shown. However, targets that are only temporarily inaccessible are still shown. .SH EXAMPLES -.TP -.B $ lfs df -hv /mnt/testfs Lists space usage per OST and MDT for the .B testfs -filesystem in human readable format. -.PP -.RS 0.75i +filesystem in human readable format: +.RS +.EX +.B # lfs df -hv /mnt/testfs UUID bytes Used Avail Use% Mounted on -.br testfs-MDT0000_UUID 13.0G 1.2G 11.0G 10% /testfs[MDT:0] -.br testfs-OST0000_UUID 3.6T 2.9T 585.7G 84% /testfs[OST:0] -.br testfs-OST0001_UUID 3.6T 3.1T 472.5G 87% /testfs[OST:1] D -.br testfs-OST0002_UUID 3.6T 3.0T 570.3G 84% /testfs[OST:2] DR -.br OST0003 : inactive device -.br testfs-OST0006_UUID 5.4T 4.9T 417.8G 92% /testfs[OST:3] -.br - +.P filesystem_summary: 16.2T 13.8T 2.0T 88% /testfs -.br +.EE .RE .PP The above example output shows that @@ -220,40 +216,48 @@ while is also marked .BR R ead-only, after detecting non-recoverable corruption in the backing filesystem. -.TP -.B $ lfs df -iH -List inode usage per OST and MDT for all mounted Lustre filesystems. -.RS 0.75i +.PP +List inode usage per OST and MDT for all mounted Lustre filesystems: +.RS +.EX +.B # lfs df -iH UUID Inodes IUsed IFree IUse% Mounted on -.br testfs-MDT0000_UUID 932.2k 884.6k 47.6k 95% /testfs[MDT:0] -.br testfs-OST0000_UUID 267.5k 179.6k 87.8k 67% /testfs[OST:0] -.br testfs-OST0001_UUID 268.9k 173.5k 95.4k 64% /testfs[OST:1] D -.br testfs-OST0002_UUID 267.5k 169.6k 97.9k 63% /testfs[OST:2] DR -.br OST0003 : inactive device -.br testfs-OST0006_UUID 426.1k 377.4k 48.7k 88% /testfs[OST:3] -.br - +.P filesystem_summary: 932.1k 884.6k 47.6k 95% /testfs -.br +.EE .RE -.TP -.B $ lfs df --pool ssd /mnt/testfs +.PP List space usage for only the .B ssd pool of the .B testfs -filesystem. -.TP -.B $ lfs df -v /mnt/testfs +filesystem: +.RS +.EX +.B # lfs df --pool ssd /mnt/testfs +.EE +.RE +.PP List all MDTs and OSTs for the .B testfs -filesystem, even if not currently connected. +filesystem, even if not currently connected: +.RS +.EX +.B # lfs df -v /mnt/testfs +.EE +.RE +.SH AVAILABILITY +.B lfs df +is part of the +.BR lustre (7) +filesystem package since release 1.4.0 +.\" Added in commit 1.3.4-1130-g113303973e .SH SEE ALSO .BR lfs (1), .BR lustre (7) diff --git a/lustre/doc/lfs-fid2path.1 b/lustre/doc/lfs-fid2path.1 index dc1ea72..cc82afc 100644 --- a/lustre/doc/lfs-fid2path.1 +++ b/lustre/doc/lfs-fid2path.1 @@ -1,52 +1,60 @@ -.TH lfs-fid2path 1 "2018-11-24" Lustre "user utilities" +.TH LFS-FID2PATH 1 2024-08-15 Lustre "Lustre User Utilities" .SH NAME lfs-fid2path \- print the pathname(s) for a file identifier .SH SYNOPSIS -.BR "lfs fid2path " -[\fI\,OPTION\/\fR]... <\fI\,FSNAME\/\fR|\fI\,MOUNT_POINT\/\fR> <\fI\,FID\/\fR>... +.SY "lfs fid2path" +.RI [ OPTION ]... +.IR FSNAME | MOUNT_POINT +.IR FID ... +.YS .SH DESCRIPTION .B lfs fid2path maps a numeric Lustre File IDentifier (FID) to one or more pathnames that -have hard links to that file. This allows resolving filenames for FIDs used +have hard links to that file. This allows resolving filenames for FIDs used in console error messages, and resolving all of the pathnames for a file -that has multiple hard links. Pathnames are resolved relative to the +that has multiple hard links. Pathnames are resolved relative to the .I MOUNT_POINT specified, or relative to the filesystem mount point if .I FSNAME is provided. .SH OPTIONS .TP -\fB\-0\fR, \fB\-\-print0\fR -Print the full pathname, followed by a NUL character instead of the newline character. +.BR -0 ", " --print0 +Print the full pathname, +followed by a NUL character instead of the newline character. .TP -\fB\-f\fR, \fB\-\-print\-fid\fR +.BR -f ", " --print-fid Print the FID with the path. .TP -\fB\-c\fR, \fB\-\-print\-link\fR +.BR -c ", " --print-link Print the current link number with each pathname or parent directory. .TP -\fB\-l\fR, \fB\-\-link\fR=\fI\,LINK\/\fR -If a file has multiple hard links, then print only the specified LINK, -starting at link 0. If multiple FIDs are given, but only one +.BR -l ", " --link\fR=\fILINK_NUM +If a file has multiple hard links, then print only the specified +.IR LINK_NUM , +starting at link 0. If multiple FIDs are given, but only one pathname is needed for each file, use .BR "--link=0" . .TP -\fB\-n\fR, \fB\-\-name\fR +.BR -n ", " --name Print only the filename instead of whole pathname .SH EXAMPLES -.TP -.B $ lfs fid2path /mnt/testfs [0x200000403:0x11f:0x0] +.EX +.B # lfs fid2path /mnt/testfs [0x200000403:0x11f:0x0] /mnt/testfs/etc/hosts -.TP -.B $ lfs fid2path -0 /mnt/lustre 0x200000401:0x6:0x0 | xargs --null +.B # lfs fid2path -0 /mnt/lustre 0x200000401:0x6:0x0 | xargs --null /mnt/lustre/Test_ -.br - file /mnt/lustre/Link_ -.br - file -.TP -.B $ lfs fid2path -n /mnt/testfs [0x200000403:0x11f:0x0] +file /mnt/lustre/Link_ +file +.B # lfs fid2path -n /mnt/testfs [0x200000403:0x11f:0x0] hosts +.EE +.SH AVAILABILITY +.B lfs fid2path +is part of the +.BR lustre (7) +filesystem package since release 2.0.0 +.\" Added in commit 1.6.0-2259-g0e660eab78 .SH SEE ALSO .BR lfs (1), .BR lfs-getstripe (1), diff --git a/lustre/doc/lfs-find.1 b/lustre/doc/lfs-find.1 index 2ee8aec..cb2665e 100644 --- a/lustre/doc/lfs-find.1 +++ b/lustre/doc/lfs-find.1 @@ -1,47 +1,170 @@ -.TH lfs-find 1 "2018-01-24" Lustre "user utilities" +.so lustre/doc/lgroff-macros +.TH LFS-FIND 1 2024-08-15" Lustre "Lustre User Utilities" .SH NAME lfs-find \- Lustre client utility to list files with specific attributes .SH SYNOPSIS -.B lfs find \fR<\fIdirectory\fR|\fIfilename \fR...> - [[\fB!\fR] \fB--atime\fR|\fB-A\fR [\fB-+\fR]\fIn[smhdwy]\fR] -[[\fB!\fR] \fB--attrs\fR=\fI[^]ATTR[,...]\fR] -[[\fB!\fR] \fB--blocks\fR|\fB-b\fR [\fB+-\fR]\fIn\fR] - [[\fB!\fR] \fB--btime\fR|\fB-B\fR [\fB+-\fR]\fIn[smhdwy]\fR] -[[\fB!\fR] \fB--ctime\fR|\fB-C\fR [\fB+-\fR]\fIn[smhdwy]\fR] - [[\fB!\fR] \fB--component-count|\fB--comp-count\fR [\fB+-\fR]\fIn\fR] - [[\fB!\fR] \fB--component-end|\fB--comp-end\fR|\fB-E\fR [\fB+-\fR]\fIn\fR[\fBKMGTPE\fR]] - [[\fB!\fR] \fB--component-flags|\fB--comp-flags\fR [^]\fIFLAG\fB,\fR...] - [[\fB!\fR] \fB--component-start|\fB--comp-start\fR [\fB+-\fR]\fIn\fR[\fBKMGTPE\fR]] - [[\fB!\fR] \fB--extension-size|\fB-z\fR [\fB+-\fR]\fIn\fR[\fBKMG\fR]] - [[\fB!\fR] \fB--foreign\fR [\fITYPE\fR]] -[[\fB!\fR] \fB--gid\fR|\fB-g\fR|\fB--group\fR|\fB-G\fR \fIGNAME\fR|\fIGID\fR>] - [\fB--help\fR|\fB-h\fR] -[[\fB!\fR] \fB--layout\fR|\fB-L mdt\fR,\fBraid0\fR,\fBreleased\fR] -[\fB--lazy|-l\fR] - [[\fB!\fR] \fB--links\fR [\fB+-\fR]\fIn\fR] [\fB--maxdepth\fR|\fB-D\fI n\fR] [\fB--mindepth\fR|\fB-d\fI n\fR] - [[\fB!\fR] \fB--mdt\fR|\fB--mdt-index\fR|\fB-m\fR \fIUUID\fR|\fIINDEX\fR,...] - [[\fB!\fR] \fB--mdt-count\fR|\fB-T\fR [\fB+-\fR]\fIn\fR] -[[\fB!\fR] \fB--mdt-hash\fR|\fB-H \fR<[^]\fIHASHFLAG\fR,[^]\fIHASHTYPE\fR,...>] - [[\fB!\fR] \fB--mirror-count|\fB-N\fR [\fB+-\fR]\fIn\fR] -[[\fB!\fR] \fB--mirror-state\fR [^]\fISTATE\fR] - [[\fB!\fR] \fB--mtime\fR|\fB-M\fR [\fB-+\fR]\fIn[smhdwy]\fR] -[[\fB!\fR] \fB--name\fR|\fB-n \fIPATTERN\fR] - [[\fB!\fR] \fB--newer\fR[\fBXY\fR] \fIREFERENCE\fR] - [[\fB!\fR] \fB--ost\fR|\fB-O\fR \fIINDEX\fR,...] - [[\fB!\fR] \fB--perm\fR [\fB/-\fR]\fIMODE\fR ] -[[\fB!\fR] \fB--pool\fR \fIPOOL\fR] -[\fB--print\fR|\fB-P\fR] - [\fB--print0\fR|\fB-0\fR] -[\fB--printf\fR \fIFORMAT\fR] -[[\fB!\fR] \fB--projid\fR \fIPROJID\fR] - [[\fB!\fR] \fB--size|\fB-s\fR [\fB-+\fR]\fIn\fR[\fBKMGTPE\fR]] - [\fB--skip\fR|\fB-k]\fR \fIPERCENT\fR] -[[\fB!\fR] \fB--stripe-count|\fB-c\fR [\fB+-\fR]\fIn\fR] - [[\fB!\fR] \fB--stripe-index|\fB-i\fR \fIn\fR,...] -[[\fB!\fR] \fB--stripe-size|\fB-S\fR [\fB+-\fR]\fIn\fR[\fBKMG\fR]] - [[\fB!\fR] \fB--type\fR|\fB-t\fR {\fBbcdflps\fR}] -[[\fB!\fR] \fB--uid\fR|\fB-u\fR|\fB--user\fR|\fB-U \fIUNAME\fR|\fIUID\fR] - [[\fB!\fR] \fB--xattr\fR \fINAME\fR[\fB=\fIVALUE\fR]] +.SY "lfs find" +.IR DIRECTORY | FILENAME " ..." +.br +.RB [[ ! ] +.BR --atime | -A +.RB [ -+ ]\c +.IR N [ smhdwy ]] +.br +.RB [[ ! ] +.BR --attrs =\c +.RI [ ^ ] ATTR [,...]] +.br +.RB [[ ! ] +.BR --blocks | -b +.RB [ +- ]\c +.IR N ] +.br +.RB [[ ! ] +.BR --btime | -B +.RB [ +- ]\c +.IR N [ smhdwy ]] +.br +.RB [[ ! ] +.BR --ctime | -C +.RB [ +- ]\c +.IR N [ smhdwy ]] +.br +.RB [[ ! ] +.BR --component-count | --comp-count +.RB [ +- ]\c +.IR N ] +.br +.RB [[ ! ] +.BR --component-end | --comp-end | -E +.RB [ +- ]\c +.I N\c +.RB [ KMGTPE ]] +.br +.RB [[ ! ] +.BR --component-flags | --comp-flags +.RI [ ^ ] FLAG ", ...]" +.br +.RB [[ ! ] +.BR --component-start | --comp-start +.RB [ +- ]\c +.I N\c +.RB [ KMGTPE ]] +.br +.RB [[ ! ] +.BR --extension-size | -z +.RB [ +- ]\c +.I N\c +.RB [ KMG ]] +.br +.RB [[ ! ] +.B --foreign +.RI [ TYPE ]] +.br +.RB [[ ! ] +.BR --gid | -g | --group | -G +.IR GNAME | GID ] +.RB [ --help | -h ] +.br +.RB [[ ! ] +.BR --layout | -L +.BR mdt | raid0 | released ] +.RB [ --lazy | -l ] +.br +.RB [[ ! ] +.B --links +.RB [ +- ]\c +.IR N ] +.RB [ --maxdepth | -D +.IR N ] +.RB [ --mindepth | -d +.IR N ] +.br +.RB [[ ! ] +.BR --mdt | --mdt-index | -m +.IR UUID | INDEX ", ...]" +.br +.RB [[ ! ] +.BR --mdt-count | -T +.RB [ +- ]\c +.IR N] +.br +.RB [[ ! ] +.BR --mdt-hash | -H +.RI [ ^ ] HASHFLAG ,[ ^ ] HASHTYPE ", ...]" +.br +.RB [[ ! ] +.BR --mirror-count | -N +.RB [ +- ]\c +.IR N ] +.RB [[ ! ] +.B --mirror-state +.RI [ ^ ] STATE ] +.br +.RB [[ ! ] +.BR --mtime | -M +.RB [ -+ ] +.IR N [ smhdwy ]] +.RB [[ ! ] +.BR --name | -n +.IR PATTERN ] +.br +.RB [[ ! ] +.BR --newer [ XY ] +.IR REFERENCE ] +.RB [[ ! ] +.BR --ost | -O +.IR INDEX ", ...]" +.br +.RB [[ ! ] +.B --perm +.RB [ /- ] +.IR MODE ] +.RB [[ ! ] +.B --pool +.IR POOL ] +.RB [ --print | -P ] +.br +.RB [ --print0 | -0 ] +.RB [ --printf +.IR FORMAT ] +.RB [[ ! ] +.B --projid +.IR PROJID ] +.br +.RB [[ ! ] +.BR --size | -s +.RB [ -+ ]\c +.I N\c +.RB [ KMGTPE ]] +.RB [ --skip | -k] +.IR PERCENT ] +.br +.RB [[ ! ] +.BR --stripe-count | -c +.RB [ +- ]\c +.IR N ] +.br +.RB [[ ! ] +.BR --stripe-index | -i +.IR n ", ...]" +.RB [[ ! ] +.RB --stripe-size | -S +.RB [ +- ]\c +.I N\c +.RB [ KMG ]] +.br +.RB [[ ! ] +.BR --type | -t +.RB { bcdflps }] +.RB [[ ! ] +.BR --uid | -u | --user | -U +.IR UNAME | UID ] +.br +.RB [[ ! ] +.BR --xattr +.IR NAME [= VALUE ]] +.YS .SH DESCRIPTION .B lfs find is similar to the standard @@ -54,17 +177,30 @@ as well as Lustre-specific attributes such as stripe count and size, OST and MDT location, and composite layout attributes. .SH OPTIONS .TP -.BR --atime | -A -File was last accessed \fIn\fR*24 hours ago (if no units are given), -or \fIn\fR*\fBs\fReconds, \fBm\fRinutes, \fBh\fRours, \fBd\fRays, -\fBw\fReeks, or \fBy\fRears ago within a margin of error of 24h -if no unit is specified. Multiple units can be specified, -for example \fB8h20m\fR is equivalent to \fB500m\fR. If multiple units -are specified, the margin of error is based on the smallest unit used, so +.BR -A ", " --atime +File was last accessed +.IR N *24 +hours ago (if no units are given), +or +.IR N *\c +.BR s econds, +.BR m inutes, +.BR h ours, +.BR d ays, +.BR w eeks, +or +.BR y ears +ago within a margin of error of 24h if no unit is specified. +Multiple units can be specified, for example +.B 8h20m +is equivalent to +.BR 500m . +If multiple units are specified, +the margin of error is based on the smallest unit used, so .B -atime 3d has a margin of error of one day, while .B -atime 72h -has a margin of error of one hour. If both +has a margin of error of one hour. If both .BI "-atime +" older and .BI "-atime -" newer @@ -77,42 +213,62 @@ File has ATTRS attribute flags. Supported attributes are (non exhaustive list): Compressed (c), Immutable (i), Append_Only (a), No_Dump (d), Encrypted (E), Automount (M) .TP -.BR --blocks | -b -Blocks allocated by the file is \fIn\fR 512-byte \fBb\fRlocks (if no units -are given), or \fBc\fRhars (bytes), \fBK\fRibi-, \fBM\fRebi-, \fBG\fRibi-, -\fBT\fRebi-, \fBP\fRebi-, or \fBE\fRbi-bytes if that suffix is given. -.TP -.BR --btime | --Btime | -B -File was created \fIn\fR*24 hours ago, see ---atime +.BR -b ", " --blocks +Blocks allocated by the file is +.I N +512-byte +.BR b locks +(if no units are given), or +.BR c hars +(bytes), +.BR K ibi-, +.BR M ebi-, +.BR G Ribi-, +.BR T Rebi-, +.BR P Rebi-, +or +.BR E bi-bytes +if that suffix is given. +.TP +.BR -B ", " --btime ", " --Btime +File was created +.IR N *24 +hours ago, see +.B --atime for full details and options. .TP -.BR --ctime | -C -File's status was last changed \fIn\fR*24 hours ago, see ---atime +.BR -C ", " --ctime +File's status was last changed +.IR N *24 +hours ago, see +.B --atime for full details and options. .TP -.BR --component-count | --comp-count -The file has \fIn\fR components in its layout. +.BR --component-count ", " --comp-count +The file has +.I N +components in its layout. .TP -.BR --component-end | --comp-end -The file has component end offset \fIn\fR (in bytes) for any component. +.BR --component-end ", " --comp-end +The file has component end offset +.I N +(in bytes) for any component. .TP -.BR --component-flags | --comp-flags +.BR --component-flags ", " --comp-flags The file has components with the specified .I flag -set. If +set. If .BI ^ flag is used, print only components not matching .IR flag . -Multiple flags can be specified, separated by commas. Valid flag names are: +Multiple flags can be specified, separated by commas. Valid flag names are: .RS 1.2i .TP .B init Component has been initialized (has allocated OST objects). .TP .B stale -Replicated (mirrored) components that do not have up-to-date data. Stale +Replicated (mirrored) components that do not have up-to-date data. Stale components will not be used for read or write operations, and need to be resynched using .B lfs mirror resync @@ -130,28 +286,30 @@ Replicated (mirrored) components that are preferred for read. Replicated (mirrored) components that are preferred for write. .RE .TP -.BR --component-start | --comp-start -The file has component start offset \fIn\fR (in bytes) for any component. +.BR --component-start ", " --comp-start +The file has component start offset +.I N +(in bytes) for any component. .TP .BR --foreign File has a foreign (non-Lustre/free format) layout and is of the given .IR type , -if specified. Presently only +if specified. Presently only .B none or .B symlink are defined types, though 32-bit numeric types can also be used. .TP -.BR --gid | -g +.BR -g ", " --gid File has specified numeric group ID. .TP -.BR --group | -G +.BR -G ", " --group File belongs to specified group, numeric group ID allowed. .TP -.BR --help | -h +.BR -h ", " --help Print usage message. .TP -.BR --layout | -L +.BR -L ", " --layout File has a layout of the given type, one of: .RS 1.2i .TP @@ -165,22 +323,28 @@ HSM-archived files that are not resident in the filesystem. Files that have the first data component on an MDT. .RE .TP -.BR --lazy|-l +.BR -l ", " --lazy Use file size and blocks from MDT, if available, to avoid extra RPCs. .TP .BR --links -File has \fIn\fR links. +File has +.I N +links. .TP .BR --maxdepth -Limits find to decend at most \fIn\fR levels of directory tree. +Limits find to decend at most +.I N +levels of directory tree. .TP .BR --mindepth -Starts find at \fIn\fR levels of directory tree. +Starts find at +.I N +levels of directory tree. .TP -.BR --mdt | --mdt-index | -m +.BR -m ", " --mdt ", " --mdt-index File or directory inode is located on the specified MDT(s). .TP -.BR --mdt-hash | -H +.BR -H ", " --mdt-hash DNE striped directory uses the given filename hashing function, one of: .RS 1.2i .TP @@ -200,14 +364,16 @@ This implicitly selects only directories to be matched, like .B -type d and not other file types. .TP -.BR --mdt-count | -T -The DNE striped directory has the given number of MDT shards. This +.BR -T ", " --mdt-count +The DNE striped directory has the given number of MDT shards. This implicitly selects only directories to be matched, like .B -type d and not other file types. .TP -.BR --mirror-count | -N -The file has \fIn\fR mirrors in its layout. +.BR -N ", " --mirror-count +The file has +.I N +mirrors in its layout. .TP .BR --mirror-state The file has a state of @@ -230,36 +396,53 @@ The mirrored file is in a state of being written. The mirrored file is in a state of being resynchronized. .RE .TP -.BR --mtime | -M -File's data was last modified \fIn\fR*24 hours ago, see ---atime +.BR -M ", " --mtime +File's data was last modified +.IR N *24 +hours ago, see +.B --atime for full details and options. .TP -.BR --name | -n +.BR -n ", " --name Filename matches the given filename, or regular expression using standard .BR glob (7) file name regular expressions and wildcards. .TP .BR --newer [ XY "] " \fIreference -Succeeds if timestamp \fIX\fR of the file being considered is newer -than timestamp \fIY\fR of the file +Succeeds if timestamp +.I X +of the file being considered is newer +than timestamp +.I Y +of the file .IR reference . -The letters \fIX\fR and \fIY\fR can be any of the following letters: - -.TS -ll -ll -ll -ll -llw(2i). -a The access time of the file \fIreference\fR -b|B The birth time of the file \fIreference\fR -c The inode status change time of \fIreference\fR -m The modification time of the file \fIreference\fR -t \fIreference\fR is interpreted directly as a time -.TE - +The letters +.I X +and +.I Y +can be any of the following letters: +.TP 4 +.B a +The access time of the file +.I reference +.TP +.B b|B +The birth time of the file +.I reference +.TP +.B c +The inode status change time of +.I reference +.TP +.B m +The modification time of the file +.I reference +.TP +.B t +.I reference +is interpreted directly as a time +.PP Some combinations are invalid; for example, it is invalid for .I X to be @@ -270,59 +453,74 @@ is equivalent to .BR -newermm . When .IR reference -is interpreted directly as a time, currently it must be in one of the -following formats: "%Y-%m-%d %H:%M:%S", "%Y-%m-%d %H:%M", "%Y-%m-%d", -"%H:%M:%S", "%H:%M", to represent year, month, day, hour, minute, seconds, -with unspecified times at the start of that minute or day, unspecified dates -being "today", and "@%s" or "%s" the seconds since the Unix epoch (see +is interpreted directly as a time, +currently it must be in one of the following formats: +"%Y-%m-%d %H:%M:%S", "%Y-%m-%d %H:%M", "%Y-%m-%d", "%H:%M:%S", "%H:%M", +to represent year, month, day, hour, minute, seconds, +with unspecified times at the start of that minute or day, +unspecified dates being "today", +and "@%s" or "%s" the seconds since the Unix epoch (see .BR strftime (3) -for details of the time formats). Otherwise, it will report an error. -If you try to use the birth time of a reference file, and the birth -time cannot be determined, a fatal error message results. If you -specify a test which refers to the birth time of files being examined, +for details of the time formats). Otherwise, it will report an error. +If you try to use the birth time of a reference file, +and the birth time cannot be determined, a fatal error message results. +If you specify a test which refers to the birth time of files being examined, this test will fail for any files where the birth time is unknown. .TP -.BR --ost | -O -File has an object on the specified OST(s). The OST names can be specified -using the whole OST target name, or just the OST index number. If multiple -OSTs are given in a comma-separated list, the file may have an object on -any of the given OSTs. Specifying multiple OSTs allows scanning the -filesystem only once when migrating objects off multiple OSTs for evacuation -and replacement using +.BR -O ", " --ost +File has an object on the specified OST(s). +The OST names can be specified using the whole OST target name, +or just the OST index number. +If multiple OSTs are given in a comma-separated list, +the file may have an object on any of the given OSTs. +Specifying multiple OSTs allows scanning the filesystem only once +when migrating objects off multiple OSTs for evacuation and replacement using .BR lfs-migrate (1). .TP -.BR "--perm \fImode\fR" -File's permission are exactly \fImode\fR (octal or symbolic). +.BI --perm " MODE" +File's permission are exactly +.I MODE +(octal or symbolic). .TP -.BR "--perm /\fImode\fR" -All of the permission bits \fImode\fR are set for the file. +.BR --perm /\fIMODE +All of the permission bits +.I MODE +are set for the file. .TP -.BR "--perm -\fImode\fR" -Any of the permission bits \fImode\fR are set for the file. If no permission -bits in \fImode\fR are set, this test matches any file. +.BR --perm -\fIMODE +Any of the permission bits +.I MODE +are set for the file. If no permission bits in +.I MODE +are set, this test matches any file. .TP .BR --pool Layout was created with the specified .I pool -name. For composite files, this may match the pool of any component. -.BR --print | -P +name. For composite files, this may match the pool of any component. +.BR -P ", " --print Prints the file or directory name to standard output if it matches all specified parameters, one file per line with a trailing linefeed. This is the default behaviour for any matching files. .TP -.BR --print0 | -0 +.BR -0 ", " --print0 Print full file name to standard output if it matches the specified -parameters, followed by a NUL character. This is for use together with +parameters, followed by a NUL character. This is for use together with .BR xargs (1) with the .B -0 option to handle filenames with embedded spaces or other special characters. .TP -.BR "--printf \fIformat\fR" -Print \fIformat\fR to standard output for each matching file, interpreting -`\' escapes and `%' directives. Unlike \fB--print\fR, the \fB--printf\fR option -does not automatically add a newline to the end of the string. The escapes and -directives are: +.BI --printf " FORMAT" +Print +.I FORMAT +to standard output for each matching file, interpreting +`\' escapes and `%' directives. Unlike +.BR --print , +the +.B --printf +option does not automatically add a newline to the end of the string. +The escapes and directives are: .RS 1.2i .TP .B \en @@ -347,7 +545,8 @@ File\'s last access time in seconds since Jan. 1, 1970, 00:00 GMT. The amount of disk space used for the file (in 512-byte blocks). .TP .B %c -File\'s last status change time in the format returned by the C \`ctime\' function. +File\'s last status change time in the format +returned by the C \`ctime\' function. .TP .B %C@ File\'s last status change time in seconds since Jan. 1, 1970, 00:00 GMT. @@ -377,7 +576,8 @@ File's name. File size in bytes. .TP .B %t -File\'s last modification time in the format returned by the C \`ctime\' function. +File\'s last modification time in the format +returned by the C \`ctime\' function. .TP .B %T@ File\'s last modification time in seconds since Jan. 1, 1970, 00:00 GMT. @@ -411,7 +611,7 @@ unknown attributes. .RE .TP .B %Lc -File\'s stripe count. For a composite file, this is the stripe count of the last +File\'s stripe count. For a composite file, this is the stripe count of the last instantiated component. .TP .B %LF @@ -429,8 +629,8 @@ component. List of all OST/MDT indices associated with a file or directory. .TP .B %Lp -File\'s OST pool name. For a composite file, this is the pool associated -with the last instantiated component. (NOTE: This can also be used for +File\'s OST pool name. For a composite file, this is the pool associated +with the last instantiated component. (NOTE: This can also be used for directories, but since MDT pools are not currently implemented, nothing will be printed.) .TP @@ -438,72 +638,123 @@ be printed.) Numeric project ID assigned to the file or directory. .TP .B %LS -File's stripe size. For a composite file, this is the stripe size of the last +File's stripe size. For a composite file, this is the stripe size of the last instantiated component. .TP .BR --projid File has specified numeric project ID. .TP -.BR --size | -s -File size is \fIn\fR 512-byte blocks (if no unit is given), or -\fIn\fR \fBc\fRhars (bytes), \fBK\fRibi-, \fBM\fRebi-, -\fBG\fRibi-, \fBT\fRebi-, \fBP\fRebi-, or \fBE\fRbi-bytes if a -suffix is given. +.BR -s ", " --size +File size is +.I N +512-byte blocks (if no unit is given), or +.I N +.BR c hars +(bytes), +.BR K ibi-, +.BR M Rebi-, +.BR G Ribi-, +.BR T Rebi-, +.BR P Rebi-, +or +.BR E Rbi-bytes +if a suffix is given. .TP -.BR --skip | -k -Skip \fIPERCENT\fR of the total that match the other filters. This is +.BR -k ", " --skip +Skip +.I PERCENT +of the total that match the other filters. This is useful together with .BR lfs-migrate (1) to allow processing only a fraction of the files to rebalance files when new OSTs are added to the filesystem. .TP -.BR --stripe-count | -c -File has \fIn\fR stripes allocated. For composite files, this +.BR -c ", " --stripe-count +File has +.I N +stripes allocated. For composite files, this matches the stripe count of the last initialized component. .TP -.BR --stripe-index | -i -File has stripe on OST index \fIn\fR. Multiple OST indices can be -specified in a comma-separated list, which indicates that the file -has a stripe on \fIany\fR of the specified OSTs. This allows a +.BR -i ", " --stripe-index +File has stripe on OST index +.IR N . +Multiple OST indices can be specified in a comma-separated list, +which indicates that the file has a stripe on \ +.B any +of the specified OSTs. This allows a single namespace scan for files on multiple different OSTs, if there are multiple OSTs that are being replaced. .TP -.BR --stripe-size | -S -Stripe size is \fIn\fR bytes, or \fBK\fRibi-, \fBM\fRebi-, -\fBG\fRibi-, \fBT\fRebi-, \fBP\fRebi-, or \fBE\fRbi-abytes if a -suffix is given. For composite files, this matches the stripe -size of the last initialized non-extension component. -.TP -.BR --extension-size | --ext-size | -z -Extension size is \fIn\fR bytes, or \fBK\fRibi-, \fBM\fRebi-, -\fBG\fRibi-, \fBT\fRebi-, \fBP\fRebi-, or \fBE\fRbi-abytes if a -suffix is given. For composite files, this matches the extension -size of any extension component. -.TP -.BR --type | -t -File has type: \fBb\fRlock, \fBc\fRharacter, \fBd\fRirectory, -\fBf\fRile, \fBp\fRipe, sym\fBl\fRink, or \fBs\fRocket. +.BR -S ", " --stripe-size +Stripe size is +.I N +bytes, or +.BR K Ribi-, +.BR M Rebi-, +.BR G Ribi-, +.BR T Rebi-, +.BR P Rebi-, +or +.BR E Rbi-abytes +if a suffix is given. For composite files, +this matches the stripe size of the last initialized non-extension component. +.TP +.BR -z ", " --extension-size ", " --ext-size +Extension size is +.I N bytes, or +.BR K Ribi-, +.BR M Rebi-, +.BR G Ribi-, +.BR T Rebi-, +.BR P Rebi-, +or +.BR E Rbi-abytes +if a suffix is given. +For composite files, this matches the extension size of any extension component. +.TP +.BR -t ", " --type +File has type: +.BR b Rlock, +.BR c haracter, +.BR d irectory, +.BR f ile, +.BR p ipe, +.RB sym l ink, +or +.BR s ocket. .TP -.BR --uid | -u +.BR -u ", " --uid File has specified numeric user ID. .TP -.BR --user | -U +.BR -U ", " --user File owned by specified user, numeric user ID also allowed. .TP -\fB--xattr \fINAME\fR[\fB=\fIVALUE\fR] +.B --xattr \fINAME\fR[\fB=\fIVALUE\fR] File has an extended attribute with name matching the regular expression .RB ( regex (7)) -\fINAME\fR, and optionally value matching the regular expression \fIVALUE\fR. +.IR NAME , +and optionally value matching the regular expression +.IR VALUE . The regular expressions must match the complete attribute names and values, and not just a substring. This option may be specified multiple times, and the file must match all provided arguments. .SH NOTES -Specifying \fB!\fR before an option negates its meaning (\fIfiles -NOT matching the parameter\fR). Using \fB+\fR before a numeric -value means 'more than \fIn\fR', while \fB-\fR before a numeric value -means 'less than \fIn\fR'. If neither is used, it means 'equal to -\fIn\fR', within the bounds of the unit specified (if any). +Specifying +.B ! +before an option negates its meaning +.RI ( "files NOT matching the parameter" ). +Using +.B + +before a numeric value means 'more than +.IR N ', +while +.B - +before a numeric value means 'less than +IR N '. +If neither is used, it means 'equal to +.IR N ', +within the bounds of the unit specified (if any). .PP Numeric suffixes are in binary SI (power-of-two) units. .PP @@ -515,76 +766,121 @@ leading dash. The order of parameters does not affect how the files are matched. .B lfs find will first scan the directory for any specified filename, and then fetch -MDT inode attributes for each matching filename. If it can make a +MDT inode attributes for each matching filename. If it can make a positive or negative decision for a file based only on the MDT attributes -(e.g. newer than specified time, user/group/project ID) it will not fetch +(e.g. newer than specified time, user/group/project ID) it will not fetch the OST object attributes for that file. +.SH BUGS +The +.B lfs find +command isn't as comprehensive as +.BR find (1). +In particular, it doesn't support complex boolean expressions with +.B -o +(logical OR), only logical AND of all expressions. The order that parameters +are specified does not affect how the files are matched. .SH EXAMPLES -.TP -.B $ lfs find /mnt/lustre Efficiently lists all files in a given directory and its subdirectories, -without fetching any file attributes. -.TP -.B $ lfs find /mnt/lustre -printf "%u %M %i \n" +without fetching any file attributes: +.RS +.EX +.B # lfs find /mnt/lustre +.EE +.RE +.PP Prints a formatted find string, listing the username, access mode and inode number. -.TP -.B $ lfs find /mnt/lustre -mtime +30 -type f -print -Recursively list all regular files in given directory more than 30 days old. -.TP -.B $ lfs find /mnt/lustre/test -o OST0002,OST0003 -print0 | lfs_migrate -y +.RS +.EX +.B # lfs find /mnt/lustre -printf "%u %M %i \n" +.EE +.RE +.PP +Recursively list all regular files in given directory more than 30 days old: +.RS +.EX +.B # lfs find /mnt/lustre -mtime +30 -type f -print +.EE +.RE +.PP Recursively find all files in .B test -that have objects on OST0002 or OST0003 and migrate them to other OSTs. See +that have objects on OST0002 or OST0003 and migrate them to other OSTs. See .BR lfs_migrate (1) -for more details. -.TP -.B $ lfs find -name "*.mpg" --component-count +3 /mnt/lustre +for more details: +.RS +.EX +.B # lfs find /mnt/lustre/test -o OST0002,OST0003 -print0 | lfs_migrate -y +.EE +.RE +.PP Recursively list all files ending with .B .mpg -that have more than 3 components. -.TP -.B $ lfs find --component-flags=init,prefer,^stale /mnt/lustre +that have more than 3 components: +.RS +.EX +.B # lfs find -name "*.mpg" --component-count +3 /mnt/lustre +.EE +.RE +.PP Recursively list all files that have at least one component with both 'init' -and 'prefer' flags set, and doesn't have flag 'stale' set. -.TP -.B $ lfs find --mirror-count +2 /mnt/lustre -Recursively list all mirrored files that have more than 2 mirrors. -.TP -.B $ lfs find ! --mirror-state=ro /mnt/lustre -Recursively list all out-of-sync mirrored files. -.TP -.B $ lfs find ! --foreign=symlink /mnt/lustre +and 'prefer' flags set, and doesn't have flag 'stale' set: +.RS +.EX +.B # lfs find --component-flags=init,prefer,^stale /mnt/lustre +.EE +.RE +.PP +Recursively list all mirrored files that have more than 2 mirrors: +.RS +.EX +.B # lfs find --mirror-count +2 /mnt/lustre +.EE +.RE +.PP +Recursively list all out-of-sync mirrored files: +.RS +.EX +.B # lfs find ! --mirror-state=ro /mnt/lustre +.EE +.RE +.PP Recursively list all but foreign files/dirs of .B symlink -type. -.TP -.B $ lfs find -xattr user.job=202310.* /mnt/lustre -Recursively list all files with the specified "user.job" extended attribute. -.TP -.B $ lfs find -xattr security.selinux ! -xattr security.selinux=.*httpd.* /var/www +type: +.RS +.EX +.B # lfs find ! --foreign=symlink /mnt/lustre +.EE +.RE +.PP +Recursively list all files with the specified "user.job" extended attribute: +.RS +.EX +.B # lfs find -xattr user.job=202310.* /mnt/lustre +.EE +.RE +.PP Recursively list all files in /var/www that have any SELinux extended attribute, but that do NOT have an SELinux extended attribute with a value containing -"httpd". -.SH BUGS -The +"httpd": +.RS +.EX +.B # lfs find -xattr security.selinux ! -xattr security.selinux=.*httpd.* \ +/var/www +.EE +.RE +.SH AVAILABILITY .B lfs find -command isn't as comprehensive as -.BR find (1). -In particular, it doesn't support complex boolean expressions with -.B -o -(logical OR), only logical AND of all expressions. The order that parameters -are specified does not affect how the files are matched. -.SH AUTHOR -The -.B lfs -command is part of the Lustre filesystem. +is part of the +.BR lustre (7) +filesystem package since release 0.10.0 +.\" Added in commit 0.9.1 .SH SEE ALSO .BR lfs (1), -.BR lfs-getstripe (1), .BR lfs-getdirstripe (1), +.BR lfs-getstripe (1), .BR lfs-migrate (1), -.BR lfs_migrate (1), +.BR xargs (1), .BR lustre (7), -.BR regex (7), -.BR xargs (1) +.BR regex (7) diff --git a/lustre/doc/lfs-flushctx.1 b/lustre/doc/lfs-flushctx.1 index 975039d..c060591 100644 --- a/lustre/doc/lfs-flushctx.1 +++ b/lustre/doc/lfs-flushctx.1 @@ -1,18 +1,26 @@ -.TH LFS-FLUSHCTX 1 2021-01-04 "Lustre" "Lustre Utilities" +.TH LFS-FLUSHCTX 1 2024-08-15 Lustre "Lustre User Utilities" .SH NAME lfs-flushctx \- flush security context of current user. .SH SYNOPSIS -.B lfs flushctx -.RB [ --help | -h "] [" -k "] [" -r "] [" \fIrootpath\fR "]" -.br +.SY "lfs flushctx" +.RB [ --help | -h ] +.RB [ -k ] +.RB [ -r ] +.RI [ rootpath ] +.YS .SH DESCRIPTION -Flush the security context of the current user, for Lustre file system -as specified by \fBrootpath\fR, or for all mounted Lustre file systems. +Flush security context of current user, for Lustre file system as specified by +.BR rootpath , +or for all mounted Lustre file systems. .P -If \fB-k\fR is specified, proceed to destroy the Kerberos credentials -cache by calling kdestroy. +If +.B -k +is specified, proceed to Kerberos credentials cache destroy as well, +by calling kdestroy. .P -If \fB-r\fR is specified, reap revoked keys from the session keyring. +If +.B -r +is specified, reap revoked keys from the session keyring. .SH OPTIONS .TP .BR -k @@ -24,17 +32,28 @@ Remove revoked keys from the session keyring. .BR -h Print usage message. .SH EXAMPLES -.TP -.B $ lfs flushctx -k -r /mnt/lustre -This flushes security context of current user for Lustre file system mounted +Flush security context of current user for Lustre file system mounted under /mnt/lustre, as well as destroys its Kerberos credentials cache and reaps revoked keys from its session keyring. This is the recommended way of using the -command. -.TP -.B $ lfs flushctx +command: +.RS +.EX +.B # lfs flushctx -k -r /mnt/lustre +.EE +.RE +.PP This simply flushes security context of current user for all mounted Lustre file -systems. -.SH AUTHOR -The lfs command is part of the Lustre filesystem. +systems: +.RS +.EX +.B # lfs flushctx +.EE +.RE +.SH AVAILABILITY +.B lfs flushctx +is part of the +.BR lustre (7) +filesystem package since release 2.0.0 +.\" Added in commit 1.6.0.1-152-gd2d56f38da .SH SEE ALSO .BR lfs (1), diff --git a/lustre/doc/lfs-getdirstripe.1 b/lustre/doc/lfs-getdirstripe.1 index 4b21f63..2b8ac35 100644 --- a/lustre/doc/lfs-getdirstripe.1 +++ b/lustre/doc/lfs-getdirstripe.1 @@ -1,8 +1,11 @@ -.TH LFS-GETDIRSTRIPE 1 2017-11-07 "Lustre" "Lustre Utilities" +.TH LFS-GETDIRSTRIPE 1 2024-08-15 Lustre "Lustre User Utilities" .SH NAME lfs-getdirstripe \- list the layout pattern of a given directory .SH SYNOPSIS -.BR "lfs getdirstripe" " [" -cDhHimOrTXvy "]... " \fIDIR\fR... +.SY "lfs getdirstripe" +.RB [ -cDhHimOrTXvy ]... +.IR DIR ... +.YS .SH DESCRIPTION Get the layout pattern of striped directories. This .BR lfs (1) @@ -11,58 +14,65 @@ command is similar to but is used for the directory layout. .SH OPTIONS .TP -.BR \-c ", " \-T ", " \-\-mdt-count +.BR -c ", " -T ", " --mdt-count Only show the number of MDTs the directory is striped across. .TP -.BR \-D ", " \-\-default +.BR -D ", " --default Show the default layout used when creating new subdirectories. .TP -.BR \-F ", " \-\-fid +.BR -F ", " --fid Show only the 128-bit unique Lustre File Identifier (FID). .TP -.BR \-h ", " \-\-help +.BR -h ", " --help Print usage message. .TP -.BR \-H ", " \-\-mdt-hash -Only show the hash function being used for this directory. Also shows hash +.BR -H ", " --mdt-hash +Only show the hash function being used for this directory. Also shows hash flags, such as overstriping (>1 stripe per MDT). .TP .BR --hex-idx Print MDT indexes in hexadecimal rather than decimal. .TP -.BR \-i ", " \-m ", " \-\-mdt-index +.BR -i ", " -m ", " --mdt-index Only show the master MDT index of the directory. .TP -\fB\-O\fR, \fB\-\-obd\fR=\fIFSNAME-MDTnnnn_UUID\fR +.BR -O ", " --obd =\fIFSNAME-MDTnnnn_UUID Limit the returned directories to those with objects on a specific MDT, whose UUID is .I FSNAME-MDTnnnn_UUID. .TP -.BR \-r ", " \-\-recursive +.BR -r ", " --recursive The default behavior when a directory is specified is to list the striping information for all sub-directories within the specified directory. This can be expanded with .BR --recursive , which will recurse into all subdirectories. .TP -.BR \-X ", " \-\-max-inherit +.BR -X ", " --max-inherit Show the inherit depth of default layout. .TP -.BR \-y ", " \-\-yaml +.BR -y ", " --yaml Show the layout in YAML format for easier parsing. .TP -.BR \-\-max-inherit-rr +.BR --max-inherit-rr Show the inherit depth of default layout to roundrobin mkdir. .SH EXAMPLES -.TP -.B $ lfs getdirstripe -O lustre-MDT0001_UUID -r /mnt/lustre/dir1 List the striping information of sub-directories, that are located on MDT1, under -.BR /mnt/lustre/dir1 . -.SH AVAILABILTY -The lfs getdirstripe command is part of the Lustre filesystem. +.BR /mnt/lustre/dir1: +.RS +.EX +.B # lfs getdirstripe -O lustre-MDT0001_UUID -r /mnt/lustre/dir1 +.EE +.RE +.SH AVAILABILITY +.B lfs getdirstripe +is part of the +.BR lustre (7) +filesystem package since release 2.4.0 +.\" Added in commit v2_3_60-39-g2ad263c602 .SH SEE ALSO .BR lfs (1), -.BR lfs-setdirstripe (1), .BR lfs-getstripe (1), +.BR lfs-setdirstripe (1), .BR lustre (7) diff --git a/lustre/doc/lfs-getname.1 b/lustre/doc/lfs-getname.1 index 0b0217a..c64a7ca 100644 --- a/lustre/doc/lfs-getname.1 +++ b/lustre/doc/lfs-getname.1 @@ -1,48 +1,55 @@ -.TH LFS-GETSOM 1 2018-10-04 "Lustre" "lustre Utilities" +.TH LFS-GETNAME 1 2024-08-15 Lustre "Lustre User Utilities" .SH NAME lfs-getname \- retrieve the filesystem name and instance ID .SH SYNOPSIS -.B lfs getname -.RB [ --help | -h "] [" --instance | -i "] [" --fsname | -n ] -.RI [ pathname ...] +.SY "lfs getname" +.RB [ --help | -h ] +.RB [ --instance | -i ] +.RB [ --fsname | -n ] +.RI [ PATHNAME ...] +.YS .SH DESCRIPTION Print the filesystem name, instance ID, and mountpoint for all Lustre mount points on the local client. If one or more -.I pathname +.I PATHNAME arguments are provided, then only print the Lustre filesystem name and instance ID for these mount points. .SH OPTIONS .TP -.BR --help | -h +.BR -h ", " --help Print usage message. .TP -.BR --fsname | -n +.BR -n ", " --fsname Print only the Lustre filesystem name for each filesystem. If .B -n is used with a single -.I pathname +.I PATHNAME then the filesystem name is printed without the mountpoint. .TP -.BR --instance | -i +.BR -i ", " --instance Only show the mount instance ID for each filesystem. If .B -i is used with a single -.I pathname +.I PATHNAME then the instance ID is printed without the mountpoint. .SH EXAMPLES -.B $ lfs getname -.br +.EX +.B # lfs getname myth-ffff880428703400 /myth -.br testfs-ffff937009271000 /mnt/testfs .P -.B $ lfs getname -n /mnt/testfs -.br +.B # lfs getname -n /mnt/testfs testfs .P -.B $ lfs getname -i /mnt/testfs -.br +.B # lfs getname -i /mnt/testfs ffff937009271000 +.EE +.SH AVAILABILITY +.B lfs getname +is part of the +.BR lustre (7) +filesystem package since release 2.2.0 +.\" Added in commit 2.1.53~17 .SH SEE ALSO .BR lfs (1), .BR llapi_getname (3), diff --git a/lustre/doc/lfs-getsom.1 b/lustre/doc/lfs-getsom.1 index e9fba5a..eadc5a3 100644 --- a/lustre/doc/lfs-getsom.1 +++ b/lustre/doc/lfs-getsom.1 @@ -1,35 +1,40 @@ -.TH LFS-GETSOM 1 2018-10-04 "Lustre" "lustre Utilities" +.TH LFS-GETSOM 1 2024-08-15 Lustre "Lustre User Utilities" .SH NAME lfs-getsom \- list file attributes that are stored on an MDS .SH SYNOPSIS -.B lfs getsom -[\fB\-s\fR | \fB\-b\fR | \fB\-f\fR] +.SY "lfs getsom" +.RB [ -s | -b | -f ] +.I FILE +.YS .SH DESCRIPTION This command lists file attributes that are stored on the MDS. It is called with the full path and file name for a file on the Lustre file system. If no flags are used, then all file attributes stored on the MDS will be shown. .SH OPTIONS .TP -.BR \-s\fR +.BR -s Only show the size value of the SOM data for a given file. .TP -.BR \-b\fR +.BR -b Only show the blocks value of the SOM data for a given file. .TP -.BR \-f\fR +.BR -f Only show the flag value of the SOM data for a given file.Valid flags are: -.br +.Ex 0 - Unknown or no SoM data, must get size from OSTs. -.br 1 - Known strictly correct, FLR or DoM file (SoM guaranteed). -.br -2 - Known stale - was right at some point in the past, but it is known +2 - Known stale - was right at some point in the past, but it is known \ (or likely) to be incorrect now (e.g. opened for write). -.br -4 - Approximate, may never have been strictly correct, need to sync SOM +4 - Approximate, may never have been strictly correct, need to sync SOM \ data to achieve eventual consistency. -.SH AUTHOR -The \fBlfs getsom\fR command is part of the Lustre filesystem. +.EE +.SH AVAILABILITY +The +.B lfs getsom +command is part of the +.BR lustre (7) +filesystem package since release 2.12.0 +.\" Added in commit 2.11.54~43 .SH SEE ALSO .BR lfs (1), .BR llsom_sync (8) diff --git a/lustre/doc/lfs-getstripe.1 b/lustre/doc/lfs-getstripe.1 index 3027cc0..8fb885d 100644 --- a/lustre/doc/lfs-getstripe.1 +++ b/lustre/doc/lfs-getstripe.1 @@ -1,40 +1,58 @@ -.TH lfs-getstripe 1 "2018-01-24" Lustre "user utilities" +.so lustre/doc/lgroff-macros +.TH LFS-GETSTRIPE 1 2024-08-15 Lustre "Lustre User Utilities" .SH NAME lfs-getstripe \- Lustre client command to print layout parameters of a file .SH SYNOPSIS -.B lfs getstripe -[\fB--component-count\fR|\fB--comp-count\fR] - [\fB--component-end\fR|\fB--comp-end\fR|\fB-E\fR[\fB=\fR[\fB+-\fR]\fIEND_OFFSET\fR[\fBKMGTPE\fR]] - [\fB--component-flags\fR|\fB--comp-flags\fR[\fB=\fICOMP_FLAGS\fR]] - [\fB--component-id\fR|\fB--comp-id\fR[=\fICOMP_ID\fR]|\fB-I\fR[\fICOMP_ID\fR]] - [\fB--component-start\fR[\fB=\fR[\fB+-\fR]\fISTART_OFFSET\fR[\fBKMGTPE\fR]]] - [\fB--extension-size\fR|\fB--ext-size\fR|\fB-z\fR] - [\fB--directory\fR|\fB-d\fR] -[\fB--fid\fR|\fB-F\fR] -[\fB--generation\fR|\fB-g\fR] -[\fB--help\fR|\fB-h\fR] -[\fB--hex-idx\fR] - [\fB--layout\fR|\fB-L\fR] -[\fB--mdt\fR|\fB--mdt-index\fR|\fB-m\fR] -[\fB--ost\fR|\fB-O\fR \fIOST_NAME\fR] - [\fB--pool\fR|\fB-p\fR] -[\fB--quiet\fR|\fB-q\fR] -[\fB--recursive\fR|\fB-r\fR] - [\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--mirror-count\fR|\fB-N\fR] - [[\fB!\fR] \fB--mirror-index\fR=[\fB+-\fR]\fIMIRROR_INDEX\fR | [\fB!\fR] \fB--mirror-id\fR=[\fB+-\fR]\fIMIRROR_ID\fR] - [\fB--verbose\fR|\fB-v\fR] -[\fB--yaml\fR|\fB-y\fR][\fB--no-follow\fR] -\fIFILENAME\fR|\fIDIRECTORY\fR ... - +.SY "lfs getstripe" +.RB [ --component-count | --comp-count ] +.br +.RB [ --component-end | --comp-end | -E [ = [ +- ]\c +.I END_OFFSET +.RB [ KMGTPE ]] +.br +.RB [ --component-flags | --comp-flags [ =\c +.IR COMP_FLAGS ]] +.br +.RB [ --component-id | --comp-id +.RI [= COMP_ID ]\c +.RB | -I\c +.RI [ COMP_ID ]] +.br +.RB [ --component-start [ = [ +- ]\c +.I START_OFFSET\c +.RB [ KMGTPE ]]] +.br +.RB [ --extension-size | --ext-size | -z ] +.RB [ --directory | -d ] +.RB [ --fid | -F ] +.RB [ --generation | -g ] +.RB [ --help | -h ] +.RB [ --hex-idx ] +.RB [ --layout | -L ] +.RB [ --mdt | --mdt-index | -m ] +.RB [ --ost | -O \ \c +.IR OST_NAME ] +.RB [ --pool | -p ] +.RB [ --quiet | -q ] +.RB [ --recursive | -r ] +.RB [ --raw | -R ] +.RB [ --stripe-count | -c ] +.RB [ --stripe-index | -i ] +.RB [ --stripe-size | -S ] +.RB [ --mirror-count | -N ] +.RB [[ ! ] --mirror-index =[ +- ]\c +.I MIRROR_INDEX\c +.RB " | [" ! ] --mirror-id =[ +- ]\c +.IR MIRROR_ID ] +.RB [ --verbose | -v ] +.RB [ --yaml | -y ] +.RB [ --no-follow ] +.IR FILENAME | DIRECTORY " ..." +.YS .SH DESCRIPTION -.nh -.ad l .B lfs getstripe is used to list the layout/striping information for a given filename or -directory tree. By default the stripe_count, stripe_size, stripe_offset, +directory tree. By default the stripe_count, stripe_size, stripe_offset, and allocated OST objects for each file will be shown. If you only want specific layout information to be printed, then the .BR --stripe-count , @@ -74,18 +92,19 @@ sign must be used. .PP The default behavior when a directory is specified is to list the striping information for all files within the specified directory (like -.RB ' "ls -l \fIDIRECTORY\fR" '). +.RB ' "ls -l" +.IR DIRECTORY '). .SH OPTIONS .TP -.BR --component-count | --comp-count +.BR --component-count ", " --comp-count Print only the number of components in the file's layout. .TP -.BR --component-end | --comp-end | -E \fR[[ +- \fR] \fIEND_OFFSET\fR [ KMGTPE ]] +.BR -E ", " --component-end ", " --comp-end [[ +- ] \fIEND_OFFSET [ KMGTPE ]] Print only the component end offset (in bytes) for the component(s). If the component .I end offset is specified (with optional suffix for SI units), print only the -attributes of the component(s) with the given end offset. If +attributes of the component(s) with the given end offset. If .BI + END_OFFSET or .BI - END_OFFSET @@ -93,23 +112,23 @@ is used, print components with respectively a larger or smaller .I END_OFFSET offset. .TP -.BR --component-flags \fR| --comp-flags \fR[ \fB^ \fR] \fICOMP_FLAG\fR ,... -Print only the component flags. If +.BR --component-flags ", " --comp-flags [ ^ ] \fICOMP_FLAG ,... +Print only the component flags. If .I COMP_FLAG is specified, print only components matching the specified .I COMP_FLAG -set. If +set. If .BI ^ COMP_FLAG is used, print only components not matching .IR COMP_FLAG . -Multiple flags may be specified, separated by commas. Valid flag names are: +Multiple flags may be specified, separated by commas. Valid flag names are: .RS 1.2i .TP .B init Component has been initialized (has allocated OST objects). .TP .B stale -Replicated (mirrored) components that do not have up-to-date data. Stale +Replicated (mirrored) components that do not have up-to-date data. Stale components will not be used for read or write operations, and need to be resynched using .B lfs mirror resync @@ -127,13 +146,16 @@ Replicated (mirrored) components that are preferred for read. Replicated (mirrored) components that are preferred for write. .TP .B nosync -Replicated (mirrored) components that do not resync using \fB -lfs mirror resync\fR. Files with the \fBnosync\fR flag will also +Replicated (mirrored) components that do not resync using +.BR "lfs mirror resync" . +Files with the +.B nosync +flag will also print the timestamp when the flag was set on the replica. .RE .TP -.BR --component-id | --comp-id | -I \fR[ \fICOMP_ID\fR ] -Print only the component COMP_ID number for the component(s). The file-unique +.BR -I ", " --component-id ", " --comp-id [ \fICOMP_ID ] +Print only the component COMP_ID number for the component(s). The file-unique component COMP_ID is assigned as each component is created, and is not re-used. The COMP_ID is .B not @@ -143,12 +165,12 @@ If .I COMP_ID is specified, then print only the fields for the matching component. .TP -.BR --component-start \fR| --comp-start \fR[ +- \fR] \fISTART_OFFSET\fR [ KMGTPE ] +.BR --component-start ", " --comp-start [ +- ] \fISTART_OFFSET [ KMGTPE ] Print only the component start offset (in bytes) for the component(s). If the component .I START_OFFSET offset is specified (with optional suffix for SI units), print only the -attributes of the component(s) with the given starting offset. If +attributes of the component(s) with the given starting offset. If .BI + START_OFFSET or .BI - START_OFFSET @@ -156,17 +178,17 @@ is used, print components with respectively a larger or smaller .I START_OFFSET offset. .TP -.BR --directory | -d +.BR -d ", " --directory Get striping information for only the specified directory, like .RB ' "ls -d" '. .TP -.BR --fid | -F +.BR -F ", " --fid Show only the 128-bit unique Lustre File Identifier (FID). .TP -.BR --generation \fR| -g +.BR -g ", " --generation Print only the layout generation number. .TP -.BR --help | -h +.BR -h ", " --help Print usage message. .TP .BR --hex-idx @@ -186,33 +208,45 @@ HSM-archived files that are not resident in the filesystem. Files that have the first data component on an MDT. .RE .TP -.BR --mdt \fR| --mdt-index \fR| -m +.BR -m ", " --mdt ", " --mdt-index Show the MDT index on which the file or directory inode is located. .TP -.BR --mirror-count \fR| -N +.BR -N ", " --mirror-count Print the number of mirrors on the file. .TP -.BR --mirror-index=\fR[\fB+-\fR]\fR\fIMIRROR_INDEX\fR -Print only the components of \fIMIRROR_INDEX\fR-th mirror, based on the order -that the mirror components are stored in the file layout. The \fIMIRROR_INDEX\fR +.BR --mirror-index =[ +- ] \fIMIRROR_INDEX +Print only the components of +.IR MIRROR_INDEX-th +mirror, +based on the order that the mirror components are stored in the file layout. +The +.I MIRROR_INDEX starts at 1. If .BI + MIRROR_INDEX or .BI - MIRROR_INDEX is used, print components of mirror(s) respectively later or earlier than -the \fIMIRROR_INDEX\fR-th mirror. +the +.IR MIRROR_INDEX -th +mirror. .RS 1.2i .TP .B ! -Negates the meaning. Using + before \fIMIRROR_INDEX\fR means mirror appears 'later -than \fIMIRROR_INDEX\fR', -- before \fIMIRROR_INDEX\fR means mirror appears 'earlier -than \fIMIRROR_INDEX\fR'. If -neither is used, it means 'equal to \fIMIRROR_INDEX\fR'. +Negates the meaning. Using + before +.I MIRROR_INDEX +means mirror appears 'later than +.IR MIRROR_INDEX ', +- before +.I MIRROR_INDEX +means mirror appears 'earlier than +.I MIRROR_INDEX '. +If neither is used, it means 'equal to +.IR MIRROR_INDEX '. .RE .TP -.B --mirror-id=\fR[\fB+-\fR]\fR\fIMIRROR_ID\fR -Print only the components of the mirror with ID of \fIMIRROR_ID\fR. +.B --mirror-id =[ +- ] \fIMIRROR_ID +Print only the components of the mirror with ID of +.IR MIRROR_ID . The mirror IDs are assigned to new mirrors as they are created, but may not be sequential if some mirrors are removed. If .BI + MIRROR_ID @@ -225,85 +259,133 @@ mirror ID of .RS 1.2i .TP .B ! -Negates the meaning. Using \fB+\fR before \fIMIRROR_ID\fR means mirror with ID -'larger than \fIMIRROR_ID\fR', \fB-\fR before \fIMIRROR_ID\fR means mirror -with ID 'smaller than \fIMIRROR_ID\fR'. If neither is used, -it means 'equal to \fIMIRROR_ID\fR'. +Negates the meaning. Using +.B + +before +.I MIRROR_ID +means mirror with ID 'larger than +.IR MIRROR_ID ', +.B - +before +.I MIRROR_ID +means mirror with ID 'smaller than +.IR MIRROR_ID '. +If neither is used, it means 'equal to +.IR MIRROR_ID '. .RE .TP -.BR --ost \fR| -O \fIOST_NAME\fR -Print only file layouts and OST objects on the specified \fIOST_NAME\fR. +.BR -O ", " --ost \ \fIOST_NAME +Print only file layouts and OST objects on the specified +.IR OST_NAME . .TP -.BR --pool \fR| -p +.BR -p ", " --pool Print only the OST pool name on which the file was created. .TP -.BR --quiet \fR| -q +.BR -q ", " --quiet Print only allocated objects for each file, not other layout parameters. .TP -.BR --raw \fR| -R +.BR -R ", " --raw Print layout information without substituting the filesystem's default values for unspecified fields. If the file layout is not set, 0, 0, and -1 will be printed for the stripe_count, stripe_size, and stripe_offset respectively. .TP -.BR --recursive \fR| -r +.BR -r ", " --recursive Recurse into all subdirectories. .TP -.BR --stripe-count \fR| -c -Print the number of stripes in the file. For composite files this is +.BR -c ", " --stripe-count +Print the number of stripes in the file. For composite files this is the stripe count of the last initialized component. .TP -.BR --stripe-index \fR| -i +.BR -i ", " --stripe-index Print the starting OST index for the file layout. .TP -.BR --stripe-size \fR| -S -Print the stripe size in bytes. For composite files this is the stripe +.BR -S ", " --stripe-size +Print the stripe size in bytes. For composite files this is the stripe size of the last initialized component. .TP -.BR --extension-size \fR| --ext-size \fR| -z +.BR -z ", " --extension-size ", " --ext-size Print the extension size in bytes. For composite files this is the extension size of the first extension component. .TP -.BR --verbose \fR| -v +.BR -v ", " --verbose Also print the layout magic, FID sequence, FID object ID, and FID, in addition to the normally-printed attributes. .TP -.BR --yaml \fR| -y +.BR -y ", " --yaml Always print the layout in YAML format, rather than only using this format for composite files. .TP .BR --no-follow Print the stripe information of symbolic link itself. -.br .SH EXAMPLES -.TP -.B $ lfs getstripe -v /mnt/lustre/file1 -List the detailed object allocation of the given file. -.TP -.B $ lfs getstripe -v -I2 /mnt/lustre/file1 -List the detailed information of only component with ID 2 of the given file. -.TP -.B $ lfs getstripe --mirror-index=+1 /mnt/lustre/file1 -Print the mirror(s) appearing later than the first mirror in the the file. -.TP -.B $ lfs getstripe ! --mirror-id=2 /mnt/lustre/file1 -Print the mirror(s) with mirror ID other than 2 in the file. -.TP -.B $ lfs getstripe --component-flags=^init -I /mnt/lustre/file1 -Print only the component IDs for all the uninitialized components. -.TP -.B $ lfs getstripe --component-flags=init,^stale -I /mnt/lustre/file1 -Print only the component(s) that are instantiated but not stale. -.TP -.B $ lfs getstripe -E-64M /mnt/lustre/file1 -List information of components in a file with extent end less than 64MiB. -.TP -.B $ lfs getstripe -I3 --component-start /mnt/lustre/file1 -Print only the component start for the component with ID of 3 -.TP -.B $ lfs getstripe --yaml /mnt/lustre/file1 -Lists the information of the components of a file in YAML format. -.SH AUTHOR -The lfs command is part of the Lustre filesystem. +List the detailed object allocation of the given file: +.RS +.EX +.B # lfs getstripe -v /mnt/lustre/file1 +.EE +.RE +.PP +List the detailed information of only component with ID 2 of the given file: +.RS +.EX +.B # lfs getstripe -v -I2 /mnt/lustre/file1 +.EE +.RE +.PP +Print the mirror(s) appearing later than the first mirror in the file: +.RS +.EX +.B # lfs getstripe --mirror-index=+1 /mnt/lustre/file1 +.EE +.RE +.PP +Print the mirror(s) with mirror ID other than 2 in the file: +.RS +.EX +.B # lfs getstripe ! --mirror-id=2 /mnt/lustre/file1 +.EE +.RE +.PP +Print only the component IDs for all the uninitialized components: +.RS +.EX +.B # lfs getstripe --component-flags=^init -I /mnt/lustre/file1 +.EE +.RE +.PP +Print only the component(s) that are instantiated but not stale: +.RS +.EX +.B # lfs getstripe --component-flags=init,^stale -I /mnt/lustre/file1 +.EE +.RE +.PP +List information of components in a file with extent end less than 64MiB: +.RS +.EX +.B # lfs getstripe -E-64M /mnt/lustre/file1 +.EE +.RE +.PP +Print only the component start for the component with ID of 3: +.RS +.EX +.B # lfs getstripe -I3 --component-start /mnt/lustre/file1 +.EE +.RE +.PP +Lists the information of the components of a file in YAML format: +.RS +.EX +.B # lfs getstripe --yaml /mnt/lustre/file1 +.EE +.RE +.SH AVAILABILITY +.B lfs getstripe +is part of the +.BR lustre (7) +filesystem package since release 0.10.0 +.\" Added in commit 0.9.1 .SH SEE ALSO .BR lfs (1), .BR lfs-find (1),