Link to home
Start Free TrialLog in
Avatar of Siv
SivFlag for United Kingdom of Great Britain and Northern Ireland

asked on

moving Exchange 2013 mailbox database logs

Hi,
I have had an issue where the Exchange 2013 server has used up the vast majority of the disk space on the server's C: drive, so I ran the PowerShell commands to move the database which has worked successfully.  However there are also a huge amount of files with names like "E00000000C8.log".  How can I instruct Exchange to relocate that folder to my new drive "E:\MailboxLogs"?  I have found procedures to list the log files using:

Get-TransportServer MailServerName | select *logpath

This lists me all the log paths for my server but none are in the same location as where the mailbox database used to be. So there must be another PowerShell command that can instruct the Exchange Server to relocate these logs?

Any help appreciated.

Siv
Avatar of basil2912
basil2912
Flag of Romania image

Use Move-DatabasePath:
http://technet.microsoft.com/en-us/library/bb124742(v=exchg.150).aspx 

Be aware that while the move is occurring the DB will be offline.
SOLUTION
Avatar of suriyaehnop
suriyaehnop
Flag of Malaysia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Siv

ASKER

suriyaehnop,
As I have already moved the .edb file can I run this command again if I run this command:

[PS] C:\scripts>Get-MailboxDatabase "Mailbox Database 0828182752" | FL Name,*Path*


Name                    : Mailbox Database 0828182752
EdbFilePath             : E:\MailboxDatabase\Mailbox Database 0828182752.edb
LogFolderPath           : C:\Program Files\Microsoft\Exchange Server\V15\Mailbox\Mailbox Database 0828182752
TemporaryDataFolderPath :

As you can see my edb is in my E:\MailboxDatabase folder already and I want my logs in E:\MailboxLogs\ if I run the command to move the database as well as the logs will that cause any issues or will it just ignore the edb file if the path is the same as its current path?

Siv
If you just run the command I gave you above and specify the database with only the logfolerpath attribute then only the logfolderpath will move/change.
Like tshearon said just run Move-Databasepath <databasename> -LogFilePath -Whatif. With "-whatif" it will let know you know the result of cmdlet. it doesn't exactly execute teh cmdlet, it like a testing. If you're ok with the result, you can run the repeat the cmdlet without specify "-whatif"
Avatar of Siv

ASKER

I tried the command and it gave me this error:

[PS] C:\scripts>Move-DatabasePath -LogFolderPath E:\MailboxLogs\MailLogs

cmdlet Move-DatabasePath at command pipeline position 1
Supply values for the following parameters:
Identity: Mailbox Database 0828182752
Failed to connect to target server "ACMMAIL". Error: WMI exception occurred on server 'ACMMail.ACMorgannwg.local':
Quota violation
    + CategoryInfo          : InvalidOperation: (Mailbox Database 0828182752:DatabaseIdParameter) [Move-DatabasePath],
    InvalidOperationException
    + FullyQualifiedErrorId : BC23C35,Microsoft.Exchange.Management.SystemConfigurationTasks.MoveDatabasePath
    + PSComputerName        : acmmail.acmorgannwg.local

I did this without dismounting the database first so I am now re-running with the database dismounted and running this command:

Move-DatabasePath -Identity "Mailbox Database 0828182752" -LogFolderPath E:\MailboxLogs\MailLogs

It seems to be going longer before erroring? but if you have any ideas what might be causing the error I would like to hear what that is.

Siv
Avatar of Siv

ASKER

Bah!
It failed again with the same Quota Violation?

anyone know what would be causing that?

Siv
Avatar of Siv

ASKER

I checked the location where the log files are being moved to and there are no quotas set for that drive? I also checked the permissions and they are full control for administrators and for domain users its everything but full control and special permissions?  The error text sounds like it's something in Exchange Server?

Failed to connect to target server "ACMMAIL". Error: WMI exception occurred on server 'ACMMail.ACMorgannwg.local':
Quota violation
    + CategoryInfo          : InvalidOperation: (Mailbox Database 0828182752:DatabaseIdParameter) [Move-DatabasePath],
    InvalidOperationException
    + FullyQualifiedErrorId : BC23C35,Microsoft.Exchange.Management.SystemConfigurationTasks.MoveDatabasePath
    + PSComputerName        : acmmail.acmorgannwg.local

I am stumped now, I looked up the FullyQualifiedErrorID and there is nothing returned for that error?

Am looking into the Quota Violation to see if there is anything about that?

Siv
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Siv

ASKER

tshearon,
Thanks for the advice, I have dismounted the database and then ran:

eseutil /MH "E:\MailboxDatabase\Mailbox Database 0828182752.edb"

I then checked for the State being "Clean Shutdown" which it was:
Extensible Storage Engine Utilities for Mic
Version 15.00
Copyright (C) Microsoft Corporation. All Ri

Initiating FILE DUMP mode...
         Database: E:\MailboxDatabase\Mailb


DATABASE HEADER:
Checksum Information:
Expected Checksum: 0x08cda997
  Actual Checksum: 0x08cda997

Fields:
        File Type: Database
         Checksum: 0x8cda997
   Format ulMagic: 0x89abcdef
   Engine ulMagic: 0x89abcdef
 Format ulVersion: 0x620,20
 Engine ulVersion: 0x620,20
Created ulVersion: 0x620,20
     DB Signature: Create time:03/28/2014 1
         cbDbPage: 32768
           dbtime: 84510640 (0x50987b0)
            State: Clean Shutdown
     Log Required: 0-0 (0x0-0x0)
    Log Committed: 0-0 (0x0-0x0)

I then manually deleted all the .log files and the .chk file as per this blog post:

http://clintboessen.blogspot.com.au/2010/09/flush-transaction-logs-in-exchange.html

I was then able to run the command though because I had removed all log files I had to add this switch
( -ConfigurationOnly ):

Move-DatabasePath -configurationOnly -Identity "Mailbox Database 0828182752" -LogFolderPath E:\MailboxLogs\MailLogs

And then the commdn completed successfully.  If I now do :

[PS] C:\Windows\system32>Get-MailboxDatabase "Mailbox Database 0828182752" | FL Name,*Path*


Name                    : Mailbox Database 0828182752
EdbFilePath             : E:\MailboxDatabase\Mailbox Database 0828182752.edb
LogFolderPath           : E:\MailboxLogs\MailLogs
TemporaryDataFolderPath :

The logs are where I want them to be and I now have 77GB free on the C: drive so all is right with the World again!

Siv
Avatar of Siv

ASKER

Thanks to tshearon and suriyaehnop I now have the system under control and loads of free space on the server's C: drive.
Thanks for all your help, another lesson learned today.

Siv