Risks when performing offline defragmentation

Hello guys!

We want to shrink the size of our mail databases. To do that, we need to perform an offline defrag of the database. The problem for us is that we only have 2 days for the defrag to complete (weekend). I want to ask you guys if that is possible AND if the job does not complete, can we cancel it without issues? In the latter case, is the database then partially shrinked or does it need to fully complete to shrink?

We run Exchange 2010 SP3, have 2 mail databases and 2 archive databases. The primary are both around 500GB and have 85 and 35 GB available whitespace. This is the value of the property "availablenewmailboxspace". I know there could be much more white space in mailboxes, but maybe we can use this as an indication. If there is a lot of extra white space that could have serious impact on the duration of the job.

We also have 2 archive databases, which are both around 1400 GB and have 80GB and 160 GB of white space. Again, the "but" above does apply.

The underlying storage is a raid 10 volume, which contains of 24x 10k 1,2 TB disks.

Does anyone have experience with this and possibly a similar setup? Is there any other info you  might need? Again, I want to see if we can get the offline defrag done during the weekend and want to know if I can stop the job without any complications. I also would like to find out if, when we stop the job half way, the DB is partially shrunk or totally not.

I hope I have made my question clear! Thanks a bunch in advance!

August 14th, 2015 8:01am

Hi,

Offline defrag should complete and it can lead to potential issues when you stop in between.

I would suggest you to create another database and move mailboxes to the new database. Once the move is completed, delete the old one.

There is no downtime involved in the above process.

Free Windows Admin Tool Kit Click here and download it now
August 14th, 2015 8:27am

Hi Manu, thanks for the clear reply! Moving is indeed an option, but we do not have the storage for that unfortunately. Is there any way to get an indication on when the defrag job should complete? Is that 10 hours or 20 hours, or even more? Of course difficult to say, but it would be helpful if we have some sort of idea.Oh, and for my learing curve, what happens if you kill such a job halfway? Does the database corrupt?
  • Edited by Niels Wes 18 hours 51 minutes ago
August 14th, 2015 8:41am

Hi,

We can't predict the exact time required for the defragmentation. But, for a better hardware configuration, you can expect 6-8GB size per hour. Also, remember that, there should be at least 110% free space should be available for initiating the defragmentation.

Huge risk is involved in stopping defragmentation in between. In this case, database corruption can occur. So, better make sure that a database copy is available

Free Windows Admin Tool Kit Click here and download it now
August 14th, 2015 8:54am

Thanks again! I almost forgot: the 110% free space... We do not have that. So it will be moving mailboxes! Thanks a bunch!
August 14th, 2015 8:57am

1. Good information from ManU

2. Agree that mailbox move is the best action, however before you start those moves consider that

A: you will either want to turn on circular logging during the moves OR better yet run backups at incremental times during the moves because there will be allot of lg generation during the process which will eat up disk space

B: Monitor your disk space closely during the move process since as data is moved the old DB will not shrink.

3. ManU is correct that bad things can happen during a defragmentation IF you kill it at the wrong spot, however have never seen corruption being caused by that action.  If corruption occurs you more than likely have a deeper issue on your hands.  Either way if you were to kill a defrag process you would gain nothing since what really happens during a defrag in short is that all relevant data is streamed from the old db into a new DB and then upon completion the old DB is deleted and NEW DB copied into place of the old.  So it has to finish the new creation before you get any value.  Either way if you were to ever to a defrag you would ALWAYS want to have a backup of the OFFLINE DB's before starting an action.

Free Windows Admin Tool Kit Click here and download it now
August 14th, 2015 9:57am

Hi Manu, thanks for the clear reply! Moving is indeed an option, but we do not have the storage for that unfortunately. Is there any way to get an indication on when the defrag job should complete? Is that 10 hours or 20 hours, or even more? Of course difficult to say, but it would be helpful if we have some sort of idea.Oh, and for my learing curve, what happens if you kill such a job halfway? Does the database corrupt?
  • Edited by Niels Wes Friday, August 14, 2015 12:36 PM
August 14th, 2015 12:35pm

Hi Manu, thanks for the clear reply! Moving is indeed an option, but we do not have the storage for that unfortunately. Is there any way to get an indication on when the defrag job should complete? Is that 10 hours or 20 hours, or even more? Of course difficult to say, but it would be helpful if we have some sort of idea.Oh, and for my learing curve, what happens if you kill such a job halfway? Does the database corrupt?
  • Edited by Niels Wes Friday, August 14, 2015 12:36 PM
Free Windows Admin Tool Kit Click here and download it now
August 14th, 2015 12:35pm

Nice addition! Thanks a lot! 
August 18th, 2015 7:26am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics