Index Index for
Section 8
Index Alphabetical
listing for C
Bottom of page Bottom of
page

cfsmgr(8)

NAME

cfsmgr - Manages a mounted physical file system in a cluster

SYNOPSIS

Query: /sbin/cfsmgr [-h member] [-c] [-e] [-n] [-a attribute] [-q] [-v] [-F raw | std ] [[-p] directory ... ] | [-d domain ... ] | [-m filesystem ... ] Set: /sbin/cfsmgr [-r] [-f] [-h member] -a attribute=value [-s] {[[-p] directory ... ] | [-d domain ... ] | [-m filesystem ... ]} Forced unmount: /sbin/cfsmgr -K directory /sbin/cfsmgr -U {[-p] directory | -d domain | -m filesystem} /sbin/cfsmgr -u {[-p] directory | -d domain | -m filesystem} Get version number: /sbin/cfsmgr -V

OPTIONS

-h member Specifies the target member; that is, the member on which the cfsmgr command is executed. If no member is specified, the local member is assumed. A member name takes the same form as the output from the command hostname -s. -c Verifies the configuration without actually changing anything. -e Shows servers for all mount points, including servers for mount points served by the automount and autofsd daemons. By default, cfsmgr does not list the servers for mount points served by automount and autofsd. -n Gets attributes without waiting for reconfiguration to complete. If a reconfiguration is in progress at the time that a cfsmgr query occurs, and the -n flag is specified, the attribute's current value is returned. If the -n flag is not specified, cfsmgr waits until reconfiguration is complete before getting the attribute's value. This flag is valid only when getting attributes. -r Relocates underlying disks, if necessary, when a file system is relocated. Keeping disks local to the serving member helps performance. -f Configures CFS as indicated, even if this means that some disks will be remotely accessed. Without the -f flag, the relocation fails unless all disks can be locally accessed on the target member. -a attribute Returns the current value of the specified attribute. -a attribute=value Sets the attribute to the specified value. The following are valid attributes. Attribute names are not case sensitive, and any attribute can be preceded by CFS_. For example, devices, DEVICES, and CFS_DEVICES are all synonyms. DEVICES Use this attribute to get a list of the devices serving the specified file systems or domains. The DEVICES attribute can be queried, but it cannot be set. FSBSIZE Use this attribute to get and set the CFS block transfer size for the specified file system. The attribute can be set only for mounted file systems. You cannot set FSBSIZE on an AdvFS domain (the -d option). The value of FSBSIZE controls the amount of data, in bytes, that is processed per pass for client-side reads and writes for the specified CFS file system. Generally, a larger value yields better performance, and a value of 64 kilobytes or larger is suitable for FSBSIZE. There are special cases where a smaller value for FSBSIZE can be advantageous. If the reads and writes for a file system are small and totally random (not sequential) in nature, then the extra processing that is done for a large value of FSBSIZE could be wasteful. This is not the case when there are multiple threads all doing small I/O to a filesystem but reading it sequentially. For example, if the I/O for a file system is 8 kilobytes or less and totally random, then a value of 8 kilobytes for FSBSIZE is appropriate for that file system. The default value for FSBSIZE is determined by the value of the cfsiosize kernel attribute. To learn the current value of cfsiosize, use the following command: sysconfig -q cfs cfsiosize Values for FSBSIZE must be between 8192 bytes (8k) and 131072 bytes (128k), inclusive. When you set FSBSIZE, the value is automatically rounded to the nearest page. For example, if you set FSBSIZE=100000, the new value for FSBSIZE is 106496. SERVER Use this attribute to manually relocate the file system to another member or to get information about the server of a file system. To relocate a file system to a different member, assign the name of the target member to this attribute. The member name can be in either short or long form. For example, either SERVER=mutt, or SERVER=mutt.tyron.com is acceptable. A member always serves its own member-specific root domain. You cannot relocate the member root domain to a different member. You can relocate the clusterwide root. File systems of type File-on-File Mount (FFM), NFS client, and Memory File System (MFS) cannot be relocated. An attempt to relocate file systems of these types returns an error (EINVAL). Relocating a file system of type AdvFS affects not only the selected file system, but all file systems in the same domain. The whole domain is relocated. STATISTICS Use this attribute to get statistics related to the cluster file system or to reset the current statistics to zero. If you do not use the -h option, the statistics are for CFS activity on the member where the cfsmgr command executes. To reset statistics, assign the value 0 (zero) to the attribute: STATISTICS=0. An attempt to assign a value other than zero results in an error message. If you specify a directory in the command line for cfsmgr, the statistics for activity in that directory are displayed or reset. If you specify a domain name in the command line, the statistics for all filesets in the domain are either totaled and displayed or reset. Statistics are reported in the following categories: read, write, lookup, getattr, readlink, access, and other (such as mkdir, rename, create, and remove). The statistics for reads, lookups, getattrs, and accesses are for those activities that are not cached. -K directory Forcibly unmounts all AutoFS intercept points and automounted file systems served on the cluster member serving the specified directory, even if the intercept points and automounted file systems are busy. Specify the directory on which an AutoFS intercept point or automounted file system is mounted. -q Shows the cluster attributes for the current configuration. -s Specifies silent mode. A valid exit value is returned. This can be useful in scripts that execute cfsmgr. -U {[-p] directory | -d domain | -m filesystem} Forcibly unmounts an entire AdvFS domain that is being served by any cluster member. Specify an AdvFS file system mount directory, the -d flag with the domain to unmount, or the -m flag with the name of a domain and fileset; for example, cluster_test#atest. Unlike the -u flag, -U applies only to an entire domain. You cannot unmount just one file system of a served domain; if you specify a file system, the entire domain is unmounted. To determine if a domain or file system is served, use the following command and check the Server Status line: cfsmgr [[-p] directory | -d domain | -m filesystem] To forcibly unmount a domain, use the following command: cfsmgr -U {[-p] directory | -d domain | -m filesystem} If there are nested mounts on any file system in the domain being unmounted, and the nested mount is not in the same domain, the forced unmount is not performed. -u {[-p] directory | -d domain | -m filesystem} Forcibly unmounts an AdvFS file system or domain that is not being served by any cluster member. Specify the directory on which an AdvFS file system is mounted, the -d flag with the domain to unmount, or the -m flag with the name of a domain and fileset; for example, cluster_test#atest. To determine if a domain or file system is not served, use the following command and check the Server Status line: cfsmgr [[-p] directory | -d domain | -m filesystem] To forcibly unmount a filesystem, use either of the following equivalent commands: cfsmgr -u [-p] directory cfsmgr -u -m filesystem To forcibly unmount a domain, use the following command: cfsmgr -u -d domain The unmount is not performed if the file system or domain is being served. If there are nested mounts on the file system being unmounted, the forced unmount is not performed. Similarly, if there are nested mounts on a file system in the domain being unmounted, and the nested mount is not in the same domain, the forced unmount is not performed. -v Enables verbose mode. -V Returns the version number of cfsmgr. -p directory ... The name of one or more directories on which the file systems are mounted. This is valid for all types of file systems, and must be used for NFS clients, MFS, and FFM. If used, this must be the last option on the command line. If you do not specify any of -p, -m, or -d, then -p is assumed. -d domain ... The name of one or more AdvFS domains. Not valid when setting the FSBSIZE attribute. If used, this must be the last option on the command line. An AdvFS file system is mounted on a fileset in a domain. All file systems in the domain must be served by the same member. Because of this, certain AdvFS operations, such as manual relocation, can be performed only on the whole domain. -m filesystem ... The name of one or more mounted-from filesystems. If used, this must be the last option on the command line. For AdvFS, enter the domain and fileset; for example, cluster_usr#usr. For UFS, enter the name of the block device special file; for example, /dev/disk/dsk3c. For NFS, enter the full path name and host in the same format used to mount the file system, either path@host or host:path. For an ISO 9660 CD-ROM file system (cdfs), enter the name of the block device special file; for example, /dev/disk/cdrom0c. -F [std | raw] Specifies output format. The default, std, is intended to be read by people. The output is clearly labeled and formatted for that purpose. The raw output is intended to be used as input to scripts. Data is unlabeled. Data fields are separated by spaces. Data is grouped into lines as follows: Line 1, data about member on which the command was executed: Member name. Cluster member ID (an integer). The date (year month day hour minute second). For example: mutt 2 1998 12 08 09 12 50 Line 2, data about the CFS entity: Name of the the CFS entity: a file system or domain. Type of CFS entity: AdvFS, ADV, UFS, NFS, CDFS, or Unknown. Class of CFS entity: FS or Domain. Mount point (in response to the -d flag, which queries a domain but not a fileset). Otherwise, -. CFS Server name. This cluster member is the CFS server of the entity. Number of devices that create and sustain the CFS entity. Number of member-specific statistics (0 or 1). For example: cluster_var AdvFS Domain - jeff 1 1 Line 3, device data: Device name. Hardware ID. Device type: 1=direct-access I/O device, 2=served device, 0=unknown. Being a direct-access I/O device does not ensure that the cluster member where the cfsmgr command executed has direct I/O capability to that device. Device kind: 1=disk, 2=tape, 3=changer device, 0=unknown. Whether it is a served device (T or F). Server name (or none). Status of the server: 1=OK, 2=no service available for the device, 3=cluster reconfiguration in progress, 4=device not handled by drdmgr, 0=status unknown. Number of servers. For example: dsk4h 27 1 1 T mutt 1 2 Line 4, statistics on the CFS entity: C (A parsing aid.) Cluster member ID (an integer). Client name. Number of read operations. Number of write operations. Number of lookup operations. Number of getattr operations. Number of readlink operations. Number of access operations. Number of other operations. For example: C 2 jeff 2383 2863 96551 32448 121975 10169 253236 See the description of the STATISTICS attribute for more information about CFS statistics.

