Monthly Archives: October 2010

Exchange 2010: Move-DatabasePath results in an InvalidOperationException when mount points are utilized for storage.

In Exchange 2010 administrators may attempt to move either log files or database files using the command move-DatabasePath.  In some instances the command may fail containing an InvalidOperationException.  Here are some examples of the errors (note that verbose output is utilized):

========================================================

Move-DatabasePath –identity <name> –logFolderPath <path> –verbose

[PS] C:>Move-DatabasePath MBX-1-DB0 -LogFolderPath T:NewPath -Verbose
VERBOSE: [17:29:43.342 GMT] Move-DatabasePath : Active Directory session
settings for ‘Move-DatabasePath’ are: View Entire Forest: ‘False’, Default
Scope: ‘home.domain.com’, Configuration Domain Controller:
‘DC-1.home.domain.com’, Preferred Global Catalog:
‘DC-2.home.domain.com’, Preferred Domain Controllers: ‘{
DC-2.home.domain.com }’
VERBOSE: [17:29:43.342 GMT] Move-DatabasePath : Runspace context: Executing
user: home.domain.com/Users/Administrator, Executing user organization: ,
Current organization: , RBAC-enabled: Enabled.
VERBOSE: [17:29:43.342 GMT] Move-DatabasePath : Beginning processing &
VERBOSE: [17:29:43.342 GMT] Move-DatabasePath : Instantiating handler with
index 0 for cmdlet extension agent "Admin Audit Log Agent".
VERBOSE: [17:29:43.420 GMT] Move-DatabasePath : Current ScopeSet is: {
Recipient Read Scope: {{, }}, Recipient Write Scopes: {{, }}, Configuration
Read Scope: {{, }}, Configuration Write Scope(s): {{, }, }, Exclusive Recipient
Scope(s): {}, Exclusive Configuration Scope(s): {} }
VERBOSE: [17:29:44.124 GMT] Move-DatabasePath : Searching objects "MBX-1-DB0"
of type "Database" under the root "$null".
VERBOSE: [17:29:44.155 GMT] Move-DatabasePath : Previous operation run on
domain controller ‘DC-1.home.domain.com’.
VERBOSE: [17:29:44.217 GMT] Move-DatabasePath : Processing object "MBX-1-DB0".
VERBOSE: [17:29:45.186 GMT] Move-DatabasePath : Searching objects
"MBX-1.home.domain.com" of type "Server" under the root "$null".
VERBOSE: [17:29:45.280 GMT] Move-DatabasePath : Previous operation run on
domain controller ‘DC-1.home.domain.com’.
VERBOSE: [17:29:46.873 GMT] Move-DatabasePath : Verifying that the path
"T:NewPath" on the server "MBX-1.home.domain.com" is located on a fixed
or network drive.
VERBOSE: [17:29:49.529 GMT] Move-DatabasePath : Verifying that the log location
"T:NewPath" on server "MBX-1.home.domain.com" has not been occupied by
an existing file or directory.
VERBOSE: [17:29:50.326 GMT] Move-DatabasePath : Checking the existence of log
files under directory "d:MBX-1MBX-1-DB0MBX-1-DB0-Logs" on Server
"MBX-1.home.domain.com".
VERBOSE: [17:33:05.815 GMT] Move-DatabasePath : Admin Audit Log: Entered
Handler:Validate.
VERBOSE: [17:33:05.815 GMT] Move-DatabasePath : Admin Audit Log: Entered
ClassFactory:InitializeConfig.
VERBOSE: [17:33:05.924 GMT] Move-DatabasePath : Admin Audit Log: Exited
ClassFactory:InitializeConfig.
VERBOSE: [17:33:07.190 GMT] Move-DatabasePath : Admin Audit Log: Exited
Handler:Validate.

Confirm
Are you sure you want to perform this action?

Moving database path "MBX-1-DB0".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): a
VERBOSE: [17:33:52.375 GMT] Move-DatabasePath : Resolved current organization:
.
VERBOSE: [17:33:52.594 GMT] Move-DatabasePath : The Admin RPC connection is
being established with server "MBX-1.home.domain.com".

