Isilon:OneFS — 如何启用访问时间跟踪 (atime)

Summary: 本文介绍如何为 OneFS 启用访问时间跟踪 (atime)。 默认情况下未启用 atime。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

简介

访问时间(缩写形式为“atime”)是上次访问文件的时间。访问时间跟踪记录创建和上次修改文件的时间,以及上次访问文件的时间。

在 OneFS 中,支持完整访问时间跟踪,但默认情况下处于禁用状态。但是,如有必要,您可以启用访问时间跟踪。
例如,如果您想要配置 SyncIQ 策略标准,以根据上次访问文件的时间匹配文件,则必须启用访问时间跟踪。

本文提供有关如何使用 OneFS Web 管理界面或命令行启用 atime 功能的步骤。
 

谨慎!
更新访问时间跟踪会将写入作添加到每个访问作。因此,启用访问时间跟踪可能会对群集性能产生重大负面影响。此外,在服务器消息块 (SMB) 环境中,每次访问作都会发送更改通知消息。这可能会导致繁重的网络流量,并阻止 SMB 客户端导航群集上的共享。

建议仅在必要时才启用此选项。

 

流程

使用 OneFS Web 管理界面

  1. 单击 File SystemManagementFile > System SettingsAccess > Time Tracking
  2. 选择 启用访问时间跟踪 选项。
  3. 根据需要编辑 精度 选项以指定更新上次访问时间的频率(以秒、分钟、小时、天、周、月或年为单位)。例如,如果您要将“Precision”设置配置为“一天”,则群集将每天更新一次上次访问时间,即使某些文件每天的访问频率超过一次也是如此。
     

    重要!
    请勿将精度设置为小于一小时。作为最佳实践,将精度设置为至少一天。
     

  4. 单击 Submit

提醒:访问时间仅适用于今后,不适用于在为装载启用访问时间之前访问过的文件。


    使用命令行界面
    1. 在群集中的任意节点上打开 SSH 连接,并使用“root”帐户登录。
    2. 运行以下命令:
       
      # isi_for_array -s sysctl efs.bam.atime_enabled=1
      
      Confirm change has been applied to the cluster:
      
      isilon-2# isi_for_array -s sysctl efs.bam.atime_enabled
      isilon-1: efs.bam.atime_enabled: 1
      isilon-2: efs.bam.atime_enabled: 1
      isilon-3: efs.bam.atime_enabled: 1
      
      
       

      注意
      上述命令启用 atime,但它不是永久性的。任何节点或群集重新启动都可以恢复并禁用该设置。

    3. 要永久启用访问时间跟踪,请通过运行以下命令将其添加到系统覆盖文件:
       

      谨慎!
      未正确实施 sysctl命令可能会导致群集无法运行。

       
      # isi_sysctl_cluster efs.bam.atime_enabled=1
      
      Confirm change has been applied to the cluster:
      
      isilon-2# isi_for_array -s sysctl efs.bam.atime_enabled
      isilon-1: efs.bam.atime_enabled: 1
      isilon-2: efs.bam.atime_enabled: 1
      isilon-3: efs.bam.atime_enabled: 1
      

      注意
      如果以前不存在 /etc/mcp/override/sysctl.conf 文件,则会创建该文件。



    使用命令行设置精度

    atime_grace_period 命令行上的设置与 OneFS Web 管理界面中的“Precision”设置相对应。它控制在 OneFS 更新上次访问时间之前文件访问之间必须经过的最短时间。设置越高会降低设置的准确性,但也会降低与在文件访问时记录 atime 相关的性能损失。
     

    设置以毫秒为单位,默认设置为:  86400000 (1天)
     

    1. 运行以下命令并确认更改:
       
      # isi_for_array -s sysctl efs.bam.atime_grace_period=<number>
      
      Confirm change has been applied to the cluster:
      
      # isi_for_array -s sysctl efs.bam.atime_grace_period
      
      

      重要!
      请勿将精度设置为小于一小时 (3600000)。最佳做法是将精度设置为至少一天 ( 86400000)时,此方法起作用。

    2. 要永久更改默认宽限期,请运行以下命令:
       

      谨慎!
      不正确地实施 sysctl 命令可能会导致群集无法运行,因此不建议将 atime 缩短到不到一小时 (3600000)。当设置为不到一小时时,可能会对性能产生严重影响。 

       
      # isi_sysctl_cluster efs.bam.atime_grace_period=86400000
      
      Confirm change has been applied to the cluster:
      
      # isi_for_array -s sysctl efs.bam.atime_grace_period
      

    启用访问时间跟踪后,系统会写入访问时间跟踪信息以及访问文件的当前时间。以下示例显示了 file1 的访问时间跟踪。它的上次访问时间比初始时间戳早了将近两个月,群集的设置精度为 1 小时 ( 3600000)时,此方法起作用。信息将写入文件的元数据。您可以运行 #isi get -DDd <file name> 启用该功能之前和启用该功能之后。最后一个访问条目将添加到输出中。

    Initial Timestamp of file1:
    1233383074 01/31/2009 @ 12:24am
    
    1236931800 03/13/2009 @ 3:10 - File is opened: Outside of grace period. file1 atime is updated to 1236931800
    1236932800 03/13/2009 @ 3:26 - File is opened again: Within grace period. file1 atime stays at 1236931800
    1236939000 03/13/2009 @ 5:10 - File is opened again: Outside of grace period. file1 atime is updated to 1236939000

    Affected Products

    Isilon

    Products

    Isilon, PowerScale OneFS
    Article Properties
    Article Number: 000021583
    Article Type: How To
    Last Modified: 26 Jun 2025
    Version:  4
    Find answers to your questions from other Dell users
    Support Services
    Check if your device is covered by Support Services.