PolyServe Matrix Server Command Reference PolyServe Matrix Server 3.
Copyright © 2004-2006 PolyServe, Inc. Use, reproduction and distribution of this document and the software it describes are subject to the terms of the software license agreement distributed with the product (“License Agreement”). Any use, reproduction, or distribution of this document or the described software not explicitly permitted pursuant to the License Agreement is strictly prohibited unless prior written permission from PolyServe has been received.
Contents 1 Matrix Server Commands destroypsfs – destroy a PSFS filesystem . . . . . . . . . . . . . . . . . . . . . . . . 1 diskupdate – reattempt to access a disk . . . . . . . . . . . . . . . . . . . . . . . . 2 dlmdebug – debug DLM problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 edquota – edit user and group quotas . . . . . . . . . . . . . . . . . . . . . . . . . . 2 emulex/dfc, emulex/lpedit – Emulex utilities . . . . . . . . . . . . . . . . . . . .
Contents iv Enable or Disable Failover for a Server . . . . . . . . . . . . . . . . . . . . . 21 Enable or Disable Failover for a PSD Device . . . . . . . . . . . . . . . . 22 An Example of Changing the I/O Path. . . . . . . . . . . . . . . . . . . . . . 23 Display Status Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Set the Timeout Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Show Number of Transient Errors . . . . . . . . . . . . . . . .
Contents v snapctl – manage snapshot operations . . . . . . . . . . . . . . . . . . . . . . . . 51 spctl – dump the SanPulse trace buffer . . . . . . . . . . . . . . . . . . . . . . . . 51 spdebug – obtain SanPulse debug information . . . . . . . . . . . . . . . . . 52 spstat – show matrix state information . . . . . . . . . . . . . . . . . . . . . . . . 52 warnquota – warn users of quota limits . . . . . . . . . . . . . . . . . . . . . . . 52 wmtest – test server-based fencing. . . . . . . . . . . . . .
1 Matrix Server Commands Matrix Server includes several commands that can be helpful for administrators managing a Matrix Server cluster. Other Matrix Server commands provide diagnostic information and should be used only under the direction of PolyServe personnel. Matrix Server also includes commands that are used internally and should not be run directly. The Matrix Server commands are located in the following directories: • /opt/polyserve/bin • /opt/polyserve/sbin • /opt/polyserve/tools • /etc/init.
Chapter 1: Matrix Server Commands 2 diskupdate – reattempt to access a disk Synopsis /opt/polyserve/tools/diskupdate Description This command should be run only at the request of PolyServe personnel. dlmdebug – debug DLM problems Synopsis/ /opt/polyserve/tools/dlmdebug Description This utility should be run only at the request of PolyServe personnel.
Chapter 1: Matrix Server Commands 3 fsprobe – report filesystem information Synopsis /opt/polyserve/tools/fsprobe Description This command should be run only at the request of PolyServe personnel. gcstat – print grpcommd statistics Synopsis /opt/polyserve/tools/gcstat Description This command should be run only at the request of PolyServe personnel.
Chapter 1: Matrix Server Commands 4 lcl-dump – show information about LCL locks Synopsis /opt/polyserve/tools/lcl-dump Description This command should be run only at the request of PolyServe personnel. log_collect – obtain log files Synopsis /opt/polyserve/tools/log_collect Description This command is used internally by the mxcollect utility and should not be run directly.
Chapter 1: Matrix Server Commands 5 • For a psv device, the device is specified as /dev/psv/psvXXX, where XXX is the volume number. For example, /dev/psv/psv1. You do not need to specify the full path name. A name such as psd6p4 or psv1 will work. mkpsfs requires exclusive access to the device. If it cannot obtain exclusive access, it will exit with an “ebusy” message. The arguments are as follows: size-in-blocks The number of blocks on the device.
Chapter 1: Matrix Server Commands 6 The following command shows the syntax for the quotas parameters: mkpsfs -o enable-quotas,userdefault=#[T|G|M|K],groupdefault=#[T|G|M|K] dev If no -o options are specified, the filesystem will be created with Full Zone Bit Maps (FZBM) and without quotas. mpdump – Save membership partition data Synopsis /opt/polyserve/lib/mpdump mpdump [-v] -F mpdump [-v] -f Description The mpdump utility backs up the membership partition data to a file and/or the screen.
Chapter 1: Matrix Server Commands 7 volume.) The utility can also be used to deport disks or dynamic volumes from the SCL database or to replace a specific UID with a different UID. NOTE: Matrix Server must be stopped on all nodes when mpimport is used. Database corruption can occur if the utility is executed while Matrix Server is running on a node. mpimport fails if Matrix Server is running on the current node; however, it does not check the other nodes.
Chapter 1: Matrix Server Commands 8 mpimport [-s] [-M] -f [|...] Import the specified psd or psv devices. If no devices are specified, import the disks and dynamic volumes listed in inputfile. The inputfile must be in the format generated by mpdump. If -s is specified, “strict” importing is done; only those disks and dynamic volumes that can be imported using the psdname indicated in inputfile will be imported.
Chapter 1: Matrix Server Commands 9 The logged mxcheck results can be seen remotely with a web browser, via https://:9071/mxcheck/. For example: https://sysa.yourcompany.com:9071/mxcheck/ You will need to know the username and password for a Matrix Server user account such as admin. The options are: -t and/or -h Place the output in a text or html file. A - implies standard out. -l Log output to /var/opt/polyserve/mxcheck.
Chapter 1: Matrix Server Commands 10 mxcollect – collect configuration information Synopsis /opt/polyserve/tools/mxcollect Description This script collects configuration information and log files from the matrix. The script is typically run under the direction of PolyServe Technical Support. mxconfig – configure the matrix Synopsis /opt/polyserve/bin/mxconfig [--import] [--help] Description The mxconfig utility performs the initial configuration of Matrix Server.
Chapter 1: Matrix Server Commands 11 mxconsole – start the Management Console Synopsis /opt/polyserve/bin/mxconsole [--matrix ] [--config ] [--user ] Description The mxconsole command starts the Management Console, which is used to configure and monitor the matrix. The Management Console can be run from either a matrix server or a local machine outside the matrix. (See the PolyServe Matrix Server Administration Guide for information about using the Management Console.
Chapter 1: Matrix Server Commands 12 verify that Matrix Server has the correct information. The server must be up when you use the utility and Matrix Server must be stopped on that server. When you run mxfence, Matrix Server uses the hostname/IP address associated with the server to access the remote controller. The server is then either power-cycled or shut down in accordance with the method you selected when you configured the fencing module.
Chapter 1: Matrix Server Commands 13 -i Specify the IP address of the remote controller. -u Specify the username needed to access the remote controller. -p Specify the password needed to access the remote controller.
Chapter 1: Matrix Server Commands 14 Typically, you should use the pmxs script to start or stop Matrix Server. However, if you want to see verbose output during the start or stop operation, you can run mxinit manually with the --verbose option. mxinit performs its actions according to a set of default values. You can use the /etc/opt/polyserve/mxinit.conf configuration file to override the default values. The file describes the available options and the required format.
Chapter 1: Matrix Server Commands 15 --version Display the version of Matrix Server. -m, --monitor Explicitly tell mxinit to monitor processes. This is the default when mxinit is invoked to start Matrix Server. -M, --no-monitor Explicitly tell mxinit not to monitor processes. --hba-status Display the state of the FibreChannel host bus adapter drivers. --status Display the status of Matrix Server processes and modules. Following is an example.
Chapter 1: Matrix Server Commands 16 mxlogger – add a log message Synopsis /opt/polyserve/bin/mxlogger -e -l [-G|-L] /opt/polyserve/bin/mxlogger [-h] Description You can use the mxlogger command to add your own messages to the matrix.log file. For example, you may want to add messages about the state of your applications. The arguments are: -h Print a help message. -e entity The type of message that you are adding.
Chapter 1: Matrix Server Commands 17 mxmpconf – manage membership partitions Synopsis /opt/polyserve/bin/mxmpconf NOTE: Matrix Server cannot be running when you use mxmpconf. To stop the matrix, use the following command: # /etc/init.
Chapter 1: Matrix Server Commands 18 Membership Partition Status The Repair Menu reports the status of each membership partition. The status will be one of the following: OK. The membership partition is included in the local membership partition list. This is the normal status. NOT FOUND. The mxmpconf utility cannot find the device containing the membership partition. INACCESSIBLE. The mxmpconf utility cannot access the device containing the membership partition. CORRUPT. The partition is not valid.
Chapter 1: Matrix Server Commands 19 NOTE: If you resilver from a partition that is labeled MISMATCH, the operation may initialize partitions that are not currently membership partitions; any existing data on those partitions will be overwritten. Use the Display option to see the membership partition lists for the current membership partitions. Add Allows you to select a new membership partition.
Chapter 1: Matrix Server Commands 20 option is useful if the matrix includes old membership partitions that are marked active or if you want to import a disk that contains an active membership partition. Clear the Host Registry This option removes all entries from the server registry. CAUTION: Before clearing the server registry, be sure to reboot or power off any servers that were previously removed from the matrix and no longer had access to the SAN.
Chapter 1: Matrix Server Commands 21 -u Display I/O latencies in microseconds instead of the default milliseconds. This option applies only to the iostat command. The commands are: enable/disable Enable or disable MPIO failover on the specified devices. enableall/disableall Globally enable or disable MPIO failover on this node. timeout value Set the timeout on the specified device. active target Set the active target on the specified device.
Chapter 1: Matrix Server Commands 22 Enable or Disable Failover for a PSD Device When a failure occurs in the I/O path to a particular PSD device, Matrix Server will by default fail over to another I/O path. You can use the following command to control whether this failover behavior can occur for specific PSD devices. Matrix Server starts with failover enabled. # mxmpio enable|disable [
Chapter 1: Matrix Server Commands 23 An Example of Changing the I/O Path In this example, we will change the target for a device. The mxmpio status -l command identifies the path currently being used by each device. That path is labeled “active.” The following output shows that device psd2p1 is active on target 1. # /opt/polyserve/sbin/mxmpio status -l MPIO Failover is globally enabled Failover Timeout Targets psd1 enabled 30000 0. (41:50) scsi2/0/2/19 1. (08:90) scsi1/0/2/19 psd1p1 enabled 10000 0.
Chapter 1: Matrix Server Commands 24 Display Status Information The status command displays MPIO status information, including the timeout value, whether MPIO is enabled (globally and per-device), and any targets specified with the active command. Use the -l option to display more information about the targets, as in the above example.
Chapter 1: Matrix Server Commands 25 The syntax is: mpioload [interval [count]] interval is the number of seconds between samplings. The default is one second. count is the number of samples to make; the default is to sample indefinitely. Values for failovers and fatal errors represent the number of respective events since the device was bound. Values for load are the instantaneous number of I/Os queued at the time of the sample.
Chapter 1: Matrix Server Commands 26 processing. Numbers are the raw counter values, not computed per sample. The syntax for the command is: rawstat [interval [count]] interval is the number of seconds between samplings. The default is one second. count is the number of samples to make; the default is to sample indefinitely. The output consists of ASCII text delimited by carets. The fields are: 1. PSD device name 2. Sample number 3. Sampling interval 4. Number of targets 5. Current active target 6.
Chapter 1: Matrix Server Commands 27 12+$4*2... I/O statistics in quads, or groups of four numbers. (The number of quads appears in field 6, “Number of I/O sizes”). Each quad consists of the following fields for each I/O size: • Minimum latency • Maximum latency • Count of I/Os • Total latency for all I/Os The minimum and maximum latency are reset every interval. Latencies are in microseconds.
Chapter 1: Matrix Server Commands 28 lose their locks. They can then reclaim those same locks on the new node without conflicts from outside clients. The options are as follows: -q Show the current status of NLM locking in the cluster (either enabled or disabled). -e Enable NLM locking in the cluster. No reboot is necessary; the change is effective almost immediately and may affect clients. -d Disable NLM locking in the cluster.
Chapter 1: Matrix Server Commands 29 mxsancheck – check server’s SAN access Synopsis /opt/polyserve/bin/mxsancheck Description The mxsancheck command determines whether a server has SAN access and is ready to mount filesystems. The command is intended to be used in scripts and returns 0 on success and 1 on failure. mxsanconf – configure FC switches Synopsis /opt/polyserve/sbin/mxsanconf
Chapter 1: Matrix Server Commands 30 membership partition. Before a matrix can begin accessing the SAN, it must first acquire a majority of the SANlocks. The SANlocks are acquired in order. mxsanlk displays the status of the SANlock stored in each membership partition. It can be used to determine whether any of the membership partitions need to be repaired. Also, if a network partition occurs, mxsanlk can be used to determine which network partition has control of the SAN. Following is some sample output.
Chapter 1: Matrix Server Commands 31 unlocked, trying to lock The SANlock does not appear to be held. The host on which mxsanlk was run is trying to acquire the SANlock. unlocked The SANlock does not appear to be held. If a host holds the SANlock, it has not yet committed its hold. initiating sdmp, not yet examined This is a transitional state. It indicates that the sdmp process responsible for the SANlock has been started but has not yet accessed the SANlock.
Chapter 1: Matrix Server Commands 32 Depending on the status of the SDMP daemon, you may see one of the following messages: Checking for SDMP activity, please wait... Still trying... The SDSMP is inactive at this host. The SDMP appears to be inactive at this host. If the SDMP daemon is not responding on the host, wait a few seconds and retry the command. If the command continues to fail, shut down the matrix and then restart it. This step should restart the SDMP daemon.
Chapter 1: Matrix Server Commands 33 mxsetsecret – set the network secret password Synopsis /opt/polyserve/bin/mxsetsecret -f [--filename] Description This command is typically run by mxconfig and should be run manually only at the request of PolyServe personnel. pmxs – start or stop Matrix Server or view status Synopsis /etc/init.d/pmxs /etc/init.d/pmxs /etc/init.d/pmxs /etc/init.d/pmxs start stop restart status Description Matrix Server runs on each server in the matrix.
Chapter 1: Matrix Server Commands 34 PSANcfg – manage ports, community string Synopsis /opt/polyserve/sbin/PSANcfg [-hu] [-[lL] ] [switch ...] Description The PSANcfg command can be used to add or remove local HBA port information in the Matrix Server configuration and to unfence ports on FibreChannel switches. The options are: -l, -L The -l command adds the specified HBA port to the list of local ports; -L removes the specified port.
Chapter 1: Matrix Server Commands 35 If no options are specified, PSANinfo displays the status of the switch one time only. Following is a sample snapshot: Switch 99.10.11.240 : 1588 Fibre Channel Switch. IP addr 99.10.11.
Chapter 1: Matrix Server Commands 36 can also be used to enable or disable Full Zone Bit Maps (FZBM), to enable or disable quotas, and to set the default quota for users and groups. device is a psd or psv device and is specified as follows: • For a psd device partition, the device is specified as /dev/psd/psdXXXpYY, where XXX is the drive number and YY is the partition number. For example, /dev/psd/psd6p4 specifies partition 4 on disk psd6.
Chapter 1: Matrix Server Commands 37 --rebuild-sb Rebuild the superblock. --rebuild-quotas Repair any errors in the quota metadata and recalculate user and group quota allocations. --interactive, -i Stop psfsck after each pass is completed. --quiet, -q Prevent psfsck from reflecting its progress. --logfile filename, -l logfilename Tell psfsck to place information about any corruption it finds into the specified logfile instead of sending it to stderr.
Chapter 1: Matrix Server Commands 38 --disable-fzbm Disable the FZBM feature on the specified filesystem. --enable-quotas Build the necessary quota infrastructure on the specified filesystem. The psfsck utility then examines the existing files and stores current allocations for each user and group owning a file on the filesystem. --disable-quotas Disable quotas on the specified filesystem and free the associated blocks. --set-udq [T|G|M|K] Set the default quota for users on the specified filesystem.
Chapter 1: Matrix Server Commands 39 See “psfsunpack – unpack a PSFS filesystem image” on page 45 for a typical pack/unpack sequence. psfsdq – save quota data Synopsis /opt/polyserve/sbin/psfsdq [-f ] Description The psfsdq command prints a quota summary for all users and groups having quota information stored on the specified PSFS filesystem. The -f option specifies the file to which psfsdq will write its output. If the file already exists, it will be overwritten.
Chapter 1: Matrix Server Commands 40 device is a psd or psv device and is specified as follows: • For a psd device partition, the device is specified as /dev/psd/psdXXXpYY, where XXX is the drive number and YY is the partition number. For example, /dev/psd/psd6p4 specifies partition 4 on disk psd6. • For a non-partitioned psd device, the device is specified as /dev/psd/psdXXX, where XXX is the drive number. For example, /dev/psd/psd5.
Chapter 1: Matrix Server Commands 41 psfslabel – label a PSFS filesystem Synopsis /opt/polyserve/tools/psfslabel “
Chapter 1: Matrix Server Commands 42 --disable-quotas Disable quotas on the specified filesystem and free the associated blocks. --set-udq [T|G|M|K] Set the default quota for users on the specified filesystem. (The default is rounded down to the nearest filesystem block.) The optional modifiers specify that the size is in terabytes (T), gigabytes (G), megabytes (M), or kilobytes (K). If a modifier is not specified, the size will be calculated in bytes.
Chapter 1: Matrix Server Commands 43 NOTE: If an attempt to mount the copied filesystem fails with an “FSID conflict” error, run the following command as user root. In the command, is the partition, such as /dev/psd/psd1p7, that contains the copied filesystem, and
Chapter 1: Matrix Server Commands 44 The options are: -i Create the PSFS command-line semaphore file and the supplemental file if either file does not already exist. It then initializes the files to create the PSFS command-line semaphore. must be a path on a PSFS filesystem. -g Lock the PSFS command-line semaphore associated with , which is the name of a semaphore file created by psfssema -i.
Chapter 1: Matrix Server Commands 45 The psfsresume utility restores a suspended filesystem. The psfssuspend and psfsresume utilities affect the specified filesystem on all servers where it is mounted; however, the utilities should be executed on only one server in the matrix. To suspend a filesystem, issue the following command on one server that has mounted the filesystem. You must be user root.
Chapter 1: Matrix Server Commands 46 quota – report quota information for a user Synopsis/ /opt/polyserve/bin/quota Description This command is based on the Linux quota command but has been modified to work with PSFS filesystems as well as the standard Linux filesystem types. The command is provided on the Matrix Server quota tools RPM. There are no changes to the syntax or operation of the command. See the Linux quota man page for details about using the command.
Chapter 1: Matrix Server Commands 47 The utility can be used with either psd or psv devices. Use this syntax to specify the device: • For a psd device partition, the device is specified as /dev/psd/psdXXXpYY, where XXX is the drive number and YY is the partition number. For example, /dev/psd/psd6p4 specifies partition 4 on disk psd6. • For a non-partitioned psd device, the device is specified as /dev/psd/psdXXX, where XXX is the drive number. For example, /dev/psd/psd5.
Chapter 1: Matrix Server Commands 48 sandiskinfo – show SAN disk information Synopsis /opt/polyserve/bin/sandiskinfo [-i|-u|-v|-f] [-alr] [-U] [--subdevices] [--dynvolumes] [--dynvol_properties [volname]] Description The sandiskinfo command can display information for both imported and unimported SAN disks and also for dynamic volumes. Under normal operations, the sandiskinfo output should be the same on all servers in the matrix.
Chapter 1: Matrix Server Commands 49 -U Display output in the format used by the Management Console. This option is used internally by Matrix Server and does not produce human-readable output. -q Suppress output of all log messages. Following are some examples of these options. Show Partition Information The -a option also lists the partitions on each disk. When combined with -u, it displays partition information for unimported disks.
Chapter 1: Matrix Server Commands 50 Show Available Volumes The -v option lists available volumes on imported disks. These volumes are not currently in use for a PSFS filesystem or a membership partition. # sandiskinfo -v Volume: /dev/psd/psd5p1 Size: 3905M Disk=20:00:00:04:cf:13:32:d1::0 partition=01 type=Linux (83) Volume: /dev/psd/psd5p2 Size: 7386M Disk=20:00:00:04:cf:13:32:d1::0 partition=01 type=Linux (83) Options for Dynamic Volumes The following sandiskinfo options apply only to dynamic volumes.
Chapter 1: Matrix Server Commands 51 # sandiskinfo --dynvol_properties Dynamic Volume: psv1 Size: 2439M Stripe=Unstriped Subdevice: 20:00:00:04:cf:13:38:18::0/5 Size: 490M psd1p5 Subdevice: 20:00:00:04:cf:13:38:18::0/2 Size: 1950M psd1p2 Dynamic Volume: psv2 Size: 490M Stripe=32K/optimal Subdevice: 20:00:00:04:cf:13:38:18::0/7 Size: 490M psd1p7 Dynamic Volume: psv3 Size: 490M Stripe=8K/optimal Subdevice: 20:00:00:04:cf:13:38:18::0/10 Size: 490M psd1p10 setquota – set quotas Synopsis/ /opt/polyserve/sbin/
Chapter 1: Matrix Server Commands 52 spdebug – obtain SanPulse debug information Synopsis /opt/polyserve/tools/spdebug Description This command should be run only at the request of PolyServe personnel. spstat – show matrix state information Synopsis /opt/polyserve/tools/spstat Description This command should be run only at the request of PolyServe personnel.
Chapter 1: Matrix Server Commands 53 Valid brands: demo, dell, hp, ibm, ipmi Valid blades: 1-14; 0 for non-BladeCenter Valid commands: status, on, off NOTE: Do not run this command from the server that you are trying to power on, power off, or reset. Copyright © 1999-2006 PolyServe, Inc. All rights reserved.
2 mx Commands The mx utility provides a command-line interface for administering a matrix and monitoring its operation. Using the mx utility The matrixrc file The mx utility can be used both interactively and in scripts. Because matrix administration requires a password, Matrix Server uses an external configuration file named matrixrc to provide authentication. This file is required for mx operation and contains password information. NOTE: The .matrixrc file is also used by the mxconsole utility.
Chapter 2: mx Commands 55 • The second field, user, is the name of a user on that server, either admin for the administrator or another name for a read-only user. • The third field is the Matrix Server password for that user. • The fourth field, default, specifies that this server will be connected to by default if a server name is not specified on the command line. Specifying a default server is optional. Blank lines and lines beginning with a # character are ignored.
Chapter 2: mx Commands 56 In the following command, --matrix srv8 matches the wildcard. When the --matrix option is not specified, the connection is made to srv3, the default; the machine specified as the default cannot contain a wildcard. mx --matrix srv8 server status Group servers This method allows mx to connect to any available server in the cluster without the need to specify a server name on the command line.
Chapter 2: mx Commands 57 NOTE: Although the mx and mxconsole commands can access clusters running different versions of Matrix Server, the .matrixrc file can include groups and wildcards only when connecting to servers running Matrix Server 3.0 or later. Also, earlier versions of Matrix Server require that a default server be specified in the matrixrc file.
Chapter 2: mx Commands 58 --numeric Causes hosts to be specified by their numeric IP addresses instead of by their hostnames. --user Specifies the user to be logged in. Class syntax The mx utility can manipulate the following classes of matrix objects.
Chapter 2: mx Commands 59 mx application – manage applications Use the following commands to manage Matrix Server applications: Rename an application: mx application rename Enable an application: mx application enable Disable an application: mx application disable Show status for an application: mx application status [--severity OK|WARNING|ERROR] [ ...
Chapter 2: mx Commands 60 [--type CUSTOM|DISK|SHARED_FILESYSTEM] The type of device monitor. [--probeSeverity nofailover|autorecover|noautorecover] The failover behavior for the monitor. nofailover prevents failover of virtual hosts when the monitored device fails. autorecover fails over the virtual hosts, and when the device is restored, fails the virtual hosts back to the original network interfaces. noautorecover fails over the virtual hosts but does not fail them back after the device is restored.
Chapter 2: mx Commands 61 [--startScript