Loading...

Optimized Scan - Getting Started

Table of Contents

Overview

The Optimized Scan feature improves the data scan capabilities of an iDataAgent by determining the files that have changed and/or been backed up. Optimized scan provides a faster method of data scan during regular as well as SnapProtect backups.

System Requirements

Ensure that the computer has the File System iDataAgent installed on it and satisfies the minimum requirements specified in System Requirements - Optimized Scan.

Enabling Optimized Scan for Windows

By default, Optimized Scan is the default method for scanning files to determine which files have changed and/or have been backed up.

Optimized Scan is the preferred method of scanning the files during a regular and SnapProtect backup, as this method is much faster as compared to the Recursive Scan.

Before selecting Optimized Scan as the scan method, consider the following:

  • Use Optimized Scan method for NTFS volumes but not for the FAT volumes.
  • For cluster volumes that are created using NTFS, you can use the Optimized Scan method to back up data on Windows failover clusters.
  • Do not use Optimized Scan method if the subclient content has any mount points.
  1. From the CommCell Browser, expand Client Computers > client > File System > backup_set.
  2. Right-click the appropriate subclient and click Properties.
  3. In the Subclient Properties dialog box, click Advanced.
  4. In the Advanced Properties dialog box, click the Advanced Options tab.
  5. Click Optimized Scan and then click OK.
  6. Click OK.

Enabling Optimized Scan for UNIX

Enabling Optimized Scan at the subclient level starts automatic monitoring of the volume. Optimized Scan is performed when you run a backup for any subclient.

The file system filter driver will keep monitoring the file system even when the Optimized Scan service does not run. On service restart, it will check if the driver has encountered any errors like e.g. queue overflow. If the driver hasn't hit any errors then the Optimized Scan service will avoid rescanning these volumes. Note that all the volumes will be automatically rescanned when ContinuousDataReplicator is used for data replication.

If a subclient contains a volume that is not added to the monitored volumes list, recursive scan is performed for that volume.

The .DATACLASS_nn directory contains the optimized scan meta data. By default, the .DATACLASS_nn directory is excluded from backups.

Consider the following before enabling Optimized Scan:

  • Optimized Scan does not monitor the root mount point
  • There should be at least 1GB free space in the mounted volume in order to enable Optimized Scan on the file system

Use the following procedure to enable Optimized Scan:

  1. From the CommCell Browser, expand Client Computers > client > File System > backup_set.
  2. Right-click the appropriate subclient and click Properties.
  3. In the Subclient Properties dialog box, click Advanced.
  4. In the Advanced Properties dialog box, click the Advanced Options tab.
  5. Click Optimized Scan and then click OK.
  6. Click OK.

Disabling Automatic Monitoring

By default, when you enable Optimized Scan on a subclient, the mount points that make up the subclient content are automatically monitored. However, you can disable automatic monitoring of volumes globally by configuring the nDisableAutoMonitoring additional setting.

To add the volumes back to the monitored volumes list, you need to manually run the following command:

DcClient -monitor <mount_path>

  1. From the CommCell Browser, navigate to the <Client>.
  2. Right-click the <Client>, and then click Properties.
  3. On the Client Computer Properties dialog box, click Advanced.
  4. On the Advanced Client Properties dialog box, click the Additional Settings tab.
  5. Click Add.
  6. On the Add Additional Settings on Unix Client dialog box, perform the following:
    1. In the Name box, type nDisableAutoMonitoring. The Category and Type details are automatically populated.

      Alternatively, you can click Lookup and search for the additional setting using the Find box.

    2. In the Value box, type  1.
    3. Click OK.
  7. Click OK to close the Advanced Client Properties dialog box.
  8. Click OK.