Confirm
To perform the move operation, database "MBX-1-DB0" must be temporarily
dismounted, which will make it inaccessible to all users. Do you want to
continue?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): a
VERBOSE: [17:34:04.422 GMT] Move-DatabasePath : Reading new object
"9d654028-b845-43fc-9b3b-a011c442c9e6" of type "Server".
VERBOSE: [17:34:04.422 GMT] Move-DatabasePath : Dismounting the database,
"MBX-1-DB0".
VERBOSE: [17:34:05.297 GMT] Move-DatabasePath : Copying the database Log files
under directory "d:MBX-1MBX-1-DB0MBX-1-DB0-Logs" to the target directory
"T:NewPath" on Server "MBX-1".
VERBOSE: [17:34:05.344 GMT] Move-DatabasePath : Checking the existence of
directory "T:NewPath" on Server "MBX-1.home.domain.com".
VERBOSE: [17:34:05.359 GMT] Move-DatabasePath : Set access control for
directory "T:NewPath" on server "MBX-1.home.domain.com".
VERBOSE: [17:34:05.359 GMT] Move-DatabasePath : Checking the existence of
directory "d:MBX-1MBX-1-DB0MBX-1-DB0-Logs" on Server
"MBX-1.home.domain.com".
VERBOSE: [17:34:05.406 GMT] Move-DatabasePath : Copying the files from
directory "d:MBX-1MBX-1-DB0MBX-1-DB0-Logs" to target directory "T:NewPath"
on server "MBX-1.home.domain.com".
VERBOSE: [17:35:54.090 GMT] Move-DatabasePath : Reading new object
"9d654028-b845-43fc-9b3b-a011c442c9e6" of type "Server".
VERBOSE: [17:35:54.105 GMT] Move-DatabasePath : The task is attempting to
communicate with the Microsoft Exchange Replication service on server
"MBX-1.home.domain.com" to obtain updated configuration changes for
database "MBX-1-DB0".
VERBOSE: [17:35:54.965 GMT] Move-DatabasePath : Mounting database "MBX-1-DB0".
VERBOSE: [17:35:56.199 GMT] Move-DatabasePath : Admin Audit Log: Entered
Handler:OnComplete.
VERBOSE: [17:36:03.902 GMT] Move-DatabasePath : Admin Audit Log: Exited
Handler:OnComplete.
Failed to move database log files from "d:MBX-1MBX-1-DB0MBX-1-DB0-Logs" to "
T:NewPath".
    + CategoryInfo          : InvalidOperation: (MBX-1-DB0:ADObjectId) [Move-DatabasePath], InvalidOperationException
    + FullyQualifiedErrorId : 7280D023,Microsoft.Exchange.Management.SystemConfigurationTasks.MoveDatabasePath
VERBOSE: [17:36:04.074 GMT] Move-DatabasePath : Ending processing &
[PS] C:>

========================================================

Move-DatabasePath –identity <name> –logFolderPath <path> –edbFilePath <pathname.edb> –verbose

[PS] C:>Move-DatabasePath -Identity MBX-1-DB0 -EdbFilePath t:NewPathMBX-1-DB0.edb

Confirm
Are you sure you want to perform this action?

Moving database path "MBX-1-DB0".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): a

Confirm
To perform the move operation, database "MBX-1-DB0" must be temporarily
dismounted, which will make it inaccessible to all users. Do you want to
continue?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): a
[PS] C:>Move-DatabasePath -Identity MBX-1-DB0 -EdbFilePath "E:MBX-1MBX-1-DB0MBX-1-DB0-DatabaseMBX-1-DB0.edb"

Confirm
Are you sure you want to perform this action?

Moving database path "MBX-1-DB0".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): a

