On 2/24/2014 12:35 PM, Zeniff Martineau wrote:
General followup sparse/usage check question (not specific to ddrescue):
I was thinking if estimating could be possible by testing a few chunks
at a time progressively toward the end of the drive, skipping large
amounts, to see when/where the drive seems to have stopped "filling
up". On a healthy drive, would this make sense for a very rough usage
guess? Or maybe the drive just puts data anywhere without regard to
physical location, so that wouldn't work? Just curious, since I think
I remember running photorec on a very large drive with almost no
usage, and it seemed to finish pretty fast, so I was assuming it was
able to check something like that. But I will ask them too; I just
wondered about that for ddrescue too. :)
If you are trying to use ddrescue because of its ability to do sparse
writes, and you are using it on good drives (NOT failing drives), then
how about this for an idea.
Mount the drive on a computer with its native filesystem if not Linux
(if the drive is NTFS, hook it up to a Windows computer, ect...). Run
the normal disk clean up utilities available to empty trash/recycle bin
and stuff. Then look for a utility that will erase (wipe) unused space
on a drive. You will want to find one that will allow you to only do a
single pass of 00's.
Another alternative is to write a large file of zero's, and then delete
it. Although I am not sure I would recommend that option unless you are
careful, as I have had bad results from the accidental and unwanted
filling a drive, and then it would not let me delete anything. If you
mount the filesystem in Linux, you could use dd or even ddrescue with
/dev/zero as the source to create such a file, and then the rm command
to remove the output file. Again, you may want to be careful by leaving
yourself a bit of a cushion and not create a file(s) that completely
fill the drive.
Once either method is done, then in theory, the used portion of the disk
reported by the filesystem should be about the size it would take up
when using sparse writes. Note that I said "in theory" and "should", you
would have to test to be sure.
Scott
_______________________________________________
Bug-ddrescue mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-ddrescue