[LU-12643] PFL layout don't inherit correctly from default layout. Created: 08/Aug/19  Updated: 28/Dec/19

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.12.0
Fix Version/s: None

Type: Bug Priority: Blocker
Reporter: Alexey Lyashkov Assignee: WC Triage
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Related
is related to LU-11656 "lfs getstripe" on directory does not... Resolved
is related to LU-11739 Don't inherit default layout from roo... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

it looks PFL layout don't inherit correctly.

[root@rhel7-1 utils]# ./lfs getstripe /mnt/lustre
/mnt/lustre
stripe_count:  1 stripe_size:   1048576 pattern:       0 stripe_offset: -1

[root@rhel7-1 utils]# ./lfs setstripe -c -1 -E -1 /mnt/lustre
[root@rhel7-1 utils]# mkdir /mnt/lustre/testdir
[root@rhel7-1 utils]# ./lfs getstripe /mnt/lustre
/mnt/lustre
  lcm_layout_gen:    0
  lcm_mirror_count:  1
  lcm_entry_count:   1
    lcme_id:             N/A
    lcme_mirror_id:      N/A
    lcme_flags:          0
    lcme_extent.e_start: 0
    lcme_extent.e_end:   EOF
      stripe_count:  -1       stripe_size:   1048576       pattern:       raid0       stripe_offset: -1

/mnt/lustre/testdir
stripe_count:  1 stripe_size:   1048576 pattern:       70 stripe_offset: -1

2.12 have same bug, 2.11 inherit this layout correctly.

[root@rhel7-1 utils]# ./lfs setstripe -c -1 -E -1 /mnt/lustre
[root@rhel7-1 utils]# mkdir /mnt/lustre/testdir
[root@rhel7-1 utils]# ./lfs getstripe /mnt/lustre
/mnt/lustre
  lcm_layout_gen:    0
  lcm_mirror_count:  1
  lcm_entry_count:   1
    lcme_id:             N/A
    lcme_mirror_id:      N/A
    lcme_flags:          0
    lcme_extent.e_start: 0
    lcme_extent.e_end:   EOF
      stripe_count:  -1       stripe_size:   1048576       pattern:       raid0       stripe_offset: -1

/mnt/lustre/testdir
  lcm_layout_gen:    0
  lcm_mirror_count:  1
  lcm_entry_count:   1
    lcme_id:             N/A
    lcme_mirror_id:      N/A
    lcme_flags:          0
    lcme_extent.e_start: 0
    lcme_extent.e_end:   EOF
      stripe_count:  -1       stripe_size:   1048576       pattern:       raid0       stripe_offset: -1


 Comments   
Comment by Andreas Dilger [ 09/Aug/19 ]

It seems like this might be a duplicate of LU-11656?

One problem is that "lfs getstripe /mnt/dir/testdir" does not print the layout from the root directory if testdir does not have an explicit copy of the default directory layout, even though files created in that directory will inherit the default layout from the root directory.

The reason that 2.12/master seems broken is that LU-11739 stopped explicitly copying the default layout from the root directory for files created under root. That is an improvement, because if the root directory layout is changed, we don't have to go around and copy the new default layout to hundreds or thousands of existing directories that made an explicit copy.

Comment by Andreas Dilger [ 09/Aug/19 ]

In your above examples, please try creating a file under testdir to see if the layout is properly inherited. Conversely, change the filesystem default layout on the root directory and create a second file. 2.12 should correctly use the new default, while 2.11 will incorrectly use the old default.

The correct solution here is to fix LU-11656, so that "lfs getstripe -d /mnt/lustre/testdir" correctly gets the default layout from the root directory.

Comment by Andreas Dilger [ 28/Dec/19 ]

Shadow, any update on this ticket? The LU-11656 patch has landed, so master should show the proper default layout for subdirectories.

Generated at Sat Feb 10 02:54:23 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.