Get the App
SLTechnology News&Howtos  ›  Servers  › 

The Exchange Management Shell moves storage groups and databases

Shulou Source: shulou.com Published: 2022-06-02 04:18:04 10月04日 Update

As an Exchange administrator, you may encounter situations where you need to change the storage path to the ExchangeServer storage group and database. In general, changing the path of the ExchangeServer storage group and database is a relatively simple operation, usually after a few simple steps in the graphical interface, and the database will automatically suspend and change the path.

And automatically load after the change. However, after Exchange Server 2007, changing the storage path in a CCR environment is no longer as simple as it used to be, unless you make a path change before installing a cluster continuous replication passive node. Here's how to change the storage path for storage groups and databases in a CCR environment.

In this article, move the sg2 storage group and database in the existing CCR environment from the current D disk to the E disk. Before you start, let's take a look at the existing environment, as shown in the following figure:

As can be seen from the figure above, the sg2 storage path of the storage group is d:\ ccr\ sg2, and the current replication status is normal. The following steps are taken to change the path:

1. Since it is a CCR cluster continuous replication environment, we need to temporarily disable the cluster replication operation, open the "Exchange Management Shell", and then execute the following command, as shown in the figure:

Suspend-StorageGroupCopy-Identity

After executing the above command, refresh in the Exchange Management console, you can see that the replication status of the sg2 storage group has been changed to "suspended", as shown in the following figure:

two。 After pausing cluster replication, the next step is to dismount the database under the storage group, as shown in the following figure. This can also be done from the Exchange management console.

Dismount-database-Identity

3. After dismounting the database, now set a new storage path for the storage group, as follows. This cmdlet does not move any data.

Move-StorageGroupPath-Identity-LogFolderPath-SystemFolderPath-ConfigurationOnly

The-ConfigurationOnly parameter must be used in the CCR environment. The new path to the system or log file cannot be the root of the volume. In addition, if the pathname contains spaces, it must be enclosed in quotation marks.

4. After you change the storage group path, then change the storage path of the database. Be sure to dismount the database before performing the move operation. Run cmdlet as follows:

Move-DatabasePath-Identity-EdbFilePath-ConfigurationOnly in a CCR environment, the-ConfigurationOnly parameter must be used. The new location cannot be the root of the volume.

5. Move the files to their new location on the active and passive nodes.

6. Use Mount-Database cmdlet to mount the database in the storage group.

Mount-Database-Identity

7. Restart replication using Resume-StorageGroupCopy cmdlet. To restart replication activity for a storage group, run the following command:

Resume-StorageGroupCopy-Identity

8. Verify that the replication of the storage group is working properly.

Get-ClusteredMailboxServerStatus-Identity:

From the results returned in the above figure, we can see that the CCR status is normal, and the operation of changing the path has been completed successfully.

Tags: Storage path data database environment commands movement management situation status image above image below location parameters console file root node control run Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology macOS Shulou Tech Info MySQL Redmi