0
votes

I'm using MongoDB of version 4.2.8

The storage engine is wiredTiger

I entered the db.serverStatus().wiredTiger to monitor cache usage, but storageEngine and wiredTiger field are not shown.

On the other hand, consist of standalone can see these field

Can't we check in shard cluster mode?

this is my shard server & config server config file

systemLog:
  verbosity: 0
  traceAllExceptions: true
  path: "~~~~~"
  logAppend: false
  logRotate: "rename"
  destination: "file"
  timeStampFormat: "iso8601-utc"

net:
  port: 20001
  bindIp: "0.0.0.0"

storage:
  dbPath: "~~~~~~"
  journal:
    enabled: true
    commitIntervalMs: 100
  directoryPerDB: true
  engine: "wiredTiger"
  wiredTiger:
    engineConfig:
      cacheSizeGB: 1.0
    collectionConfig:
      blockCompressor: "snappy"
    indexConfig:
      prefixCompression: true

security:
  keyFile: "~~~~~"

sharding:
  clusterRole: "configsvr"

replication:
  replSetName: "config-server"

    systemLog:
      verbosity: 0
      traceAllExceptions: true
      path: "~~~~~~"
      logAppend: false
      logRotate: "rename"
      destination: "file"
      timeStampFormat: "iso8601-utc"
    
    net:
      port: 20002
      bindIp: "0.0.0.0"
    
    storage:
      dbPath: "~~~~"
      journal:
        enabled: true
        commitIntervalMs: 100
      directoryPerDB: true
      engine: "wiredTiger"
      wiredTiger:
        engineConfig:
          cacheSizeGB: 10.0
        collectionConfig:
          blockCompressor: "snappy"
        indexConfig:
          prefixCompression: true
    
    security:
      keyFile: "~~~~~"
    
    sharding:
      clusterRole: "shardsvr"
    
    replication:

  replSetName: "shard1-server"
1

1 Answers

0
votes

mongos does not store any data itself, this is probably why it doesn't report a storage engine.

I don't know if you can have different storage engines in different shards, seems theoretically possible to me.

You could use https://docs.mongodb.com/manual/reference/command/listShards/ to identify the shards and query each of them for their storage engines.