5 ipfs cluster集群搭建,怎样配置让follow节点也能固定(pinned)数据

我的尝试:通过docker运行4个节点 ipfs版本:ipfs/go-ipfs:master-2022-08-05-cb280cb ipfs cluster版本:ipfs/ipfs-cluster:1.0.2 1个cluster引导节点,service.json参考默认配置:https://ipfscluster.io/0.14.2_service.json 2个cluster ipfs-cluster-service启动的节点,使用 ipfs-cluster-service init --datastore badger 命令初始化 1个cluster ipfs-cluster-follow 启动的节点,配置同默认配置,修改内容是:"listen_multiaddress": "/ip4/0.0.0.0/tcp/18100" & peer_addresses & trusted_peers

启动后,引导节点可以查看到4个节点 image.png

pin,非follow节点都可以pinned,follow节点为remote 如果强行固定4份,则报错。 image.png

请问是哪里出了问题?或者是需要配置那个值? 谢谢

引导节点初始化命令:

readonly name=service
readonly tag=1.0.2

docker stop ${name}
docker rm ${name}

docker run -d --name ${name} \
 -e CLUSTER_PEERNAME=${name} \
 -e CLUSTER_SECRET=fa6aa72ad61b6218453059a7b311999e1fd67f5d07b7db3ac7e908c9a4a47bcd \
 -e CLUSTER_IPFSHTTP_NODEMULTIADDRESS=/ip4/172.17.0.2/tcp/5001 \
 -v $PWD/data/${name}:/data/ipfs-cluster \
 -p 9094:9094 \
 -p 9096:9096 \
 --entrypoint="" \
ipfs/ipfs-cluster:${tag} \
sh -c 'ipfs-cluster-service init --datastore badger http://192.168.1.112:8080/ipfs/QmRt1RHyTN4ywtsuVUiu68dUwsfismWexPNAdZ3fDgxdS4 && ipfs-cluster-service daemon'

ipfs-cluster-service 节点启动命令:

readonly name=cluster_1
readonly tag=1.0.2

docker stop ${name}
docker rm ${name}

docker run -d --name ${name} \
 -e CLUSTER_PEERNAME=${name} \
 -e CLUSTER_FOLLOWERMODE=true \
 -e CLUSTER_PINONLYONTRUSTEDPEERS=false \
 -e CLUSTER_PEERADDRESSES="/ip4/172.17.0.6/tcp/9096/p2p/12D3KooWJfsc6rLzbypDvoxWW6oLJTjTnM5Wmso4SLWCjEoJuDuG" \
 -e CLUSTER_REPLICATIONFACTORMIN=2 \
 -e CLUSTER_REPLICATIONFACTORMAX=3 \
 -e CLUSTER_SECRET=fa6aa72ad61b6218453059a7b311999e1fd67f5d07b7db3ac7e908c9a4a47bcd \
 -e CLUSTER_IPFSHTTP_NODEMULTIADDRESS=/ip4/172.17.0.3/tcp/5001 \
 -e CLUSTER_MONITORPINGINTERVAL=2s \
 -e CLUSTER_CRDT_TRUSTEDPEERS="12D3KooWJfsc6rLzbypDvoxWW6oLJTjTnM5Wmso4SLWCjEoJuDuG" \
 -v $PWD/data/${name}:/data/ipfs-cluster \
 --entrypoint="" \
ipfs/ipfs-cluster:${tag} \
sh -c 'ipfs-cluster-service init --datastore badger && ipfs-cluster-service daemon --bootstrap /ip4/172.17.0.6/tcp/9096/p2p/12D3KooWJfsc6rLzbypDvoxWW6oLJTjTnM5Wmso4SLWCjEoJuDuG'

follow启动命令

readonly name=follow
readonly tag=1.0.2

docker stop ${name}
docker rm ${name}

docker run -d --name ${name} \
 -e CLUSTER_PEERNAME=${name} \
 -e CLUSTER_IPFSHTTP_NODEMULTIADDRESS=/ip4/172.17.0.5/tcp/5001 \
 -v $PWD/data/${name}:/data/ipfs-cluster \
 --entrypoint="" \
ipfs/ipfs-cluster:${tag} \
ipfs-cluster-follow ${name} run --init http://192.168.1.112:8080/ipfs/QmPCcaRR6DN5HPwv3djz38WrCgWsAKnDE8yWTXukMhsMLK
请先 登录 后评论