[LU-3846] Sanity 56u error with two OSTs Created: 28/Aug/13  Updated: 14/Jan/18  Resolved: 14/Jan/18

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.11.0

Type: Bug Priority: Minor
Reporter: Li Xi (Inactive) Assignee: Emoly Liu
Resolution: Fixed Votes: 1
Labels: patch

Issue Links:
Related
is related to LU-3886 sanity test_56a: @@@@@@ FAIL: /usr/bi... Resolved
Severity: 3
Rank (Obsolete): 9961

 Description   

We ran sanity tests with 2 OSTs and got following errors.

== sanity test 56u: check lfs find -stripe-index works == 08:53:30 (1377824010)
sanity test_56u: @@@@@@ FAIL: "lfs find -stripe-index 0 -type f /mnt/lustre/d0.sanity/d56u" wrong: found 16, expected 12

We found that the newly created files located on two OSTs rather than one. This might happen when the default stripe of mount point is two. So I think when creating the file, 'lfs setstripe -i 1' might not be enough, '-c 1' should be added too.

I will push the patch soon.



 Comments   
Comment by Li Xi (Inactive) [ 28/Aug/13 ]

Here is the patch.
http://review.whamcloud.com/7479

Comment by Peter Jones [ 28/Aug/13 ]

Emoly

Could you please take care of this patch?

Thanks

Peter

Comment by Emoly Liu [ 09/Sep/13 ]

Do you mean the default stripe count of mount point is two?

Comment by Li Xi (Inactive) [ 10/Sep/13 ]

Sorry, that is a mistake. I found the default stripe count of mount point is -1, not 2. Here is the stripe informantion after running the test suit. Somehow, the new files were created with 2 stripe_count rather than 1 when the directory stripe count was -1. I thought the new file should have stripe count of 1 as the right behavior, am I wrong?

[root@vm1 ~]# lfs getstripe /mnt/lustre/
/mnt/lustre/
stripe_count: -1 stripe_size: 1048576 stripe_offset: -1
/mnt/lustre//d0.sanity
stripe_count: -1 stripe_size: 1048576 stripe_offset: -1
[root@vm1 ~]# lfs getstripe /mnt/lustre/d0.sanity/
/mnt/lustre/d0.sanity/
stripe_count: -1 stripe_size: 1048576 stripe_offset: -1
/mnt/lustre/d0.sanity//d56u
stripe_count: -1 stripe_size: 1048576 stripe_offset: 0
[root@vm1 ~]# lfs getstripe /mnt/lustre/d0.sanity/d56u/
/mnt/lustre/d0.sanity/d56u/
stripe_count: -1 stripe_size: 1048576 stripe_offset: 0
/mnt/lustre/d0.sanity/d56u//f.sanity.56u.0
lmm_stripe_count: 2
lmm_stripe_size: 1048576
lmm_pattern: 1
lmm_layout_gen: 0
lmm_stripe_offset: 1
obdidx objid objid group
1 15 0xf 0
0 15 0xf 0

/mnt/lustre/d0.sanity/d56u//file2
lmm_stripe_count: 2
lmm_stripe_size: 1048576
lmm_pattern: 1
lmm_layout_gen: 0
lmm_stripe_offset: 0
obdidx objid objid group
0 4 0x4 0
1 4 0x4 0

/mnt/lustre/d0.sanity/d56u//f.sanity.56u.2
lmm_stripe_count: 2
lmm_stripe_size: 1048576
lmm_pattern: 1
lmm_layout_gen: 0
lmm_stripe_offset: 1
obdidx objid objid group
1 17 0x11 0
0 17 0x11 0

/mnt/lustre/d0.sanity/d56u//dir1
stripe_count: -1 stripe_size: 1048576 stripe_offset: 0 pool:
/mnt/lustre/d0.sanity/d56u//dir3
stripe_count: -1 stripe_size: 1048576 stripe_offset: 0 pool:
/mnt/lustre/d0.sanity/d56u//f.sanity.56u.3
lmm_stripe_count: 2
lmm_stripe_size: 1048576
lmm_pattern: 1
lmm_layout_gen: 0
lmm_stripe_offset: 1
obdidx objid objid group
1 18 0x12 0
0 18 0x12 0

/mnt/lustre/d0.sanity/d56u//dir2
stripe_count: -1 stripe_size: 1048576 stripe_offset: 0 pool:
/mnt/lustre/d0.sanity/d56u//file1
lmm_stripe_count: 2
lmm_stripe_size: 1048576
lmm_pattern: 1
lmm_layout_gen: 0
lmm_stripe_offset: 0
obdidx objid objid group
0 3 0x3 0
1 3 0x3 0

/mnt/lustre/d0.sanity/d56u//f.sanity.56u.1
lmm_stripe_count: 2
lmm_stripe_size: 1048576
lmm_pattern: 1
lmm_layout_gen: 0
lmm_stripe_offset: 1
obdidx objid objid group
1 16 0x10 0
0 16 0x10 0

