-
New Feature
-
Resolution: Unresolved
-
Medium
-
None
-
None
-
None
-
3
-
9223372036854775807
Directory level Snapshot
By leveraging file-level read-only data clones, Lustre Flashback can implement highly efficient, directory-level snapshots.
The Eager Approach (Naive Implementation)
The simplest method is eager replication: when a directory snapshot is created (e.g., executing lfs snapshot create --scn <SCN> $dir), the entire directory tree structure is immediately copied under $dir/.snapshot/$SCN. For regular files inside the tree, read-only clones are created using the previously defined layout templates to avoid copying actual data blocks. While this avoids physical data duplication, the metadata copying phase remains a significant bottleneck for large directories containing millions of files or subdirectories.
The Lazy Approach (Optimized SnapDomain Implementation)
To resolve the metadata copy bottleneck, Lustre Flashback supports a deferred (lazy-evaluation) metadata replication strategy:
- Domain Registration: Instead of copying the directory tree, the MDT simply registers the target directory as a new snapshot realm/domain (SnapDomain) and activates a dedicated subtree changelog.
- Context Transition: The creation of this new SnapDomain transitions all descendant files in the subtree to the new realm/domain context. Subsequent writes or updates to these descendant files automatically trigger their respective file-level data snapshots (clones) before modifications are applied.
- On-Demand Reconstruction: The metadata directory tree is reconstructed only when a user explicitly accesses the snapshot path ($dir/.snapshot/$SCN). The Flashback engine utilizes the subtree's historical changelogs to rebuild the directory structure and instantiate the read-only file clones on-the-fly, layer-by-layer, only for the paths being traversed.
- is related to
-
LU-18457 Flashback for Lustre
-
- Open
-