mmchfs command

Changes the attributes of a GPFS™ file system.

Synopsis

mmchfs Device [-A {yes | no | automount}] [-D {posix | nfs4}] [-E {yes | no}]
       [-k {posix | nfs4 | all}] [-K {no | whenpossible | always}]
       [-L LogFileSize] [-m DefaultMetadataReplicas] [-n NumNodes]
       [-o MountOptions] [-r DefaultDataReplicas] [-S {yes | no | relatime}]
       [-T Mountpoint] [-t DriveLetter] [-V {full | compat}] [-z {yes | no}]
       [--filesetdf | --nofilesetdf]
       [--inode-limit MaxNumInodes[:NumInodesToPreallocate]]
       [--log-replicas LogReplicas] [--mount-priority Priority]
       [--perfileset-quota | --noperfileset-quota]
       [--rapid-repair | --norapid-repair]
       [--write-cache-threshold HAWCThreshold]

or

mmchfs Device -Q {yes | no}

or

mmchfs Device -W NewDeviceName

Availability

Available on all IBM Spectrum Scale™ editions.

Description

Use the mmchfs command to change the attributes of a GPFS file system.

Parameters

Device
The device name of the file system to be changed.

File system names need not be fully-qualified. fs0 is as acceptable as /dev/fs0. However, file system names must be unique across GPFS clusters.

This must be the first parameter.

-A {yes | no | automount}
Indicates when the file system is to be mounted:
yes
When the GPFS daemon starts.
no
Manual mount.
automount
On non-Windows nodes, when the file system is first accessed. On Windows nodes, when the GPFS daemon starts.
Note: The file system must be unmounted prior to changing the automount settings.
-D {nfs4 | posix}
Specifies whether a deny-write open lock will block writes, which is expected and required by NFS V4, Samba, and Windows. File systems supporting NFS V4 must have -D nfs4 set. The option -D posix allows NFS writes even in the presence of a deny-write open lock. If you intend to export the file system using NFS V4 or Samba, or mount your file system on Windows, you must use -D nfs4. For NFS V3 (or if the file system is not NFS exported at all) use -D posix.
-E {yes | no}
Specifies whether to report exact mtime values. If -E no is specified, the mtime value is periodically updated. If you desire to always display exact modification times, specify -E yes.
-k {posix | nfs4 | all}
Specifies the type of authorization supported by the file system:
posix
Traditional GPFS ACLs only (NFS V4 and Windows ACLs are not allowed). Authorization controls are unchanged from earlier releases.
nfs4
Support for NFS V4 and Windows ACLs only. Users are not allowed to assign traditional GPFS ACLs to any file system objects (directories and individual files).
all
Any supported ACL type is permitted. This includes traditional GPFS (posix) and NFS V4 and Windows ACLs (nfs4).

The administrator is allowing a mixture of ACL types. For example, fileA may have a posix ACL, while fileB in the same file system may have an NFS V4 ACL, implying different access characteristics for each file depending on the ACL type that is currently assigned.

Avoid specifying nfs4 or all unless files will be exported to NFS V4 or Samba clients, or the file system will be mounted on Windows. NFS V4 and Windows ACLs affect file attributes (mode) and have access and authorization characteristics that are different from traditional GPFS ACLs.

-K {no | whenpossible | always}
Specifies whether strict replication is to be enforced:
no
Strict replication is not enforced. GPFS will try to create the needed number of replicas, but will still return EOK as long as it can allocate at least one replica.
whenpossible
Strict replication is enforced provided the disk configuration allows it. If there is only one failure group, strict replication will not be enforced.
always
Strict replication is enforced.

For more information, see Strict replication.

-L LogFileSize
Specifies the new size of the internal log files. The LogFileSize specified must be a multiple of the metadata block size. The minimum size is 256 KB and the maximum size is 1024 MB. Specify this value with the K or M character, for example: 8M.