Confirm
To perform the move operation, database "MBX-1-DB0" must be temporarily
dismounted, which will make it inaccessible to all users. Do you want to
continue?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): a
[PS] C:>       Move-DatabasePath MBX-1-DB0 -LogFolderPath T:NewPath -EdbFilePath t:NewPathMBX-1-DB0.edb -Verbose
VERBOSE: [17:43:42.454 GMT] Move-DatabasePath : Active Directory session
settings for ‘Move-DatabasePath’ are: View Entire Forest: ‘False’, Default
Scope: ‘home.domain.com’, Configuration Domain Controller:
‘DC-1.home.domain.com’, Preferred Global Catalog:
‘DC-2.home.domain.com’, Preferred Domain Controllers: ‘{
DC-2.home.domain.com }’
VERBOSE: [17:43:42.454 GMT] Move-DatabasePath : Runspace context: Executing
user: home.domain.com/Users/Administrator, Executing user organization: ,
Current organization: , RBAC-enabled: Enabled.
VERBOSE: [17:43:42.454 GMT] Move-DatabasePath : Beginning processing &
VERBOSE: [17:43:42.454 GMT] Move-DatabasePath : Instantiating handler with
index 0 for cmdlet extension agent "Admin Audit Log Agent".
VERBOSE: [17:43:42.470 GMT] Move-DatabasePath : Current ScopeSet is: {
Recipient Read Scope: {{, }}, Recipient Write Scopes: {{, }}, Configuration
Read Scope: {{, }}, Configuration Write Scope(s): {{, }, }, Exclusive Recipient
Scope(s): {}, Exclusive Configuration Scope(s): {} }
VERBOSE: [17:43:42.470 GMT] Move-DatabasePath : Searching objects "MBX-1-DB0"
of type "Database" under the root "$null".
VERBOSE: [17:43:42.486 GMT] Move-DatabasePath : Previous operation run on
domain controller ‘DC-1.home.domain.com’.
VERBOSE: [17:43:42.486 GMT] Move-DatabasePath : Processing object "MBX-1-DB0".
VERBOSE: [17:43:42.501 GMT] Move-DatabasePath : Searching objects
"MBX-1.home.domain.com" of type "Server" under the root "$null".
VERBOSE: [17:43:42.533 GMT] Move-DatabasePath : Previous operation run on
domain controller ‘DC-1.home.domain.com’.
VERBOSE: [17:43:42.595 GMT] Move-DatabasePath : Verifying that EDB file path
"t:NewPathMBX-1-DB0.edb" is available for use.
VERBOSE: [17:43:42.704 GMT] Move-DatabasePath : Checking the existence of file
"E:MBX-1MBX-1-DB0MBX-1-DB0-DatabaseMBX-1-DB0.edb" on server "MBX-1".
VERBOSE: [17:43:42.783 GMT] Move-DatabasePath : Verifying that the path
"t:NewPathMBX-1-DB0.edb" on the server "MBX-1" is located on a fixed or
network drive.
VERBOSE: [17:43:42.783 GMT] Move-DatabasePath : Checking the existence of file
"t:NewPathMBX-1-DB0.edb" on server "MBX-1".
VERBOSE: [17:43:42.814 GMT] Move-DatabasePath : Checking the existence of
directory "t:NewPathMBX-1-DB0.edb" on Server "MBX-1".
VERBOSE: [17:43:42.845 GMT] Move-DatabasePath : Checking the existence of
directory "t:NewPath" on Server "MBX-1.home.domain.com".
VERBOSE: [17:43:42.845 GMT] Move-DatabasePath : Set access control for
directory "t:NewPath" on server "MBX-1.home.domain.com".
VERBOSE: [17:43:42.845 GMT] Move-DatabasePath : Checking the existence of
directory
"e:mbx-1mbx-1-db0mbx-1-db0-databasecatalogdata-ed71935d-a14f-4937-b20d-50b3
7e136797-9d654028-b845-43fc-9b3b-a011c442c9e6" on Server "MBX-1".
VERBOSE: [17:43:42.845 GMT] Move-DatabasePath : Verifying that the path
"T:NewPath" on the server "MBX-1.home.domain.com" is located on a fixed
or network drive.
VERBOSE: [17:43:42.861 GMT] Move-DatabasePath : Verifying that the log location
"T:NewPath" on server "MBX-1.home.domain.com" has not been occupied by
an existing file or directory.
VERBOSE: [17:43:42.923 GMT] Move-DatabasePath : Checking the existence of log
files under directory "d:MBX-1MBX-1-DB0MBX-1-DB0-Logs" on Server
"MBX-1.home.domain.com".
VERBOSE: [17:46:51.018 GMT] Move-DatabasePath : Admin Audit Log: Entered
Handler:Validate.
VERBOSE: [17:46:51.034 GMT] Move-DatabasePath : Admin Audit Log: Exited
Handler:Validate.

Confirm
Are you sure you want to perform this action?

