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

chfs Command

Purpose

Changes attributes of a file system.

Syntax

chfs [ -n NodeName ] [ -m NewMountPoint ] [ -u MountGroup ] [ -A { yes | no } ] [ -p { ro | rw } ] [ -t { yes | no } ] [ -a Attribute=Value ] [ -d Attribute ] FileSystem

Description

The chfs command changes the attributes of a file system. The new mount point, automatic mounts, permissions, and file system size can be set or changed. The FileSystem parameter specifies the name of the file system, expressed as a mount point.

Some file system attributes are set at the time the file system is created and cannot be changed. For the Journaled File System (JFS), such attributes include the fragment size, block size, number of bytes per i-node, compression, and the minimum file system size.

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 chhfs fast path to run this command.

Flags

-a Attribute=Value
Specifies the Attribute=Value pairs; dependent on virtual file system type. To specify more than one Attribute=Value pair, provide multiple -a Attribute=Value parameters.

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

-a Size=NewSize
Specifies the size of the Journaled File System in 512-byte blocks. If Value begins with a + it is interpreted as a rquest to increase the file system size by the specified amount. 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.

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:

nbpi Fragment size in bytes Maximum size in 512-byte blocks
512 512, 1024, 2048, 4096 16777216
1024 512, 1024, 2048, 4096 33554432
2048 512, 1024, 2048, 4096 67108864
4096 512, 1024, 2048, 4096 134217728
8192 512, 1024, 2048, 4096 268435456
16384 512 268435456
16384 1024, 2048, 4096 536870912
32768 512 268435456
32768 1024 536870912
32768 2048, 4096 1073741824
65536, 131072 512 268435456
65536, 131072 1024 536870912
65536, 131072 2048 1073741824
65536, 131072 4096 2147483648
AIX 4.1 is limited to NBPI values from 512 to 16384.
In AIX4.3, 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.

-a log=LVName
Specifies the full path name of the filesystem logging logical volume name of the existing log to be used. The log device for this filesystem must reside on the same volume group as the filesystem
-A
Specifies the attributes for auto-mount.
yes
File system is automatically mounted at system restart.
no
File system is not mounted at system restart.
-d Attribute
Deletes the specified attribute from the /etc/filesystems file for the specified file system.
-m NewMountPoint
Specifies the new mount point.
-n NodeName
Specifies a node name for the specified file system. The node name attribute in the /etc/filesystems file is updated with the new name. The node name attribute is specific to certain remote virtual file system types, such as the NFS (Network File System) virtual file system type.
-p
Sets the permissions for the file system.
ro
Specifies read-only permissions.
rw
Specifies read-write permissions.
-t
Sets the accounting attribute for the specified file system:
yes
File system accounting is to be processed by the accounting subsystem.
no
File system accounting is not to be processed by the accounting subsystem; this is the default.
-u MountGroup
Specifies the mount group. Mount groups are used to group related mounts, so that they can be mounted as one instead of mounting each individually. For example, if several scratch file systems always need to be mounted together when performing certain tests, they can each be placed in the test mount group. They can then all be mounted with a single command, such as the mount -t test command.

Examples

  1. To change the file system size of the /test Journaled File System, enter:
    chfs -a size=24576 /test
    This command changes the size of the /test Journaled File System to 24576 512-byte blocks, or 12MB (provided it was previously no larger than this).
  2. To increase the size of the /test Journaled File System, enter:
    chfs -a size=+8192 /test
    This command increases the size of the /test Journaled File System by 8192 512-byte blocks, or 4MB.
  3. To change the mount point of a file system, enter:
    chfs -m /test2 /test
    This command changes the mount point of a file system from /test to /test2.
  4. To delete the accounting attribute from a file system, enter:
    chfs -d account /home
    This command removes the accounting attribute from the /home file system. The accounting attribute is deleted from the /home: stanza of the /etc/filesystems file.

File

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

Related Information

The crfs command, mkfs command, mklv command.

The Accounting Overview in AIX Version 4.3 System Management Guide: Operating System and Devices explains the file system accounting subsystem.

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.


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