You must restart the GPFS daemons before the new log file size takes effect. The GPFS daemons can be restarted one node at a time. When the GPFS daemon is restarted on the last node in the cluster, the new log size becomes effective.

-m DefaultMetaDataReplicas
Changes the default number of metadata replicas. Valid values are 1, 2, and (for GPFS V3.5.0.7 and later) 3. This value cannot be greater than the value of MaxMetaDataReplicas set when the file system was created.

Changing the default replication settings using the mmchfs command does not change the replication setting of existing files. After running the mmchfs command, the mmrestripefs command with the -R option can be used to change all existing files or you can use the mmchattr command to change a small number of existing files.

-n NumNodes
Changes the number of nodes for a file system. This setting is just an estimate and will only be used to affect the layout of system metadata for storage pools created after the setting is changed.
-o MountOptions
Specifies the mount options to pass to the mount command when mounting the file system. For a detailed description of the available mount options, see GPFS-specific mount options.
-Q {yes | no}
If -Q yes is specified, quotas are activated automatically when the file system is mounted. If -Q no is specified, the quota files remain in the file system, but are not used.

For more information, see Enabling and disabling GPFS quota management.

-r DefaultDataReplicas
Changes the default number of data replicas. Valid values are 1, 2, and (for GPFS V3.5.0.7 and later) 3. This value cannot be greater than the value of MaxDataReplicas set when the file system was created.

Changing the default replication settings using the mmchfs command does not change the replication setting of existing files. After running the mmchfs command, the mmrestripefs command with the -R option can be used to change all existing files or you can use the mmchattr command to change a small number of existing files.

-S {yes | no | relatime}
Suppress the periodic updating of the value of atime as reported by the gpfs_stat(), gpfs_fstat(), stat(), and fstat() calls. If yes is specified, these calls report the last time the file was accessed when the file system was mounted with -S no.

If relatime is specified, the file access time is updated only if the existing access time is older than the value of the atimeDeferredSeconds configuration attribute or the existing file modification time is greater than the existing access time.

-T Mountpoint
Change the mount point of the file system starting at the next mount of the file system.

The file system must be unmounted on all nodes prior to issuing the command.

-t DriveLetter
Changes the Windows drive letter for the file system.

The file system must be unmounted on all nodes prior to issuing the command.

-V {full | compat}
Changes the file system format to the latest format supported by the currently installed level of GPFS. This may cause the file system to become permanently incompatible with earlier releases of GPFS.
Note: The -V option cannot be used to make file systems created prior to GPFS 3.2.1.5 available to Windows nodes. Windows nodes can mount only file systems that are created with GPFS 3.2.1.5 or later.

Before issuing -V, see Migration, coexistence and compatibility. Ensure that all nodes in the cluster have been migrated to the latest level of GPFS code and that you have successfully run the mmchconfig release=LATEST command.

For information about specific file system format and function changes when you upgrade to the current release, see File system format changes between versions of GPFS.

full
Enables all new functionality that requires different on-disk data structures. Nodes in remote clusters running an older GPFS version will no longer be able to mount the file system. If there are any nodes running an older GPFS version that have the file system mounted at the time the command is issued, the mmchfs command will fail.
compat
Enables only backward-compatible format changes. Nodes in remote clusters that are running GPFS 3.5 will still be able to mount the file system. Nodes running GPFS 3.4 or earlier will no longer be able to mount the file system.
-W NewDeviceName
Assign NewDeviceName to be the device name for the file system.
-z {yes | no}
Enable or disable DMAPI on the file system. Turning this option on will require an external data management application such as IBM Spectrum Protect™ hierarchical storage management (HSM) before the file system can be mounted.

For further information regarding DMAPI for GPFS, see GPFS-specific DMAPI events.

