From: Lei Feng Date: Fri, 18 Feb 2022 08:11:15 +0000 (+0800) Subject: LUDOC-501 manual: add max_stripecount and max_mdt_stripecount X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F48%2F46548%2F9;p=doc%2Fmanual.git LUDOC-501 manual: add max_stripecount and max_mdt_stripecount Add the description of max_stripecount and max_mdt_stripecount. Add the description of max-inherit and its default values. Change-Id: I8a00f66eaa755eeeb270547f2d5da610aecd8590 Signed-off-by: Lei Feng Reviewed-on: https://review.whamcloud.com/46548 Reviewed-by: Andreas Dilger Tested-by: jenkins --- diff --git a/LustreOperations.xml b/LustreOperations.xml index 1a84156..af47a65 100644 --- a/LustreOperations.xml +++ b/LustreOperations.xml @@ -538,6 +538,35 @@ client# lfs mkdir -c Otherwise, create more subdirectories on MDTs with more free inodes/blocks. + Sometime there are many MDTs. But it is not always desirable to + stripe a directory across all MDTs, even if the directory default + stripe_count=-1 (unlimited). + In this case, the per-filesystem tunable parameter + lod.*.max_mdt_stripecount can be used to limit the + actual stripe count of directory to fewer than the full MDT count. + If lod.*.max_mdt_stripecount is not 0, and the + directory stripe_count=-1, the real directory + stripe count will be the minimum of the number of MDTs and + max_mdt_stripecount. + If lod.*.max_mdt_stripecount=0, or an explicit + stripe count is given for the directory, it is ignored. + + To set max_mdt_stripecount, on all MDSes of + file system, run: + +mgs# lctl set_param -P lod.$fsname-MDTxxxx-mdtlov.max_mdt_stripecount=<N> + + + To check max_mdt_stripecount, run: + +mds# lctl get_param lod.$fsname-MDTxxxx-mdtlov.max_mdt_stripecount + + + To reset max_mdt_stripecount, run: + +mgs# lctl set_param -P -d lod.$fsname-MDTxxxx-mdtlov.max_mdt_stripecount + +
Filesystem-wide default directory striping @@ -570,6 +599,48 @@ client# lfs mkdir -c
+
+ + <indexterm> + <primary>operations</primary> + <secondary>default dir stripe policy</secondary> + </indexterm>Default Dir Stripe Policy + If default dir stripe policy is set to a directory, it will be + applied to sub directories created later. For example: + +$ mkdir testdir1 +$ lfs setdirstripe testdir1 -D -c 2 +$ lfs getdirstripe testdir1 -D +lmv_stripe_count: 2 lmv_stripe_offset: -1 lmv_hash_type: none lmv_max_inherit: 3 lmv_max_inherit_rr: 0 +$ mkdir dir1/subdir1 +$ lfs getdirstripe testdir1/subdir1 +lmv_stripe_count: 2 lmv_stripe_offset: 0 lmv_hash_type: crush +mdtidx FID[seq:oid:ver] + 0 [0x200000400:0x2:0x0] + 1 [0x240000401:0x2:0x0] + + Default dir stripe can be inherited by sub directory. + This behavior is controlled by lmv_max_inherit + parameter. If lmv_max_inherit is 0 or 1, sub + directory stops to inherit default dir stripe policy. + Or sub directory decreases its parent's + lmv_max_inherit and uses it as its own + lmv_max_inherit. + -1 is special because it means unlimited. For example: + +$ lfs getdirstripe testdir1/subdir1 -D +lmv_stripe_count: 2 lmv_stripe_offset: -1 lmv_hash_type: none lmv_max_inherit: 2 lmv_max_inherit_rr: 0 + + + lmv_max_inherit can be set explicitly with + --max-inherit option in + lfs setdirstripe -D command. + If the max-inherit value is not specified, the default value is -1 + when stripe_count is 0 or 1. + For other values of stripe_count, the default value + is 3. + +
<indexterm> diff --git a/ManagingStripingFreeSpace.xml b/ManagingStripingFreeSpace.xml index d213d1a..a029799 100644 --- a/ManagingStripingFreeSpace.xml +++ b/ManagingStripingFreeSpace.xml @@ -316,6 +316,40 @@ obdidx objid objid group <section remap="h3"> <title><indexterm> <primary>striping</primary> + <secondary>stripe count limit</secondary> + </indexterm>Per File System Stripe Count Limit + Sometime there are many OSTs in a filesystem, but it is not always + desirable to stripe file to across all OSTs, even if the given + stripe_count=-1 (unlimited). + In this case, the per-filesystem tunable parameter + lod.*.max_stripecount can be used to limit the real + stripe count of file to a lower number than the OST count. + If lod.*.max_stripecount is not 0, and the file + stripe_count=-1, the real stripe count will be + the minimum of the OST count and max_stripecount. If + lod.*.max_stripecount=0, or an explicit stripe count + is given for the file, it is ignored. + To set max_stripecount, on all MDSes of + file system, run: + +mgs# lctl set_param -P lod.$fsname-MDTxxxx-mdtlov.max_stripecount=<N> + + + To check max_stripecount, run: + +mds# lctl get_param lod.$fsname-MDTxxxx-mdtlov.max_stripecount + + + To reset max_stripecount, run: + +mgs# lctl set_param -P -d lod.$fsname-MDTxxxx-mdtlov.max_stripecount + + +
+ +
+ <indexterm> + <primary>striping</primary> <secondary>on specific OST</secondary> </indexterm>Creating a File on a Specific OST You can use lfs setstripe to create a file on a specific OST. In the