/mnt/lustre/d0.sanity/d56u//file3
lmm_stripe_count: 2
lmm_stripe_size: 1048576
lmm_pattern: 1
lmm_layout_gen: 0
lmm_stripe_offset: 0
obdidx objid objid group
0 5 0x5 0
1 5 0x5 0
[root@vm1 ~]# lfs getstripe /mnt/lustre/d0.sanity/d56u/dir1/
/mnt/lustre/d0.sanity/d56u/dir1/
stripe_count: -1 stripe_size: 1048576 stripe_offset: 0 pool:
/mnt/lustre/d0.sanity/d56u/dir1//file1
lmm_stripe_count: 2
lmm_stripe_size: 1048576
lmm_pattern: 1
lmm_layout_gen: 0
lmm_stripe_offset: 0
obdidx objid objid group
0 6 0x6 0
1 6 0x6 0

/mnt/lustre/d0.sanity/d56u/dir1//file3
lmm_stripe_count: 2
lmm_stripe_size: 1048576
lmm_pattern: 1
lmm_layout_gen: 0
lmm_stripe_offset: 0
obdidx objid objid group
0 8 0x8 0
1 8 0x8 0

/mnt/lustre/d0.sanity/d56u/dir1//file2
lmm_stripe_count: 2
lmm_stripe_size: 1048576
lmm_pattern: 1
lmm_layout_gen: 0
lmm_stripe_offset: 0
obdidx objid objid group
0 7 0x7 0
1 7 0x7 0

[root@vm1 ~]# lfs getstripe /mnt/lustre/d0.sanity/d56u/dir2/
/mnt/lustre/d0.sanity/d56u/dir2/
stripe_count: -1 stripe_size: 1048576 stripe_offset: 0 pool:
/mnt/lustre/d0.sanity/d56u/dir2//file1
lmm_stripe_count: 2
lmm_stripe_size: 1048576
lmm_pattern: 1
lmm_layout_gen: 0
lmm_stripe_offset: 0
obdidx objid objid group
0 9 0x9 0
1 9 0x9 0

/mnt/lustre/d0.sanity/d56u/dir2//file3
lmm_stripe_count: 2
lmm_stripe_size: 1048576
lmm_pattern: 1
lmm_layout_gen: 0
lmm_stripe_offset: 0
obdidx objid objid group
0 11 0xb 0
1 11 0xb 0

/mnt/lustre/d0.sanity/d56u/dir2//file2
lmm_stripe_count: 2
lmm_stripe_size: 1048576
lmm_pattern: 1
lmm_layout_gen: 0
lmm_stripe_offset: 0
obdidx objid objid group
0 10 0xa 0
1 10 0xa 0

[root@vm1 ~]# lfs getstripe /mnt/lustre/d0.sanity/d56u/dir3/
/mnt/lustre/d0.sanity/d56u/dir3/
stripe_count: -1 stripe_size: 1048576 stripe_offset: 0 pool:
/mnt/lustre/d0.sanity/d56u/dir3//file1
lmm_stripe_count: 2
lmm_stripe_size: 1048576
lmm_pattern: 1
lmm_layout_gen: 0
lmm_stripe_offset: 0
obdidx objid objid group
0 12 0xc 0
1 12 0xc 0

/mnt/lustre/d0.sanity/d56u/dir3//file3
lmm_stripe_count: 2
lmm_stripe_size: 1048576
lmm_pattern: 1
lmm_layout_gen: 0
lmm_stripe_offset: 0
obdidx objid objid group
0 14 0xe 0
1 14 0xe 0

/mnt/lustre/d0.sanity/d56u/dir3//file2
lmm_stripe_count: 2
lmm_stripe_size: 1048576
lmm_pattern: 1
lmm_layout_gen: 0
lmm_stripe_offset: 0
obdidx objid objid group
0 13 0xd 0
1 13 0xd 0

Comment by Emoly Liu [ 10/Sep/13 ]

stripe_count=-1 means full striping, I guess your system has 2 OSTs, lmm_string_count of your new created files is 2.

In lustre, the default stripe count should be 1, if you run "setstripe -d" you will see like this:

[root@centos6-3 master]# ./lustre/utils/lfs getstripe -v /mnt/lustre/d
(Default) /mnt/lustre/d
stripe_count:   1 stripe_size:    1048576 stripe_offset:  -1  

There is a keyword "Default". That is why I suggested to add "setstripe -d" in your patch.

Comment by Gerrit Updater [ 14/Jan/18 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/7479/
Subject: LU-3846 test: Fix sanity test_56* with different layouts
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 8f39c90355f4d60698b4b59d7a49aa1a714282ac

Comment by Peter Jones [ 14/Jan/18 ]

Landed for 2.11

Generated at Sat Feb 10 01:37:25 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.