Mongod crashing with core dumps when storage is full

Hello,
using MongoDB 6.0.4 with ranged-sharding.
I’ve noticed that once the attached storage goes to 100% capacity, then mongo starts crashing with core dumps.
Tried using maxSize for the shard, but apparently it does not protect from exceeding this definition, but only as a hint for the balancer:
https://www.mongodb.com/docs/manual/tutorial/manage-sharded-cluster-balancer/#change-the-maximum-storage-size-for-a-given-shard

Is there a way to limit the capacity usage of mongo to not use all of the disk? or, prevent the core dump from happening in this case, like a graceful shut down?

ok, i searched but couldn’t get any info on setting limit on disk usage. But

  1. clients should monitor disk usage all the time and take action when it’s almost full. serverStatus seems to be returning such metrics.
  2. check https://www.mongodb.com/docs/manual/administration/monitoring/#storage-node-watchdog