From: Bruno Faccini Date: Tue, 4 Feb 2020 09:45:04 +0000 (+0100) Subject: LUDOC-465 foreign: Add foreign LOV/LMV documentation X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=3133718080b31b96a88ac905b46c1632a28252cb;p=doc%2Fmanual.git LUDOC-465 foreign: Add foreign LOV/LMV documentation Description of and usage information for the foreign LOV/LMV format that has been introduced by patches for LU-11376. Signed-off-by: Bruno Faccini Change-Id: Icf171598c52e49f2b5611c1861498baf8ec50aa6 Reviewed-on: https://review.whamcloud.com/37425 Tested-by: jenkins Reviewed-by: Andreas Dilger Reviewed-by: Wang Shilong --- diff --git a/ManagingStripingFreeSpace.xml b/ManagingStripingFreeSpace.xml index 1a03083..0bcff3e 100644 --- a/ManagingStripingFreeSpace.xml +++ b/ManagingStripingFreeSpace.xml @@ -1848,6 +1848,117 @@ STRIPE OPTIONS: /mnt/lustre/file + +
+ + <indexterm><primary>striping</primary><secondary>Foreign</secondary> + </indexterm>Foreign Layout + The Lustre Foreign Layout feature is an extension of both the + LOV and LMV formats which allows the creation of empty files and directories + with the necessary specifications to point to corresponding objects outside + from Lustre namespace. + The new LOV/LMV foreign internal format can be represented as: +
+ LOV/LMV foreign format + + + + + + LOV/LMV foreign format + + +
+
+ <literal>lfs set[dir]stripe</literal> + The lfs set[dir]stripe commands are used to + create files or directories with foreign layouts, by calling the + corresponding API, itself invoking the appropriate ioctl(). +
+ Create a Foreign file/dir + Command + lfs set[dir]stripe \ +--foreign[=<foreign_type>] --xattr|-x <layout_string> \ +[--flags <hex_bitmask>] [--mode <mode_bits>] \ +{file,dir}name + Both the --foreign and + --xattr|-x options are mandatory. + The <foreign_type> (default is "none", meaning + no special behavior), and both --flags and + --mode (default is O666) options are optional. + Example + The following command creates a foreign file of "none" type and + with "foo@bar" LOV content and specific mode and flags: + # lfs setstripe --foreign=none --flags=0xda08 --mode=0640 \ +--xattr=foo@bar /mnt/lustre/file +
+ Example: create a foreign file + + + + + + Example: create a foreign file + + +
+
+
+
+
+ <literal>lfs get[dir]stripe</literal> + lfs get[dir]stripe commands can be used to + retrieve foreign LOV/LMV informations and content. + Command + lfs get[dir]stripe [-v] filename + List foreign layout information + + Suppose we already have a foreign file + /mnt/lustre/file, created by the following command: + # lfs setstripe --foreign=none --flags=0xda08 --mode=0640 \ +--xattr=foo@bar /mnt/lustre/file + The full foreign layout informations can be listed using the + following command: + # lfs getstripe -v /mnt/lustre/file +/mnt/lustre/file + lfm_magic: 0x0BD70BD0 + lfm_length: 7 + lfm_type: none + lfm_flags: 0x0000DA08 + lfm_value: foo@bar + + As you can see the lfm_length field + value is the characters number in the variable length + lfm_value field. +
+
+ <literal>lfs find</literal> + lfs find commands can be used to search for + all the foreign files/directories or those that match the given + selection paremeters. + lfs find +[[!] --foreign[=<foreign_type>] + The --foreign[=<foreign_type>] option + has been added to specify that all [!,but not] files and/or directories + with a foreign layout [and [!,but not] of + <foreign_type>] will be retrieved. + Example + # lfs setstripe --foreign=none --xattr=foo@bar /mnt/lustre/file +# touch /mnt/lustre/file2 + +# lfs find --foreign /mnt/lustre/* +/mnt/lustre/file + +# lfs find ! --foreign /mnt/lustre/* +/mnt/lustre/file2 + +# lfs find --foreign=none /mnt/lustre/* +/mnt/lustre/file +
+
+
<indexterm> <primary>space</primary> diff --git a/figures/Foreign_Createfile.png b/figures/Foreign_Createfile.png new file mode 100644 index 0000000..35ea037 Binary files /dev/null and b/figures/Foreign_Createfile.png differ diff --git a/figures/Foreign_Format.png b/figures/Foreign_Format.png new file mode 100644 index 0000000..fe6c25b Binary files /dev/null and b/figures/Foreign_Format.png differ