Create User-Defined FS (CRTUDFS)

The Create User-Defined File System (CRTUDFS) command creates a file system that can be made visible to the rest of the integrated file system name space through the Add Mounted File System (ADDMFS) or MOUNT command.

A UDFS is represented by the object type *BLKSF, or block special file.

Restrictions:

Parameters

Keyword Description Choices Notes
UDFS User-defined file system Path name Required, Positional 1
DTAAUT Public authority for data Name, *INDIR, *RWX, *RW, *RX, *WX, *R, *W, *X, *EXCLUDE, *NONE Optional
OBJAUT Public authority for object Single values: *INDIR, *NONE, *ALL
Other values (up to 4 repetitions): *OBJEXIST, *OBJMGT, *OBJALTER, *OBJREF
Optional
CRTOBJAUD Auditing value for objects *SYSVAL, *NONE, *USRPRF, *CHANGE, *ALL Optional
CRTOBJSCAN Scanning option for objects *PARENT, *YES, *NO, *CHGONLY Optional
RSTDRNMUNL Restricted rename and unlink *NO, *YES Optional
DFTDISKSTG Default disk storage option *NORMAL, *MINIMIZE, *DYNAMIC Optional
DFTMAINSTG Default main storage option *NORMAL, *MINIMIZE, *DYNAMIC Optional
CASE Case sensitivity *MIXED, *MONO Optional
DFTFILEFMT Default file format *TYPE1, *TYPE2 Optional
UNIT Preferred storage unit *ANY, *SSD Optional
TEXT Text 'description' Character value, *BLANK Optional

User-defined file system (UDFS)

Specifies the path name of the file system to be created. It must be in one of the following forms:

The name part of the path must be unique within the specified qaspXX or aspname directory.

This is a required parameter.

Note: This parameter is Unicode-enabled. See "Unicode support in CL" in the CL topic collection in the Programming category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/ for additional information.

Public authority for data (DTAAUT)

Specifies the public data authority given to the user for the new user-defined file system (UDFS), or specifies that all authorities are inherited from the directory it is to be created in.

*INDIR
The authority for the UDFS to be created is determined by the directory it is to be created in. This means the new UDFS will inherit its primary group, authorization list, and its public, private and primary group authorities from the /dev/qaspXX or /dev/aspname directory. If the value *INDIR is specified for either the Public authority for object (OBJAUT) parameter or the DTAAUT parameter, then *INDIR must be specified for both parameters.
*RWX
The user can change the object and perform basic functions on the object except those limited to the owner or controlled by object existence (*OBJEXIST), object management (*OBJMGT), object alter (*OBJALTER) and object reference (*OBJREF) authority. Read, write, and execute (*RWX) authority provides object operational (*OBJOPR) and all data authorities.
*RW
The user can view and change the contents of an object. Read and write (*RW) authority provides *OBJOPR and data read (*READ), add (*ADD), update (*UPD) and delete (*DLT) authorities.
*RX
The user can perform basic operations on the object, such as run a program or display the contents of a file. The user is prevented from changing the object. Read and execute (*RX) authority provides *OBJOPR and data *READ and *EXECUTE authorities.
*WX
The user can change the contents of an object and run a program or search a library or directory. Write and execute (*WX) authority provides *OBJOPR and data *READ, *UPD, *DLT, and *EXECUTE authorities.
*R
The user can view the contents of an object. Read (*R) authority provides *OBJOPR and data *READ authorities.
*W
The user can change the contents of an object. Write (*W) authority provides *OBJOPR and data *READ, *UPD, and *DLT authorities.
*X
The user can run a program or search a library or directory. Execute (*X) authority provides *OBJOPR and data *EXECUTE authorities.
*EXCLUDE
The user cannot access the object. The OBJAUT value must be *NONE, if this special value is used.
*NONE
The user is given no data authorities to the object. This value cannot be used with OBJAUT value of *NONE.
authorization-list-name
The format of the authorization list name remains the current ten-character format. The OBJAUT value must be *NONE, if this special value is used. An authorization list can not be specified for a temporary user-defined file system.

Public authority for object (OBJAUT)

Specifies the public object authority given to users for the user-defined file system, or specifies that all authorities are inherited from the directory it is to be created in.

*INDIR
The object authority for the UDFS to be created is determined by the directory it is to be created in. This means the new UDFS will inherit its primary group, authorization list, and its public, private and primary group authorities from the /dev/qaspXX or /dev/aspname directory. If the value *INDIR is specified for either the OBJAUT parameter or the Public authority for data (DTAAUT) parameter, then *INDIR must be specified for both parameters.
*NONE
None of the other object authorities (*OBJEXIST, *OBJMGT, *OBJALTER or *OBJREF) are given to the users. If *EXCLUDE or an authorization list is specified for the DTAAUT parameter, *NONE must be specified. This value cannot be used with the DTAAUT value of *NONE.
*ALL
All of the other object authorities (*OBJEXIST, *OBJMGT, *OBJALTER or *OBJREF) are given to the users.

