Page History
...
Mirroring States: The file system maintains has the following states for mirrored files:
Read-only (ro): All mirrors are synchronized and up-to-dateFile cannot be written without a layout state change; when a write starts, trigger transition to:
Write pending (wp): Active writing is happening to the primary mirrorOpen for writing, new writes do not need to change the layout. A resync starting transitions to:
Sync pending (sp): The system is synchronizing mirrorsMarked for synchronization - data copy for synchronization can start. Writes trigger layout to go back to write pending (and sync process fails)
Today, we have manual synchronizationManual Synchronization: After writing to a mirrored file, the lfs mirror resync command must be run to synchronize the stale mirrors with the primary mirror. This command copies data from the synced mirror to the stale mirrors and marks successfully copied mirrors as synchronized.
This delayed write approach was implemented in the first phase of FLR to avoid the complexity of maintaining consistency across multiple mirrors during concurrent writes. By updating only one mirror during writes and marking others as stale, the system maintains a consistent view of the file data, at the cost of requiring explicit synchronization after writes complete.
...