Moving database path "MBX-1-DB0".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): a
VERBOSE: [17:51:35.320 GMT] Move-DatabasePath : Resolved current organization:
.
VERBOSE: [17:51:35.351 GMT] Move-DatabasePath : The Admin RPC connection is
being established with server "MBX-1.home.domain.com".

Confirm
To perform the move operation, database "MBX-1-DB0" must be temporarily
dismounted, which will make it inaccessible to all users. Do you want to
continue?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): a
VERBOSE: [17:51:37.586 GMT] Move-DatabasePath : Reading new object
"9d654028-b845-43fc-9b3b-a011c442c9e6" of type "Server".
VERBOSE: [17:51:37.586 GMT] Move-DatabasePath : Dismounting the database,
"MBX-1-DB0".
VERBOSE: [17:51:37.851 GMT] Move-DatabasePath : The file is being copied from
"E:MBX-1MBX-1-DB0MBX-1-DB0-DatabaseMBX-1-DB0.edb" to
"t:NewPathMBX-1-DB0.edb" on server "MBX-1.home.domain.com".
VERBOSE: [17:53:03.177 GMT] Move-DatabasePath : Copying the database Log files
under directory "d:MBX-1MBX-1-DB0MBX-1-DB0-Logs" to the target directory
"T:NewPath" on Server "MBX-1".
VERBOSE: [17:53:03.209 GMT] Move-DatabasePath : Checking the existence of
directory "T:NewPath" on Server "MBX-1.home.domain.com".
VERBOSE: [17:53:03.209 GMT] Move-DatabasePath : Set access control for
directory "T:NewPath" on server "MBX-1.home.domain.com".
VERBOSE: [17:53:03.209 GMT] Move-DatabasePath : Checking the existence of
directory "d:MBX-1MBX-1-DB0MBX-1-DB0-Logs" on Server
"MBX-1.home.domain.com".
VERBOSE: [17:53:03.271 GMT] Move-DatabasePath : Copying the files from
directory "d:MBX-1MBX-1-DB0MBX-1-DB0-Logs" to target directory "T:NewPath"
on server "MBX-1.home.domain.com".
VERBOSE: [17:56:19.237 GMT] Move-DatabasePath : Deleting the file
"t:NewPathMBX-1-DB0.edb" on server "MBX-1".
VERBOSE: [17:56:19.378 GMT] Move-DatabasePath : Reading new object
"9d654028-b845-43fc-9b3b-a011c442c9e6" of type "Server".
VERBOSE: [17:56:19.378 GMT] Move-DatabasePath : The task is attempting to
communicate with the Microsoft Exchange Replication service on server
"MBX-1.home.domain.com" to obtain updated configuration changes for
database "MBX-1-DB0".
VERBOSE: [17:56:19.503 GMT] Move-DatabasePath : Mounting database "MBX-1-DB0".
VERBOSE: [17:56:21.487 GMT] Move-DatabasePath : Admin Audit Log: Entered
Handler:OnComplete.
VERBOSE: [17:56:21.831 GMT] Move-DatabasePath : Admin Audit Log: Exited
Handler:OnComplete.
Failed to move database log files from "d:MBX-1MBX-1-DB0MBX-1-DB0-Logs" to "
T:NewPath".
    + CategoryInfo          : InvalidOperation: (MBX-1-DB0:ADObjectId) [Move-DatabasePath], InvalidOperationException
    + FullyQualifiedErrorId : 7280D023,Microsoft.Exchange.Management.SystemConfigurationTasks.MoveDatabasePath
VERBOSE: [17:56:22.003 GMT] Move-DatabasePath : Ending processing &
[PS] C:>

========================================================

The issue that causes this error is due to the way free space is determined when a mount point is utilized.  In this case we have the following disk layout:

Disk T: –> 8 megs free space.

Disk T:NewPath –>  NewPath is a mount point created from a folder residing on the T volume.  NewPath has 127 gig of free space.

In this case the first check that is performed is a WMI query to determine if the destination has enough free space to accommodate the log files being moved.  Unfortunately the WMI call utilized checks the free space of the mount point root disk, and not the mount point itself.  This results in the destination being preceived as not having enough disk space and the move operation returning failed with an exception.

Note:  This issue only happens when moving log files or moving log files with a database.  If only the database path is adjusted this issue does not occur.

To correct this issue the log files can be moved by hand.  The following steps will work around this condition:

1)  Dismount the database that you want to move log files for.

