-
Notifications
You must be signed in to change notification settings - Fork 11
Is it possible to map the blocks to existing files? #253
Comments
Hi, I think you may find this discussion interesting: It resulted in experimental 'no-copy' mode for |
Thank you. I don't know where to report tests with nocopy (see ipfs/kubo#875 (comment)), but here are some results: SSD: HDD: Interestingly, sometimes the hashes began with Qm, and sometimes with zb2rh. This is not correlated with symlinks. Now what happens if the file vanishes: In FUSE, however, cat did not work as expected. Error log: |
This issue was moved to https://discuss.ipfs.io/t/is-it-possible-to-map-the-blocks-to-existing-files/273 |
Hey everyone! I have a idea regarding the data blocks. Blocks are definitively a good idea, but I have sorrows about the way the data is effectively stored.
It would be cool if .ipfs/ contained an index which links the blocks to files (file path + offset), since files are still advantageous compared to blocks. For example, you can open them in a system where no ipfs is running.
When the original files are still available locally, they remain usable for web publishing on the own server, tracking changes with git, publishing with NFS, enabling mirroring with rsync, deduplication in a modern file system, etc. After all, I can open them with normal applications using the quite strong hierachical index of filesystems. Dealing with hashes is complicated in relation to dealing with files, folders and sub-folders. I don't know Sia/dat very well atm, but it seems that I can use the same set of files for another network. Thinking in the long term, keeping files is way more sustainable. And consuming less disk space.
Of course, the mentioned server use cases are possible with blocks too, but I would be happy if I'm not dependent on a certain program (IPFS in this case) and a certain storage format. I would like to manage the way I store the data on my own. If the files are kept in original state, the IPFS storage format could change dramatically and one could reinject the very same data again, resulting in an entirely newly organized index.
When the files are stored as blocks in .ipfs/, the are some sort of protected from being accidentally deleted, altered or renamed by the user. This may not be the case when the files are referenced, but still somewhere in the file system. I offer five possible solutions do deal with the problem:
Now what if human error still occurs? Well, one could argue that a file missing file means that it can not be hosted by the peer and the index should be updated accordingly. Simple thing if the user then re-adds the renamed file: the index just points to the new path. One could imagine a periodic "scan.sh false" which produces list.txt. list.txt then informs the index of renamed files.
Otherwise, we may keep track of the files by their contents, e.g. by using the output from the script attached.
The advantage of this approach may vanish if the FUSE module is integrated better, e.g. showing the files that are in the local repo without having to call ipfs pin ls --type=recursive.
So what do you think? Let me know!
Edit: I've seen ipfs filestore, but I don't know where I can look up more / who I have to contact.
Attachement:
The text was updated successfully, but these errors were encountered: