[LU-7585] Implement OI Scrub for ZFS Created: 20/Dec/15  Updated: 25/Nov/20  Resolved: 06/Feb/18

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

Type: Improvement Priority: Critical
Reporter: Andreas Dilger Assignee: nasf (Inactive)
Resolution: Fixed Votes: 0
Labels: lfsck

Issue Links:
Related
is related to LU-7797 Can't mount zpools after OSS restart Resolved
is related to LU-3569 Use real OST index as ostid_to_fid() ... Resolved
is related to LU-5855 sanity-lfsck does not work under ZFS-... Resolved
is related to LU-7582 Manual delete of oi directory in ZFS ... Resolved
is related to LU-8521 ZFS OST is unwritable Closed
is related to LUDOC-161 document backup/restore process for Z... Resolved
is related to LU-8620 Get rid of mystery object '???<object... Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
LU-10186 OI compatibility between ldiskfs and ZFS Technical task Resolved nasf  
LU-10187 Handle FID-in-dirent Technical task Resolved nasf  
LU-10188 Block size alignment issues Technical task Resolved nasf  
LU-10189 Handle PFID EA in LMA Technical task Resolved nasf  
LU-10190 Agent object for cross-MDTs reference Technical task Resolved nasf  
LU-10192 Agent entry for cross-MDTs reference Technical task Resolved nasf  
LU-10193 Index object on-disk layout compatibi... Technical task Resolved nasf  
Rank (Obsolete): 9223372036854775807

 Description   

There at occasions where the OI file can become corrupted (e.g. double mount of a filesystem), or otherwise need to be rebuilt (e.g. upgrade of normal ZFS filesystem to Lustre MDT in the future). It would be useful to be able to verify and/or rebuild the ZFS OI files during dnode iteration.



 Comments   
Comment by Andreas Dilger [ 27/Apr/16 ]

There have been a number of requests to be able to use tar or rsync or similar tools to do file level backup/restore for ZFS MDTs, for example upgrading the MDT from ldiskfs to ZFS. The only currently supported mechanism for ZFS backup/restore is zfs send and zfs recv which ties the data to always be in a ZFS filesystem. In addition to implementing ZFS Scrub to repair the OI files in case of corruption (for whatever reason), we should consider whether this would allow us to use tar to restore an ldiskfs MDT into a new ZFS filesystem and/or restore a ZFS tar backup? We would need to support IGIF FIDs for ZFS which I think is relatively low complexity, as well as the ability to rebuild FID-in-dirent which may be considerably more complex.

With Data-on-MDT it might also be possible to take an existing regular ZFS (or ext4) filesystem and convert it to a Lustre MDT (mkdir ROOT/; mv "*" ROOT/; umount; mount -t lustre; run LFSCK), but this is not a primary goal at this point.