Dismount-Database –identity <NAME> -verbose

[PS] C:>Dismount-Database -Identity MBX-1-DB0 -Verbose
VERBOSE: [18:12:18.536 GMT] Dismount-Database : Active Directory session
settings for ‘Dismount-Database’ are: View Entire Forest: ‘False’, Default
Scope: ‘home.domain.com’, Configuration Domain Controller:
‘DC-1.home.domain.com’, Preferred Global Catalog:
‘DC-2.home.domain.com’, Preferred Domain Controllers: ‘{
DC-2.home.domain.com }’
VERBOSE: [18:12:18.536 GMT] Dismount-Database : Runspace context: Executing
user: home.domain.com/Users/Administrator, Executing user organization: ,
Current organization: , RBAC-enabled: Enabled.
VERBOSE: [18:12:18.536 GMT] Dismount-Database : Beginning processing &
VERBOSE: [18:12:18.536 GMT] Dismount-Database : Instantiating handler with
index 0 for cmdlet extension agent "Admin Audit Log Agent".
VERBOSE: [18:12:18.583 GMT] Dismount-Database : Current ScopeSet is: {
Recipient Read Scope: {{, }}, Recipient Write Scopes: {{, }}, Configuration
Read Scope: {{, }}, Configuration Write Scope(s): {{, }, }, Exclusive Recipient
Scope(s): {}, Exclusive Configuration Scope(s): {} }
VERBOSE: [18:12:18.583 GMT] Dismount-Database : Searching objects "MBX-1-DB0"
of type "Database" under the root "$null".
VERBOSE: [18:12:18.598 GMT] Dismount-Database : Previous operation run on
domain controller ‘DC-1.home.domain.com’.
VERBOSE: [18:12:18.598 GMT] Dismount-Database : Processing object "MBX-1-DB0".
VERBOSE: [18:12:18.645 GMT] Dismount-Database : Admin Audit Log: Entered
Handler:Validate.
VERBOSE: [18:12:18.645 GMT] Dismount-Database : Admin Audit Log: Exited
Handler:Validate.

Confirm
Are you sure you want to perform this action?

Dismounting database "MBX-1-DB0". This may result in reduced availability for
mailboxes in the database.
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): a
VERBOSE: [18:12:20.458 GMT] Dismount-Database : Resolved current organization:
.
VERBOSE: [18:12:20.489 GMT] Dismount-Database : The Admin RPC connection is
being established with server "MBX-1.home.domain.com".
VERBOSE: [18:12:20.489 GMT] Dismount-Database : Dismounting the database,
"MBX-1-DB0".
VERBOSE: [18:12:20.817 GMT] Dismount-Database : Admin Audit Log: Entered
Handler:OnComplete.
VERBOSE: [18:12:20.880 GMT] Dismount-Database : Admin Audit Log: Exited
Handler:OnComplete.
VERBOSE: [18:12:20.895 GMT] Dismount-Database : Ending processing &
[PS] C:>

2)  Move the log file path using the configuration only switch which will simply write the new path to the active directory. 

Move-DatabasePath –identity <NAME> –logFolderPath <path> –configurationOnly:$TRUE –verbose

[PS] C:>Move-DatabasePath -Identity MBX-1-DB0 -LogFolderPath T:NewPath -ConfigurationOnly:$TRUE -Verbose
VERBOSE: [18:18:12.047 GMT] Move-DatabasePath : Active Directory session
settings for ‘Move-DatabasePath’ are: View Entire Forest: ‘False’, Default
Scope: ‘home.domain.com’, Configuration Domain Controller:
‘DC-1.home.domain.com’, Preferred Global Catalog:
‘DC-2.home.domain.com’, Preferred Domain Controllers: ‘{
DC-2.home.domain.com }’
VERBOSE: [18:18:12.063 GMT] Move-DatabasePath : Runspace context: Executing
user: home.domain.com/Users/Administrator, Executing user organization: ,
Current organization: , RBAC-enabled: Enabled.
VERBOSE: [18:18:12.063 GMT] Move-DatabasePath : Beginning processing &
VERBOSE: [18:18:12.063 GMT] Move-DatabasePath : Instantiating handler with
index 0 for cmdlet extension agent "Admin Audit Log Agent".
VERBOSE: [18:18:12.063 GMT] Move-DatabasePath : Current ScopeSet is: {
Recipient Read Scope: {{, }}, Recipient Write Scopes: {{, }}, Configuration
Read Scope: {{, }}, Configuration Write Scope(s): {{, }, }, Exclusive Recipient
Scope(s): {}, Exclusive Configuration Scope(s): {} }
VERBOSE: [18:18:12.079 GMT] Move-DatabasePath : Searching objects "MBX-1-DB0"
of type "Database" under the root "$null".
VERBOSE: [18:18:12.360 GMT] Move-DatabasePath : Previous operation run on
domain controller ‘DC-1.home.domain.com’.
VERBOSE: [18:18:12.360 GMT] Move-DatabasePath : Processing object "MBX-1-DB0".
VERBOSE: [18:18:12.391 GMT] Move-DatabasePath : Searching objects
"MBX-1.home.domain.com" of type "Server" under the root "$null".
VERBOSE: [18:18:12.391 GMT] Move-DatabasePath : Previous operation run on
domain controller ‘DC-1.home.domain.com’.