The user can specify up to four of the following values:

*OBJEXIST
The user is given object existence (*OBJEXIST) authority to the object. The user can delete the object, free storage of the object, perform save and restore operations for the object, and transfer ownership of the object.
*OBJMGT
The user is given object management (*OBJMGT) authority to the object. With this authority the user can specify security for the object, move or rename the object and add members to database files.
*OBJALTER
The user is given object alter (*OBJALTER) authority to the object. The user is able to alter the attributes of the objects. On a database file, the user can add and remove triggers, add and remove referential and unique constraints, and change the attributes of the database file. With this authority on an SQL package, the user can change the attributes of the SQL package. Currently, this authority is used only for database files and SQL packages.
*OBJREF
The user is given object reference (*OBJREF) authority to objects. Used only for database files, the user can reference an object from another object such that operations on that object may be restricted by the other object. On a physical file, the user can add a referential constraint in which the physical file is the parent.

Auditing value for objects (CRTOBJAUD)

Specifies the auditing value of root directory objects created in this user-defined file system.

*SYSVAL
The object auditing value for the objects in the UDFS is determined by the Create object auditing (QCRTOBJAUD) system value.
*NONE
Using or changing this object does not cause an audit entry to be sent to the security journal.
*USRPRF
The user profile of the user accessing this object is used to determine if an audit record is sent for this access. The OBJAUD parameter of the Change User Auditing (CHGUSRAUD) command is used to turn on auditing for a specific user.
*CHANGE
All change accesses to this object by all users are logged.
*ALL
All change or read accesses to this object by all users are logged.

Scanning option for objects (CRTOBJSCAN)

Specifies whether the root directory objects created in the user-defined file system will be scanned when exit programs are registered with any of the integrated file system scan-related exit points.

The integrated file system scan-related exit points are:

For details on these exit points, see the APIs topic collection in the Programming category in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/.

Even though this attribute can be set for user-defined file systems, only objects which are in *TYPE2 directories in that user-defined file system will actually be scanned, no matter what value is set for this attribute.

*PARENT
The create object scanning attribute value for this user-defined file system is copied from the create object scanning attribute value of the parent directory.
*YES
After an object is created in the user-defined file system, the object will be scanned according to the rules described in the scan-related exit programs if the object has been modified or if the scanning software has been updated since the last time the object was scanned.
*NO
After an object is created in the user-defined file system, the object will not be scanned by the scan-related exit programs.

Note: If the Scan file systems control (QSCANFSCTL) value *NOPOSTRST is not specified when an object with this attribute is restored, the object will be scanned at least once after the restore.

*CHGONLY
After an object is created in the user-defined file system, the object will be scanned according to the rules described in the scan-related exit programs only if the object has been modified since the last time the object was scanned. It will not be scanned if the scanning software has been updated. This attribute only takes effect if the Scan file systems control (QSCANFSCTL) system value has *USEOCOATR specified. Otherwise, it will be treated as if the attribute is *YES.

Note: If the Scan file systems control (QSCANFSCTL) value *NOPOSTRST is not specified when an object with this attribute is restored, the object will be scanned at least once after the restore.

Restricted rename and unlink (RSTDRNMUNL)

Specifies whether special restrictions apply for rename and unlink operations performed on objects within the root directory of the user-defined file system. This attribute is equivalent to the S_ISVTX mode bit for this directory.

*NO
No additional restrictions for renaming or unlinking objects from the root directory of the user-defined file system.
*YES
Objects within the root directory of the user-defined file system may be renamed or unlinked only if one or more of the following are true for the user performing the operation:
  1. The user is the owner of the object.
  2. The user is the owner of the directory.
  3. The user has all object (*ALLOBJ) special authority.

Default disk storage option (DFTDISKSTG)

Specifies how auxiliary storage will be allocated by the system for the stream files (*STMF) created in this user-defined file system. This option will be ignored for *TYPE1 stream files.

*NORMAL
The auxiliary storage will be allocated normally. That is, as additional auxiliary storage is required, it will be allocated in logically sized extents to accommodate the current space requirement, and anticipated future requirements, while minimizing the number of disk I/O operations.
*MINIMIZE
The auxiliary storage will be allocated to minimize the space used by the object. That is, as additional auxiliary storage is required, it will be allocated in small sized extents to accommodate the current space requirement. Accessing an object composed of many small extents may increase the number of disk I/O operations for that object.
*DYNAMIC
The system will dynamically determine the optimal auxiliary storage allocation for the object, balancing space used versus disk I/O operations. For example, if a file has many small extents, yet is frequently being read and written, then future auxiliary storage allocations will be larger extents to minimize the number of disk I/O operations. Or, if a file is frequently truncated, then future auxiliary storage allocations will be small extents to minimize the space used. Additionally, information will be maintained on the stream file sizes for this system and its activity. This file size information will also be used to help determine the optimal auxiliary storage allocations for this object as it relates to the other objects' sizes.

