Mongod crashing with core dumps when storage is full

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:

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