From 5081cd6c388cb534fe39d99230275389d83a0a33 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Sun, 14 Oct 2018 13:24:44 -0600 Subject: [PATCH] LUDOC-11 lfs: use a more realistic PFL layout Don't use an example for "lfs setstripe" that explicitly sets an index of 0, since this will cause an imbalance in the OST usage, and is not a good example for users to follow. Create the PFL layout with a more typical configuration. Signed-off-by: Andreas Dilger Change-Id: Ic7ca6d1b25760d1292c7ac2cfb3c11497c2efa52 Reviewed-on: https://review.whamcloud.com/33367 Tested-by: Jenkins Reviewed-by: Joseph Gmitter --- ManagingStripingFreeSpace.xml | 82 +++++++++++++++++++++++++------------------ 1 file changed, 48 insertions(+), 34 deletions(-) diff --git a/ManagingStripingFreeSpace.xml b/ManagingStripingFreeSpace.xml index 68f88db..c94c020 100644 --- a/ManagingStripingFreeSpace.xml +++ b/ManagingStripingFreeSpace.xml @@ -736,71 +736,84 @@ error: setstripe: delete component of file '/mnt/testfs/del_comp' failed: Invali [--component-end|-E end1] [STRIPE_OPTIONS] [--component-end|-E end2] [STRIPE_OPTIONS] ... dirname Example - $ mkdir /mnt/testfs/pfldir -$ touch /mnt/testfs/pfldir/commonfile -$ lfs setstripe -E 64M -c 2 -i 0 -E -1 -c 4 -i 0 /mnt/testfs/pfldir + +$ mkdir /mnt/testfs/pfldir +$ lfs setstripe -E 256M -c 1 -E 16G -c 4 -E -1 -S 4M -c -1 /mnt/testfs/pfldir + When you run lfs getstripe, you will see: - $ lfs getstripe /mnt/testfs/pfldir + +$ lfs getstripe /mnt/testfs/pfldir /mnt/testfs/pfldir lcm_layout_gen: 0 - lcm_entry_count: 2 + lcm_entry_count: 3 lcme_id: N/A lcme_flags: 0 lcme_extent.e_start: 0 - lcme_extent.e_end: 67108864 - stripe_count: 2 stripe_size: 1048576 stripe_offset: 0 + lcme_extent.e_end: 268435456 + stripe_count: 1 stripe_size: 1048576 stripe_offset: -1 lcme_id: N/A lcme_flags: 0 - lcme_extent.e_start: 67108864 + lcme_extent.e_start: 268435456 + lcme_extent.e_end: 17179869184 + stripe_count: 4 stripe_size: 1048576 stripe_offset: -1 + lcme_id: N/A + lcme_flags: 0 + lcme_extent.e_start: 17179869184 lcme_extent.e_end: EOF - stripe_count: 4 stripe_size: 1048576 stripe_offset: 0 -/mnt/testfs/pfldir/commonfile -lmm_stripe_count: 1 -lmm_stripe_size: 1048576 -lmm_pattern: 1 -lmm_layout_gen: 0 -lmm_stripe_offset: 0 - obdidx objid objid group - 0 9 0x9 0 + stripe_count: -1 stripe_size: 4194304 stripe_offset: -1 + If you create a file under /mnt/testfs/pfldir, - the layout of that file will inherit 2 components from its parent + the layout of that file will inherit the layout from its parent directory: - $ touch /mnt/testfs/pfldir/pflfile + +$ touch /mnt/testfs/pfldir/pflfile $ lfs getstripe /mnt/testfs/pfldir/pflfile /mnt/testfs/pfldir/pflfile lcm_layout_gen: 2 - lcm_entry_count: 2 + lcm_entry_count: 3 lcme_id: 1 lcme_flags: init lcme_extent.e_start: 0 - lcme_extent.e_end: 67108864 - lmm_stripe_count: 2 + lcme_extent.e_end: 268435456 + lmm_stripe_count: 1 lmm_stripe_size: 1048576 - lmm_pattern: 1 + lmm_pattern: raid0 lmm_layout_gen: 0 - lmm_stripe_offset: 0 + lmm_stripe_offset: 1 lmm_objects: - - 0: { l_ost_idx: 0, l_fid: [0x100000000:0xa:0x0] } - - 1: { l_ost_idx: 1, l_fid: [0x100010000:0x9:0x0] } + - 0: { l_ost_idx: 1, l_fid: [0x100010000:0xa:0x0] } lcme_id: 2 lcme_flags: 0 - lcme_extent.e_start: 67108864 - lcme_extent.e_end: EOF + lcme_extent.e_start: 268435456 + lcme_extent.e_end: 17179869184 lmm_stripe_count: 4 lmm_stripe_size: 1048576 - lmm_pattern: 1 + lmm_pattern: raid0 lmm_layout_gen: 0 - lmm_stripe_offset: 0 + lmm_stripe_offset: -1 + + lcme_id: 3 + lcme_flags: 0 + lcme_extent.e_start: 17179869184 + lcme_extent.e_end: EOF + lmm_stripe_count: -1 + lmm_stripe_size: 4194304 + lmm_pattern: raid0 + lmm_layout_gen: 0 + lmm_stripe_offset: -1 + lfs setstripe --component-add/del can't be run on a directory, because default layout in directory is likea config, which can be arbitrarily changed by lfs setstripe, while layout in file may have data (OST objects) attached. If you want - to delete default layout in a directory, please run lfs - setstripe -d dirname, like : - $ lfs setstripe -d /mnt/testfs/pfldir + to delete default layout in a directory, run + lfs setstripe -d dirname + to return the directory to the filesystem-wide defaults, like: + +$ lfs setstripe -d /mnt/testfs/pfldir $ lfs getstripe -d /mnt/testfs/pfldir /mnt/testfs/pfldir stripe_count: 1 stripe_size: 1048576 stripe_offset: -1 @@ -811,7 +824,8 @@ lmm_pattern: 1 lmm_layout_gen: 0 lmm_stripe_offset: 0 obdidx objid objid group - 0 9 0x9 0 + 2 9 0x9 0 + -- 1.8.3.1