Confirm
This operation will skip the safety check and make the change to Active
Directory directly. Do you want to continue?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): a
VERBOSE: [18:18:14.798 GMT] Move-DatabasePath : Admin Audit Log: Entered
Handler:Validate.
VERBOSE: [18:18:14.798 GMT] Move-DatabasePath : Admin Audit Log: Exited
Handler:Validate.

Confirm
Are you sure you want to perform this action?

Moving database path "MBX-1-DB0".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): a
VERBOSE: [18:18:16.110 GMT] Move-DatabasePath : Resolved current organization:
.
VERBOSE: [18:18:16.126 GMT] Move-DatabasePath : The Admin RPC connection is
being established with server "MBX-1.home.domain.com".
VERBOSE: [18:18:16.126 GMT] Move-DatabasePath : Saving object "MBX-1-DB0" of
type "Database" and state "Changed".
VERBOSE: [18:18:16.126 GMT] Move-DatabasePath : Previous operation run on
domain controller ‘DC-1.home.domain.com’.
VERBOSE: [18:18:16.126 GMT] Move-DatabasePath : Getting the name of the domain
controller to be used to double write the configurable object’s changes. Double
write is the mechanism to make sure that the changes are persisted in the
domain controller used by the store service on server
"MBX-1.home.domain.com".
VERBOSE: [18:18:16.141 GMT] Move-DatabasePath : Reading new object "MBX-1-DB0"
of type "Database".
VERBOSE: [18:18:16.141 GMT] Move-DatabasePath : Previous operation run on
domain controller ‘DC-1.home.domain.com’.
VERBOSE: [18:18:16.141 GMT] Move-DatabasePath : Double writing changes of the
configurable object, "MBX-1-DB0", on domain controller
"DC-1.home.domain.com".
VERBOSE: [18:18:16.141 GMT] Move-DatabasePath : Previous operation run on
domain controller ‘DC-1.home.domain.com’.
VERBOSE: [18:18:16.141 GMT] Move-DatabasePath : The task is attempting to
communicate with the Microsoft Exchange Replication service on server
"MBX-1.home.domain.com" to obtain updated configuration changes for
database "MBX-1-DB0".
VERBOSE: [18:18:16.298 GMT] Move-DatabasePath : Admin Audit Log: Entered
Handler:OnComplete.
VERBOSE: [18:18:16.313 GMT] Move-DatabasePath : Admin Audit Log: Exited
Handler:OnComplete.
VERBOSE: [18:18:16.313 GMT] Move-DatabasePath : Ending processing &
[PS] C:>

3)  Using ROBOCopy – which is included with Windows 2008 and Windows 2008 R2 – mirror the current log directory to the new location. 

Note:  This command will MOVE the files – that is copy them to the new directory and then delete the original file.

Note:  This command assumes that only log files exist in the directory.  If the database and catalog files exist in the directory they should be skipped.

ROBOCOPY <SOURCE-DIR> <TARGET-DIR> /MOVE /XD *Catalog* /XF *.edb

[PS] C:>robocopy "D:MBX-1MBX-1-DB0MBX-1-DB0-Logs" "T:NewPath" /MOVE /XD *Catalog* /XF *.edb

——————————————————————————-
   ROBOCOPY     ::     Robust File Copy for Windows

