全球多写(Zone Sharding) db1复制集配置 mkdir -p /mongodb/{20001..20003}/{conf,data,log} # 配置文件 cat > /mongodb/20001/conf/mongodb.conf <<EOF systemLog: destination: file path: /mongodb/20001/log/mongodb.log logAppend: true storage: journal: enabled: true dbPath: /mongodb/20001/data directoryPerDB: true #engine: wiredTiger wiredTiger: engineConfig: cacheSizeGB: 1 directoryForIndexes: true collectionConfig: blockCompressor: zlib indexConfig: prefixCompression: true net: bindIpAll: true port: 20001 replication: oplogSizeMB: 2048 replSetName: CN_sh sharding: