Adds a file system.
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 } ]
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.
The crfs command ignores any Attribute=Value pair that the command does not understand but adds them to an appropriate stanza in the /etc/filesystems file.
Example:
crfs -a abcd=1G /
This sets the new abcd attribute to the value of 1G in the root stanza in the /etc/filesystems file.
You can use the File Systems application in Web-based System Manager (wsm) to change file system characteristics. You could also use the System Management Interface Tool (SMIT) smit crfs fast path to run this command.
Item | Description |
---|---|
-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 an example). The following attribute/value pairs are specific to the Journaled File System (JFS): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The maximum size of a JFS file system is a function of its fragment size and the NBPI value. These values yield the following size restrictions:
You can have NBPI values from 512 to 128K, with corresponding maximum
file system sizes. |
|
The volume group in which the file system resides defines
a maximum logical volume size and also limits the file system size.
Note:
|
|
The following attribute/value pairs are specific to the Enhanced Journaled File System (JFS2): |
|
-a Attribute=Value |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-A | Specifies whether the file system is mounted at each 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 and JFS2 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.
|
-t | Specifies whether the file system is to be processed
by the accounting subsystem:
|
-u MountGroup | Specifies the mount group. |
-v VfsType | Specifies the virtual file system type. |
The ea attributes format is set at file system creation. The chfs command can be used to convert the extended attribute format from v1 to v2, but the format cannot be converted back. The conversion is done in an on-demand manner such that any extended attribute or ACL writes cause the conversion for that file object to occur.
The maxext attribute is ignored in older releases even if the filesystem was created with it on a later release.
Access Control
Only the root user or a member of the system group can run this command.
Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.
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).
crfs -v jfs -g rootvg -m /test -a size=16M -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.crfs -v jfs2 -g rootvg -m /test -a size=1G -a ea=v2
This
command creates the /test JFS2 file system on the rootvg volume
group with an initial size of 1 gigabyte. The file system will store
extended attributes using the v2 format.Item | Description |
---|---|
/etc/filesystems | Lists the known file systems and defines their characteristics. |