3 ms·
I think the term to search for is reflink. Btrfs is one example: https://btrfs.readthedocs.io/en/latest/Reflink.html https://btrfs.readthedocs.io/en/latest/Refl
by coder543 2y ago
I think the term to search for is reflink. Btrfs is one example: https://btrfs.readthedocs.io/en/latest/Reflink.html https://btrfs.readthedocs.io/en/latest/Reflink.html
Like with Hyperspace, you would need to use a tool that can identify which files are duplicates, and then convert them into reflinks.
- pca006132 2y agoI thought reflink is provided by the underlying FS, and Hyperspace is a dedup tool that finds the duplicates.
- coder543 2y agoYes. Hyperspace is finding the identical files and then replacing all but one copy with a reflink copy using the filesystem's reflink functionality. When you asked about the filesystem, I assumed you were asking about which filesystem feature was being used, since hyperspace itself is not provided by the filesystem. Someone else mentioned[0] fclones, which can do this task of finding and replacing duplicates with reflinks on more than just macOS, if you were looking for a userspace tool. [0]: https://news.ycombinator.com/item?id=43173713 https://news.ycombinator.com/item?id=43173713
- MBCook 2y agoHyperspace uses built in APFS features, it just applies them to existing files. You only get CoW on APFS if you copy a file with certain APIs or tools. If you have a program that does it manually, you copied a duplicate to somewhere on your desk from some other source, or your files already existed on the file system when you converted to APFS because you’ve been carrying them for a long time then you’d have duplicates. APFS doesn’t look for duplicates at any point. It just keeps track of those that it knows are duplicates because of copy operations.
- zerd 2y agoYou can do the same with `cp -c` on macOS, or `cp --reflink=always` on Linux, if your filesystem supports it.