

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# SVM Active Directory 구성 관리
<a name="manage-svm-ad-config"></a>

이 섹션에서는 AWS Management Console, AWS CLI, FSx API 및 ONTAP CLI를 사용하여 다음을 수행하는 방법을 설명합니다.
+ 기존 SVM을 Active Directory에 가입하기
+ 기존 SVM Active Directory 구성 수정
+ Active Directory에서 SVMs 제거

Active Directory에서 SVM을 제거하려면 NetApp ONTAP CLI를 사용해야 합니다.

**Topics**
+ [AWS Management Console AWS CLI 및 API를 사용하여 Active Directory에 SVMs 조인](join-svm-to-ad.md)
+ [AWS Management Console AWS CLI및 API를 사용하여 기존 SVM Active Directory 구성 업데이트](update-svm-ad-config.md)
+ [NetApp CLI를 사용하여 SVM Active Directory 구성 업데이트](manage-svm-ad-config-ontap-cli.md)

# AWS Management Console AWS CLI 및 API를 사용하여 Active Directory에 SVMs 조인
<a name="join-svm-to-ad"></a>

기존 SVM을 Active Directory에 조인하려면 다음 절차를 따릅니다. 이 절차에서는 SVM이 아직 Active Directory에 조인하지 *않았습니다*.

**Active Directory(AWS Management Console)에 SVM 조인**