DESCRIPTION

Use the cfsmgr command to query attributes of the cluster file system and to set the SERVER and STATISTICS attributes. By setting the SERVER attribute for various file systems, you can manually balance the loads on the CFS servers. Entering the cfsmgr command with no options returns the names of domains and file systems, where each is mounted, the name of the server of each, and the server status. When setting or querying a CFS attribute, you must specify a file system. If you request a file system relocation, cfsmgr verifies that all disks used by the file system can be accessed locally from the target member. If the disk check succeeds, the file system is moved to the target member. If the check fails, the file system is not relocated, and a message is displayed recommending against relocating the file system to the target member. Use the -f flag if you want the relocation to take place even when the disks used by the file system cannot be accessed locally from the target member. Use the -r flag to move all underlying disks to the target member. After the disks are being served by the target member, the file system is moved to the new server. No checks are made as to whether disks serving the subject file system are in use by another file system. Relocating a served disk can mean that another file system suddenly does remote disk I/O. It is up to the system administrator to manage the disk pool appropriately. If the mount path of a file system is configured to traverse the mount of an inaccessible file system, the first file system becomes inaccessible as well. In that case, cfsmgr displays an error message stating the reason for the inaccessibility. It is up to the system administrator to arrange the mount points in a way that maintains availability. The values of attributes set with cfsmgr do not survive a reboot of the host on which the attribute was set. To set an attribute and have it survive a reboot, create a startup script that calls cfsmgr to make the desired configuration. The cfsmgr command includes a -U flag that forcibly unmounts AdvFS domains that are served by any cluster member. You cannot use this flag to unmount the root (/), usr, or var file systems. The -u flag forcibly unmounts AdvFS file systems or domains that are not served by any cluster member. A domain or file system could become not served if one or more storage elements containing the domain or file system become unavailable. The forced unmount operation fails if the file system or domain you specify is currently being served. You cannot use this flag to unmount the root (/), usr, or var file systems. The cfsmgr command also includes a -K flag that provides a way to forcibly unmount all AutoFS intercept points and automounted file systems. This flag is needed if AutoFS is stopped on a cluster member where there are busy file systems, and then started on another member. In this case, the busy AutoFS intercept points continue to recognize the cluster member as the server, even after the autofsd daemon has been started on the other cluster member. These intercept points do not allow new automounts. To correct this problem without halting the cluster member, use the -K flag to forcibly unmount all AutoFS intercept points and automounted file systems served on the cluster member, even if the intercept points and automounted file systems are busy. This flag results in applications receiving I/O errors for open files in affected file systems. An application with its current working directory in an affected file system will no longer be able to navigate the file system namespace using relative names. See the Cluster Administration manual for additional information before using this flag.

