

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

# 일반 사용 사례
<a name="fsrm-common-use-cases"></a>

이 주제에서는 일반적인 File Server Resource Manager 작업에 대한 step-by-step 예제를 제공합니다. 이 예제에서는 FSRM 기능을 사용하고 구현하여 일반적인 파일 관리 문제를 해결하는 방법을 보여줍니다.

**참고**  
이 페이지의 모든 예제에서는 파일 시스템의 Windows 원격 PowerShell 엔드포인트로 ` $FSxWindowsRemotePowerShellEndpoint` 변수를 정의했다고 가정합니다. 파일 시스템의 세부 정보 페이지의 Amazon FSx 콘솔에서 또는 명령을 사용하여이 엔드포인트를 AWS CLI `describe-file-systems` 찾을 수 있습니다.

## 폴더에 하드 할당량 설정
<a name="fsrm-setting-hard-quota"></a>

이 예제에서는 사용자가 '부서' 폴더에 10GB 이상을 저장하지 못하도록 하는 하드 할당량을 생성하는 방법을 보여줍니다.

**폴더에 할당량을 설정하려면:**

1. 10GB 한도의 하드 할당량을 생성합니다.

   ```
   Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock {
       New-FSxFSRMQuota -Folder "share\department" -Size 10GB -Description "10 GB hard limit for department folder" 
   }
   ```

1. (선택 사항) 할당량을 수정하여 사용량이 85%인 임계값 알림을 추가합니다.

   ```
   $thresholds = [System.Collections.ArrayList]@() 
   $threshold = @{ 
       ThresholdPercentage = 85 
       Action = @( 
           @{ 
               ActionType = "Event" 
               EventType = "Warning" 
               MessageBody = "Department folder has reached 85% of quota limit" 
           } 
       ) 
   } 
   
   $null = $thresholds.Add($threshold) 
   
   Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ArgumentList ($thresholds) -ScriptBlock { 
       param($thresholds) 
       Set-FSxFSRMQuota -Folder "share\department" -ThresholdConfigurations $Using:thresholds 
   }
   ```

1. 할당량이 생성되었는지 확인합니다.

   ```
   Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock {
       Get-FSxFSRMQuota -Folder "share\department"
   }
   ```

## 파일 그룹을 사용하여 특정 파일 유형 제한
<a name="fsrm-restricting-file-types"></a>

이 예제에서는 사용자가 기본 "`Audio and Video Files`" 파일 그룹을 사용하여 오디오 및 비디오 파일을 비즈니스 문서 폴더에 저장하지 못하도록 차단하는 방법을 보여줍니다.

**파일 그룹을 사용하여 파일 유형을 제한하려면:**

1. 오디오 및 비디오 파일을 차단하는 활성 파일 화면을 생성합니다.

   ```
   Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock {
   New-FSxFSRMFileScreen -Folder "share\business-documents" -IncludeGroup "Audio and Video Files" -Description "Block media files in business documents folder" 
   }
   ```

1. (선택 사항) 사용자가 차단된 파일을 저장하려고 할 때 알림을 추가하도록 파일 화면을 업데이트합니다.

   ```
   $notifications = [System.Collections.ArrayList]@()
                       
   $eventNotification = @{
       ActionType = "Event"
       EventType = "Warning"
       MessageBody = "User attempted to save blocked media file"
   }
   $null = $notifications.Add($eventNotification)
   
   Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ArgumentList $notifications -ScriptBlock {
       param($notifications)
       Set-FSxFSRMFileScreen -Folder "share\business-documents" -NotificationConfigurations $Using:notifications 
   }
   ```

1. 파일 화면이 생성되었는지 확인합니다.

   ```
   Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock {
       Get-FSxFSRMFileScreen -Folder "share\business-documents"
   }
   ```

## PII 데이터 식별 및 분류
<a name="fsrm-identify-classify-pii"></a>

이 예제에서는 사회보장번호가 포함된 파일을 자동으로 식별하고 개인 식별 정보(PII)가 포함된 것으로 분류하는 방법을 보여줍니다.

**PII 데이터를 식별하고 분류하려면:**

1. PII에 대한 분류 속성 생성:

   ```
   Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock {
       New-FSxFSRMClassificationPropertyDefinition -Name "ContainsPII" -Type OrderedList -PossibleValueConfigurations @(
           @{ Name = "Yes" },
           @{ Name = "No" })
   }
   ```

1. 분류 규칙을 생성하여 사회보장번호를 탐지합니다.
**참고**  
다음 정규 표현식은 XXX-XX-XXXX 패턴의 텍스트를 검색합니다. 프로덕션 용도로는 보다 정교한 패턴을 사용하거나 여러 탐지 방법을 결합하는 것이 좋습니다.

   ```
   Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock {
       New-FSxFSRMClassificationRule -Name "Detect_SSN" -Property "ContainsPII" -PropertyValue "Yes" -Namespace "share" -ClassificationMechanism "Content Classifier" -ContentRegularExpression "\b\d{3}-\d{2}-\d{4}\b" 
   }
   ```

1. 실행 분류:

   ```
   Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock {
       Start-FSxFSRMClassification
   }
   ```

1. (선택 사항) 새 파일을 자동으로 분류하도록 연속 분류를 구성합니다.

   ```
   Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock {
       Set-FSxFSRMClassification -Continuous $true
   }
   ```

1. 상태 확인(1은 완료를 의미함):

   ```
   Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock {
       Get-FSxFSRMClassification
   }
   ```

1. 분류가 완료되면 Windows File Explorer에서 파일을 마우스 오른쪽 버튼으로 클릭하고 속성을 선택한 다음 분류 탭을 선택하여 파일에 할당된 **분류** **속성을** 볼 수 있습니다. 이 탭에는 파일의 모든 분류 속성과 해당 값이 표시됩니다.