1. [https://console.aws.amazon.com/fsx/](https://console.aws.amazon.com/fsx/)에서 Amazon FSx 콘솔을 엽니다.

1. 다음과 같이 Active Directory에 조인할 SVM을 선택합니다.
   + 왼쪽 탐색 창에서 **파일 시스템**을 선택한 후 업데이트하려는 SVM이 있는 ONTAP 파일 시스템을 선택합니다.
   + **스토리지 가상 머신** 탭을 선택합니다.

     또는
   + 사용 가능한 모든 SVM 목록을 표시하려면 왼쪽 탐색 창에서 **ONTAP**을 확장하고 **스토리지 가상 머신**을 선택합니다. 의 계정에 SVMs 목록이 AWS 리전 표시됩니다.

   목록에서 Active Directory에 조인할 SVM을 선택합니다.

1. SVM **요약** 패널의 오른쪽 상단에서 **작업** > **Active Directory 조인/업데이트**를 선택합니다. **Active Directory에 SVM 연결** 창이 표시됩니다.

1. SVM에 조인하려는 Active Directory에 대해 다음 정보를 입력합니다.
   + SVM에 대해 생성할 Active Directory 컴퓨터 객체의 **NetBIOS 이름**. Active Directory의 SVM 이름이며 Active Directory 내에서 고유해야 합니다. 홈 도메인의 NetBIOS 이름을 사용하지 않습니다. NetBIOS 이름은 15자를 초과할 수 없습니다.
   + Active Directory의 **정규화된 도메인 이름(FQDN)**. 도메인 이름은 255자를 초과할 수 없습니다.
   + **DNS 서버 IP 주소** - 도메인의 DNS 서버의 IPv4 또는 IPv6 주소입니다.
   + **서비스 계정 자격 증명** - 서비스 계정 자격 증명을 제공하는 방법을 선택합니다.
     + **옵션 1**: AWS Secrets Manager 비밀 ARN - Active Directory 도메인의 서비스 계정에 대한 사용자 이름과 암호가 포함된 보안 암호입니다. 자세한 내용은 [를 사용하여 Active Directory 자격 증명 저장 AWS Secrets Manager](self-managed-AD-best-practices.md#bp-store-ad-creds-using-secret-manager) 단원을 참조하십시오.
     + **옵션 2**: 일반 텍스트 자격 증명
       + **서비스 계정 사용자 이름** - 기존 Microsoft Active Directory에 있는 서비스 계정의 사용자 이름입니다. 도메인 접두사나 접미사를 포함하지 않습니다. 예를 들어 `EXAMPLE\ADMIN`에는 `ADMIN`만 사용합니다.
       + **서비스 계정 암호** - 서비스 계정의 암호입니다.
       + **암호 확인** - 서비스 계정의 암호입니다.
     + **Secrets Manager에서 관리**(기본값) - 서비스 계정 자격 증명이 포함된 Secrets Manager 보안 암호의 ARN을 제공합니다. 보안 암호에는 키-값 페어 `CUSTOMER_MANAGED_ACTIVE_DIRECTORY_USERNAME` 및 `CUSTOMER_MANAGED_ACTIVE_DIRECTORY_PASSWORD`가 포함되어야 합니다.
     + (선택 사항) **조직 단위(OU)** - SVM에 조인할 조직 단위의 고유 경로 이름입니다.
     + **위임된 파일 시스템 관리자 그룹** - Active Directory에서 파일 시스템을 관리할 수 있는 그룹의 이름입니다.

       를 사용하는 경우 AWS 위임된 FSx 관리자 AWS Managed Microsoft AD, AWS 위임된 관리자 또는 OU에 위임된 권한이 있는 사용자 지정 그룹과 같은 그룹을 지정해야 합니다.

       자체 관리형 Active Directory에 조인하는 경우 Active Directory에 있는 그룹의 이름을 사용합니다. 기본 그룹은 `Domain Admins`입니다.

1. 제공한 구성을 사용하여 SVM을 Active Directory에 조인하려면 **Active Directory 조인**을 선택합니다.

**SVM을 Active Directory에 조인하려면(AWS CLI)**
+ FSx for ONTAP SVM을 Active Directory에 조인하려면 다음 예제와 같이 [update-storage-virtual machine](https://docs.aws.amazon.com/cli/latest/reference/fsx/update-storage-virtual-machine.html) CLI 명령(또는 이에 상응하는 [UpdateStorageVirtualMachine](https://docs.aws.amazon.com/fsx/latest/APIReference/API_UpdateStorageVirtualMachine.html) API 작업)을 사용합니다.

  ```
  aws fsx update-storage-virtual-machine \
    --storage-virtual-machine-id svm-abcdef0123456789a\
    --active-directory-configuration SelfManagedActiveDirectoryConfiguration='{DomainName="corp.example.com", \
      OrganizationalUnitDistinguishedName="OU=FileSystems,DC=corp,DC=example,DC=com",\
      FileSystemAdministratorsGroup="FSxAdmins",UserName="FSxService",\
      Password="password", \
      DnsIps=["10.0.1.18"]}',NetBiosName=amznfsx12345
  ```

  스토리지 가상 머신을 생성한 후 Amazon FSx는 다음 예제와 같이 JSON 형식으로 설명을 반환합니다.

  ```
  {
    "StorageVirtualMachine": {
      "ActiveDirectoryConfiguration": {
        "NetBiosName": "amznfsx12345",
        "SelfManagedActiveDirectoryConfiguration": {
          "UserName": "Admin",
          "DnsIps": [
            "10.0.1.3",
            "10.0.91.97"
          ],
          "OrganizationalUnitDistinguishedName": "OU=Computers,OU=customer-ad,DC=customer-ad,DC=example,DC=com",
          "DomainName": "customer-ad.example.com"
        }
      }
      "CreationTime": 1625066825.306,
      "Endpoints": {
        "Management": {
          "DnsName": "svm-abcdef0123456789a.fs-0123456789abcdef0.fsx.us-east-1.amazonaws.com",
          "IpAddressses": ["198.19.0.4"]    
        },
        "Nfs": {
          "DnsName": "svm-abcdef0123456789a.fs-0123456789abcdef0.fsx.us-east-1.amazonaws.com",
          "IpAddressses": ["198.19.0.4"]    
        },
        "Smb": {
          "DnsName": "amznfsx12345",
          "IpAddressses": ["198.19.0.4"]        
        },
        "SmbWindowsInterVpc": {
          "IpAddressses": ["198.19.0.5", "198.19.0.6"]    
        },
        "Iscsi": {
          "DnsName": "iscsi.svm-abcdef0123456789a.fs-0123456789abcdef0.fsx.us-east-1.amazonaws.com",
          "IpAddressses": ["198.19.0.7", "198.19.0.8"]    
        }
      },
      "FileSystemId": "fs-0123456789abcdef0",
      "Lifecycle": "CREATED",
      "Name": "vol1",
      "ResourceARN": "arn:aws:fsx:us-east-1:123456789012:storage-virtual-machine/fs-0123456789abcdef0/svm-abcdef0123456789a",
      "StorageVirtualMachineId": "svm-abcdef0123456789a",
      "Subtype": "default",
      "Tags": [],
  
    }
  }
  ```

# AWS Management Console AWS CLI및 API를 사용하여 기존 SVM Active Directory 구성 업데이트
<a name="update-svm-ad-config"></a>

다음 절차를 사용하여 이미 Active Directory에 조인된 SVM의 Active Directory 구성을 업데이트합니다.

**SVM Active Directory 구성(AWS Management Console)을 업데이트하려면**

1. [https://console.aws.amazon.com/fsx/](https://console.aws.amazon.com/fsx/)에서 Amazon FSx 콘솔을 엽니다.

1. 다음과 같이 업데이트할 SVM을 선택합니다.
   + 왼쪽 탐색 창에서 **파일 시스템을** 선택한 후 업데이트하려는 SVM이 있는 ONTAP 파일 시스템을 선택합니다.
   + **스토리지 가상 머신** 탭을 선택합니다.

     또는
   + 사용 가능한 모든 SVM 목록을 표시하려면 왼쪽 탐색 창에서 **ONTAP**을 확장하고 **스토리지 가상 머신**을 선택합니다.

   목록에서 업데이트할 SVM을 선택합니다.

1. SVM **요약** 패널에서 **작업** > **Active Directory 조인/업데이트**를 선택합니다. **SVM Active Directory 구성 업데이트** 창이 표시됩니다.

1. 이 창에서 다음과 같은 Active Directory 구성 속성을 업데이트할 수 있습니다.
   + **DNS 서버 IP 주소** - 도메인의 DNS 서버의 IPv4 또는 IPv6 주소입니다.
   + **서비스 계정 자격 증명** - 서비스 계정 자격 증명을 제공하는 방법을 선택합니다.
     + **옵션 1**: AWS Secrets Manager 비밀 ARN - Active Directory 도메인의 서비스 계정에 대한 사용자 이름과 암호가 포함된 보안 암호입니다. 자세한 내용은 [를 사용하여 Active Directory 자격 증명 저장 AWS Secrets Manager](self-managed-AD-best-practices.md#bp-store-ad-creds-using-secret-manager) 단원을 참조하십시오.
     + **옵션 2**: 일반 텍스트 자격 증명
       + **서비스 계정 사용자 이름** - 기존 Microsoft Active Directory에 있는 서비스 계정의 사용자 이름입니다. 도메인 접두사나 접미사를 포함하지 않습니다. 예를 들어 `EXAMPLE\ADMIN`에는 `ADMIN`만 사용합니다.
       + **서비스 계정 암호** - 서비스 계정의 암호입니다.
       + **암호 확인** - 서비스 계정의 암호입니다.

1. 업데이트를 입력한 후 **Active Directory 업데이트**를 선택하여 변경합니다.

다음 절차를 사용하여 이미 Active Directory에 조인된 SVM의 Active Directory 구성을 업데이트합니다.

**SVM Active Directory 구성(AWS CLI)을 업데이트하려면**
+  AWS CLI 또는 API를 사용하여 SVM의 Active Directory 구성을 업데이트하려면 다음 예제와 같이 [update-storage-virtual-machine](https://docs.aws.amazon.com/cli/latest/reference/fsx/update-storage-virtual-machine.html) CLI 명령(또는 동등한 [UpdateStorageVirtualMachine](https://docs.aws.amazon.com/fsx/latest/APIReference/API_UpdateStorageVirtualMachine.html) API 작업)을 사용합니다.

  ```
  aws fsx update-storage-virtual-machine \
      --storage-virtual-machine-id svm-abcdef0123456789a\
      --active-directory-configuration \
      SelfManagedActiveDirectoryConfiguration='{UserName="FSxService",\
      Password="password", \
      DnsIps=["10.0.1.18"]}'
  ```

# NetApp CLI를 사용하여 SVM Active Directory 구성 업데이트
<a name="manage-svm-ad-config-ontap-cli"></a>

NetApp ONTAP CLI를 사용하여 SVM을 Active Directory에 조인 및 조인 해제하고 기존 SVM Active Directory 구성을 수정할 수 있습니다.

## ONTAP CLI를 사용하여 SVM을 Active Directory에 가입하기
<a name="using-ontap-cli-to-connect-to-ad"></a>

다음 절차의 설명에 따라 ONTAP CLI를 사용하여 기존 SVM을 Active Directory에 조인할 수 있습니다. SVM이 이미 Active Directory에 조인된 경우에도 이 작업을 수행할 수 있습니다.

1. ONTAP CLI에 액세스하려면 다음 명령을 실행하여 Amazon FSx for NetApp ONTAP 파일 시스템 또는 SVM의 관리 포트에 SSH 세션을 설정합니다. `management_endpoint_ip`를 파일 시스템의 관리 포트의 IP 주소로 바꿉니다.

   ```
   [~]$ ssh fsxadmin@management_endpoint_ip
   ```

   자세한 내용은 [ONTAP CLI를 사용한 파일 시스템 관리](managing-resources-ontap-apps.md#fsxadmin-ontap-cli) 단원을 참조하십시오.

1.  전체 디렉터리 DNS 이름(`corp.example.com`) 및 하나 이상의 DNS 서버 IP 주소를 제공하여 Active Directory용 DNS 항목을 생성합니다.

   ```
   ::>vserver services name-service dns create -vserver svm_name -domains corp.example.com -name-servers dns_ip_1, dns_ip_2 
   ```

   DNS 서버에 대한 연결을 확인하려면 다음 명령을 실행합니다. *svm\$1name*을 사용자의 정보로 바꿉니다.

   ```
   FsxId0ae30e5b7f1a50b6a::>vserver services name-service dns check -vserver svm_name 
   
                                 Name Server
   Vserver       Name Server     Status       Status Details
   ------------- --------------- ------------ --------------------------
   svm_name      172.31.14.245   up           Response time (msec): 0
   svm_name      172.31.25.207   up           Response time (msec): 1
   2 entries were displayed.
   ```

1. SVM을 Active Directory에 조인하려면 다음 명령을 실행합니다. Active Directory에 아직 존재하지 않는 `computer_name`을 지정하고 `-domain`의 디렉터리 DNS 이름을 제공해야 한다는 점에 유의하세요. `-OU`의 경우 SVM이 조인할 OU 및 전체 DNS 이름을 DC 형식으로 입력합니다.

   ```
   ::>vserver cifs create -vserver svm_name -cifs-server computer_name -domain corp.example.com -OU OU=Computers,OU=example,DC=corp,DC=example,DC=com
   ```

   Active Directory 연결 상태를 확인하려면 다음 명령을 실행합니다.

   ```
   ::>vserver cifs check -vserver svm_name
                                 
                 Vserver : svm_name
                       Cifs NetBIOS Name : svm_netBIOS_name
                             Cifs Status : Running
                                    Site : Default-First-Site-Name
   Node Name       DC Server Name  DC Server IP    Status   Status Details
   --------------- --------------  --------------- ------   --------------
   FsxId0ae30e5b7f1a50b6a-01 
                   corp.example.com  
                                   172.31.14.245   up       Response time (msec): 5
   FsxId0ae30e5b7f1a50b6a-02 
                   corp.example.com  
                                   172.31.14.245   up       Response time (msec): 20
   2 entries were displayed.
   ```

1. 이 조인 후에 공유에 액세스할 수 없는 경우 공유에 액세스하는 데 사용하는 계정에 권한이 있는지 확인합니다. 예를 들어 AWS 관리형 Active Directory에서 기본 `Admin` 계정(위임된 관리자)을 사용하는 경우 ONTAP에서 다음 명령을 실행해야 합니다. `netbios_domain`은 Active Directory의 도메인 이름(`corp.example.com`의 경우 여기서 사용되는 `netbios_domain`은 `example`임)과 일치합니다.

   ```
   FsxId0123456789a::>vserver cifs users-and-groups local-group add-members -vserver svm_name -group-name BUILTIN\Administrators -member-names netbios_domain\admin
   ```

## ONTAP CLI를 사용하여 Active Directory 구성 수정
<a name="using-ontap-cli-to-modify-ad"></a>

ONTAP CLI를 사용하여 기존 Active Directory 구성을 수정할 수 있습니다. 

1. ONTAP CLI에 액세스하려면 다음 명령을 실행하여 Amazon FSx for NetApp ONTAP 파일 시스템 또는 SVM의 관리 포트에 SSH 세션을 설정합니다. `management_endpoint_ip`를 파일 시스템의 관리 포트의 IP 주소로 바꿉니다.

   ```
   [~]$ ssh fsxadmin@management_endpoint_ip
   ```

   자세한 내용은 [ONTAP CLI를 사용한 파일 시스템 관리](managing-resources-ontap-apps.md#fsxadmin-ontap-cli) 단원을 참조하십시오.

1. 다음 명령을 실행하여 SVM의 CIFS 서버를 일시적으로 가동 중지합니다. 

   ```
   FsxId0123456789a::>vserver cifs modify -vserver svm_name -status-admin down
   ```

1. Active Directory의 DNS 항목을 수정해야 하는 경우 다음 명령을 실행합니다. 

   ```
   ::>vserver services name-service dns modify -vserver svm_name -domains corp.example.com -name-servers dns_ip_1,dns_ip_2
   ```

   `vserver services name-service dns check -vserver svm_name` 명령을 사용하여 Active Directory의 DNS 서버에 대한 연결 상태를 확인할 수 있습니다.

   ```
   ::>vserver services name-service dns check -vserver svm_name
                                 Name Server
   Vserver       Name Server     Status       Status Details
   ------------- --------------- ------------ --------------------------
   svmciad       dns_ip_1        up           Response time (msec): 1
   svmciad       dns_ip_2        up           Response time (msec): 1
   2 entries were displayed.
   ```

1. Active Directory 구성 자체를 수정해야 하는 경우 다음 명령에서 기존 필드를 변경할 수 있습니다.
   + SVM의 NetBIOS(시스템 계정) 이름을 수정하려는 경우 *computer\$1name*을 변경.
   + 도메인 이름을 수정하려는 경우 *domain\$1name*을 변경. 이는 이 섹션의 3단계에 기록된 DNS 도메인 항목(`corp.example.com`)과 일치해야 합니다.
   + OU(`OU=Computers,OU=example,DC=corp,DC=example,DC=com`)를 수정하려는 경우 `organizational_unit`을 변경.

   이 디바이스를 Active Directory에 연결하는 데 사용한 Active Directory 보안 인증을 다시 입력해야 합니다.

   ```
   ::>vserver cifs modify -vserver svm_name -cifs-server computer_name -domain domain_name -OU organizational_unit
   ```

   `vserver cifs check -vserver svm_name` 명령을 사용하여 Active Directory 연결의 연결 상태를 확인할 수 있습니다.

1. Active Directory 및 DNS 구성 수정을 완료하면 다음 명령을 실행하여 CIFS 서버의 가동을 재개합니다.

   ```
   ::>vserver cifs modify -vserver svm_name -status-admin up
   ```

## NetApp ONTAP CLI를 사용하여 SVM에서 Active Directory 조인 해제
<a name="using-ontap-cli-to-unjoin-ad"></a>

NetApp ONTAP CLI를 사용하여 아래 단계에 따라 Active Directory에서 SVM을 조인 해제할 수도 있습니다.

1. ONTAP CLI에 액세스하려면 다음 명령을 실행하여 Amazon FSx for NetApp ONTAP 파일 시스템 또는 SVM의 관리 포트에 SSH 세션을 설정합니다. `management_endpoint_ip`를 파일 시스템의 관리 포트의 IP 주소로 바꿉니다.

   ```
   [~]$ ssh fsxadmin@management_endpoint_ip
   ```

   자세한 내용은 [ONTAP CLI를 사용한 파일 시스템 관리](managing-resources-ontap-apps.md#fsxadmin-ontap-cli) 단원을 참조하십시오.

1. 다음 명령을 실행하여 Active Directory에서 디바이스 조인을 해제한 CIFS 서버를 삭제합니다. ONTAP에서 SVM의 시스템 계정을 삭제하도록 하려면 원래 SVM을 Active Directory에 조인하는 데 사용한 보안 인증을 제공합니다.

   ```
   FsxId0123456789a::>vserver cifs modify -vserver svm_name -status-admin down
   ```

1. Active Directory의 DNS 항목을 수정해야 하는 경우 다음 명령을 실행합니다. 

   ```
   FsxId0123456789a::vserver cifs delete -vserver svm_name
   
   In order to delete an Active Directory machine account for the CIFS server, you must supply the name and password of a Windows account with
   sufficient privileges to remove computers from the "CORP.ADEXAMPLE.COM" domain. 
   
   Enter the user name: user_name
   
   Enter the password: 
   
   Warning: There are one or more shares associated with this CIFS server
            Do you really want to delete this CIFS server and all its shares? {y|n}: y
   ```

1. 다음 명령을 실행하여 Active Directory용 DNS 서버를 삭제합니다.

   ```
   ::vserver services name-service dns delete -vserver svm_name
   ```

   다음과 같이 `ns-switch`로 구성된 `dns`를 제거해야 한다는 경고 메시지가 표시되고 이 디바이스를 Active Directory에 다시 조인할 계획이 없는 경우 `ns-switch` 항목을 제거할 수 있습니다.

   ```
   Warning: "DNS" is present as one of the sources in one or more ns-switch databases but no valid DNS configuration was found for Vserver
            "svm_name". Remove "DNS" from ns-switch using the "vserver services name-service ns-switch" command. Configuring "DNS" as a source
            in the ns-switch setting when there is no valid configuration can cause protocol access issues.
   ```

1. (선택 사항) 다음 명령을 실행하여 `dns`에 대한 `ns-switch` 항목을 제거합니다. 소스 순서를 확인한 다음 나열된 다른 소스만 `sources`에 포함되도록 수정하여 `hosts` 데이터베이스의 `dns` 항목을 제거합니다. 이 예제에서 유일한 다른 소스는 `files`입니다.

   ```
   ::>vserver services name-service ns-switch show -vserver svm_name -database hosts
   
                        Vserver: svm_name
   Name Service Switch Database: hosts
      Name Service Source Order: files, dns
   ```

   ```
   ::>vserver services name-service ns-switch modify -vserver svm_name -database hosts -sources files
   ```

1.  (선택 사항) 데이터베이스 호스트의 `sources`가 `files`만 포함하도록 수정하여 `dns` 항목을 제거합니다.

   ```
   ::>vserver services name-service ns-switch modify -vserver svm_name -database hosts -sources files
   ```