Comment by Gerrit Updater [ 19/Aug/17 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: https://review.whamcloud.com/28607
Subject: LU-7585 scrub: general framework for OI scrub
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: d41e7422086c0ffbe91de18924625eef94448f4f

Comment by Gerrit Updater [ 19/Aug/17 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: https://review.whamcloud.com/28608
Subject: LU-7585 zfs: FS uuid for zfs backend
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: bfde4149fc407ea875255ed0c9d691a47b62aadc

Comment by Gerrit Updater [ 19/Aug/17 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: https://review.whamcloud.com/28609
Subject: LU-7585 zfs: repair FID-in-dirent for ZFS backend
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 001cc223bb90a17bb23bf196b264be78d9224e2a

Comment by Gerrit Updater [ 19/Aug/17 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: https://review.whamcloud.com/28610
Subject: LU-7585 zfs: OI scrub for ZFS
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 77f89863da826af795c6c66618e825fc4e6a5d81

Comment by Gerrit Updater [ 24/Aug/17 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: https://review.whamcloud.com/28678
Subject: LU-7585 zfs: maintain index file size
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: b8f1a9a9401bf92f1982a5707878477a803d7141

Comment by Gerrit Updater [ 24/Aug/17 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: https://review.whamcloud.com/28679
Subject: LU-7585 zfs: move LAST_ID OI mapping out of oi.xx
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 8c93eafa7ad984709174048cc5bdf77c540ec5da

Comment by Gerrit Updater [ 01/Sep/17 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: https://review.whamcloud.com/28833
Subject: LU-7585 utils: new mkfs option 'restore'
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: cabff40245dd0580a3676006c3781c1d4cb404f0

Comment by Gerrit Updater [ 01/Sep/17 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: https://review.whamcloud.com/28834
Subject: LU-7585 zfs: backup index object with plain format
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: aa57e51ccf31e3aff29e6cae6a5b71fb1b704d2a

Comment by Gerrit Updater [ 04/Sep/17 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: https://review.whamcloud.com/28847
Subject: LU-7585 ldiskfs: backup index object with plain format
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 136d925c505bf72ffd2c8da1093b84ed71663640

Comment by Gerrit Updater [ 05/Sep/17 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: https://review.whamcloud.com/28855
Subject: LU-7585 zfs: create agent object for remote entry
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: e22cd933455e777fc2de1170239b56315add1891

Comment by Gerrit Updater [ 28/Sep/17 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: https://review.whamcloud.com/29241
Subject: LU-7585 zfs: handle non 4K-aligned blocksize
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 8ff5673f50d4f4e5bf908d78f6aab87f1e94a728

Comment by Gerrit Updater [ 14/Oct/17 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: https://review.whamcloud.com/29617
Subject: LU-7585 zfs: create agent entry for remote entry
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 1186da38066b7139347685d4f3260137d7fdf161

Comment by Gerrit Updater [ 20/Oct/17 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: https://review.whamcloud.com/29696
Subject: LU-7585 osd: handle PFID EA in LMA properly
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: ae7008f67345203828e39c6db0d4070c01a3a00e

Comment by Gerrit Updater [ 23/Oct/17 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: https://review.whamcloud.com/29710
Subject: LU-7585 ldiskfs: auto scrub control
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 66291c9352833186026a24ff69086af513a9ebdd

Comment by nasf (Inactive) [ 15/Nov/17 ]

All the patches for this ticket:
1) https://review.whamcloud.com/#/c/28607
2) https://review.whamcloud.com/#/c/29710
3) https://review.whamcloud.com/#/c/29241
4) https://review.whamcloud.com/#/c/28679
5) https://review.whamcloud.com/#/c/28609
6) https://review.whamcloud.com/#/c/29696
7) https://review.whamcloud.com/#/c/28855
8) https://review.whamcloud.com/#/c/29984
9) https://review.whamcloud.com/#/c/29617
10) https://review.whamcloud.com/#/c/29985
11) https://review.whamcloud.com/#/c/28610
12) https://review.whamcloud.com/#/c/28834
13) https://review.whamcloud.com/#/c/28847
14) https://review.whamcloud.com/#/c/30106

Comment by Gerrit Updater [ 17/Dec/17 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/28607/
Subject: LU-7585 scrub: general framework for OI scrub
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 7e21ea59edcc65426e1753ab1884b9a2b93826ce

Comment by Gerrit Updater [ 17/Dec/17 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/29710/
Subject: LU-7585 osd-ldiskfs: auto scrub control
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 3ff1c932f869c8535aaebc56f0c924a760d1d601

Comment by Gerrit Updater [ 18/Jan/18 ]

Fan Yong (fan.yong@intel.com) uploaded a new patch: https://review.whamcloud.com/30909
Subject: LU-7585 zfs: OI scrub for ZFS
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: b5f4bb73612dc2060208c20265f7c4d4ec367371

Comment by Gerrit Updater [ 31/Jan/18 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/30909/
Subject: LU-7585 zfs: OI scrub for ZFS
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 89ead218ebe99a955afc0bc7f6aba83ef35019fb

Comment by Peter Jones [ 31/Jan/18 ]

Can this work now be marked as resolved?

Comment by nasf (Inactive) [ 31/Jan/18 ]

No, there are still three patches to be landed:
https://review.whamcloud.com/#/c/30910/
https://review.whamcloud.com/#/c/30911/
https://review.whamcloud.com/#/c/30106/

Comment by Peter Jones [ 31/Jan/18 ]

Isn't that distinct functionality tracked under a different JIRA ticket (LU-10193)?

Comment by nasf (Inactive) [ 31/Jan/18 ]

LU-10193 is one of the sub-tasks of this ticket.

Comment by Peter Jones [ 31/Jan/18 ]

Ah. Got it. Thanks

Comment by nasf (Inactive) [ 31/Jan/18 ]

All the remaining three patches have been approved by reviewers, just waiting gate keeper for landing.

Comment by Peter Jones [ 31/Jan/18 ]

so should https://review.whamcloud.com/#/c/28834/ and https://review.whamcloud.com/#/c/28847/ be abandoned?

Comment by nasf (Inactive) [ 31/Jan/18 ]

Right, abandoned already.

Comment by Peter Jones [ 06/Feb/18 ]

ok. So now everything is landed AFAICT

Comment by Gerrit Updater [ 25/Nov/20 ]

Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/40762
Subject: LU-7585 tests: enable sanity-lfsck tests for ZFS
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: bc6992fe8c019a2525d19496b395bfc5f8815155

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