Create copy-on-write directory on Windows 7 with NTFS
Asked Answered
R

1

20

I have a directory containing source code, which I compile to produce object files. I want to quickly apply a patch and rebuild in such a way that I have simultaneous access to both the old and new object files. One way to do that is:

cd old && make
xcopy old new
cd new && apply diff && make

However, the copy takes about 10 minutes, even on the same drive. If I could make new be a copy-on-write version of old that would be much faster. Can Windows 7 NTFS create copy-on-write directories? Can these directories be expanded to copy-on-write subdirectories when the outer directory is modified?

Reiner answered 2/3, 2015 at 16:48 Comment(3)
No, NTFS does not have copy-on-write support.Lucrece
@HarryJohnston, the Volume Shadow copy service apparently does use copy-on-write to do its magic, but perhaps that's internal only?Reiner
That affects the entire volume, rather than specific files or directories, and I believe it is implemented at the block level. I suppose it might still work, depending on your exact needs.Lucrece
C
1

If you create a VHD and mount that in that directory, you can independently configure VSS on that volume and therefore on that directory.

Chace answered 14/2, 2018 at 15:11 Comment(1)
I can't confirm this answer works, but it seems plausible, so accepting.Reiner

© 2022 - 2024 — McMap. All rights reserved.