I have a go-ipfs docker node running which has a lot of data pinned in it. It was running with auto-gc enabled which was blocking a lot of RPC calls every hour when GC runs. In order to disable auto-gc, I have stopped existing container (docker stop), removed it (docker rm) and started a new container (command given below) by pointing it to same data directory. To my surprise, none of the existing pins and files are shown when i do a ipfs repo stat.
When i go and look in the data directory under “blocks” folder i see all the data is present (which is approx 25GB in size), but when i try to fetch any of the IPFS/IPLD CID’s which were added before the restart, i couldn’t get the same.
where you running the same go-ipfs version before and after the upgrade? Can you double check that the folders are mounted in the right place inside the container? Are you starting it in the same way as before?
Using the same version before and after.
Not sure what you mean by folders being mounted in the right place, but following is the docker volumes output :
docker inspect -f '{{ .Mounts }}' 7f313e232389
[{volume 684d069c738ad13175851ceca19731ad9d704b3e970fd7e84d2fcb818f16da41 /var/lib/docker/volumes/684d069c738ad13175851ceca19731ad9d704b3e970fd7e84d2fcb818f16da41/_data :/export local true } {volume e4ac8eac956329af3fad81bf75cf28fa7db368d0d6ae9fb4941d49fd6f7c9f85 /var/lib/docker/volumes/e4ac8eac956329af3fad81bf75cf28fa7db368d0d6ae9fb4941d49fd6f7c9f85/_data /data/ipfs local true } {volume 342fd04cd8063f588cfa8be901b7b5c5c47ea993ce441a6f06de0b6ca95ec230 /var/lib/docker/volumes/342fd04cd8063f588cfa8be901b7b5c5c47ea993ce441a6f06de0b6ca95ec230/_data :/data/ipfs local true }]
Except for disabling the --auto-gc flag, I have used the same command as before.
I have figured out the issue, it was a silly mistake on my part.
I did not create the env variables for data and staging directories…i assumed the default would be picked up from user’s home directory.
When i restarted docker as these env variables were empty ,path for data directory should’ve been picked up from some other location and hence newly initialized. Hence, older data was not visible.