Default main storage option (DFTMAINSTG)

Specifies how main storage is allocated and used by the system for the stream files (*STMF) created in this user-defined file system.

*NORMAL
The main storage will be allocated normally. That is, as much main storage as possible will be allocated and used. This minimizes the number of disk I/O operations since the information is cached in main storage.
*MINIMIZE
The main storage will be allocated to minimize the space used by the object. That is, as little main storage as possible will be allocated and used. This minimizes main storage usage while increasing the number of disk I/O operations since less information is cached in main storage.
*DYNAMIC
The system will dynamically determine the optimal main storage allocation for the object depending on other system activity and main storage contention. That is, when there is little main storage contention, as much storage as possible will be allocated and used to minimize the number of disk I/O operations. When there is significant main storage contention, less main storage will be allocated and used to minimize the main storage contention. This option only has an effect when the storage pool's paging option is *CALC. When the storage pool's paging option is *FIXED, the behavior is the same as *NORMAL. When the object is accessed through a file server, this option has no effect. Instead, its behavior is the same as *NORMAL.

Case sensitivity (CASE)

Specifies the case sensitivity of this file system.

*MONO
The file system will not be case sensitive. For example, the names FileA and filea refer to the same object.
*MIXED
The file system will be case sensitive. For example, the names FileA and filea do NOT refer to the same object.

Default file format (DFTFILEFMT)

Specifies the format of stream files (*STMF) created in this user-defined file system.

*TYPE2
A *TYPE2 *STMF has high performance file access and was new in Version 4 Release 4 of IBM i. It has a minimum object size of 4096 bytes and a maximum object size of approximately 1 terabyte. A *TYPE2 stream file is capable of memory mapping as well as the ability to specify an attribute to optimize disk storage allocation.
*TYPE1
A *TYPE1 *STMF has the same format as *STMF objects created on releases prior to Version 4 Release 4 of IBM i. It has a minimum size of 4096 bytes and a maximum object size of approximately 128 gigabytes.

Preferred storage unit (UNIT)

Specifies the preferred storage media of objects created in this user-defined file system.

*ANY
No storage media is preferred. Storage will be allocated from any available storage media.
*SSD
Solid state drive storage media is preferred. Storage should be allocated from solid state drive storage media, if available.

Text 'description' (TEXT)

Text description for the user-defined file system.

*BLANK
Text is not specified.
character
Specify no more than 50 characters, enclosed in apostrophes.

Examples

Example 1: Create Permanent UDFS in System ASP

CRTUDFS   UDFS('/dev/QASP01/joe.udfs)  TEXT('Joe Smith')

This command creates a user-defined file system (UDFS) named joe.udfs in the system auxiliary storage pool (ASP 1).

Example 2: Create Permanent UDFS in ASP 3

CRTUDFS   UDFS('/dev/QASP03/harry.udfs')  CASE(*MIXED)

This command creates a case-sensitive user-defined file system (UDFS) named harry.udfs in user auxiliary storage pool (ASP) 3.

Example 3: Create Permanent UDFS Selecting Storage Options

CRTUDFS   UDFS('/dev/IASPNAME/mary.udfs')
          DFTDISKSTG(*DYNAMIC) DFTMAINSTG(*DYNAMIC)

This command creates a UDFS named mary.udfs in the independent auxiliary storage pool (ASP) whose name is IASPNAME. Additionally, any stream files that are created in this UDFS will have their disk and main storage options set to *DYNAMIC to optimize their disk and main storage allocations.

Example 4: Create Temporary UDFS in System ASP

CRTUDFS   UDFS('/dev/QASP01/larry.tmpudfs')
          CASE(*MIXED) TEXT('Larry Smith')
          DFTDISKSTG(*DYNAMIC) DFTMAINSTG(*DYNAMIC)

This command creates a case-sensitive user-defined file system (UDFS) named larry.tmpudfs in the system auxiliary storage pool (ASP 1). Additionally, any stream files that are created in this UDFS will have their disk and main storage options set to *DYNAMIC to optimize their disk and main storage allocations. Because the name ends with '.tmpudfs', all of the objects in that file system will be temporary objects which will be deleted when the file system is unmounted, the system is restarted, or the Reclaim Storage (RCLSTG) command is used.

Error messages

*ESCAPE Messages

CPFA0A2
Information passed to this operation was not valid.
CPFA09C
Not authorized to object. Object is &1.
CPFA0A9
Object not found. Object is &1.
CPFA0B1
Requested operation not allowed. Access problem.
CPFA1B8
*IOSYSCFG authority required to use &1.