Manually Adding Volumes to the Monitored Volumes List

  1. Log on to the client computer.
  2. Open the command prompt, and then navigate to the Base folder of the SnapProtect installation directory:

    <SnapProtect_Installation_Directory>/Base

  3. Type the following command:

    DcClient -monitor <mount_path>

    where: <mount_path> is the volume that you want to add to the monitoring list.

    On a Cluster Setup:

    Optimized Scan is supported only with active-passive cluster configurations.

    • To list the volumes for the virtual client, type the command:

      DcClient -cluster vollist <virtual_client_name>

    • To store the volume list for the virtual client, type the command:

      DcClient -cluster volcreate <virtual_client_name> <vol 1, vol 2,...vol n>

    • To configure failovers:

      The shared volumes need to be added to the Monitored Volumes list on the active node using the DcClient -cluster volcreate command. Centralized Optimized Scan database is not supported for failovers. Even if you configure a centralized database for volumes that need failover capability, you must relocate the database to the root of the volume.

      The root (/)  and the volumes that contain job results, tmp, and var (which contains SnapProtect log files) folders are not monitored by Optimized Scan.

      A failure of any Agent software on the active node in a UNIX cluster will not cause a failover to be initiated.

      The cvclusternotify script should be added as part of the normal cluster startup/shutdown procedure. The script is provided as a generic template, and it must be run at the beginning of node shutdown and at the end of new active node startup before any I/O or application starts on the cluster volumes. In both cases, data protection services must be up and running.

      Run the following command to notify SnapProtect that the specified "Cluster Group" is going up or down because of a cluster failover:

      Usage:

      cvclusternotify -inst InstanceName -cn ClientName [-start | -shutdown]

      Where:

      • cvclusternotify is the script that notifies the SnapProtect software about cluster failovers.
      • -inst specifies the name of the SnapProtect instance on which you want to run the script. If you have a single instance, specify Instance001.
      • -cn is the name of the cluster group client.

      Example:

      For a two-node cluster, if the cluster group client name is "ClusterGroup1" and the application instance is "Instance001", run the following command:

      • To shutdown:

        cvclusternotify -inst Instance001 -cn "ClusterGroup1" -shutdown

      • To start up:

        cvclusternotify -inst Instance001 -cn "ClusterGroup1" -start

Modifying the Optimized Scan Frequency

Optimized Scan service will refresh all the monitored volumes regularly after a period of time, which is 60 minutes by default. If any changes occur on the monitored volumes, the Optimized Scan service will attempt an incremental scan of the data after the refresh period. Depending on the time specified, if you add any new volumes, the services will pick up the volumes and start to monitor those volumes after the refresh period.

Follow these steps to change the Optimized Scan service refresh interval.

  1. From the CommCell Browser, navigate to the <Client>.
  2. Right-click the <Client>, and then click Properties.
  3. On the Client Computer Properties dialog box, click Advanced.
  4. On the Advanced Client Properties dialog box, click the Additional Settings tab.
  5. Click Add.
  6. On the Add Additional Settings on Unix Client dialog box, perform the following:
    1. In the Name box, type REFRESH_PERIOD. The Category and Type details will be automatically populated.

      Alternatively, you can click Lookup and search for the additional setting using the Find box.

    2. In the Value box, type <Value>.

      For example, type 10 to set the Optimized Scan service time interval to 10 minutes.

    3. Click OK.
  7. Click OK to close the Advanced Client Properties dialog box.
  8. Click OK.

Running Optimized Scan Service on Multiple Volumes

The number of volumes that the Optimized Scan service will scan at a time is one, by default. We can modify the Optimized Scan service to run simultaneously on multiple volumes using the following steps:

  1. From the CommCell Browser, navigate to the <Client>.
  2. Right-click the <Client>, and then click Properties.
  3. On the Client Computer Properties dialog box, click Advanced.
  4. On the Advanced Client Properties dialog box, click the Additional Settings tab.
  5. Click Add.
  6. On the Add Additional Settings on Unix Client dialog box, perform the following:
    1. In the Name box, type THROTTLE. The Category and Type details will be automatically populated.

      Alternatively, you can click Lookup and search for the additional setting using the Find box.

    2. In the Value box, type <Value>.

      For example, type 2 to set two run Optimized Scan service on two volumes simultaneously.

    3. Click OK.
  7. Click OK to close the Advanced Client Properties dialog box.
  8. Click OK.

Increasing the Optimized Scan Service Priority

The Optimized Scan service runs with a priority level of 10, by default. We can increase the priority of the Optimized Scan service using the following steps by assigning a priority level between 1 and 10, 10 being the least:

  1. From the CommCell Browser, navigate to the <Client>.
  2. Right-click the <Client>, and then click Properties.
  3. On the Client Computer Properties dialog box, click Advanced.
  4. On the Advanced Client Properties dialog box, click the Additional Settings tab.
  5. Click Add.
  6. On the Add Additional Settings on Unix Client dialog box, perform the following:
    1. In the Name box, type SCAN_PRIORITY. The Category and Type details will be automatically populated.

      Alternatively, you can click Lookup and search for the additional setting using the Find box.

    2. In the Value box, type <Value>.

      For example, type 6.

    3. Click OK.
  7. Click OK to close the Advanced Client Properties dialog box.
  8. Click OK.

