File System Log Redundancy Check for Partial Write Recovery

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional file server recovery methods face inconsistencies and corruption issues due to partial writes and hardware failures, leading to incomplete metadata recovery, especially during server crashes, without adequate checks to detect such corruption.

Innovation Solution

Implementing redundancy checks for each log record to validate metadata transactions and identifying the last valid record before replaying transactions, ensuring only valid records are written to the file system, and using the 'fsck' utility only when necessary to maintain file system integrity.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If redundancy checks are added to each log record to detect corruption, then file system integrity is improved, but device complexity increases

Engineering Contradiction:
Improvefile system integrityVSAvoidlog structure complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

A redundancy check value is calculated and stored with each log record before the record is written to disk. This preliminary action ensures that when the system recovers after a crash, the redundancy check can immediately validate the integrity of log records without requiring complex post-crash analysis, thus improving reliability while keeping the added complexity minimal and structured.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If the entire log is replayed during recovery, then file system consistency is ensured, but service recovery time increases

Engineering Contradiction:
Improvefile system consistencyVSAvoidservice recovery time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

During log replay, the system uses the stored redundancy check values to validate each log record as it is being processed. When an invalid record is detected, the replay process is terminated immediately. This feedback mechanism allows the system to skip validating or replaying subsequent records, significantly reducing recovery time while maintaining file system consistency by stopping at the point of corruption.

Inventive Principle:
Principle #23Feedback

3Productivity

If partial writes to the log are not detected, then log processing is faster, but file system corruption occurs

Engineering Contradiction:
Improvelog processing speedVSAvoidfile system integrity
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The redundancy check value is pre-calculated and stored with each log record during the normal logging operation. This preliminary calculation captures the integrity state of the record at the time of writing, enabling fast detection of partial writes during recovery without requiring complex validation algorithms, thus maintaining both speed and reliability.

Inventive Principle:
Principle #10Preliminary action

4Reliability

If the fsck utility is run on every recovery, then file system integrity is verified, but recovery time significantly increases

Engineering Contradiction:
Improvefile system integrity verificationVSAvoidrecovery time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system uses redundancy check validation during log replay as a first line of defense. Only when this validation fails does the system invoke the fsck utility. This feedback-based approach filters out the majority of recovery scenarios that can be handled quickly through redundancy check validation, reserving the time-consuming fsck utility for only the cases where it is truly necessary, thus significantly reducing average recovery time while maintaining integrity verification.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS7631009B1Redundancy check of transaction records in a file system log of a file server
Publication Date: 2009.12.08 EMC IP HLDG CO LLC
  • US7631009B1 patent drawing
  • US7631009B1 patent drawing
  • US7631009B1 patent drawing

AI summary

To recover from partial writes of metadata transactions to a file system log, a redundancy check is added to each log record. Upon re-boot of the file server, the file system is recovered by finding the last valid record in the log, and then replaying records from the log into the on-disk file system. The replay is terminated prior to the last valid record upon reaching any record with a bad redundancy check. A “fsck” is performed on the file system prior to granting client access to the file system only if the log recovery was terminated prior to the last valid record upon reaching a record with a bad redundancy check and the position of the records in the log indicates that this record with a bad redundancy check could not have been written to the log concurrently with the last valid record.