I have a node which was not previously part of a cluster.
It already has lots of production data (65377 pins to be exact).
To add the cluster, I’m using ipfs-cluster-service@0.13.1 in this node and another one.
I followed the guide on the docs and I can see the nodes are connected through ipfs-cluster-ctl peers ls.
However the data is not being copied from one node to the other.
Edit:
I should also clarify that stopping the current node to copy all the data to the other node is not an option. Ideally this should be done without a downtime.
Does that mean that I must manually pin all local pins to the entire cluster?
Is that a better way to handle this?
Do you mean that you are adding an node in which IPFS has 65377 into a cluster?
Those pins are in the ipfs daemon. ipfs-cluster does not know about them (ipfs-cluster-ctl pin ls shows what cluster knows about). For ipfs cluster to track those pins, you need to pin them using ipfs cluster.
If you are using CRDT-consensus mode, after pin-adding those 60k pins, you may want to compact the state by manually doing state-export and then state-import on your nodes (Data, backups and recovery - Pinset orchestration for IPFS).
Regarding the export/import, I was reading through the docs and found this section:
In crdt , importing will clean the state completely and create a single batch Merkle-DAG node. This effectively compacts the state by replacing the Merkle-DAG, but to prevent this peer from re-downloading the old DAG, all other peers in the Cluster should have replaced or removed it to.
I’m not sure I understood the implications. Could you please clarify on that?
Should I make sure I run the export/import in all nodes in the cluster?
It means that if you export/import, you need to do it in all your cluster nodes (with the same file you exported in one of them). (or import it in one, but do a state cleanup in the rest).