Adding shard to existing cluster does not reduce disk size on existing shards

Hello,

I have added 2 new shards to existing cluster of three node replica set.
Chunks balancing is good, but I can see there is no disk size reduced on existing shards while other new shards are getting data.

– NO chunk archive is enabled
– Any option other than repair database, why data is not reducing automatically.

Hi @Aayushi_Mangal,

The Wired Tiger storage does not release space when chunks are moved and deleted from old shards as deletion only mark blocks for reuse.

I suspect that you haven’t compacted or resynced the nodes with the unreleased space and therefore it is still shown as occupied…

If you wish to release space to the os consider doing a rolling resync on those shards.

Thanks
Pavel

1 Like

Thank you @Pavel_Duchovny for explanation.

We have around 1TB of data, looks like resync is not good option for us, it will take a lot of time. De-frag looks like good option here. Let me know if you have any other suggestions.

Hi @Aayushi_Mangal,

Since the blocks are marked for reuse you can leave it as is… New data will use this space… You can monitor the behaviour and consider if you still need a defrag otherwise just let it run and add storage when needed.

Best
Pavel