반응형

AutoReseed Exchange Server 2013 이후에 도입된 기능으로 Disk 이슈로 인하여 복제문제가 발생시 Spare(예비) Disk 활용하여 자동 복제되도록 하는 기능입니다.

 

아래의 기술자료를 참고하여 작성하였습니다.

AutoReseed | Microsoft Docs

데이터베이스 사용 가능 그룹에 대한 AutoReseed 구성 | Microsoft Docs

 

실제 AutoReseed 사용하는 환경은 국내에 많지 않습니다. 다만 해당 환경에 테스트가 필요한 경우를 위해서 글을 작성하였습니다. 각각의 단계를 설명하는 것보다는 구성한 다음, 어떻게 동작하는지 보면 이해가 쉬울 것입니다.

 

기본 구성은 다음과 같이 하는 것을 목표로 합니다.

 

[Step 1] Configure the root paths for databases and volumes

Set-DatabaseAvailabilityGroup -Identity DAG2013 -AutoDagDatabasesRootFolderPath "C:\ExchangeDatabases" -AutoDagVolumesRootFolderPath "C:\ExchangeVolumes"

 

[Step 2] Configure the number of databases per volume

Set-DatabaseAvailabilityGroup -Identity DAG2013 -AutoDagDatabaseCopiesPerVolume 1

 

[Step 3] Create the root directories for databases and volumes

다음과 같이 Database, Volume 관련 폴더를 생성합니다.

[Step 4] Mount the volume folders

아래와 같이 Volume1, Volume2 폴더를 생성합니다.

 

기존 구성에서 AutoReseed Disk 2 추가 (Hyper-V 기준)

 

Disk Management 실행합니다.

 

Disk Online 상태로 변경 - 디스크 공간을 선택 - 우클릭 - New Simple Volume

 

Next

 

Next

 

다음과 같이 경로 지정 - Next

 

Next

 

Finish

 

2번째 Disk 동일하게 진행합니다.

 

 

아래와 같이 확인할 있습니다.

 

[Step 5] Create the database folders

C:\ExchangeDatabases 폴더에 DB01 폴더를 생성합니다.

[Step 6] Create the mount points for the databases

명령 프롬프트창에서 mountvol 실행합니다.

DB01 맵핑해야하는 개체 값이 \\?\Volume{7a87e085-dfc8-4c6f-8f60-bda64de11750}\ 라는 것을 확인할 있습니다.

 

ExchangeDatabases 경로에서 다음 명령어로 해당 볼륨과 맵핑합니다.

Mountvol DB01 \\?\Volume{7a87e085-dfc8-4c6f-8f60-bda64de11750}\

 

다음과 같이 맵핑된 것을 확인할 있습니다.

 

[Step 7] Create the database directory structure

다음과 같이 DB 폴더와 Log 폴더를 생성합니다.

 

Volume 폴더에서도 동일하게 표시되는 것을 확인할 있습니다.

 

작업을 다른 DAG Member (2번서버)에도 동일하게 생성합니다.

 

[Step 8] Create databases

DB 생성합니다.

New-MailboxDatabase -Name DB01 -Server EX13MBX1 -LogFolderPath "C:\ExchangeDatabases\DB01\DB01.log" -EdbFilePath "C:\ExchangeDatabases\DB01\DB01.db\DB01.edb"

 

복제본 생성

Add-MailboxDatabaseCopy DB01 -MailboxServer EX13MBX2

 

복제가 이루어 지는 것을 확인

 

[Step 9] Test

AutoReseed 테스트를 위해서 우선 다음과 같이 진행합니다.

1. Volume1 Offline으로 변경

 

 

2. Volume1 Offline 이므로 DB01 Volume Disconnected 됩니다.

 

3. DAG 구성되어 있으므로 EX13MBX2 에서 DB01 활성화됩니다.

 

 

Disk 3 Offline 으로 변경

ECP에서 DB01 Active Server 2번서버로 변경된 것을 확인할 있습니다.

 

AutoReseed 진행되는 Step 보도록 하겠습니다.

기술자료: AutoReseed | Microsoft Docs

