IBM Books

IBM General Parallel File System for AIX: Administration and Programming Reference

mmchattr Command

Name

mmchattr - Changes replication attributes of one or more GPFS files.

Synopsis

mmchattr [-m MetadataReplicas] [-M MaxMetadataReplicas] [-r DataReplicas] [-R MaxDataReplicas] Filename[Filename ...]

Description

Use the mmchattr command to change the replication attributes of files in the GPFS file system. The replication factor must be less than or equal to the maximum replication factor for the file. If insufficient space is available in the file system to increase the number of replicas to the value requested, mmchattr ends. However, some blocks of the file may have their replication factor increased after mmchattr ends.

If additional free space becomes available in the file system at a later time (when, for example, you add another disk to the file system), you can then issue the mmrestripefs command with the -r or -b option to complete the replication of the file. You can then use the mmlsattr command to display the replication values.

The mmchattr command can be run against a file in use.

You must have write permission for the files whose attributes you are changing.

Parameters

Filename [Filename ...]
The name of one or more files to be changed. Each file name should be delimited by a space. Wildcard characters are supported in file names, for example, project*.sched.

Options

-m MetadataReplicas
Specifies how many copies of the file system's metadata to create. Enter a value of 1 or 2, but not larger than the value of the MaxMetadataReplicas attribute of the file.

-M MaxMetadataReplicas
The maximum number of copies of indirect blocks for a file. Can only be overridden by a system call when the file has length 0. Space is reserved in the inode for all possible copies of pointers to indirect blocks. Valid values are 1 and 2 but cannot be lower than DefaultMetadataReplicas. The default is 1.

-r DataReplicas
Specifies how many copies of the file data to create. Enter a value of 1 or 2, but not larger than the value of the MaxDataReplicas attribute of the file.

-R MaxDataReplicas
The maximum number of copies of data blocks for a file. Can only be overridden by a system call when the file has length 0. Space is reserved in the inode and indirect blocks for all possible copies of pointers to data blocks. Valid values are 1 and 2 but cannot be lower than DefaultDataReplicas. The default is 1.

Exit status

0
Successful completion.

1
A failure has occurred.

Security

You must have write access to the file to run the mmchattr command.

You may only issue the mmchattr command from a node in the GPFS nodeset where the file system is mounted.

In an SP environment, verify the authentication method set for SP security services:

  1. If your authentication method is set to compatibility, Kerberos authentication is required. Issue the k4init command.
  2. If your authentication method is set to DCE, dce_login authentication is required.
  3. If your authentication method is set to NONE/std, there must be an entry in the /etc/sysctl.mmcmd.acl file on every node in the nodeset for the root user at every other node in the nodeset.

For further information, see the latest IBM Parallel System Support Programs for AIX: Administration Guide, IBM Parallel System Support Programs for AIX: Command and Technical Reference, and RS/6000: Planning Volume 2, Control Workstation and Software Environment manuals at www.rs6000.ibm.com/resource/aix_resource/sp_books/pssp. Search for information on sysctl.

Examples

To change the metadata replication factor to 2 and the data replication factor to 2 for the project7.resource file in file system fs1, enter:

 mmchattr -m 2 -r 2 fs1/project7.resource

To confirm the change, enter:

mmlsattr project7.resource

The system displays information similar to:

replication factors   
metadata(max) data(max) file    
------------- --------- ----
      2 (  2)   2 (  2) project7.resource
 

See also

mmcrfs Command

mmlsattr Command

mmlsfs Command

Location

/usr/lpp/mmfs/bin


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]