Skip to main content
本繁體中文版使用機器翻譯,譯文僅供參考,若與英文版本牴觸,應以英文版本為準。

啟用及管理 FlexCache 回寫

貢獻者

從 ONTAP 9.15.1 開始、您可以在 FlexCache 磁碟區上啟用 FlexCache 回寫模式、為邊緣運算環境和具有大量寫入工作負載的快取提供更好的效能。您也可以決定是否在 FlexCache 磁碟區上啟用回寫功能、或在必要時停用磁碟區上的回寫功能。

在快取磁碟區上啟用回寫時、寫入要求會傳送至本機快取、而非原始磁碟區。

開始之前

您必須處於進階權限模式。

在啟用回寫功能的情況下建立新的 FlexCache Volume

步驟

您可以使用 ONTAP 系統管理員或 ONTAP CLI 、在啟用回寫功能的情況下建立新的 FlexCache Volume 。

系統管理員
  1. 如果 FlexCache 磁碟區與原始磁碟區位於不同的叢集、請建立叢集對等關係:

    1. 在本機叢集上、按一下 * 保護 > 概述 * 。

    2. 展開 * 叢集間設定 * 、按一下 * 新增網路介面 * 、然後將叢集間介面新增至叢集。

      在遠端叢集上重複此步驟。

    3. 在遠端叢集上、按一下 * 保護 > 概述 * 。按一下 功能表選項圖示 在叢集對等端點區段中、按一下*產生密碼密碼*。

    4. 複製產生的通關密碼、然後貼到本機叢集中。

    5. 在本機叢集上、按一下叢集對等項下的 * 對等叢集 * 、然後對本機叢集和遠端叢集進行對等處理。

  2. 建立 SVM 對等關係:

    在 * 儲存 VM 對等端 * 下、按一下 功能表選項圖示 然後*對等儲存VM*來對等儲存VM。

  3. 選擇*儲存>磁碟區*。

  4. 選取*「Add*」。

  5. 選取 * 更多選項 * 、然後選取 * 新增為遠端磁碟區的快取 * 。

  6. 選取 * 啟用 FlexCache 回寫 * 。

CLI
  1. 如果FlexCache 要建立的實體磁碟區位於不同的叢集、請建立叢集對等關係:

    1. 在目的地叢集上、與資料保護來源叢集建立對等關係:

      cluster peer create -generate-passphrase -offer-expiration MM/DD/YYYY HH:MM:SS|1...7days|1...168hours -peer-addrs <peer_LIF_IPs> -initial-allowed-vserver-peers <svm_name>,..|* -ipspace <ipspace_name>

      從ONTAP 功能支援的9.6開始、建立叢集對等關係時、預設會啟用TLS加密。支援TLS加密、以便在來源FlexCache 與實體磁碟區之間進行叢集間通訊。您也可以視需要停用叢集對等關係的TLS加密。

    cluster02::> cluster peer create -generate-passphrase -offer-expiration 2days -initial-allowed-vserver-peers *
    
                         Passphrase: UCa+6lRVICXeL/gq1WrK7ShR
                    Expiration Time: 6/7/2017 08:16:10 EST
      Initial Allowed Vserver Peers: *
                Intercluster LIF IP: 192.140.112.101
                  Peer Cluster Name: Clus_7ShR (temporary generated)
    
    Warning: make a note of the passphrase - it cannot be displayed again.
    1. 在來源叢集上、驗證來源叢集到目的地叢集的驗證:

      cluster peer create -peer-addrs <peer_LIF_IPs> -ipspace <ipspace>
      cluster01::> cluster peer create -peer-addrs 192.140.112.101,192.140.112.102
      
      Notice: Use a generated passphrase or choose a passphrase of 8 or more characters.
              To ensure the authenticity of the peering relationship, use a phrase or sequence of characters that would be hard to guess.
      
      Enter the passphrase:
      Confirm the passphrase:
      
      Clusters cluster02 and cluster01 are peered.
  2. 如果 FlexCache 磁碟區與原始磁碟區位於不同的 SVM 、請與建立 SVM 對等關係 flexcache 應用程式:

    1. 如果 SVM 位於不同的叢集中、請為對等 SVM 建立 SVM 權限:

      vserver peer permission create -peer-cluster <cluster_name> -vserver <svm-name> -applications flexcache

      下列範例說明如何建立適用於所有本機SVM的SVM對等權限:

    cluster1::> vserver peer permission create -peer-cluster cluster2 -vserver "*" -applications flexcache
    
    Warning: This Vserver peer permission applies to all local Vservers. After that no explict
    "vserver peer accept" command required for Vserver peer relationship creation request
    from peer cluster "cluster2" with any of the local Vservers. Do you want to continue? {y|n}: y
    1. 建立 SVM 對等關係:

      vserver peer create -vserver <local_SVM> -peer-vserver <remote_SVM> -peer-cluster <cluster_name> -applications flexcache
  3. 建立啟用回寫功能的 FlexCache Volume :

    volume flexcache create -vserver <cache_vserver_name> -volume <cache_flexgroup_name> -aggr-list <list_of_aggregates> -origin-volume <origin flexgroup> -origin-vserver <origin_vserver name> -junction-path <junction_path> -is-writeback-enabled true

在現有的 FlexCache 磁碟區上啟用 FlexCache 回寫

您可以使用 ONTAP 系統管理員或 ONTAP CLI 、在現有的 FlexCache 磁碟區上啟用 FlexCache 回寫功能。

系統管理員
  1. 選取 * 儲存 > 磁碟區 * 、然後選取現有的 FlexCache 磁碟區。

  2. 在磁碟區的「總覽」頁面上、按一下右上角的 * 編輯 * 。

  3. 在 * 編輯 Volume * 視窗中、選取 * 啟用 FlexCache 回寫 * 。

CLI
  1. 在現有的 FlexCache 磁碟區上啟用回寫:

    volume flexcache config modify -volume <cache_flexgroup_name> -is-writeback-enabled true

檢查是否已啟用 FlexCache 回寫

步驟

您可以使用系統管理員或 ONTAP CLI 來判斷是否已啟用 FlexCache 回寫。

系統管理員
  1. 選取 * 儲存 > 磁碟區 * 、然後選取一個磁碟區。

  2. 在 Volume * Overview (卷 * 概述) * 中,找到 FlexCache details* 並檢查 FlexCache 捲上的 FlexCache 寫回是否設置爲 Enabled (已啓用 * )。

CLI
  1. 檢查是否已啟用 FlexCache 回寫:

    volume flexcache config show -volume cache -fields is-writeback-enabled

停用 FlexCache 磁碟區上的回寫功能

在刪除 FlexCache 磁碟區之前、您需要停用 FlexCache 回寫功能。

步驟

您可以使用系統管理員或 ONTAP CLI 來停用 FlexCache 回寫。

系統管理員
  1. 選取 * 儲存 > Volumes (磁碟區) * 、然後選取已啟用 FlexCache 回寫功能的現有 FlexCache 磁碟區。

  2. 在 Volume 的「總覽」頁面上、按一下右上角的「編輯」。

  3. 在 * 編輯 Volume * 視窗中、取消選取 * 啟用 FlexCache 回寫 * 。

CLI
  1. 停用回寫:

    volume flexcache config modify -volume <cache_vol_name> -is-writeback-enabled false