——————————————————————————-

  Started : Mon Sep 27 14:50:08 2010

   Source : D:MBX-1MBX-1-DB0MBX-1-DB0-Logs
     Dest : T:NewPath

    Files : *.*

Exc Files : *.edb

Exc Dirs : *Catalog*

  Options : *.* /COPY:DAT /MOVE /R:1000000 /W:30

——————————————————————————

100%        New File               1.0 m        E00res00005.jrs
100%        New File               1.0 m        E00res00006.jrs
100%        New File               1.0 m        E00res00007.jrs
100%        New File               1.0 m        E00res00008.jrs
100%        New File               1.0 m        E00res00009.jrs
100%        New File               1.0 m        E00res0000A.jrs
100%        New File                   0        E00tmp.log

——————————————————————————

               Total    Copied   Skipped  Mismatch    FAILED    Extras
    Dirs :         2         0         2         0         0         1
   Files :      6430      6429         1         0         0         0
   Bytes :   9.158 g   6.275 g   2.882 g         0         0         0
   Times :   0:04:03   0:03:40                       0:00:00   0:00:22

   Speed :            30539839 Bytes/sec.
   Speed :            1747.503 MegaBytes/min.

   Ended : Mon Sep 27 14:44:39 2010
[PS] C:>

3)  Optional:  Move the database file to the new location.

Move-DatabasePath –identity <NAME> –edbFilePath <TargetPathName.edb> –verbose

4)  Mount the database post all move operations (allow sufficient time for AD replication to occur)

Mount-Database –identity <NAME> –verbose

[PS] C:>Mount-Database -Identity MBX-1-DB0 -Verbose
VERBOSE: [19:06:06.471 GMT] Mount-Database : Active Directory session settings
for ‘Mount-Database’ are: View Entire Forest: ‘False’, Default Scope:
‘home.domain.com’, Configuration Domain Controller:
‘DC-1.home.domain.com’, Preferred Global Catalog:
‘DC-2.home.domain.com’, Preferred Domain Controllers: ‘{
DC-2.home.domain.com }’
VERBOSE: [19:06:06.486 GMT] Mount-Database : Runspace context: Executing user:
home.domain.com/Users/Administrator, Executing user organization: ,
Current organization: , RBAC-enabled: Enabled.
VERBOSE: [19:06:06.486 GMT] Mount-Database : Beginning processing &
VERBOSE: [19:06:06.486 GMT] Mount-Database : Instantiating handler with index 0
for cmdlet extension agent "Admin Audit Log Agent".
VERBOSE: [19:06:07.033 GMT] Mount-Database : Current ScopeSet is: { Recipient
Read Scope: {{, }}, Recipient Write Scopes: {{, }}, Configuration Read Scope:
{{, }}, Configuration Write Scope(s): {{, }, }, Exclusive Recipient Scope(s):
{}, Exclusive Configuration Scope(s): {} }
VERBOSE: [19:06:07.033 GMT] Mount-Database : Searching objects "MBX-1-DB0" of
type "Database" under the root "$null".
VERBOSE: [19:06:07.049 GMT] Mount-Database : Previous operation run on domain
controller ‘DC-1.home.domain.com’.
VERBOSE: [19:06:07.065 GMT] Mount-Database : Processing object "MBX-1-DB0".
VERBOSE: [19:06:07.111 GMT] Mount-Database : Admin Audit Log: Entered
Handler:Validate.
VERBOSE: [19:06:07.111 GMT] Mount-Database : Admin Audit Log: Exited
Handler:Validate.
VERBOSE: Mounting database "MBX-1-DB0".
VERBOSE: [19:06:07.127 GMT] Mount-Database : Resolved current organization: .
VERBOSE: [19:06:07.158 GMT] Mount-Database : Searching objects
"home.domain.com/Microsoft Exchange System
Objects/SystemMailbox{ed71935d-a14f-4937-b20d-50b37e136797}" of type
"ADRecipient" under the root "$null".
VERBOSE: [19:06:07.752 GMT] Mount-Database : Mounting database "MBX-1-DB0".
VERBOSE: [19:06:08.971 GMT] Mount-Database : Admin Audit Log: Entered
Handler:OnComplete.
VERBOSE: [19:06:09.065 GMT] Mount-Database : Admin Audit Log: Exited
Handler:OnComplete.
VERBOSE: [19:06:09.065 GMT] Mount-Database : Ending processing &
[PS] C:>

