Virtual Disk Log Checkpoint for Crash Recovery
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In virtual disk systems, there is a risk of metadata corruption and loss due to improper closure during power failures or crashes, leading to unusable virtual disk extents, as changes to allocation tables and other metadata are not guaranteed to be persisted until cache is flushed.
Innovation Solution
A log is used as both a log and a checkpoint record to store information about changes to virtual disk metadata, allowing for replay of log entries in case of improper closure, ensuring data integrity and preventing widespread corruption by delaying writes and applying changes in batches.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If metadata changes are delayed and applied in batches, then data integrity is improved, but system complexity increases
Solution Approach 1:
The log records metadata changes before they are actually applied to the virtual disk file. By capturing changes in advance and storing them sequentially in the log, the system can replay these recorded changes after recovery, ensuring data integrity without requiring complex real-time synchronization mechanisms
Solution Approach 2:
The log acts as an intermediary between the cache and the virtual disk file. Instead of directly applying changes to the virtual disk file, modifications are first recorded in the log, which then serves as a buffer and recovery mechanism, simplifying the overall system architecture while improving reliability
2Reliability
If log entries store tail identifiers for crash recovery, then reliability is improved, but information storage requirements increase
Solution Approach 1:
The tail identifier is copied into each log entry as it is written. This creates a redundant reference within the log itself that enables recovery without requiring external metadata, efficiently using the log structure to store recovery information
Data Source
Figure 1
Figure 2
Figure 3
AI summary
This document describes techniques for effecting a virtual disk. In an exemplary configuration, a virtual disk file can be associated with a log that acts as both a log and a check point record. When a log entry is generated, information that identifies the tail can be stored therein. This information can be used in the event that virtual disk file is improperly closed, i.e., a crash or power failure occurs, to discover a sequence of log entries to replay. In addition to the foregoing, other techniques are described in the claims, detailed description, and figures.