

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 停用自動快照
<a name="disable-snapshots"></a>

FSx for ONTAP 檔案系統中磁碟區的預設快照政策會啟用自動快照。如果您不需要資料的快照 （例如，如果您使用測試資料），您可以將磁碟區的快照[政策設定為使用 、 API 和 CLI 來停用快照](snapshots-ontap.md#snapshot-policies)，如下列程序所述。 `none` AWS 管理主控台 AWS CLI ONTAP

## 停用自動快照 (AWS 主控台）
<a name="w2aac26c11c19b5b1"></a>停用自動快照 （主控台）

1. 在 [https://console.aws.amazon.com/fsx/](https://console.aws.amazon.com/fsx/)：// 開啟 Amazon FSx 主控台。

1. 導覽至**檔案系統**，然後選擇您要更新磁碟區的 ONTAP 檔案系統。

1. 選擇**磁碟區**索引標籤。

1. 選擇您要更新的磁碟區。

1. 針對**動作**，選擇**更新磁碟區**。

   **更新磁碟**區對話方塊會顯示磁碟區目前的設定。

1. 針對**快照政策**，選擇**無**。

1. 選擇**更新**以更新磁碟區。

## 停用自動快照 (AWS CLI)
<a name="w2aac26c11c19b5b3"></a>
+ 使用 [update-volume](https://docs.aws.amazon.com/cli/latest/reference/fsx/update-volume.html) AWS CLI 命令 （或同等的 [UpdateVolume](https://docs.aws.amazon.com/fsx/latest/APIReference/API_UpdateVolume.html) API 命令），將 `SnapshotPolicy` 設定為 `none`，如下列範例所示。

  ```
  aws fsx update-volume \
      --volume-id fsvol-1234567890abcdefa \
      --name new_vol \
      --ontap-configuration CopyTagsToBackups=true,JunctionPath=/new_vol, \
             SizeInMegabytes=2048,SnapshotPolicy=none, \
             StorageEfficiencyEnabled=true, \
             TieringPolicy=all
  ```

## 停用自動快照 (ONTAP CLI)
<a name="w2aac26c11c19b5b5"></a>

將磁碟區的快照政策設定為使用`none`預設政策來關閉自動快照。

1. 使用 [https://docs.netapp.com/us-en/ontap-cli-9131/volume-snapshot-policy-show.html](https://docs.netapp.com/us-en/ontap-cli-9131/volume-snapshot-policy-show.html) ONTAP CLI 命令來顯示`none`政策。

   ```
   ::> snapshot policy show -policy none
   
   Vserver: FsxIdabcdef01234567892
                            Number of Is
   Policy Name              Schedules Enabled Comment
   ------------------------ --------- ------- ----------------------------------
   none                             0 false   Policy for no automatic snapshots.
       Schedule               Count     Prefix                 SnapMirror Label
       ---------------------- -----     ---------------------- -------------------
       -                          -     -                      -
   ```

1. 使用 [https://docs.netapp.com/us-en/ontap-cli-9131/volume-modify.html](https://docs.netapp.com/us-en/ontap-cli-9131/volume-modify.html) ONTAP ClI 命令將磁碟區的快照政策設定為 `none`，以停用自動快照。將下列預留位置值取代為您的資料：
   + *`svm_name`* — 使用 SVM 的名稱。
   + *`vol_name`* — 使用磁碟區的名稱。

   提示繼續時，輸入 **y**。

   ```
   ::> volume modify -vserver svm_name -volume vol_name -snapshot-policy none
   
   Warning: You are changing the Snapshot policy on volume "vol_name" to "none". Snapshot copies on this volume
            that do not match any of the prefixes of the new Snapshot policy will not be deleted. However, when
            the new Snapshot policy takes effect, depending on the new retention count, any existing Snapshot copies
            that continue to use the same prefixes might be deleted. See the 'volume modify' man page for more information. 
   Do you want to continue? {y|n}: y
   Volume modify successful on volume vol_name of Vserver svm_name.
   ```