1. Microsoft Exchange Replication ServiceFailedAndSuspended 상태인 복사본을 정기적으로 검색합니다. AutoReseed에 대해 구성된 볼륨의 모든 데이터베이스 복사본이 FailedandSuspended 상태인 경우 15분 연속으로 자동 다시 시드 워크플로가 시작됩니다.


The Microsoft Exchange Replication service periodically scans for copies that have a status of FailedAndSuspended. If all database copies on a volume configured for AutoReseed are in a FailedandSuspended state for 15 consecutive minutes, the AutoReseed workflow is started.

 

DB01\EX13MBX1 Status FailedAndSuspended 것을 확인할 있습니다.

 

Event Viewer -> Applications and Services Logs -> Microsoft -> Exchange -> HighAvailability -> Seeding 으로 이동합니다.

구성 환경상의 문제일지 모르겠지만, 해당 상태를 감지하는데는 다소 시간이 걸렸습니다.

 

2. AutoReseed는 실패한 복사본과 일시 중단된 복사본을 최대 3번 다시 시작하려고 시도하며 각 시도 사이에 5분 절전 모드가 설정됩니다. FailedandSuspended 데이터베이스 복사본을 다시 시작한 후에도 복사본이 Failed 상태로 남아 있는 경우도 있습니다. 이 단계는 다양한 이유로 인해 발생될 수 있으므로 이 단계는 이러한 사례를 처리하도록 디자인됩니다. AutoReseed는 워크플로를 계속 실행하기 위해 10분 연속 실패한 데이터베이스 복사본을 자동으로 일시 중단합니다. 일시 중단 및 다시 시작 작업으로 인해 데이터베이스 복사본이 정상으로 유지되지 않는 경우 워크플로가 계속됩니다.


AutoReseed will try to resume the failed and suspended copies up to three times, with a 5-minute sleep in between each attempt. Sometimes, after a FailedandSuspended database copy is resumed, the copy remains in a Failed state. This can happen for various reasons, so this step is designed to handle those cases; AutoReseed will automatically suspend a database copy that has been Failed for 10 consecutive minutes to keep the workflow running. If the suspend and resume actions don't result in a healthy database copy, the workflow continues.

 

1

 

2

 

3

3. 해당 상태의 복사본을 찾으면 몇 가지 선행 검사를 합니다. 예를 들어 예비 디스크를 사용할 수 있는지, 데이터베이스 및 로그 파일이 동일한 볼륨에 구성되어 있는지, 그리고 필요한 이름 규칙과 일치하는 적절한 위치에 있는지를 확인할 수 있습니다.
When it finds a copy with that status, it does some prerequisite checks. For example, it will verify that a spare disk is available, that the database and its log files are configured on the same volume, and in the appropriate locations that match the required naming conventions.


4. 선행 조건을 검사하는 데 성공하면 Microsoft Exchange Replication Service 내의 Disk Reclaimer 함수는 아래 표의 일정에 따라 예비 디스크를 할당, 다시맵 및 포맷합니다. AutoReseed는 최대 5번 예비 볼륨을 할당하려고 시도합니다. 각 시도 사이에 1시간 절전 모드가 설정됩니다.
If the prerequisite checks pass successfully, the Disk Reclaimer function within the Microsoft Exchange Replication service allocates, remaps, and formats a spare disk according to the timelines in the table below. AutoReseed will attempt to assign a spare volume up to five times, with one hour sleep in between each try.

 

Event 1119 다음과 같이 기록됩니다.

Event ID 1119
Automatic Reseed Manager failed to resume database copy 'DB01' as part of repair workflow 'FailedSuspendedCopyAutoReseed' after a maximum of 3 attempts. The workflow will next attempt to assign a spare volume and reseed the database copy.


자동 Reseed Manager는 최대 3번의 시도 후에 복구 워크플로 'FailedSuspendedCopyAutoReseed'의 일부로 데이터베이스 복사본 'DB01'을 재개하지 못했습니다. 워크플로는 다음으로 예비 볼륨을 할당하고 데이터베이스 복사본을 다시 시드합니다.

 

