DEFINE DEVCLASS (Define a FILE device class)

Use the FILE device class when you are using files on magnetic disk storage as volumes that store data sequentially (as on tape).

AIX operating systemsLinux operating systemsThe FILE device class does not support EXTERNAL libraries.

Windows operating systemsThe FILE device class does not support EXTERNAL or Remote Storage Manager libraries.

AIX operating systemsLinux operating systemsIf you are defining a device class for devices that are to be accessed through a z/OS® media server, see DEFINE DEVCLASS (Define a FILE device class for z/OS media server).

Privilege class

To issue this command, you must have system privilege or unrestricted storage privilege.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-DEFine DEVclass--device_class_name--DEVType--=--FILE--------->

   .-MOUNTLimit--=--20-----.  .-MAXCAPacity--=--10G--.   
>--+-----------------------+--+----------------------+---------->
   '-MOUNTLimit--=--number-'  '-MAXCAPacity--=--size-'   

   .-DIRectory--=--current_directory_name-.   
>--+--------------------------------------+--------------------->
   |               .-,--------------.     |   
   |               V                |     |   
   '-DIRectory--=----directory_name-+-----'   

   .-SHAREd--=--No------.   
>--+--------------------+--------------------------------------><
   '-SHAREd--=--+-No--+-'   
                '-Yes-'     

Parameters

device_class_name (Required)
Specifies the name of the device class to be defined. The maximum length of the device class name is 30 characters.
DEVType=FILE (Required)
Specifies that the FILE device type is assigned to the device class. FILE indicates that a file is assigned to this device class. When the server must access a volume that belongs to this device class, it opens a file and reads or writes file data.

A file is a form of sequential-access media.

MOUNTLimit
Specifies the maximum number of files that can be simultaneously open for input and output. This parameter is optional. The default value is 20. You can specify a number from 0 to 4096.

Windows operating systemsIf the device class is shared with a storage agent (by specifying the SHARED=YES parameter), drives are defined or deleted to match the mount limit value.

If you plan to use the simultaneous-write function, ensure that sufficient drives are available for the write operation. If the number of drives needed for a simultaneous-write operation is greater than the value of the MOUNTLIMIT parameter for a device class, the transaction fails.

MAXCAPacity
Specifies the maximum size of any data storage files that are defined to a storage pool in this device class.

The value of the MAXCAPACITY parameter is also used as the unit of allocation when storage pool space triggers create volumes. The default value is 10 GB (MAXCAPACITY=10G). The value that is specified must be less than or equal to the maximum supported size of a file on the target file system.

Specify this value as an integer followed by K (kilobytes), M (megabytes), G (gigabytes), or T (terabytes). The minimum size is 1 MB (MAXCAPACITY=1M). If you are defining a FILE device class for database-backup volumes, specify a value for MAXCAPACITY that is appropriate for the size of the database and that minimizes the number of database volumes.

AIX operating systemsLinux operating systemsDo not define a MAXCAPACITY value greater than 640M when this file is for REMOVABLEFILE CD support. A value less than a CD's usable space (650 MB) enables a one-to-one match between files from the FILE device class and copies that are on CD.

DIRectory
Specifies the directory location or locations of the files that are used in this device class. Enclose the entire list of directories within quotation marks, and use commas to separate individual directory names. Special characters (for example, blank spaces) are allowed within directory names. For example, the directory list "abc def,xyz" contains two directories: abc def and xyz.

This parameter is optional.

AIX operating systemsLinux operating systemsThe default is the current working directory of the server at the time the command is issued.

Windows operating systemsThe default is the current working directory of the server at the time the command is issued. Windows registry information is used to determine the default directory.

By specifying a directory name or names, you identify the location where the server places the files that represent storage volumes for this device class.

For NetApp SnapLock support (storage pools with RECLAMATIONTYPE=SNAPLOCK, which are going to use this device class), the directory, or directories that are specified with DIRECTORY parameter must point to the directory or directories on the NetApp SnapLock volumes.

AIX operating systemsLinux operating systemsWhile the command is processed, the server expands the specified directory name or names into their fully qualified forms, starting from the root directory.

If the server must allocate a scratch volume, it creates a new file in one of these directories. (The server can choose any of the directories in which to create new scratch volumes.) For scratch volumes used to store client data, the file that is created by the server has a file name extension of .bfs. For scratch volumes used to store export data, a file name extension of .exp is used.

AIX operating systemsLinux operating systemsFor example, if you define a device class with a directory of tsmstor and the server needs a scratch volume in this device class to store export data, the file that the server creates might be named ⁄tsmstor⁄00566497.exp.

Windows operating systemsFor example, if you define a device class with a directory of c:\server and the server needs a scratch volume in this device class to store export data, the file that the server creates might be named c:\server\00566497.exp.

Important: You must ensure that storage agents can access newly created FILE volumes. Failure of the storage agent to access a FILE volume can cause operations to be retried on a LAN-only path or to fail. For more information, see the description of the DIRECTORY parameter in DEFINE PATH (Define a path).
Tip: If you specify multiple directories for a device class, ensure that the directories are associated with separate file systems. Space trigger functions and storage pool space calculations take into account the space that remains in each directory. If you specify multiple directories for a device class and the directories are in the same file system, the server calculates space by adding values that represent the space that remains in each directory. These space calculations are inaccurate. Rather than choosing a storage pool with sufficient space for an operation, the server might choose the wrong storage pool and run out of space prematurely. For space triggers, an inaccurate calculation might result in a failure to expand the space available in a storage pool. Failure to expand space in a storage pool is one of the conditions that can cause a trigger to become disabled. If a trigger is disabled because the space in a storage pool could not be expanded, you can re-enable the trigger by issuing the following command: update spacetrigger stg. No further changes are required to the space trigger.
SHAREd
Specifies that this FILE device class is shared between the server and one or more storage agents. To prepare for sharing, a library is automatically defined along with a number of drives corresponding to the MOUNTLIMIT parameter value. The drive names are the name of the library plus a number from 1 to the mount limit number. For example, if the library name is FILE and the mount limit is set to 4, the drives are named FILE11, FILE12, FILE13, FILE14.

For information about prerequisites when storage is shared by the server and storage agent, see IBM® Support Portal for IBM Spectrum Protect™.

Example: Define a FILE device class with multiple directories

Define a device class that specifies multiple directories.

AIX operating systems
define devclass multidir devtype=file
   directory=/usr/xyz,/usr/abc,/usr/uvw
Linux operating systems
define devclass multidir devtype=file
   directory=/opt/xyz,/opt/abc,/opt/uvw
Windows operating systems
define devclass multidir devtype=file
   directory=e:\xyz,f:\abc,g:\uvw

Example: Define a FILE device class with a 50 MB capacity

Define a device class named PLAINFILES with a FILE device type and a maximum capacity of 50 MB.
define devclass plainfiles devtype=file  
maxcapacity=50m