## 파일에 대한 보존 정책 생성
<a name="fsrm-creating-retention-policy"></a>

이 예제에서는 폴더 위치에 따라 보존 기간별로 파일을 분류한 다음 클라이언트 측 PowerShell 스크립트와 함께 사용하여 파일을 보관하거나 삭제할 수 있는 방법을 보여줍니다.

**파일에 대한 보존 정책을 생성하려면:**

1. 보존 기간에 대한 분류 속성을 생성합니다.

   ```
   Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock {
       New-FSxFSRMClassificationPropertyDefinition -Name "RetentionPeriod" -Type String -Description "File retention period" 
   }
   ```

1. 서로 다른 보존 기간에 대한 분류 규칙을 생성합니다.
   + 법적 문서 폴더에 있는 **법적 문서의** 경우 7년 보존:

     ```
     Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock {
         New-FSxFSRMClassificationRule -Name "Legal_7Year" -Property "RetentionPeriod" -PropertyValue "7 years" -Namespace "share/Legal Documents" -ClassificationMechanism "Folder Classifier" 
     }
     ```
   + **Finance** 폴더 아래의 재무 레코드에 대한 3년 보존:

     ```
     Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock {
         New-FSxFSRMClassificationRule -Name "Finance_3Year" -Property "RetentionPeriod" -PropertyValue "3 years" -Namespace "share/Finance" -ClassificationMechanism "Folder Classifier" 
     }
     ```

   파일 콘텐츠별로 분류하고 "보존 기간 7년"과 같은 문자열을 검색할 수도 있습니다. 이렇게 하려면 `ClassificationMechanism "Content Classifier"` 및를 사용합니다`ContentString "Retention seven years"`.

1. 분류를 실행하여 보존 속성을 적용합니다.

   ```
   Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock {
       Start-FSxFSRMClassification
   }
   ```

1. (선택 사항) 새 파일을 자동으로 분류하도록 연속 분류를 구성합니다.

   ```
   Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock {
       Set-FSxFSRMClassification -Continuous $true
   }
   ```

1. 상태 확인(1은 완료를 의미함):

   ```
   Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock {
       Get-FSxFSRMClassification
   }
   ```

1. 분류가 완료되면 Windows File Explorer에서 파일을 마우스 오른쪽 버튼으로 클릭하고 속성을 선택한 다음 분류 탭을 선택하여 파일에 할당된 **분류** **속성을** 볼 수 있습니다. 이 탭에는 파일의 모든 분류 속성과 해당 값이 표시됩니다.

1. 파일이 보존 기간으로 분류되면 클라이언트 측 PowerShell 스크립트를 사용하여 `RetentionPeriod` 속성과 기간에 따라 파일을 보관하거나 삭제할 수 있습니다. 예를 들어 파일 시스템을 스캔하고 파일 수명을 보존 기간 분류와 비교할 수 있습니다. 자세한 내용은 [파일 관리 작업](fsrm-file-management.md) 단원을 참조하십시오.

## 공통 스토리지 보고서 설정
<a name="fsrm-setting-up-storage-reports"></a>

이 섹션에서는 일반적으로 사용되는 두 가지 스토리지 보고서, 즉 대용량 파일 보고서와 소유자별 파일을 생성하는 방법을 보여줍니다.

### 대용량 파일 보고서
<a name="fsrm-large-files-report"></a>

이 예제에서는 200MB보다 큰 파일을 식별하는 월별 보고서를 생성합니다.

**대용량 파일 보고서를 생성하려면:**

1. 예약된 대용량 파일 보고서를 생성합니다.

   ```
   $schedule = @{
       Time = "2:00 AM"
       Monthly = @(1) # Run on the 1st of each month
   }
   
   Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ArgumentList $schedule -ScriptBlock {
       param($schedule)
       New-FSxFSRMStorageReport -Name "Monthly Large Files Report" -Namespace "share" -ReportType "LargeFiles" -LargeFileMinimum 200MB -ReportFormat "HTML","CSV" -ScheduleConfigurations $schedule 
   }
   ```

1. (선택 사항) 보고서를 즉시 실행하여 다음을 테스트합니다.

   ```
   Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock {
       Start-FSxFSRMStorageReport -Name "Monthly Large Files Report"
   }
   ```

### 소유자별 파일 보고서
<a name="fsrm-files-by-owner-report"></a>

이 예제에서는 사용자의 스토리지 소비를 보여주는 주간 보고서를 생성합니다.

**소유자 보고서별로 파일을 생성하려면:**

1. 소유자 보고서별로 예약된 파일을 생성합니다.

   ```
   $schedule = @{
       Time = "3:00 AM"
       Weekly = @('Sunday')
   }
   
   Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ArgumentList $schedule -ScriptBlock {
       param($schedule)
       New-FSxFSRMStorageReport -Name "Weekly Files by Owner Report" -Namespace "share" -ReportType "FilesByOwner" -ReportFormat "HTML","CSV" -ScheduleConfigurations $schedule 
   }
   ```

1. (선택 사항) 보고서를 즉시 실행하여 다음을 테스트합니다.

   ```
   Invoke-Command -ComputerName $FSxWindowsRemotePowerShellEndpoint -ConfigurationName FSxRemoteAdmin -ScriptBlock {
       Start-FSxFSRMStorageReport -Name "Weekly Files by Owner Report"
   }
   ```

관리 D$ 공유를 매핑하여 생성된 보고서에 액세스합니다. 자세한 내용은 [스토리지 보고서 액세스](fsrm-storage-reports.md#fsrm-storage-reports-accessing)에서 알아보세요.