Skip to main content
日本語は機械翻訳による参考訳です。内容に矛盾や不一致があった場合には、英語の内容が優先されます。

ONTAP Vscanでオンデマンドタスクを作成する

共同作成者 netapp-aaron-holt netapp-ahibbard netapp-dbagwell netapp-powr netapp-maireadn netapp-barbe netapp-mdavidson netapp-aherbin

オンデマンド タスクはオンデマンド ウイルス スキャンの範囲を定義します。スキャンするファイルの最大サイズ、スキャン対象に含めるファイルの拡張子とパス、およびスキャン対象から除外するファイルの拡張子とパスを指定できます。デフォルトでは、サブディレクトリ内のファイルもスキャンされます。

タスク概要
  • SVMごとに最大10個のオンデマンド タスクを作成できますが、アクティブにできるのは1つだけです。

  • オンデマンド タスクにより、スキャンに関連する統計が記載されたレポートが作成されます。このレポートを確認するには、コマンドを使用するか、定義済みの場所にタスクにより作成されたレポート ファイルをダウンロードします。

  • ONTAP 9.14.1以降では、ワイルドカードを使用して除外するオンデマンドパスを指定できます。

開始する前に
  • オンアクセスポリシーを作成したが必要です。ポリシーはデフォルトまたはユーザーが作成したものを使用できます。on-accessポリシーがないと、スキャンを有効にできません。

手順
  1. オンデマンド タスクを作成します。

    vserver vscan on-demand-task create -vserver data_SVM -task-name task_name -scan-paths paths_of_files_to_scan -report-directory report_directory_path -report-expiry-time expiration_time_for_report -schedule cron_schedule -max-file-size max_size_of_files_to_scan -paths-to-exclude paths -file-ext-to-exclude file_extensions -file-ext-to-include file_extensions -scan-files-with-no-ext true|false -directory-recursion true|false

    • `-file-ext-to-exclude`設定は `-file-ext-to-include`設定を上書きします。

    • -scan-files-with-no-ext を true に設定すると、拡張子のないファイルをスキャンします。

      `vserver vscan on-demand-task create`の詳細については、link:https://docs.netapp.com/us-en/ontap-cli/vserver-vscan-on-demand-task-create.html["ONTAPコマンド リファレンス"^]をご覧ください。

      次のコマンドは、vs1 SVM に `Task1`という名前のオンデマンド タスクを作成します:

    cluster1::> vserver vscan on-demand-task create -vserver vs1 -task-name Task1 -scan-paths "/vol1/","/vol2/cifs/" -report-directory "/report" -schedule daily -max-file-size 5GB -paths-to-exclude "/vol1/cold-files/" -file-ext-to-include "vmdk?","mp*" -file-ext-to-exclude "mp3","mp4" -scan-files-with-no-ext false
    [Job 126]: Vscan On-Demand job is queued. Use the "job show -id 126" command to view the status.

    +

    メモ `job show`コマンドを使用してジョブのステータスを表示できます。 `job pause`コマンドと `job resume`コマンドを使用してジョブを一時停止および再開したり、 `job stop`コマンドを使用してジョブを終了したりできます。"ONTAPコマンド リファレンス"の `job`の詳細を確認してください。
  2. オンデマンド タスクが作成されたことを確認します。

    vserver vscan on-demand-task show -instance data_SVM -task-name task_name

    `vserver vscan on-demand-task show`の詳細については、link:https://docs.netapp.com/us-en/ontap-cli/vserver-vscan-on-demand-task-show.html["ONTAPコマンド リファレンス"^]をご覧ください。

    次のコマンドは、 `Task1`タスクの詳細を表示します:

    cluster1::> vserver vscan on-demand-task show -instance vs1 -task-name Task1
    
                               Vserver: vs1
                             Task Name: Task1
                    List of Scan Paths: /vol1/, /vol2/cifs/
                 Report Directory Path: /report
                          Job Schedule: daily
    Max File Size Allowed for Scanning: 5GB
                File Paths Not to Scan: /vol1/cold-files/
           File Extensions Not to Scan: mp3, mp4
               File Extensions to Scan: vmdk?, mp*
          Scan Files with No Extension: false
               Request Service Timeout: 5m
                        Cross Junction: true
                   Directory Recursion: true
                         Scan Priority: low
                      Report Log Level: info
            Expiration Time for Report: -
終了後の操作

タスクの実行をスケジュールする前に、SVMでスキャンを有効にする必要があります。