--filesetdf
Specifies that when quotas are enforced for a fileset, the numbers reported by the df command are based on the quotas for the fileset (rather than the entire file system). This option affects the df command behavior only on Linux nodes.
--nofilesetdf
Specifies that when quotas are enforced for a fileset, the numbers reported by the df command are based on the quotas for the entire file system (rather than individual filesets.
--inode-limit MaxNumInodes[:NumInodesToPreallocate]
MaxNumInodes specifies the maximum number of files that can be created. Allowable values range from the current number of created inodes (determined by issuing the mmdf command with -F), through the maximum number of files possibly supported as constrained by the formula:

maximum number of files = (total file system space) / (inode size + subblock size)

Note: This formula works only for simpler configurations. For complex configurations, such as separation of data and metadata, this formula might not provide an accurate result.

If your file system has additional disks added or the number of inodes was insufficiently sized at file system creation, you can change the number of inodes and hence the maximum number of files that can be created.

For file systems that will be doing parallel file creates, if the total number of free inodes is not greater than 5% of the total number of inodes, there is the potential for slowdown in file system access. Take this into consideration when changing your file system.

NumInodesToPreallocate specifies the number of inodes that will be pre-allocated by the system right away. If this number is not specified, GPFS allocates inodes dynamically as needed.

The MaxNumInodes and NumInodesToPreallocate values can be specified with a suffix, for example 100K or 2M. Note that in order to optimize file system operations, the number of inodes that are actually created may be greater than the specified value.

This option applies only to the root fileset. When there are multiple inode spaces, use the --inode-space option of the mmchfileset command to alter the inode limits of independent filesets. The mmchfileset command can also be used to modify the root inode space. The --inode-space option of the mmlsfs command shows the sum of all inode spaces.

--log-replicas LogReplicas
Specifies the number of recovery log replicas. Valid values are 1, 2, 3, or DEFAULT. If DEFAULT is specified, the number of log replicas is the same as the number of metadata replicas currently in effect for the file system and will change when this number is changed.

Changing the default replication settings using the mmchfs command does not change the replication setting of existing files. After running the mmchfs command, the mmrestripefs command with the -R option can be used to change existing log files.

This option is only applicable if the recovery log is stored in the system.log storage pool.

--mount-priority Priority
Controls the order in which the individual file systems are mounted at daemon startup or when one of the all keywords is specified on the mmmount command.

File systems with higher Priority numbers are mounted after file systems with lower numbers. File systems that do not have mount priorities are mounted last. A value of zero indicates no priority.

--perfileset-quota
Sets the scope of user and group quota limit checks to the individual fileset level (rather than the entire file system). Before you activate or deactivate per-fileset quotas, you must unmount the file system from the cluster.
--noperfileset-quota
Sets the scope of user and group quota limit checks to the entire file system (rather than per individual filesets).
--rapid-repair
Keeps track of incomplete replication on an individual file block basis (as opposed to the entire file). This may result in a faster repair time when very large files are only partially ill-replicated.
--norapid-repair
Specifies that replication status is kept on a whole file basis (rather than on individual block basis).
--write-cache-threshold HAWCThreshold
Specifies the maximum length (in bytes) of write requests that will be initially buffered in the highly-available write cache before being written back to primary storage. Only synchronous write requests are guaranteed to be buffered in this fashion.

A value of 0 disables this feature. 64K is the maximum supported value. Specify in multiples of 4K.

This feature can be enabled or disabled at any time (the file system does not need to be unmounted). For more information about this feature, see Highly-available write cache (HAWC).

Exit status

0
Successful completion.
nonzero
A failure has occurred.

Security

You must have root authority to run the mmchfs command.

The node on which the command is issued must be able to execute remote shell commands on any other node in the cluster without the use of a password and without producing any extraneous messages. For more information, see Requirements for administering a GPFS file system.

Examples

To change the default replicas for metadata to 2 and the default replicas for data to 2 for new files created in the fs0 file system, issue this command:
mmchfs fs0 -m 2 -r 2
To confirm the change, issue this command:
mmlsfs fs0 -m -r
The system displays information similar to:
flag value          description
---- -------------- -----------------------------------
 -m  2              Default number of metadata replicas
 -r  2              Default number of data replicas

Location

/usr/lpp/mmfs/bin