Live data from Hacker News

Hyperspace

hypercritical.co

121–130 of 503 posts

Re: Hyperspace

#121
post #102

Earlier quoted context omitted.

It does get rid of the duplicate. The duplicate data is deleted and a hard link is created in its place.

No, because it's not actually a hard link -- if you modify one of the files they'll diverge.

Sounds like jdupes with -B

Re: Hyperspace

#122
post #48

> There is no way for Hyperspace to cooperate with all other applications and macOS itself to coordinate a “safe” time for those files to be replaced, nor is there a way for Hyperspace for forcibly take exclusive control of those files. This got me wondering why the filesystem itself doesn't run a similar kind of deduplication process in the background. Presumably, it is at a level of abstraction where it could safel…

If Apple is anything like where I work, there's probably a three-year-old bug ticket in their system about it and no real mandate from upper management to allocate resources for it.

Re: Hyperspace

#123
post #60

I did this with two scripts - one that produces and cached sha1 sums of files, and another that consumes the output of the first (or any of the *sum progs) and produces stats about duplicate files, with options to delete or hard-link them.

I wonder how any comments about hard links will be in these comments by people misunderstanding what this app does.

Re: Hyperspace

#125

Many comments here offering similar solutions based on hardlinks or symlinks. This uses a specific feature of APFS that allows the creation of copy-on-write clones. [1] If a clone is written to, then it is copied on demand and the original file is unmodified. This is distinct from the behavior of hardlinks or symlinks. [1] https://en.wikipedia.org/wiki/Apple_File_System#Clones

[deleted]

Re: Hyperspace

#127

Many comments here offering similar solutions based on hardlinks or symlinks. This uses a specific feature of APFS that allows the creation of copy-on-write clones. [1] If a clone is written to, then it is copied on demand and the original file is unmodified. This is distinct from the behavior of hardlinks or symlinks. [1] https://en.wikipedia.org/wiki/Apple_File_System#Clones

Also called reflink on Linux. Which are supported by bcachefs, Btrfs, CIFS, NFS 4.2, OCFS2, overlayfs, XFS, and OpenZFS.

Sources: https://unix.stackexchange.com/questions/631237/in-linux-whi... https://forums.veeam.com/veeam-backup-replication-f2/openzfs...

Re: Hyperspace

#129
post #48

> There is no way for Hyperspace to cooperate with all other applications and macOS itself to coordinate a “safe” time for those files to be replaced, nor is there a way for Hyperspace for forcibly take exclusive control of those files. This got me wondering why the filesystem itself doesn't run a similar kind of deduplication process in the background. Presumably, it is at a level of abstraction where it could safel…

This is commonly done with compression on block storage devices. That fails, of course, if the file system is encrypting the blocks it sends down to the device.

Doing deduplication at this level is nice because you can dedupe across file systems. If you have, say, a thousand systems that all have the same OS files you can save vats of storage. Many times, the only differences will be system specific configurations like host keys and hostnames. No single filesystem could recognize this commonality.

This fails when the deduplication causes you to have fewer replicas of files with intense usage. To take the previous example, if you boot all thousand machines at the same time, you will have a prodigious I/O load on the kernel images.

Re: Hyperspace

#130
post #48

> There is no way for Hyperspace to cooperate with all other applications and macOS itself to coordinate a “safe” time for those files to be replaced, nor is there a way for Hyperspace for forcibly take exclusive control of those files. This got me wondering why the filesystem itself doesn't run a similar kind of deduplication process in the background. Presumably, it is at a level of abstraction where it could safel…

data loss is the largest concern I still do not trust de-duplication software.

Even using sha-256 or greater type of hashing, I'd still have concerns about letting a system make deletion decisions without my involvement. I've even been part of de-dupe efforts, so maybe my hesitation is just because I wrote some of the code and I know I'm not perfect in my coding or even my algo decision trees. I know that any mistake I made would not be of malice but just ignorance or other stupid mistake.

I've done the entire compare every file via hashing and then log each of the matches for humans to compare, but never has any of that ever been allowed to mv/rm/link -s anything. I feel my imposter syndrome in this regard is not a bad thing.

Post reply on HN