I first ran this command:
ddrescue --force /dev/sda /dev/null HGST_RMA.map
I just wanted a map file for blanking (therefore /dev/null
). And this is what my .map
file looks like before I interrupted the run towards the end (Ctrl+C'd it):
Then I decided to blank the disk (/dev/zero
):
$ sudo ddrescue --force --fill-mode=+ /dev/zero /dev/sda HGST_RMA.map
GNU ddrescue 1.21
Press Ctrl-C to interrupt
Initial status (read from mapfile)
filled size: 266742 MB, filled areas: 43
remaining size: 233363 MB, remaining areas: 151
Current status
filled size: 500106 MB, filled areas: 194, current rate: 55115 kB/s
remain size: 0 B, remain areas: 0, average rate: 71200 kB/s
current pos: 500107 MB, run time: 54m 37s
Finished
Then I ran:
$ fdisk -l /dev/sda
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xbf7dbd9f
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 62916607 62914560 30G 83 Linux
/dev/sda2 62916608 67110911 4194304 2G 82 Linux swap / Solaris
/dev/sda3 67110912 976773167 909662256 433.8G 83 Linux
This is what the initial bit of my map file looks like:
# Mapfile. Created by GNU ddrescue version 1.21
# Command line: ddrescue --force --fill-mode=+ /dev/zero /dev/sda HGST_RMA.map
# Start time: 2017-12-28 17:37:14
# Current time: 2017-12-28 18:31:57
# Finished
# current_pos current_status
0x7470BFD000 +
# pos size status
0x00000000 0x608336000 +
0x608336000 0x00001000 -
0x608337000 0x380B8DD000 +
0x3E13C14000 0x00001000 -
0x3E13C15000 0x00224000 +
By my own estimate the partition table should have been wiped clean because of the
0x00000000 0x608336000 +
Why hasn't that happened and what has been blanked?
What has been blanked?
The clue is here:
$ sudo ddrescue --force --fill-mode=+ /dev/zero /dev/sda HGST_RMA.map … Initial status (read from mapfile) filled size: 266742 MB, filled areas: 43 remaining size: 233363 MB, remaining areas: 151 …
For some reason ddrescue
decided it should continue from the middle of the disk, as if the first half had already been filled. This way the partition table was left intact.
Why […]?
Frankly I cannot tell. My tests with ddrescue
1.19 indicate this happens when the current_status
inside the mapfile is F
meaning "filling specified blocks". This is the case after you interrupt filling operation. Continuing seems sane, I would expect this.
But according to your ddrescueview
screenshot, the current_status
was *
, "trimming non-trimmed blocks". With this status I cannot replicate the issue, my ddrescue
fills all healthy blocks as it should. Again, this is sane and expected.
Either you hit a bug or you had altered the file(s) (and neglected to mention it here) in a way that mislead ddrescue
. E.g. if you accidentally run this:
sudo ddrescue --force --fill-mode=+ /dev/zero /dev/null HGST_RMA.map
and realized your mistake ("Wait! Why is it writing so fast?"), interrupted halfway with Ctrl+C, then your mapfile would contain F
as current_status
. Next you run the proper command and it "continues" from the middle of /dev/sda
.
User contributions licensed under CC BY-SA 3.0