Initialize Free Space Log Out | Topics | Search
Moderators | Edit Profile

X-Ways Support Forum » Disk Tools » Initialize Free Space « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

pleonasm
Username: pleonasm

Registered: N/A
Posted on Thursday, May 1, 2008 - 0:32:   

What is the process used by WinHex to initialize (erase) free space on a hard disk drive? Does it open the disk for “raw access” as noted in the following comments by Sysinternals?

“Cleaning free space presents another challenge. Since FAT and NTFS provide no means for an application to directly address free space, SDelete has one of two options. The first is that it can … open the disk for raw access and overwrite the free space. This approach suffers from a big problem: even if SDelete were coded to be fully capable of calculating the free space portions of NTFS and FAT drives (something that's not trivial), it would run the risk of collision with active file operations taking place on the system. … The file system driver writes the new data to the cluster, and then SDelete comes along and overwrites the freshly written data: the file's new data is gone. The problem is even worse if the cluster is allocated for file system metadata since SDelete will corrupt the file system's on-disk structures.”

Or, does WinHex use an approach for initializing (erasing) free space similar to the following?

“The second approach, and the one SDelete takes, is to indirectly overwrite free space. First, SDelete allocates the largest file it can. SDelete does this using non-cached file I/O so that the contents of the NT file system cache will not be thrown out and replaced with useless data associated with SDelete's space-hogging file. Because non-cached file I/O must be sector (512-byte) aligned, there might be some left over space that isn't allocated for the SDelete file even when SDelete cannot further grow the file. To grab any remaining space SDelete next allocates the largest cached file it can. For both of these files SDelete performs a secure overwrite, ensuring that all the disk space that was previously free becomes securely cleansed.”

Thank you for your assistance.

P.S.: Quotes are from http://technet.microsoft.com/en-us/sysinternals/bb897443.aspx
Top of pagePrevious messageNext messageBottom of page Link to this message

Stefan Fleischmann
Username: admin

Registered: 1-2001
Posted on Thursday, May 1, 2008 - 1:08:   

Similar to the second approach.

Add Your Message Here
Post:
Username: Posting Information:
Only registered users may post messages here, i.e. you need to have an account.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:
Forum operated by X-Ways Software Technology AG.