Question about hard links – Linux and Unix
I am considering using hard links to reduce disk resource usage in Linux (let’s keep it simpler). There are two groups of files that I am considering using links – one is videos and images, videos that I edit, but the edited copies are not duplicated from the originals and renamed when editing processes. Photos that I do not edit so no problem. Spreadsheets and other textual documents are best managed in a source control system. The other scenario is an archival situation. Once the hard link dup removal process has been run on new data added to the archive, this data will be READ ONLY for everything except the dup removal process so that even text files that might be changed will enter the system as NEW FULL COPIES (usually in a folder identified by the date of copy) which are compared to the old uneven copies avoiding any problems.
Considering the uses above, I read that hard links can only be in the same “filesystem”. Where the understanding of the filesystem seems to be assumed and I think it is not entirely clear. An example of a set of simple ext4 partitions assembled into the OS ROOT “filesystem” using / etc / fstab is, in my opinion, multiple file systems, one for each physical partition, as the inodes are specific to the physical partition and even to those of the OS Root partition. have inodes that would be specific to ONLY this partition. This means two partitions on the same drive, even though in / etc / fstab there would still be two separate file systems in terms of hard link files. There is probably an exception to this when aggregate / mirrored disks or partitions are involved; as in the set of disks or partitions participating in a single striped / mirrored drive would be considered a hard-linked file system.
Based on these assumptions in the ZFS file system I’m not sure hard links are possible and they are probably not needed because snapshots can perform the same archive process that prevents duplicate data creation. on the material medium. But if linking is allowed, linking would only be possible inside the pool where the partitions or disks were assigned (essentially the same principle I followed with conventional ext4 partitions.
Thanks to anyone who can confirm my analysis is correct or point out where it is inaccurate.