IPFS cluster pinning

Hello,

I have a situation where I deployed my own private IPFS cluster containing 4 nodes. I uploaded a file using a replication factor of 2, and I also specified 2 nodes using the user-allocations parameter. The file was pinned correctly, as the ipfs-cluster-ctl status command showed it as PINNED on the 2 specified nodes.

Later, one of the specified nodes went down, and the pin was automatically transferred to another available IPFS node to maintain the replication factor. So far, this behavior is expected.

Now, I want to bring the originally specified node back up. However, the IPFS cluster does not automatically repin the file to that node. In other words, I no longer see PINNED for that node in the status output.

Is this expected behavior, or is there something I need to adjust in the configuration? Are there any workarounds or ideas for how I can return the pin to the original node from the temporary one?

This is expected behaviour. The repinning behaviour is disabled by default because, well, it rellocates stuff and then when the original peer comes back up it will have the content but not the pins (plus the repinning can be a huge thing for a large cluster).

You can pin rm and pin add with the right set of allocations though, in order to fix the allocations.