X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=UserUtilities.xml;h=a3eb0c35c703cfc1a0d03e6f71b168c797b26c5f;hb=a239b0876f76e85a259765f2b47b1ddd588f1bcd;hp=976dbaa38c211cfb1c894496b9654331c72b53ab;hpb=40ae42335c7f27f17b8803278aebf2bdd2e34511;p=doc%2Fmanual.git diff --git a/UserUtilities.xml b/UserUtilities.xml index 976dbaa..a3eb0c3 100644 --- a/UserUtilities.xml +++ b/UserUtilities.xml @@ -22,6 +22,7 @@ lfs lfs changelog [--follow] mdt_name [startrec [endrec]] lfs changelog_clear mdt_name id endrec lfs check mds|osts|servers +lfs data_version [-nrw] filename lfs df [-i] [-h] [--pool]-p fsname[.pool] [path] [--lazy] lfs find [[!] --atime|-A [-+]N] [[!] --mtime|-M [-+]N] [[!] --ctime|-C [-+]N] [--maxdepth|-D N] [--name|-n pattern] @@ -32,9 +33,10 @@ lfs find [[!] --atime|-A [-+]N] [[!] --mtime|-M [-+]N] dirname|filename lfs getname [-h]|[path...] lfs getstripe [--obd|-O ost_name] [--quiet|-q] [--verbose|-v] - [--count|-c] [--index|-i | --offset|-o] - [--size|-s] [--pool|-p] [--directory|-d] - [--recursive|-r] [--raw|-R] [-M] + [--stripe-count|-c] [--stripe-index|-i] + [--stripe-size|-s] [--pool|-p] [--directory|-d] + [--mdt-index|-M] [--recursive|-r] [--raw|-R] + [--layout|-L] dirname|filename ... lfs setstripe [--size|-s stripe_size] [--count|-c stripe_count] [--stripe-index|-i start_ost_index] @@ -45,27 +47,27 @@ lfs setstripe -d dir lfs osts [path] lfs pool_list filesystem[.pool]| pathname lfs quota [-q] [-v] [-h] [-o obd_uuid|-I ost_idx|-i mdt_idx] - [-u username|uid|-g group|gid] /mount_point -lfs quota -t -u|-g /mount_point + [-u username|uid|-g group|gid|-p projid] /mount_point +lfs quota -t -u|-g|-p /mount_point lfs quotacheck [-ug] /mount_point lfs quotachown [-i] /mount_point lfs quotainv [-ug] [-f] /mount_point lfs quotaon [-ugf] /mount_point lfs quotaoff [-ug] /mount_point -lfs setquota {-u|--user|-g|--group} uname|uid|gname|gid +lfs setquota {-u|--user|-g|--group|-p|--project} uname|uid|gname|gid|projid [--block-softlimit block_softlimit] [--block-hardlimit block_hardlimit] [--inode-softlimit inode_softlimit] [--inode-hardlimit inode_hardlimit] /mount_point -lfs setquota -u|--user|-g|--group uname|uid|gname|gid +lfs setquota -u|--user|-g|--group|-p|--project uname|uid|gname|gid|projid [-b block_softlimit] [-B block_hardlimit] [-i inode-softlimit] [-I inode_hardlimit] /mount_point -lfs setquota -t -u|-g [--block-grace block_grace] +lfs setquota -t -u|-g|-p [--block-grace block_grace] [--inode-grace inode_grace] /mount_point -lfs setquota -t -u|-g [-b block_grace] [-i inode_grace] +lfs setquota -t -u|-g|-p [-b block_grace] [-i inode_grace] /mount_point lfs help @@ -170,6 +172,40 @@ lfs help + + data_version [-nrw] + filename + + + + Displays the current version of file data. If + -n is specified, the data version is read + without taking a lock. As a consequence, the data version could + be outdated if there are dirty caches on filesystem clients, but + this option will not force data flushes and has less of an + impact on the filesystem. If -r is specified, + the data version is read after dirty pages on clients are + flushed. If -w is specified, the data version + is read after all caching pages on clients are flushed. + + + Even with -r or -w, race + conditions are possible and the data version should be checked + before and after an operation to be confident the data did not + change during it. + + + The data version is the sum of the last committed transaction + numbers of all data objects of a file. It is used by HSM policy + engines for verifying that file data has not been changed during + an archive operation or before a release operation, and by OST + migration, primarily for verifying that file data has not been + changed during a data copy, when done in non-blocking mode. + + + + + df [-i] [-h] [--pool|-p fsname[. pool] [ @@ -435,10 +471,11 @@ lfs help are returned. If you only want specific striping information, then the options of - --count, - --size, - --index or - --offset plus various combinations of these + --stripe-count, + --stripe-size, + --stripe-index, + --layout, or + --pool plus various combinations of these options can be used to retrieve specific information. If the --raw option is specified, the stripe @@ -447,7 +484,7 @@ lfs help not set, 0, 0, and -1 will be printed for the stripe count, size, and offset respectively. The - -M prints the index of the MDT for a given + --mdt-index prints the index of the MDT for a given directory. See . @@ -730,8 +767,8 @@ lfs help quota [-q] [-v] [-o obd_uuid|-i mdt_idx|-I - ost_idx] [-u|-g - uname|uid|gname|gid] + ost_idx] [-u|-g|-p + uname|uid|gname|gid|projid] /mount_point   @@ -739,11 +776,11 @@ lfs help Displays disk usage and limits, either for the full file system or for objects on a specific OBD. A user or group name - or an ID can be specified. If both user and group are omitted, - quotas for the current UID/GID are shown. The - -q option disables printing of additional - descriptions (including column titles). It fills in blank - spaces in the + or an usr, group and project ID can be specified. If all user, + group project ID are omitted, quotas for the current UID/GID + are shown. The -q option disables printing + of additional descriptions (including column titles). It fills + in blank spaces in the grace column with zeros (when there is no grace period set), to ensure that the number of columns is consistent. The @@ -755,14 +792,15 @@ lfs help quota -t - -u|-g + -u|-g|-p /mount_point Displays block and inode grace times for user ( -u) or group ( - -g) quotas. + -g) or project ( + -p) quotas. @@ -847,9 +885,9 @@ lfs help - setquota -u|-g - - uname|uid|gname|gid}[--block-softlimit + setquota {-u|-g|-p + uname|uid|gname|gid|projid} + [--block-softlimit block_softlimit] [--block-hardlimit block_hardlimit] @@ -861,8 +899,8 @@ lfs help - Sets file system quotas for users or groups. Limits can - be specified with + Sets file system quotas for users, groups or one project. + Limits can be specified with --{block|inode}-{softlimit|hardlimit} or their short equivalents -b, @@ -884,7 +922,7 @@ lfs help - setquota -t -u|-g [--block-grace + setquota -t -u|-g|-p [--block-grace block_grace] [--inode-grace inode_grace] /mount_point @@ -924,8 +962,8 @@ lfs help -
- Examples +
+ Examples Creates a file striped on two OSTs with 128 KB on each stripe. @@ -984,6 +1022,10 @@ $ lfs df --pool $ lfs quota -u bob /mnt/lustre + List quotas of project ID '1'. + +$ lfs quota -p 1 /mnt/lustre + Show grace times for user quotas on /mnt/lustre. @@ -1064,7 +1106,7 @@ $ lfs setstripe --pool my_pool /mnt/lustre/dir
-
+
<indexterm> <primary>lfs_migrate</primary> @@ -1072,50 +1114,54 @@ $ lfs setstripe --pool my_pool /mnt/lustre/dir <literal>lfs_migrate</literal> The - lfs_migrate utility is a simple tool to migrate files - between Lustre OSTs. + lfs_migrate utility is a simple to migrate file + data between OSTs.
Synopsis -lfs_migrate [-c stripecount] [-h] [-l] [-n] [-q] [-R] [-s] [-y] -[file|directory ...] +lfs_migrate [lfs_setstripe_options] + [-h] [-n] [-q] [-R] [-s] [-y] [-0] [file|directory ...]
Description The - lfs_migrate utility is a simple tool to assist - migration of files between Lustre OSTs. The utility copies each specified - file to a new file, verifies the file contents have not changed, and then - renames the new file to the original filename. This allows balanced space - usage between OSTs, moving files off OSTs that are starting to show - hardware problems (though are still functional) or OSTs that will be - discontinued. + lfs_migrate utility is a tool to assist migration + of file data between Lustre OSTs. The utility copies each specified + file to a temporary file using supplied lfs setstripe + options, if any, optionally verifies the file contents have not changed, + and then swaps the layout (OST objects) from the temporary file and the + original file (for Lustre 2.5 and later), or renames the temporary file + to the original filename. This allows the user/administrator to balance + space usage between OSTs, or move files off OSTs that are starting to show + hardware problems (though are still functional) or will be removed. For versions of Lustre before 2.5, - lfs_migrate is not closely integrated with the MDS, - it cannot determine whether a file is currently open and/or in-use by - other applications or nodes. This makes it UNSAFE for use on files that - might be modified by other applications, since the migrated file is - only a copy of the current file. This results in the old file becoming - an open-unlinked file and any modifications to that file are - lost. + lfs_migrate was not integrated with the MDS at all. + That made it UNSAFE for use on files that were being modified by other + applications, since the file was migrated through a copy and rename of + the file. With Lustre 2.5 and later, the new file layout is swapped + with the existing file layout, which ensures that the user-visible + inode number is kept, and open file handles and locks on the file are + kept. Files to be migrated can be specified as command-line arguments. If a directory is specified on the command-line then all files within the directory are migrated. If no files are specified on the command-line, then a list of files is read from the standard input, making lfs_migrate suitable for use with - lfs find to locate files on specific OSTs and/or - matching other file attributes. - The current file allocation policies on the MDS dictate where the - new files are placed, taking into account whether specific OSTs have been - disabled on the MDS via - lctl(preventing new files from being allocated there), - whether some OSTs are overly full (reducing the number of files placed on - those OSTs), or if there is a specific default file striping for the - target directory (potentially changing the stripe count, stripe size, OST - pool, or OST index of a new file). + lfs find to locate files on specific OSTs and/or + matching other file attributes, and other tools that generate a list + of files on standard output. + Unless otherwise specified through command-line options, the + file allocation policies on the MDS dictate where the new files + are placed, taking into account whether specific OSTs have been + disabled on the MDS via lctl (preventing new + files from being allocated there), whether some OSTs are overly full + (reducing the number of files placed on those OSTs), or if there is + a specific default file striping for the parent directory (potentially + changing the stripe count, stripe size, OST pool, or OST index of a + new file). The lfs_migrate utility can also be used in some cases to @@ -1247,21 +1293,31 @@ lfs_migrate [-c stripecount] [-h] [-l] [-n] [-q] [-R] scripts, use with caution). + + + -0 + + Expect NUL-terminated filenames on standard input, as + generated by lfs find -print0 or + find -print0. This allows filenames with + embedded newlines to be handled correctly. + +
Examples - Rebalances all files in - /mnt/lustre/dir. + Rebalance all files in + /mnt/lustre/dir: -$ lfs_migrate /mnt/lustre/file +$ lfs_migrate /mnt/lustre/dir - Migrates files in /test filesystem on OST004 larger than 4 GB in - size. + Migrate files in /test filesystem on OST0004 larger than 4 GB in + size and older than a day old: -$ lfs find /test -obd test-OST004 -size +4G | lfs_migrate -y +$ lfs find /test -obd test-OST0004 -size +4G -mtime +1 | lfs_migrate -y
@@ -1575,7 +1631,7 @@ File size of /mnt/lustre/foo is 1468297786 (1433888 blocks of 1024 bytes) - Enables/disables FID to path translation by + Enables/disables FID to path translation by regular users