2 basic questions

I’ve been playing around with IPFS for about 3 months now, so pretty new at it.

Q1) I don’t understand why the root hash of a new IPFS installation is always the same, the hash returned by ipfs init. It is always QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv Is that normal and correct?

Q2) When you add a file to IPFS, can the original file on the filesystem be removed AFTER "ipfs add " returns a hash?

I ran into an issue running out of space, so as soon as I get the hash upon adding to IPFS, I removed the source file, assuming it was moved / managed under the .ipfs folder. However, when I used the hash to obtain the file from IPFS (ipfs cat /ipfs/“file’s hash” > restoredCopy.file), I only got part of it and no errors were produced.

I had close to 6000 files I added to my local IPFS node, which required ~550GB of original storage in the filesystem, which is slightly under 1TB. However, I ran out of space while adding the files to IPFS, so I changed my algo to remove the original file after I got the hash from adding it.

Not sure why I only get part of the file back on retrieval, but I’m guessing IPFS is only making a reference to it and not copying / compression / storing it under the .ipfs folder, thus it needs to remain on the filesystem.

Seems like a lot of overhead to me. I would have thought a storage size of 700GB (storageMax in config file) would have been adequate for this. That amounts to 150GB of overhead to manage the 550GB of files. If the files are duplicated and not merely referenced, running out of space would make sense, but that what it does I should be able to remove the original file.

I’m using ipfs version 0.4.21.

You’re looking at the part where it tells you how to view the readme for IPFS. It’s not meant to be unique and won’t change unless the readme is updated.

to get started, enter:

	ipfs cat /ipfs/QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv/readme

Yes, if you’re okay with the only copy of the file on your computer existing in the IPFS repo.

I’m also not sure without more information, or maybe a minimal working example demonstrating the issue.

This shouldn’t be the case unless you’re using the --nocopy option when adding files.

Thank you for your informative reply @leerspace.

As to the node ID being the same on several different installations - Doh! you’re right, wasn’t looking at the peer ID above the readme hash.

I have restarted the node and adding files, without removing the originals. I’m loading slowly, so as not to run out of disk space.

I will periodically spot check to see if IPFS returns the entire file. So far all is well. Will be interesting to see if that still holds true when the original is deleted.

I appreciate the clarification, that removal of the original after adding should be OK.