[LU-11760] formatted OST recognition change Created: 11/Dec/18 Updated: 12/Sep/19 Resolved: 21/Aug/19 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.13.0, Lustre 2.12.3 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Sergey Cheremencev | Assignee: | Sergey Cheremencev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | patch | ||
| Issue Links: |
|
||||||||||||
| Severity: | 3 | ||||||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||||||
| Description |
|
We faced multiple missing OST objects mdtest job failure during failover/failback test(stripe count 2). V-1: Entering unique_dir_access... V-1: Entering mdtest_stat... 08/14/2018 21:46:25: Process 25(nid00016): FAILED in mdtest_stat, unable to stat file: No such file or directory 08/14/2018 21:46:25: Process 30(nid00045): FAILED in mdtest_stat, unable to stat file: No such file or directory Failure occurred because of absent the range of objects on one of the OSTs. The marker of the failure could be the following message after recovery on OST: Aug 14 21:46:07 snx11205n004 kernel: format at ofd_dev.c:1713:ofd_create_hdl doesn't end in newline |
| Comments |
| Comment by Sergey Cheremencev [ 11/Dec/18 ] |
|
The reason of failures is uncommitted journal transaction. /* This can happen if a new OST is formatted and installed
* in place of an old one at the same index. Instead of
* precreating potentially millions of deleted old objects
* (possibly filling the OST), only precreate the last batch.
* LFSCK will eventually clean up any orphans. LU-14 */
if (diff > 5 * OST_MAX_PRECREATE) {
diff = OST_MAX_PRECREATE / 2;
LCONSOLE_WARN("%s: Too many FIDs to precreate "
"OST replaced or reformatted: "
"LFSCK will clean up",
ofd_name(ofd));
In such case It decides OST is formatted and recreates only last 10 000. For us it means we can have huge gaps in OST objects. |
| Comment by Gerrit Updater [ 11/Dec/18 ] |
|
Sergey Cheremencev (c17829@cray.com) uploaded a new patch: https://review.whamcloud.com/33833 |
| Comment by Gerrit Updater [ 25/May/19 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33833/ |
| Comment by Peter Jones [ 25/May/19 ] |
|
Landed for 2.13 |
| Comment by Andreas Dilger [ 27/Jun/19 ] |
|
I think that this is not a full solution to the problem, and is causing a lot of test failures for conf-sanity test_69 for OSTs that do not have 500k free inodes. I think there are two problems with the patch that was landed:
I don't mind to have a change that is increasing the maximum number of objects created per commit, but this needs to be negotiated between the MDS and OSS at connect time, with a new OBD_CONNECT2_MAX_PRECREATE flag and an ocd_max_precreate field (probably using __u32 padding1) that passes the current OST_MAX_PRECREATE value, and use OST_MAX_PRECREATE_OLD = 20000 if the feature is not available. This also allows fixing the problem properly in older releases. Until this is fixed (and even afterward), the proper solution is to track on the OST how many objects have been created by each MDT/sequence within the current transaction (use a commit callback to reset the "created this transaction" counter to zero), and force a sync journal commit during precreate if the number exceeds OST_MAX_PRECREATE. If there are multiple MDTs creating, or the create rate is not too large, or if the clients do some IO and force a transaction commit anyway, then there is no need for a commit. This also avoids the future bug when 500k+ precreates can happen within a single commit, since we are already over 150k/s creates on the MDS, and that is processing separate RPCs while the OST is in a fast local loop precreating objects. I was going to say that the if (diff > 500000) check in ofd_create_hdl() could be modified to also check if LAST_ID < 5 or similar, to detect if this is a newly-formatted filesystem, but I realize that this case may also happen if e.g. the OST is restored from a backup or a snapshot and has an old LAST_ID but is not new. It would be useful to update the comment to reflect this. |
| Comment by Sergey Cheremencev [ 28/Jun/19 ] |
If we increase OST_MAX_PRECREATE on MDS also, I am afraid MDS will ask OST to precreate too rare. It may cause several different problems. For example OST after failover needs to precreate more objects that takes extra time(500 000 instead of 20 000). I suggest to use the 2nd approach with commit callback and revert https://review.whamcloud.com/33833. |
| Comment by Gerrit Updater [ 28/Jun/19 ] |
|
Sergey Cheremencev (c17829@cray.com) uploaded a new patch: https://review.whamcloud.com/35373 |
| Comment by Gerrit Updater [ 30/Jun/19 ] |
|
Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35388 |
| Comment by Gerrit Updater [ 10/Jul/19 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35388/ |
| Comment by Gerrit Updater [ 21/Aug/19 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35373/ |
| Comment by Peter Jones [ 21/Aug/19 ] |
|
Landed for 2.13 |
| Comment by Gerrit Updater [ 28/Aug/19 ] |
|
Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35951 |
| Comment by Gerrit Updater [ 12/Sep/19 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35951/ |