[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 1

crfs Command

Purpose

Adds a file system.

Syntax

crfs -v VfsType { -g VolumeGroup | -d Device } [ -l LogPartitions ] -m MountPoint [ -n NodeName ] [ -u MountGroup ] [ -A { yes | no } ] [ -p {ro | rw } ] [ -a Attribute= Value ... ] [ -t { yes | no } ]

Description

The crfs command creates a file system on a logical volume within a previously created volume group. A new logical volume is created for the file system unless the name of an existing logical volume is specified using the -d. An entry for the file system is put into the /etc/filesystems file.

Note: The file system is created with the setgid (set group ID) bit enabled. This determines the default group permissions. All directories created under the new file system will have the same default group permissions.

You can use the Web-based System Manager File Systems application (wsm fs fast path) to run this command. You could also use the System Management Interface Tool (SMIT) smit crfs fast path to run this command.

Flags

-a Attribute=Value Specifies a virtual file system-dependent attribute/value pair. To specify more than one attribute/value pair, provide multiple -a Attribute=Value parameters (see example).

The following attribute/value pairs are specific to the Journaled File System (JFS):

-a ag={ 8 | 16 | 32 | 64 }
Specifies the allocation group size in megabytes. An allocation group is a grouping of inodes and disk blocks similar to BSD cylinder groups. The default ag value is 8. This attribute only applies to AIX Version 4.2 or later.
-a bf={ true | false }
Specifies a large file enabled file system. See "Understanding Large File Enabled File Systems" for more information. If you do not need a large file enabled file system, set this option to false; this is the default. Specifying bf=true requires a fragment size of 4096 and compress=no. This attribute only applies to AIX Version 4.2 or later.
-a compress={ no | LZ }
Specifies data compression. If you do not want data to be compressed, set this option to no. The default compress value is no. Selecting compression requires a fragment size of 2048 or less.
-a frag={ 512 | 1024 | 2048 | 4096 }
Specifies the JFS fragment size in bytes. A file system fragment is the smallest unit of disk storage that can be allocated to a file. The default fragment size is 4096 bytes.
-a logname=LVName
Specifies the log logical volume name. The specified logical volume will be the logging device for the new JFS. The LVName logical volume must already exist. The default action is to use an existing logging device in the target volume group.
-a nbpi={ 512 | 1024 | 2048 | 4096 | 8192 | 16384 | 32768 | 65536 | 131072 }
Specifies the number of bytes per i-node (nbpi). The nbpi affects the total number of i-nodes on the file system. The nbpi value is inversely proportional to the number of i-nodes on the file system. The default nbpi value is 4096 bytes. The values 32768, 65536, and 131072 only apply to AIX Version 4.2 or later.
-a size=Value
Specifies the size of the JFS in 512-byte blocks. If the specified size is not evenly divisible by the physical partition size, it is rounded up to the closest number that is evenly divisible. This attribute is required when creating a JFS file system. See "Understanding JFS Size Limitations" for more information.

Notes:

  1. Only JFS file systems created with the default ag, bf, compress, frag, and nbpi values and a size of less than 2 gigabytes are recognized on an AIX Version 3.2 system. Furthermore, file systems created with an ag value greater than 8 are not recognized on an AIX Version 4.1 system much less an AIX Version 3.2 system.
  2. The ag, bf, compress, frag, and nbpi attributes are set at file system creation and cannot be changed after the file system is successfully created. The size attribute defines the minimum file system size, and you cannot decrease it once the file system is created.
  3. The root filesystem ( / ) cannot be compressed.
  4. Some nbpi values and allocation group sizes are mutually exclusive. See "Understanding JFS Size Limitations" for information.
-A Specifies whether the file system is mounted at each system restart:
yes
File system is automatically mounted at system restart.
no
File system is not mounted at system restart.
-d Device Specifies the device name of a device or logical volume on which to make the file system. This is used to create a file system on an already existing logical volume.
-g VolumeGroup Specifies an existing volume group on which to make the file system. A volume group is a collection of one or more physical volumes.
-l LogPartitions Specifies the size of the log logical volume, expressed as a number of logical partitions. This flag applies only to JFS file systems that do not already have a log device.
-m MountPoint Specifies the mount point, which is the directory where the file system will be made available.

Note: If you specify a relative path name, it is converted to an absolute path name before being inserted into the /etc/filesystems file.

-n NodeName Specifies the remote host name where the file system resides. This flag is only valid with remote virtual file systems such as the Network File System (NFS).
-p Sets the permissions for the file system.
ro
Read-only permissions
rw
Read-write permissions
-t Specifies whether the file system is to be processed by the accounting subsystem:
yes
Accounting is enabled on the file system.
no
Accounting is not enabled on the file system (default value).
-u MountGroup Specifies the mount group.
-v VfsType Specifies the virtual file system type.

Examples

To make a JFS on the rootvg volume group with nondefault fragment size and nondefault nbpi, enter:

crfs -v jfs -g 
rootvg -m /test -a \
size=32768 -a frag=512 -a nbpi=1024

This command creates the /test file system on the rootvg volume group with a fragment size of 512 bytes, a number of bytes per i-node (nbpi) ratio of 1024, and an initial size of 16MB (512 * 32768).

Files

/etc/filesystems Lists the known file systems and defines their characteristics.

Related Information

The chfs command, mkfs command, mklv command.

The File Systems Overview for System Management in AIX Version 4.3 System Management Guide: Operating System and Devices explains file system types, management, structure, and maintenance.

Setting up and running Web-based System Management in AIX Version 4.3 System Management Guide: Operating System and Devices.

The System Management Interface Tool (SMIT): Overview in AIX Version 4.3 System Management Guide: Operating System and Devices explains SMIT structure, main menus, and tasks.

Understanding Journaled File System Size Limitations in AIX Version 4.3 System Management Guide: Operating System and Devices.


[ Previous | Next | Contents | Glossary | Home | Search ]