[ale] File “ropes”
Michael B. Trausch
mike at trausch.us
Wed Oct 6 10:43:40 EDT 2010
Hey everyone,
I have an interesting little problem.
I was doing a backup of someone's hard disk drive in their laptop
computer, and the first time I ran dd it failed (albeit on an even block
boundary). So I ran the dd command again, skipping all the sectors that
were already copied, and put that in a second file.
Now, I have two very large files that have the HDD image in them. What
I want to do is combine them into one file. I want to do this
efficiently, though; the normal "cat hdd-* > hdd-full.img" method will
take hours and hours, and I don't want that.
I'm using btrfs, and I thought that maybe there would be some way that I
could create a file that would have two extents, mapping to the first
image and second image, so that I can mount the image loopback and begin
extracting files. But I can not find a way to do that --- The way that
I'd expect it to be done in btrfs would be to treat the files as
“ropes” (á la strings) and be able to efficiently and logically put the
ropes together. I seem to be barking up the wrong tree there, though.
Is there something out there that would permit me to solve this problem
in an efficient way without actually cat'ing the files together? I
don't want to double the disk space used by this even temporarily since
that would put me, well, pretty much over-full. :-) I could write a
program that created a large sparse file and filled the sparse file
block-by-block, effectively moving chunks from one file to the other,
but that, too, would take hours to do and if the power went out, I'd be
in a pretty un-happy state.
--- Mike
More information about the Ale
mailing list