Modifying the Optimized Scan Database Location

The Optimized Scan database is created on each volume. For all the existing volumes in Optimized Scan monitoring, we can relocate the database to a centralized location and add into Optimized Scan monitoring.

For better performance, place the Optimized Scan database at a centralized location.

Follow the steps given below to change the location of the Optimized Scan database:

  1. From the CommCell Browser, navigate to the <Client>.
  2. Right-click the <Client>, and then click Properties.
  3. On the Client Computer Properties dialog box, click Advanced.
  4. On the Advanced Client Properties dialog box, click the Additional Settings tab.
  5. Click Add.
  6. On the Add Additional Settings on Unix Client dialog box, perform the following:
    1. In the Name box, type DB_FOLDER. The Category and Type details will be automatically populated.

      Alternatively, you can click Lookup and search for the additional setting using the Find box.

    2. In the Value box, type <Value>.

      For example, type /cdrcache/.DATACLASS_4/.db.cv.

    3. Click OK.
  7. Click OK to close the Advanced Client Properties dialog box.
  8. Click OK.

Using Command Prompt to Manage Optimized Scan Services

The DcClient command is a command line tool used to administer Optimized Scan volumes on a UNIX client. This command allows you to do the following, among other tasks:

  • change the Optimized Scan additional setting values regarding volumes
  • administer the Optimized Scan database
  • stop and start individual volumes and stop and start all volumes simultaneously.

To use this tool, open the command prompt and navigate to the Optimized Scan installation directory.

For Example: /opt/SnapProtect/Base

The following table describes these options in detail.

Task Command Line Usage
Get Information on Volumes States and Additional Setting Values The following command displays information on the current state of the volumes and additional settings:

DcClient -getinfo

Start Monitoring a Volume The following command starts monitoring an Optimized Scan volume:

DcClient -start <mount path>

The Optimized Scan services will start monitoring the volume unless the services are restarted or the corresponding stop command is run.

Stop Monitoring a Volume The following command stops monitoring an Optimized Scan volume:

DcClient -stop <mount path>

The Optimized Scan services will stop monitoring the volume.

Defragment a Volume The following command defragments (optimizes) an Optimized Scan database.

DcClient -defrag <mount path>

Defragmentation is especially helpful for reorganizing highly-active databases.

Relocate a Database Volume The following command moves a database to another directory. In essence, the command relocates the database from the current path to the specified new path.

DcClient -relocate <volume> <new path to the database>

For better performance of Optimized Scan, it is recommended that the Optimized Scan database is located at a centralized location.

Add a Volume to be Monitored The following command adds an Optimized Scan volume for monitoring.

DcClient -monitor <mount path>

You can add either existing volumes or new volumes for monitoring.

Remove a Volume from being Monitored The following command removes an Optimized Scan volume from being monitored:

DcClient -donot-monitor <mount path>

Change Additional Setting Values You can use the DcClient command with various additional setting values to set or implement the following:
  • Centralized Location of Optimized Scan Database
  • Refresh Time Interval for All Monitored Volumes
  • Volume Picking and Scanning
  • Volume Scan Priority

Create a centralized directory for all Optimized Scan databases

DcClient -edit DB_FOLDER <path to a directory>

The Optimized Scan database is created on each volume. You can use the DB_FOLDER additional setting to create a centralized database directory to accommodate all these databases. The centralized database directory will be created for all the volumes, added into Optimized Scan monitoring, after you create the additional setting. For all the existing volumes in the Optimized Scan monitoring, relocate the database to a centralized location.

For better performance of Optimized Scan, it is recommended that the Optimized Scan database is located at a centralized location.

If you want Optimized Scan to create databases under the root of each volume, run the following command:

DcClient -edit DB_FOLDER NULL

Change the Refresh Time Interval for All Monitored Volumes

DcClient -edit REFRESH_PERIOD <time>

The REFRESH_PERIOD additional setting indicates the period of time after which the Optimized Scan services will refresh all the monitored volumes. If any changes occur on the monitored volumes, the Optimized Scan services will attempt an incremental scan of the data after the refresh period. You can use this additional setting to change the refresh interval. Depending on the time specified, if you add any new volumes, the services will "pick up" the volumes and start to monitor those volumes after the refresh period.

Set the number of volumes that Optimized Scan will scan at once

DcClient -edit THROTTLE <number of volumes>

The default is 1.

Set the Volume Scan Priority

DcClient -edit PRIORITY <priority number>

The value for the PRIORITY additional setting depends on the operating system-level scan priority.