5 ms·
the hard linking of directories is a hack not really a feature. There's a good reason why filesystems ( including HFS+ when not being used for Time Machine) do
by vvhn 13y ago
the hard linking of directories is a hack not really a feature. There's a good reason why filesystems ( including HFS+ when not being used for Time Machine) do not do it.
- wtallis 13y agoIt's a hack, but it's also the best (only?) way to deduplicate all that metadata without breaking the ability to access the history using pre-existing filesystem operations.
- oofabz 13y agoVolume snapshots are a better way. The only filesystems I know of that support them are ZFS, BtrFS, and HAMMER. I'm not sure if snapshots are implemented using hard links or if they are more fundamental. Another way, which is worse, is block-level deduplication. All of the above filesystems support it, as does NTFS. I wish Apple would adopt HAMMER for Mac OS. It is BSD-licensed and more suitable for a memory-constrained environment than ZFS.
- e12e 13y agoHm, how about nilfs2? http://www.nilfs.org http://www.nilfs.org
- Tobu 13y agoBtrfs snapshots are implemented using COW-shared trees (multiple trees for data and metadata). They can't be implemented with hardlinks, that would be a very leaky abstraction.
- beagle3 13y agoWhy is block level deduplication worse?
- wtallis 13y agoI'm not aware of any volume snapshot system that presents the history as a plain directory tree. At best, you can use some special mount options to mount a snapshot, but you generally have to use a special tool particular to that filesystem in order to access a snapshot, and creating the snapshot always requires such a tool. There's no standard Unix way to create or access volume snapshots. Time Machine histories can be created, accessed, and analyzed entirely with standard tools except for the modified `ln`.
- porker 13y ago(How) would AuFS fit into this? I've only come across it with Docker.io, but it sounds like it handles incremental backups?
- fulafel 13y agoWhy would deduplicating the metadata be important for this use case? Static amount of available inodes on some filesystems is the only reason I can think of.
- wtallis 13y agoBecause of the aforementioned problem where it takes 100MB and the better part of an hour just to record a new snapshot when literally nothing has changed since the previous snapshot. Deduplicating gets rid of that 100MB overhead, and being able to explicitly do it with hard links instead of having to rely on the filesystem to discover the duplication on its own takes care of most of the running time overhead.