Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
3
-
9223372036854775807
Description
The following scenario is possible:
[root@client client]# lfs setstripe -E100M -c1 -p flash -E-1 -p not_a_pool test [root@client client]# lfs getstripe test test lcm_layout_gen: 2 lcm_mirror_count: 1 lcm_entry_count: 2 lcme_id: 1 lcme_mirror_id: 0 lcme_flags: init lcme_extent.e_start: 0 lcme_extent.e_end: 104857600 lmm_stripe_count: 1 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 0 lmm_stripe_offset: 1 lmm_pool: flash lmm_objects: - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x83:0x0] } lcme_id: 2 lcme_mirror_id: 0 lcme_flags: 0 lcme_extent.e_start: 104857600 lcme_extent.e_end: EOF lmm_stripe_count: 1 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 0 lmm_stripe_offset: -1 lmm_pool: not_a_pool
"lfs" should check if the specified pool "not_a_pool" exists before generate and write the layout (trusted.lov) on the filesystem.
The issue does not exist with plain layout:
[root@client client]# lfs setstripe -c-1 -p not_a_pool test
lfs setstripe: pool 'lustrefs.not_a_pool' does not exist: Invalid argument (22)
Attachments
Issue Links
- is related to
-
LU-11264 llapi_* routines demonstrate poor performance
-
- Open
-
Activity
Assignee | Original: WC Triage [ wc-triage ] | New: Etienne Aujames [ eaujames ] |
Description |
Original:
The following scenario is possible:
{code:java} [root@client client]# lfs setstripe -E100M -c1 -p flash -E-1 -p not_a_pool test [root@client client]# lfs getstripe test test lcm_layout_gen: 2 lcm_mirror_count: 1 lcm_entry_count: 2 lcme_id: 1 lcme_mirror_id: 0 lcme_flags: init lcme_extent.e_start: 0 lcme_extent.e_end: 104857600 lmm_stripe_count: 1 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 0 lmm_stripe_offset: 1 lmm_pool: flash lmm_objects: - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x83:0x0] } lcme_id: 2 lcme_mirror_id: 0 lcme_flags: 0 lcme_extent.e_start: 104857600 lcme_extent.e_end: EOF lmm_stripe_count: 1 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 0 lmm_stripe_offset: -1 lmm_pool: not_a_pool {code} "lfs" should check if the specified pool "not_a_pool" exist before generate and write the layout (trusted.lov) on the filesystem. The issue does not exist with plain layout: {code:java} [root@client client]# lfs setstripe -c-1 -p not_a_pool test lfs setstripe: pool 'lustrefs.not_a_pool' does not exist: Invalid argument (22) {code} |
New:
The following scenario is possible:
{code:java} [root@client client]# lfs setstripe -E100M -c1 -p flash -E-1 -p not_a_pool test [root@client client]# lfs getstripe test test lcm_layout_gen: 2 lcm_mirror_count: 1 lcm_entry_count: 2 lcme_id: 1 lcme_mirror_id: 0 lcme_flags: init lcme_extent.e_start: 0 lcme_extent.e_end: 104857600 lmm_stripe_count: 1 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 0 lmm_stripe_offset: 1 lmm_pool: flash lmm_objects: - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x83:0x0] } lcme_id: 2 lcme_mirror_id: 0 lcme_flags: 0 lcme_extent.e_start: 104857600 lcme_extent.e_end: EOF lmm_stripe_count: 1 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 0 lmm_stripe_offset: -1 lmm_pool: not_a_pool {code} "lfs" should check if the specified pool "not_a_pool" exists before generate and write the layout (trusted.lov) on the filesystem. The issue does not exist with plain layout: {code:java} [root@client client]# lfs setstripe -c-1 -p not_a_pool test lfs setstripe: pool 'lustrefs.not_a_pool' does not exist: Invalid argument (22) {code} |
Description |
Original:
The following scenario is possible:
{code:java} [root@client client]# lfs setstripe -E100M -c1 -p flash -E-1 -p not_a_pool test [root@client client]# lfs getstripe test test lcm_layout_gen: 2 lcm_mirror_count: 1 lcm_entry_count: 2 lcme_id: 1 lcme_mirror_id: 0 lcme_flags: init lcme_extent.e_start: 0 lcme_extent.e_end: 104857600 lmm_stripe_count: 1 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 0 lmm_stripe_offset: 1 lmm_pool: flash lmm_objects: - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x83:0x0] } lcme_id: 2 lcme_mirror_id: 0 lcme_flags: 0 lcme_extent.e_start: 104857600 lcme_extent.e_end: EOF lmm_stripe_count: 1 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 0 lmm_stripe_offset: -1 lmm_pool: not_a_pool {code} "lfs" should check if the specified pool "not_a_pool" exist before generate and write the layout (trusted.lov) on the filesystem. The issue does not exist with plain layout: {code:java} // code placeholder {code} |
New:
The following scenario is possible:
{code:java} [root@client client]# lfs setstripe -E100M -c1 -p flash -E-1 -p not_a_pool test [root@client client]# lfs getstripe test test lcm_layout_gen: 2 lcm_mirror_count: 1 lcm_entry_count: 2 lcme_id: 1 lcme_mirror_id: 0 lcme_flags: init lcme_extent.e_start: 0 lcme_extent.e_end: 104857600 lmm_stripe_count: 1 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 0 lmm_stripe_offset: 1 lmm_pool: flash lmm_objects: - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x83:0x0] } lcme_id: 2 lcme_mirror_id: 0 lcme_flags: 0 lcme_extent.e_start: 104857600 lcme_extent.e_end: EOF lmm_stripe_count: 1 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 0 lmm_stripe_offset: -1 lmm_pool: not_a_pool {code} "lfs" should check if the specified pool "not_a_pool" exist before generate and write the layout (trusted.lov) on the filesystem. The issue does not exist with plain layout: {code:java} [root@client client]# lfs setstripe -c-1 -p not_a_pool test lfs setstripe: pool 'lustrefs.not_a_pool' does not exist: Invalid argument (22) {code} |
Description |
New:
The following scenario is possible:
{code:java} [root@client client]# lfs setstripe -E100M -c1 -p flash -E-1 -p not_a_pool test [root@client client]# lfs getstripe test test lcm_layout_gen: 2 lcm_mirror_count: 1 lcm_entry_count: 2 lcme_id: 1 lcme_mirror_id: 0 lcme_flags: init lcme_extent.e_start: 0 lcme_extent.e_end: 104857600 lmm_stripe_count: 1 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 0 lmm_stripe_offset: 1 lmm_pool: flash lmm_objects: - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x83:0x0] } lcme_id: 2 lcme_mirror_id: 0 lcme_flags: 0 lcme_extent.e_start: 104857600 lcme_extent.e_end: EOF lmm_stripe_count: 1 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 0 lmm_stripe_offset: -1 lmm_pool: not_a_pool {code} "lfs" should check if the specified pool "not_a_pool" exist before generate and write the layout (trusted.lov) on the filesystem. The issue does not exist with plain layout: {code:java} // code placeholder {code} |
Summary | Original: "lfs setstripe/migrate" should check if pool exist for PFL components | New: "lfs setstripe/migrate" should check if pool exists for PFL components |
Note that there have been complains like LU-11264 that the setstripe code is already too heavy with checks. I pushed patch https://review.whamcloud.com/35028 "LU-11264 llapi: avoid pool verification overhead" to reduce the overhead of checking the pools for each file, but didn't have time to finish it off.
It would be best to start with updating that patch (maybe split into 2-3 smaller patches to separate the different changes) to reduce the overhead of checking pool validity before adding even more checks to setstripe.
Note that Lustre itself doesn't care if the pool is wrong or missing. This can still happen even if setstripe validates the input, if the pool is deleted afterward. It will allocate as if no pool is specified in that case.