EXAMPLES

1. In the following example, cfsmgr gets the names of the servers of /var. In the output, the null value for host name indicates that the command ran on the local member. # cfsmgr -v -a server /var cfsmgr: Domain or fs name = /var cfsmgr: cfs_attribute = 0, host name = (null) cfsmgr: op_flag = 0, clu_cfs_flag = 0x8 Server Name = sys1 Server Status : OK 2. In the following example, cfsmgr relocates /usr from the host mutt to jeff. # cfsmgr -h mutt -r -a SERVER=jeff /usr 3. The following example gets the CFS statistics for the root file system: # cfsmgr -a STATISTICS / Counters for the filesystem /: read_ops = 46435 write_ops = 105459 lookup_ops = 2367579 getattr_ops = 381126 readlink_ops = 4154614 access_ops = 75064263 other_ops = 5072410 Server Status : OK

EXIT VALUES

Upon successful completion the command returns 0 (zero). In an attempt to relocate a file system, if all disks serving the file system are not locally connected to the target member, the exit status is 1. The relocation does not occur unless the user specifies the -f flag. If an error occurs, the exit status is greater than 1.

FILES

/sbin/cfsmgr The command path.

SEE ALSO

Commands: drdmgr(8)

Index Index for
Section 8
Index Alphabetical
listing for C
Top of page Top of
page