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
- Select ‘File Criteria’ from the Navigation menu
- The ‘Add a File Criteria’ content page appears
- Enter ‘NonCifsChars’ in the ‘Name’ field.
- Enter ‘Identify CIFS Characters not allowed in file names’ in the ‘Description’ field.
- Select ‘Add’ from the menu items in the ‘Actions’ menu
- The ‘Create Condition Dialog’ appears
- Select ‘File Name Expression’ from the ‘Type’ dropdown menu
- In the regular expression field type:
.*[\Q?<*>|$+{}\[]\E].*
- Click the OK button to close the ‘Create Condition’ dialog box
- 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
- Open your favorite text editor
- Add the following line to the text file
'NonCifsChars','Identify CIFS Characters not allowed in file names','FE=(.*[\Q?<*>|$+{}\[]\E].*)'
- Save and close the file
- Select ‘File Criteria’ from the Navigation menu
- Select the ‘Import’ menu item from the ‘Actions’ menu
- The ‘Import criteria’ dialog box appears
- 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
- Select the ‘Reports’ menu option from the Navigation menu
- The ‘Reports’ content page appears
- Select ‘Add File System Report…’ option from the Actions menu.
- The ‘File System Report Wizard’ is now displayed
- 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
- Click ‘Next’
- On the second page of the wizard, select an ‘NFS inventory’ to use for the report
- On the third page of the wizard, select the additional file properties to display in the report
- Click ‘Next’
- Click ‘Finish’
- 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.