啟用檔案存取時間更新
從 ONTAP 9.11.1 開始、您可以啟用 -atime-update
FlexCache 捲上的欄位、以允許檔案存取時間更新。您也可以使用設定存取時間更新期間 -atime-update-period
屬性。。 -atime-update-period
屬性可控制存取時間更新的發生頻率、以及更新可傳播到原始磁碟區的時間。
總覽
ONTAP 提供一個稱為的 Volume 層級欄位 -atime-update
,用於管理使用讀取、 readlink 和 READDIR 讀取的檔案和目錄的存取時間更新。atime用於不常存取的檔案和目錄的資料生命週期決策。不常存取的檔案最終會移轉至歸檔儲存設備、之後通常會移至磁帶。
在現有和新建立FlexCache 的版本中、預設會停用atim-update欄位。如果您在早於 9.11.1 版的 ONTAP 上使用 FlexCache Volume ,則應將 atime-update 欄位保持停用,以便在原始磁碟區上執行讀取作業時,不會不必要地清除快取。然而、有了大量FlexCache 的支援資料的快取、系統管理員可以使用特殊工具來管理資料、並確保熱資料保留在快取中、並清除冷資料。停用atime-update時無法執行此動作。不過,從 ONTAP 9.11.1 開始,您可以啟用 `-atime-update`及 `-atime-update-period,`使用管理快取資料所需的工具。
開始之前
-
所有FlexCache 的不完整資料區都必須執行ONTAP 更新版本的更新版本。
-
您必須使用 `advanced`權限模式。
關於這項工作
設定 -atime-update-period
至 86400 秒、無論檔案上執行的類似讀取作業次數為何、每 24 小時期間都不允許進行一次以上的存取時間更新。
設定 -atime-update-period
至 0 會傳送訊息給每個讀取存取的來源。然後、來源會通知每FlexCache 個VMware Volume、該atime已經過時、影響效能。
-
將權限模式設定為
advanced
:set -privilege advanced
-
啟用檔案存取時間更新並設定更新頻率:
volume modify -volume vol_name -vserver <SVM name> -atime-update true -atime-update-period <seconds>
以下範例啟用
-atime-update
和套件-atime-update-period
至 86400 秒或 24 小時:c1: volume modify -volume origin1 vs1_c1 -atime-update true -atime-update-period 86400
-
請確認
-atime-update
已啟用:volume show -volume vol_name -fields atime-update,atime-update-period
c1::*> volume show -volume cache1_origin1 -fields atime-update,atime-update-period vserver volume atime-update atime-update-period ------- -------------- ------------ ------------------- vs2_c1 cache1_origin1 true 86400
-
啟用之後, `-atime-update`您可以指定是否可以自動清理 FlexCache 磁碟區上的檔案,以及清理時間間隔:
volume flexcache config modify -vserver <SVM name> -volume <volume_name> -is-atime-scrub-enabled <true|false> -atime-scrub-period <integer>
如需參數的詳細 `-is-atime-scrub-enabled`"指令參考資料ONTAP"資訊,請參閱。