Creating A File Criteria To Find Characters Not Supported In A CIFS File System

Introduction

This article illustrates how to create a file criteria directly through the ‘Criteria Wizard’ as well as by uploading a text file that contains the criteria. As an example we will create a criteria that will identify file names that contain characters that are not allowed in a CIFS filenames. This criteria can then be used in validated by creating an advanced report with an inventory from an NFS file system. Advanced reports and file criteria are only available in the full version of Data Manager with the Advanced Reporting license.

Problem

When accessing multiprotocol storage devices from Microsoft Windows clients it is useful to know if the NFS clients have named files and directories with any of the following illegal CIFS characters:

" . / \ [ ] : + | < > = ; ,* ?

Solution

One way to identify whether your multiprotocol storage has file and directory names containing these characters is to create a ‘File Set’ report using a ‘File Name Expression File Criteria’. The following procedure illustrates how to create the specific file criteria and how to include it in your report.

Creating a File Name Expression File Criteria from the GUI

  1. Select ‘File Criteria’ from the Navigation menu
  2. The ‘Add a File Criteria’ content page appears
  3. Enter ‘NonCifsChars’ in the ‘Name’ field.
  4. Enter ‘Identify CIFS Characters not allowed in file names’ in the ‘Description’ field.
  5. Select ‘Add’ from the menu items in the ‘Actions’ menu
  6. The ‘Create Condition Dialog’ appears
  7. Select ‘File Name Expression’ from the ‘Type’ dropdown menu
  8. In the regular expression field type:
    .*[\Q?<*>|$+{}\[]\E].*
  9. Click the OK button to close the ‘Create Condition’ dialog box
  10. Now that the condition has been added, click the OK button on the content pane to save the ‘File Criteria’

Creating this same File Name Expression File Criteria by uploading it from a file

Before creating the criteria file you should know that a complete file criteria has three parts:

  • Name
  • Description
  • Conditions

Each of these parts is enclosed in a single quote and the parts are separated by a comma. Criteria files many contain several individual file criteria. Each individual file criteria must start on a separate line.

To create a criteria file

  1. Open your favorite text editor
  2. Add the following line to the text file
    'NonCifsChars','Identify CIFS Characters not allowed in file names','FE=(.*[\Q?<*>|$+{}\[]\E].*)'
  3. Save and close the file
  4. Select ‘File Criteria’ from the Navigation menu
  5. Select the ‘Import’ menu item from the ‘Actions’ menu
  6. The ‘Import criteria’ dialog box appears
  7. Click on the browse button in the dialog and locate the criteria file that you created above

Now test your file criteria by using it to create a File Set report

  1. Select the ‘Reports’ menu option from the Navigation menu
  2. The ‘Reports’ content page appears
  3. Select ‘Add File System Report…’ option from the Actions menu.
  4. The ‘File System Report Wizard’ is now displayed
  5. On the first page of the report wizard, provide a report name, select ‘File Set’ as the report type and select the appropriate ‘File Criteria’ from the ‘Matching File Criteria’ dropdown box
  6. Click ‘Next’
  7. On the second page of the wizard, select an ‘NFS inventory’ to use for the report
  8. On the third page of the wizard, select the additional file properties to display in the report
  9. Click ‘Next’
  10. Click ‘Finish’
  11. Review the report and verify that your report has identified the appropriate files

Summary

File Criteria are an easy way to filter and customize your file system reports. Using a File Criteria in conjunction with a File Set report is a useful way to validate the operation of your File Criteria before publishing your final report. When experimenting with compound File Criteria sometimes it is best to create and upload criteria files so that you have an archive of your work at each interim step.

Supplementary data

Related Links

AskF5 – F5’s repository of product information, manuals, and much more. You can find the Data Manager Administrator’s Guide here, which also explains this procedure.

Author bio

Rob Gagnon has been working in the storage domain for over 14 years and was instrumental in the delivery of the Data Manager application at Acopia Networks. F5 acquired Acopia Networks in 2007, and since then Rob has continued his role as Data Manager project leader as well as management of the ARX System Management team.

Published Aug 12, 2011
Version 1.0

Was this article helpful?

No CommentsBe the first to comment