What can I do if disk is full?

We have a live instance that we inherited from a previous sale and so we have limited access.
The disk is now full and preventing any WriteCOncern operation such as delete or installing TTL (which would reduce space)…
I am wondering what we can do other than getting into the server and increasing disk space as we are skittish of changing anything before backing up the system.

Any ideas ?

Thank you in advance !

Hi @Pascal_Audant welcome to the community!

There are some things I can think of off the top of my head:

  • Maybe you can delete some documents, drop some collections/indexes, or similar? The compact command may be able to help if you have deleted many documents. By default WiredTiger does not return space to the OS readily, so you might need to run this command.
  • Dump all data and restore to a new hardware with a larger disk. This is of course easier said than done, but may be a longer term solution.
  • Scale horizontally with sharding. This is of the same complexity as the previous point, and would require careful planning to execute.
  • Migrate into a hosted environment such as Atlas, if you’re currently using an on-prem setup. There are tools that can help you do a live migration into Atlas. A hosted environment may be easier to scale in the future.

Those are the immediate solutions that I can think of, but depending on your situation, some of them may not be a practical solution at all. Unfortunately since this is a hardware-related issue, you may not be able to avoid getting into the server.

Best regards
Kevin

1 Like