At this time we expect this issue to be resolved in Exchange 2010 Service Pack 2.

Database copies fail to display after upgrading to Exchange 2010 Service Pack 1

 

Recently some customers have experienced an issue where database copies do not display when using the Exchange Management Console after upgrading to Exchange 2010 Service Pack 1.  When attempting to view database copies using the Exchange Management Shell no issue is displayed. 

Database copies can be viewed in two locations. 

The first location is under Organization Configuration –> Mailbox –> Database Management.  In this view when an administrator selects a database from the list, the Database Copies displayed in the bottom portion of the display are missing ALL or SOME copies for a given database.  Here is an example of a 4 node DAG with a database replicated to all 4 members:

All Database Copies Missing:

image

Some Database Copies Missing:

image

Expected output showing all database copies:

image 

The second location is under Server Configuration –> Mailbox.  By selecting a server with the mailbox role you can view the individual database copies assigned to that server.  Here is an example of database copies missing from the server:

image

Whether all database copies are missing <or> some database copies are missing the Exchange Management Shell command Get-MailboxDatabaseCopyStatus always returns accurate information.  Here is a copy of Get-MailboxDatabaseCopyStatus *:

image

When any Exchange role is installed on the server (with exception of Edge transport) the hostname of the server is written into the Exchange configuration container within Active Directory.  In this case the server name was established with a lower case.  It was established in the container with a lower case because the hostname of the server, which was established during setup, was established with a lower case name (or a portion of the name lowercase).

In reference customers running HOSTNAME <or> reviewing the full computer name in server management showed that all or a portion of the name was lower case.

The Exchange Management Console code incorrectly compares case when comparing a database copy against a server name.  This causes the console to not display all the valid database copies.

Let’s step through an example.

In this example there is a four node DAG.  The server names are as follows:

Dag-1

dag-2

DAG-3

DAG-4

You can verify these server names by running get-databaseavailabilitygroup –identity <DAGName> | fl name,servers

[PS] D:>Get-DatabaseAvailabilityGroup -Identity DAG | fl name,servers

Name    : DAG
Servers : {DAG-4, DAG-3, dag-2, Dag-1}

When looking in the management console, and selecting any database replicated to all four members, the only copies that will be displayed are on nodes DAG-4 and DAG-3.

image

When the Exchange Management Console draws the database copies pane, it compares the host server name of a database copy to the server name of a database copy status.  This comparison is case sensitive.  Let’s take a look at a database copy that fails to display when viewing the copies for DAG-1.

(Get-MailboxDatabase –identity <NAME>).databasecopies | fl hostservername

[PS] D:>(Get-MailboxDatabase DAG-DB0).databasecopies | fl hostservername

HostServerName : Dag-1

HostServerName : DAG-3

HostServerName : DAG-4

HostServerName : dag-2

(Get-MailboxDatabaseCopyStatus <NAME><Server>).mailboxserver

[PS] D:>(Get-MailboxDatabaseCopyStatus DAG-DB0DAG-1).mailboxServer
DAG-1

In this case DAG-1 != Dag-1 and therefore the copy does not display in the management console.

Let’s take a look at a copy that does display.

(Get-MailboxDatabase –identity <NAME>).databasecopies | fl hostservername

[PS] D:>(Get-MailboxDatabase DAG-DB0).databasecopies | fl hostservername

HostServerName : Dag-1

HostServerName : DAG-3

HostServerName : DAG-4

HostServerName : dag-2

(Get-MailboxDatabaseCopyStatus <NAME><Server>).mailboxserver

[PS] D:>(Get-MailboxDatabaseCopyStatus DAG-DB0DAG-4).mailboxServer
DAG-4

In this case DAG-4 == DAG-4 and therefore the copy does display in the management console.

Unfortunately at this time we can only recommend that database copies for missing servers be managed using the Exchange Management Shell.  It is not recommended to attempt to modify the active directory at this time to overcome this issue.

At this time we are filing the necessary bugs to get this permanently corrected without modifying server names.  I will update this blog as this process progresses.

=======================================

Update 10/10/2010

 

This issue is currently scheduled to be corrected in Exchange 2010 SP1 Rollup Update 3.  

=======================================