그리고 복구 시도하는 이벤트가 기록됩니다.

Event ID 1124
Automatic Reseed Manager is beginning attempt number 1 of execution stage 'AssignSpare' for database copy 'DB01' as part of repair workflow 'FailedSuspendedCopyAutoReseed'.
 

Automatic Reseed Manager는 복구 워크플로 'FailedSuspendedCopyAutoReseed'의 일부로 데이터베이스 복사본 'DB01'에 대한 'AssignSpare' 실행 단계의 1번 시도를 시작합니다.

 

후에 다음 기록을 확인할 있습니다.

Event ID 1149, High Availability, Disk Reclaimer
The Volume Manager found the following volumes:


UnknownVolumeCount=0
UnEncryptedEmptySpareVolumeCount=0
EncryptingEmptySpareVolumeCount=0
EncryptedEmptySpareVolumeCount=0
QuarantinedVolumeCount=0
NotUsableAsSpareVolumeCount=5
ErrorVolumeCount=0


---UnEncryptedEmptySpareVolumeList---


---EncryptingEmptySpareVolumeList---


---EncryptedEmptySpareVolumeList---


---QuarantinedVolumeList---


---NotUsableAsSpareVolumeList---
  ( \\?\Volume{773ad62d-a2ab-47ea-9357-1a785846adb1}\ )
C:\  ( \\?\Volume{f7c200d8-097f-448d-a24e-3eaa47a06105}\ )
D:\  ( \\?\Volume{b612acb2-38a8-4398-916f-99c5c945c773}\ )
E:\  ( \\?\Volume{f14d4dcf-0417-47fc-a2e4-0942cc0df818}\ )
C:\ExchangeVolumes\Volume2\  ( \\?\Volume{a82f4b68-00e3-4ed1-a223-a41503ef61ce}\ )
C:\ExchangeDatabases\DB01\


---ErrorVolumeList---


---UnknownVolumeList---


Auto Reseed Manager 적절한 Spare volume 탑재한 것을 확인할 있습니다.

 

5. 예비가 할당된 후 AutoReseed는 SafeDeleteExistingFiles 시드 스위치를 사용하여 InPlaceSeed 작업을 수행하게 됩니다. 영향을 받는 디스크에 있는 모든 데이터베이스는 데이터베이스의 활성 복사본을 시드 원본으로 사용하여 다시 시드됩니다.

Once a spare has been assigned, AutoReseed will do an InPlaceSeed operation using the SafeDeleteExistingFiles seeding switch. All databases that were on the affected disk are reseeded using the active copy of the database as the seeding source.

 

기술자료에서 언급한대로 InPlaceSeed 작업이 진행됩니다.

 

다음 이벤트에서 SafeDeleteExistingFiles 시드 스위치를 사용한 것을 확인할 있습니다.

 

Reseeding 시작하였습니다.

 

Reseeding 완료되었습니다.

 

6. 시드 작업이 완료된 후 Microsoft Exchange Replication Service는 새로 시드된 복사본의 상태가 정상인지 확인합니다.

After the seeding operation has been completed, the Microsoft Exchange Replication service verifies that the newly seeded copy is healthy.

정상 상태인지 확인을 진행합니다.

 

상태 확인 완료

기술자료 상의 Step 전부 진행해 보았습니다.

 

[Step 10] Result

실제 복제 상태에 문제 없는지 확인합니다.

Get-MailboxDatabaseCopyStatus DB01 | ft -autosize

 

파일 탐색기 상에서 Volume2 확인합니다.

 

실제 파일들이 정상적으로 복제되었는지를 확인합니다.

 

 

DB

 

Log

 

최종적으로는 아래와 같이 구성된 것을 확인할 있습니다.

 

 

Conclusion

AutoReseed Disk Failover 방식과 유사하다는 것을 확인할 있었습니다.

개념이 등장한지 대략 9년정도 지났지만, 국내에서는 많이 사용하는 방식은 아닙니다. 고객사나 유지보수하는 파트너사 입장에서는 다소 생소한 개념일 있습니다.

반응형

+ Recent posts