Reputation: 4297
I would like to create a copy of a file without using aditional disk space for the data, similar to what a hardlink would do.
However I would like this data to have CoW (copy on write) behaviour at the block/extent level, so only modified blocks/extents of data are actually written to disk, thus minimizing disk usage. I'm also trying to minimize the amount of I/O I'm doing by this.
The files are relatively large compared to the size of the differences between them, so copying the files and relying on mechanisms such as deduplication later would be a huge waste of resources.
An external application which I can't modify must be able to read the files in the format they are in, so alternatives that modify the contents of the files are unusable in my scenario.
No idea if this is possible on NTFS at the moment and my searches have not turned up anything useful, might be that I'm using the wrong terminology.
Upvotes: 1
Views: 172
Reputation: 11178
You are perhaps looking for Data Deduplication API. It cannot be done at the NTFS level, at least, without a filter driver. Apart from that, you can use the Remote Differential Compression API to do it manually. My FileSnap tool does exactly that.
Upvotes: 1