From 1b7495a49d51d5dd7d3fd0cb39c303a0546a0632 Mon Sep 17 00:00:00 2001 From: Joseph Gmitter Date: Fri, 9 Sep 2016 12:16:09 -0400 Subject: [PATCH] LUDOC-22 fix: lfs getstripe option and example fixes This patch corrects the documentation of the lfs getstripe options that have been depricated: --count => --stripe-count --index => --stripe-index --size => --stripe-size --offset => removed, deprecated by stripe-index The following options were added:: --mdt-index (previously only -M was documented) --layout (previously missing) A few example output areas were also updated to reflect the current output from the command. Signed-off-by: Joseph Gmitter Change-Id: Id1875afc7a724a8f495018cb9ddea215e94b8954 Reviewed-on: http://review.whamcloud.com/22408 Tested-by: Jenkins Reviewed-by: Andreas Dilger --- LustreDebugging.xml | 27 ++++++++++++++++----------- LustreMaintenance.xml | 3 ++- ManagingFileSystemIO.xml | 2 +- ManagingStripingFreeSpace.xml | 23 ++++++++++++++++------- UserUtilities.xml | 18 ++++++++++-------- 5 files changed, 45 insertions(+), 28 deletions(-) diff --git a/LustreDebugging.xml b/LustreDebugging.xml index 32fd72b..fcd030d 100644 --- a/LustreDebugging.xml +++ b/LustreDebugging.xml @@ -646,24 +646,29 @@ Debug log: 324 lines, 258 kept, 66 dropped. attributes for a new file or directory. The lfs getstripe command takes a Lustre filename as input and lists all the objects that form a part of this file. To obtain this information for the file - /mnt/lustre/frog in a Lustre file system, run: - $ lfs getstripe /mnt/lustre/frog + /mnt/testfs/frog in a Lustre file system, run: + $ lfs getstripe /mnt/testfs/frog lmm_stripe_count: 2 lmm_stripe_size: 1048576 +lmm_pattern: 1 +lmm_layout_gen: 0 lmm_stripe_offset: 2 obdidx objid objid group 2 818855 0xc7ea7 0 0 873123 0xd52a3 0 - The debugfs tool is provided in the e2fsprogs - package. It can be used for interactive debugging of an ldiskfs file - system. The debugfs tool can either be used to check status or modify - information in the file system. In a Lustre file system, all objects that belong to a file - are stored in an underlying ldiskfs file system on the OSTs. The file - system uses the object IDs as the file names. Once the object IDs are known, use the - debugfs tool to obtain the attributes of all objects from different - OSTs. - A sample run for the /mnt/lustre/frog file used in the above example is shown here: + The debugfs tool is provided in the + e2fsprogs package. It can be used for interactive + debugging of an ldiskfs file system. The + debugfs tool can either be used to check status or + modify information in the file system. In a Lustre file system, all + objects that belong to a file are stored in an underlying + ldiskfs file system on the OSTs. The file system + uses the object IDs as the file names. Once the object IDs are known, + use the debugfs tool to obtain the attributes of + all objects from different OSTs. + A sample run for the /mnt/testfs/frog file used + in the above example is shown here: $ debugfs -c -R "stat O/0/d$((818855 % 32))/818855" /dev/vgmyth/lvmythost2 debugfs 1.41.90.wc3 (28-May-2011) diff --git a/LustreMaintenance.xml b/LustreMaintenance.xml index 99372b9..cdad1b6 100644 --- a/LustreMaintenance.xml +++ b/LustreMaintenance.xml @@ -391,7 +391,8 @@ client$ mkdir /mnt/lustre/local_dir0 client$ lfs getstripe -M /mnt/lustre/local_dir0 0 - The getstripe -M parameters return the index of the MDT that is serving the given directory. + The getstripe [--mdt-index|-M] parameters return + the index of the MDT that is serving the given directory.
diff --git a/ManagingFileSystemIO.xml b/ManagingFileSystemIO.xml index b3439e8..6318d99 100644 --- a/ManagingFileSystemIO.xml +++ b/ManagingFileSystemIO.xml @@ -185,7 +185,7 @@ $ for i in $(seq 3); do lfs getstripe -M ./testremote/${i}.txt; done <lineannota <orderedlist> <listitem> <para>Identify the file(s) to be moved.</para> - <para>In the example below, output from the + <para>In the example below, the object information portion of the output from the <literal>lfs getstripe</literal> command below shows that the <literal>test_2</literal>file is located entirely on OST0002:</para> <screen> diff --git a/ManagingStripingFreeSpace.xml b/ManagingStripingFreeSpace.xml index 023f871..c07c82e 100644 --- a/ManagingStripingFreeSpace.xml +++ b/ManagingStripingFreeSpace.xml @@ -223,11 +223,13 @@ <para>The command to create a new file with a specified stripe size is similar to:</para> <screen>[client]# lfs setstripe -s 4M /mnt/lustre/new_file</screen> <para>This example command creates the new file <literal>/mnt/lustre/new_file</literal> with a stripe size of 4 MB.</para> - <para>Now, when a file is created, the new stripe setting evenly distributes the data over all the available OSTs:</para> + <para>Now, when the file is created, the new stripe setting creates the file on a single OST with a stripe size of 4M:</para> <screen> [client]# lfs getstripe /mnt/lustre/new_file /mnt/lustre/4mb_file lmm_stripe_count: 1 lmm_stripe_size: 4194304 +lmm_pattern: 1 +lmm_layout_gen: 0 lmm_stripe_offset: 1 obdidx objid objid group 1 690550 0xa8976 0 </screen> @@ -299,9 +301,10 @@ $ dd if=/dev/zero of=file1 count=1 bs=100M $ lfs getstripe file1 /mnt/testfs/file1 -/mnt/testfs/file1 lmm_stripe_count: 1 lmm_stripe_size: 1048576 +lmm_pattern: 1 +lmm_layout_gen: 0 lmm_stripe_offset: 0 obdidx objid objid group 0 37364 0x91f4 0</screen> @@ -328,6 +331,11 @@ lmm_stripe_offset: 0 <para>To view information for a file, enter a command similar to:</para> <screen>$ lfs getstripe /mnt/lustre/foo /mnt/lustre/foo +lmm_stripe_count: 1 +lmm_stripe_size: 1048576 +lmm_pattern: 1 +lmm_layout_gen: 0 +lmm_stripe_offset: 0 obdidx objid objid group 2 835487 m0xcbf9f 0 </screen> <para>In this example, the file is located on <literal>obdidx 2</literal>, which corresponds @@ -345,11 +353,12 @@ osc.lustre-OST0002-osc.ost_conn_uuid=192.168.20.1@tcp</screen></para> <primary>striping</primary> <secondary>remote directories</secondary> </indexterm>Locating the MDT for a remote directory - Lustre software release 2.4 can be configured with multiple MDTs in the - same file system. Each sub-directory can have a different MDT. To identify on which MDT a - given subdirectory is located, pass the getstripe -M parameters to - lfs. An example of this command is provided in the section . + Lustre software release 2.4 can be configured with + multiple MDTs in the same file system. Each sub-directory can have a + different MDT. To identify on which MDT a given subdirectory is + located, pass the getstripe [--mdt-index|-M] + parameters to lfs. An example of this command is + provided in the section .
diff --git a/UserUtilities.xml b/UserUtilities.xml index 976dbaa..8a2a2a3 100644 --- a/UserUtilities.xml +++ b/UserUtilities.xml @@ -32,9 +32,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] @@ -435,10 +436,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 +449,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 . -- 1.8.3.1