[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-ddrescue] ddrescue bug with overwriting the mapfile

From: Scott Dwyer
Subject: Re: [Bug-ddrescue] ddrescue bug with overwriting the mapfile
Date: Tue, 8 Jan 2019 22:10:36 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 1/8/2019 11:44 AM, Antonio Diaz Diaz wrote:
Hi Joe,

Joe Kickman wrote:
Sometimes while rescuing I see the situation of hanging PC. If the
hang happens at the moment of rewriting the log/map file - it gets
size of 0
I propose to first rename the log, adding .bak at the end, flush file
buffer to disk (sync) and then write the new log file from memory to
disk, thus always having a recent backup.

Thank you for reporting this.

I'll implement some backup scheme similar to what you propose as soon as possible. Maybe it should be controlled by an option and disabled by default, given that the current method is more efficient and seems to be safe enough (no complaints in 14 years).

I will break down and say this. The reason I did my implementation is BECAUSE of some reports of issues where the ddrescue log was corrupt after something like a computer lockup or power loss. Maybe you did not receive direct complaints, but the issue has been there. The log backup option should be default with the option to disable it. My implementation may not be the ideal way (after reading Ketil's message I may even update my method), but it has been proven to work. A proven instance: after a user had an unexpected power loss during a recovery, the log file was incomplete and corrupt, but the backup log was good, verified by my examining of both files.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]