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 PolyServe Matrix Server Commands Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 .dll Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 .reg Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 .exe Files . . . . . . . . . .
Contents iv mxpasswd.exe – add users or change passwords . . . . . . . . . . . . . . . 15 mxsancheck.exe – check SAN access . . . . . . . . . . . . . . . . . . . . . . . . . . 16 mxsanconf.exe – configure FibreChannel switches . . . . . . . . . . . . . . 16 mxsanlk.exe – display status of SAN locks . . . . . . . . . . . . . . . . . . . . . 17 mxservice.exe – container for matrix components. . . . . . . . . . . . . . . 20 mxsetsecret.exe – set the network secret password . . . . . . . . . . . . . .
Contents v spstat.exe – show matrix state information. . . . . . . . . . . . . . . . . . . . . 42 sqlreg.exe – create a registry file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 wmtest.exe – test server-based fencing . . . . . . . . . . . . . . . . . . . . . . . . 42 2 mx Commands The matrixrc file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Format of the .matrixrc file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1 PolyServe Matrix Server Commands Overview PolyServe Matrix Server includes several commands that can be helpful for administrators managing a PolyServe Matrix Server cluster. Other PolyServe Matrix Server commands provide diagnostic information and should be used only under the direction of PolyServe personnel. PolyServe Matrix Server also includes commands that are used internally and should not be run directly.
Chapter 1: PolyServe Matrix Server Commands 2 Scripts The bin and tools directories contain scripts that are used by PolyServe Matrix Server programs. These scripts should not be changed or executed manually. .exe Files The remainder of this chapter describes the executable commands included in the bin and tools directories. Some of these commands are useful for matrix administration.
Chapter 1: PolyServe Matrix Server Commands 3 dledit.exe – assign drive letters and mount points Synopsis/ bin\dledit Description This command assigns drive letters and mount points to PSFS filesystems. It is used internally by PolyServe Matrix Server and should never be run directly. dlmdebug.exe – debug DLM problems Synopsis tools\dlmdebug Description This utility should be run only at the request of PolyServe personnel. eventlog.
Chapter 1: PolyServe Matrix Server Commands 4 gcstat.exe – print grpcommd statistics Synopsis tools\gcstat Description This command should be run only at the request of PolyServe personnel. get_fenceidentity.exe – retrieve fencing information Synopsis bin\get_fenceidentity Description This command is used internally during PolyServe Matrix Server configuration and should not be run manually. hbaapidump.
Chapter 1: PolyServe Matrix Server Commands 5 idfence.exe – fence a server during a fencing test Synopsis bin\idfence Description The PolyServe Management Console includes an option to test your fencing configuration. The idfence command is used internally during this test and should not be run directly. lcl-dump – show information about LCL locks Synopsis \bin\lcl-dump Description This command should be run only at the request of PolyServe personnel. makescldb.
Chapter 1: PolyServe Matrix Server Commands 6 The options are: -F Send the data to the default membership partition backup file, which is located at Program Files\Polyserve\matrixserver\conf\MP.backup{.prev} on the drive where you installed PolyServe Matrix Server. This file can subsequently be used as input to the mpimport utility if needed. If there is an existing backup file, it will be saved as MP.backup.prev. -f Send the data to the specified output file.
Chapter 1: PolyServe Matrix Server Commands 7 The options are: mpimport [ ...] Import the set of disks corresponding to the specified UIDs. mpimport --local [ ...] Import the set of disks corresponding to the specified local disknames. mpimport -p Import the disk indicated by the UID and assign the specified psdname to it. mpimport -p --local Import the disk indicated by the specified local diskname and assign psdname to it.
Chapter 1: PolyServe Matrix Server Commands 8 mpimport --replace Replace all occurrences of olduid with newuid throughout the membership partition data. mprepair.exe – repair membership partitions Synopsis bin\mprepair Description The mprepair utility can be used to repair any problems if a failure causes servers to have inconsistent views of the membership partitions. This utility is invoked from the operating system prompt.
Chapter 1: PolyServe Matrix Server Commands 9 The status reported in the second field 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 mprepair utility cannot find the device containing the membership partition. INACCESSIBLE. The mprepair utility cannot access the device containing the membership partition. CORRUPT. The partition is not valid. MISMATCH.
Chapter 1: PolyServe Matrix Server Commands 10 When the disk access problem is corrected, the old membership partition will still be on the disk and will be marked active. When a membership partition is active, the disk containing the partition cannot be imported into the matrix. You may see this situation if you want to import a disk that was previously used by another matrix.
Chapter 1: PolyServe Matrix Server Commands 11 The output shows the local membership partition list on the server where you are running mprepair. It then compares this list with the lists located on the disks containing the membership partitions. The output also includes the device database records for the disks containing the membership partitions. Following is an example.
Chapter 1: PolyServe Matrix Server Commands 12 However, in certain situations you may need to perform the resilver operation manually. For example, a membership partition might become corrupt or a local membership list might become out of date. To resilver from a particular partition, type the following command: mprepair --resilver UID/PART# UID is the UID for the device and PART# is the number of the partition on the device.
Chapter 1: PolyServe Matrix Server Commands 13 msmtool.exe – diagnose the MSM process Synopsis tools\msmtool Description This diagnostics tool should be run only under the direction of PolyServe personnel. mx.exe – administer a matrix The mx utility provides a command-line interface for administering a matrix and monitoring its operation. See Chapter 2 for more information about the commands provided with this utility. mxcheck.
Chapter 1: PolyServe Matrix Server Commands 14 mxcollect.exe – collect configuration information Synopsis 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. For more information, see “Collect Log Files with mxcollect” in Chapter 17 of the PolyServe Matrix Server Administration Guide. mxconsole.
Chapter 1: PolyServe Matrix Server Commands 15 Description You can use the mxlogger command to add your own messages to the PolyServe Matrix Server event log. For example, you may want to add messages about the state of your applications. The arguments are: -e entity The type of message that you are adding. entity can be USER1, USER2, USER3, USER4, USER5, USER6, USER7, or USER8. You will need to determine how you want to use these entities. -l level The severity of the message.
Chapter 1: PolyServe Matrix Server Commands 16 # mxpasswd mxpasswd> {user}{password} To change an existing password, use the following syntax. Users can change their own passwords. If you are root, you can change any user password without specifying the old password. $ mxpasswd mxpasswd> {user} {new_password} {old_password} mxsancheck.exe – check SAN access Synopsis bin\mxsancheck Description The mxsancheck command determines whether a server has SAN access and is ready to mount filesystems.
Chapter 1: PolyServe Matrix Server Commands 17 mxsanlk.exe – display status of SAN locks Synopsis tools\mxsanlk Description PolyServe Matrix Server uses a set of disk-based data structures called SANlocks to protect filesystem integrity. If a problem causes a matrix to split into two or more network partitions, the SANlocks ensure that only one of the resulting network partitions has access to the SAN. Each SANlock is stored in a membership partition.
Chapter 1: PolyServe Matrix Server Commands 18 • trying to lock, last held by host X.X.X.X The SANlock was most recently held by host X.X.X.X and may still be held by that host. The host on which mxsanlk was run is trying to acquire the SANlock. • cannot access The host on which mxsanlk was run is unable to access the SANlock.The membership partition may need to be repaired. • trying to lock, cannot access The host on which mxsanlk was run is trying to acquire the SANlock but is unable to access it.
Chapter 1: PolyServe Matrix Server Commands 19 • trying to lock, sdmp process hung The host on which mxsanlk was run is trying to acquire the SANlock but the SDMP process responsible for the SANlock is unresponsive. • locked, sdmp process hung The host on which mxsanlk was run held the SANlock but the SDMP process responsible for the SANlock is now unresponsive.
Chapter 1: PolyServe Matrix Server Commands 20 mxservice.exe – container for matrix components Synopsis bin\mxservice Description This single service controls the starting, stopping, and failure detection for all of the operational components of PolyServe Matrix Server. This command should not be run directly. mxsetsecret.
Chapter 1: PolyServe Matrix Server Commands 21 partresize.exe – grow a partition Synopsis bin\partresize Description The PolyServe Management Console includes an option to increase the size of a PSFS filesystem and the partition on which it is located. When this option is used, PolyServe Matrix Server runs the partresize command to increase the size of the partition. This command is not intended to be run directly. pathfilter.
Chapter 1: PolyServe Matrix Server Commands 22 -h Print a usage message. PSANinfo.exe – show FC logins or Naming Database Synopsis bin\PSANinfo [-n] [[-s]|[-u]] Description The PSANinfo command can be used to print the Naming Database or to get a snapshot of logins for a particular FibreChannel switch. The options are: -n Print the contents of the Naming Database. -s Wait seconds between probes of the FC switch. -u Wait microseconds between probes of the FC switch.
Chapter 1: PolyServe Matrix Server Commands 23 psdcoinst.exe – enable or remove the psd process Synopsis bin\psdcoinst -install|-uninstall Description The psdcoinst command enables or removes the psd process. The -install option enables the process; the -uninstall option removes the process. The server must be rebooted for the change to take effect. psdctl.exe – display device bindings Synopsis bin\psdctl Description This command should be run only at the request of PolyServe personnel. psfscheck.
Chapter 1: PolyServe Matrix Server Commands 24 Check a filesystem If a filesystem is not unmounted cleanly, the journal will be replayed the next time the filesystem is mounted to restore consistency. You should seldom need to check the filesystem. However, if a filesystem was corrupted by a hardware or software failure, you can repair it with the psfscheck utility. When psfscheck is running in default mode, it attempts to fix any corruptions that can be fixed without using --rebuild-tree.
Chapter 1: PolyServe Matrix Server Commands 25 --no-modify, -n Checks the filesystem in read-only mode, preventing psfscheck from replaying the journal and/or fixing any corruption. If errors are found, it is strongly recommended that you run psfscheck again, without the --no-modify option, before running with the --rebuild-tree option. (The --no-modify option cannot be specified with the --rebuild-tree or --rebuild-sb options).
Chapter 1: PolyServe Matrix Server Commands 26 --enable-sparse Enable sparse files on the specified filesystem. Manage quotas The psfscheck utility includes options to enable or disable quotas on a filesystem and to set the default quotas: --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.
Chapter 1: PolyServe Matrix Server Commands 27 --enforce-hardlimit File operations that will result in exceeding a user’s hard limit are denied. --no-enforce-hardlimit File operations that will result in exceeding a user’s hard limit are allowed. --log-hardlimit File operations that result in exceeding a user’s hard limit are logged in the system event log. --no-log-hardlimit File operations that result in exceeding a user’s hard limit are not logged.
Chapter 1: PolyServe Matrix Server Commands 28 compression algorithm will be affected by the corruption and the unpacked metadata will not be identical to the original. See “psfsunpack.exe – unpack a filesystem image” on page 37 for a typical pack/unpack sequence. psfsdq – save quota data Synopsis bin\psfsdq [-f ] Description The psfsdq command prints a quota summary for all users and groups having quota information stored on the specified PSFS filesystem.
Chapter 1: PolyServe Matrix Server Commands 29 The device can be specified in several ways: • By the drive letter, such as X: • By the mount point (junction), such as C:\san\vol2 • By the psd or psv name, such as psd2p2 or psv1 The options are: -f The -f option (format) can be used if PolyServe Matrix Server is not running or the disk is not imported. Before using this option, be sure that the volume is not in use on another node. The format operation will take place even if the volume is in use.
Chapter 1: PolyServe Matrix Server Commands 30 (kilobytes), M (megabytes), G (gigabytes), or T (terabytes). If one of these modifiers is not specified, the will be interpreted in bytes. If the default quota limit is not specified on the command line, the limit will be set to 0, which means there is no default limit. softdefault= [T|G|M|K] Set the default soft quota on the specified filesystem.
Chapter 1: PolyServe Matrix Server Commands 31 sparse-realcost Quota accounting for sparse files reflects the actual allocation of filesystem space to the files. psfsinfo – report filesystem information Synopsis \tools\psfsinfo [--feature ] [--version] [--verbose] ... Description The psfsinfo command reports information about the filesystem.
Chapter 1: PolyServe Matrix Server Commands – 1 – not enabled – 2 – could not open or read disk – 3 – a bad argument was specified --version Display the version of the on-disk filesystem format. --verbose, -v Enable verbose messages. psfslabel.exe – label a filesystem Synopsis bin\psfslabel “
Chapter 1: PolyServe Matrix Server Commands 33 The options are: --enable-quotas Build the quota infrastructure on the specified filesystem. The psfsquota 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 filesystem and free the associated blocks. --set-dq [T|G|M|K] Set the default hard quota on the specified filesystem.
Chapter 1: PolyServe Matrix Server Commands 34 --no-enforce-hardlimit File operations that will result in exceeding a user’s hard limit are allowed. --log-hardlimit File operations that result in exceeding a user’s hard limit are logged in the system event log. --no-log-hardlimit File operations that result in exceeding a user’s hard limit are not logged. --log-softlimit File operations that result in exceeding a user’s soft limit are logged in the system event log.
Chapter 1: PolyServe Matrix Server Commands 35 PSFS filesystem on the expanded partition. This command is not intended to be run directly. psfsresume.exe – resume a suspended filesystem Synopsis bin\psfsresume Description 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.
Chapter 1: PolyServe Matrix Server Commands 36 The psfsdq and psfsrq commands should be run in conjunction with the standard filesystem backup utilities, as those utilities do not save the quota limits set on the filesystem. psfssuspend.exe – suspend a filesystem Synopsis bin\psfssuspend Description The psfssuspend utility suspends a PSFS filesystem in a stable, coherent, and unchanging state. While the filesystem is in this state, you can copy it for backup and/or archival purposes.
Chapter 1: PolyServe Matrix Server Commands 37 Any process attempting to modify a suspended filesystem will block until the filesystem is resumed. These blocked processes may hold resources, thereby causing other processes to block waiting on these resources. psfsunpack.exe – unpack a filesystem image Synopsis tools\psfsunpack Description The psfsunpack command unpacks a PSFS filesystem that was packed with the psfsdebug command.
Chapter 1: PolyServe Matrix Server Commands 38 sandiskinfo.exe – show disk information Synopsis bin\sandiskinfo [-i|-u|-v] [-al] Description The sandiskinfo command can display information for both imported and unimported SAN disks. Under normal operations, the sandiskinfo output should be the same on all servers in the matrix. With no options, sandiskinfo shows the UID, vendor, model, and capacity of each imported disk and specifies the FC switch used to access the disk. sandiskinfo Disk: \\.
Chapter 1: PolyServe Matrix Server Commands 39 The -l option displays the local device name for each disk, as well as the default disk information. When combined with -u, it displays local device names for unimported disks. sandiskinfo -al Disk: \\.\Global\psd1 (Membership Disk) Uid: 20:00:00:04:cf:13:38:18::0 SAN info: fcswitch5:7 Vendor: SEAGATE Capacity: 34733M Local Device Paths: \\.
Chapter 1: PolyServe Matrix Server Commands 40 scsf.exe – shadow copies of shared folders Synopsis bin\scsf Description This command is used internally by PolyServe Matrix Server and should never be run directly. sdmp.exe, sdmp_ctl.
Chapter 1: PolyServe Matrix Server Commands 41 smds.exe – show UI status Synopsis tools\smds Description This command should be run only at the request of PolyServe personnel. snapctl – manage snapshot operations Synopsis \bin\snapctl Description This command is used internally by PolyServe Matrix Server and should not be run directly. spctl.exe – dump the SanPulse trace buffer Synopsis tools\spctl -l Description This command should be run only at the request of PolyServe personnel. spdebug.
Chapter 1: PolyServe Matrix Server Commands 42 spstat.exe – show matrix state information Synopsis tools\spstat Description This command should be run only at the request of PolyServe personnel. sqlreg.exe – create a registry file Synopsis \bin\sqlreg Description This command is used internally by the MxDB for SQL Server Solution Pack and should never be run directly. wmtest.
2 mx Commands The mx utility provides a command-line interface for administering a matrix and monitoring its operation. The matrixrc file PolyServe Matrix Server can use an optional, external configuration file named .matrixrc to provide authentication information for matrix connections. If the file is configured, it will be used when you connect to a matrix through either the PolyServe Matrix Server Connect window or the mx command.
Chapter 2: mx Commands 44 The entries in the matrixrc file have this format: machine user password default • The first field, machine, is either the name or IP address of the server. • The second field, user, is optional. It 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 also optional and contains the PolyServe Matrix Server password for that user.
Chapter 2: mx Commands 45 List servers individually Add a line to the file for each server for which you want mx access and specify the appropriate username and password. This example specifies that srv3 is the default. srv1 srv2 srv3 admin admin admin secret1 secret1 secret2 default When you issue a mx command without specifying a server name, as in the following example, it connects to the machine specified as the default in the .matrixrc file.
Chapter 2: mx Commands 46 # production cluster prod { srv1 admin secret1 srv2 admin secret1 srv3 admin secret1 default } To connect to the matrix, include the option --matrix prod in the mx command. mx first attempts to access srv3, the default. If that server is not available, the command tries the other servers in the group. If your servers mostly use the same username and password, to simplify configuring the .matrixrc file, you can specify those values following the cluster name.
Chapter 2: mx Commands 47 The mxgenpass.exe command asks for a password and then displays the encrypted version: mxgenpass.exe Enter password: 06c684c5:8cCRCT1aVCjzWb/TL7IHThBmrgY1wkBV6pElkzNr7ZI= Replace the password in the .matrixrc file with the encrypted password.
Chapter 2: mx Commands 48 --prompt Specifies the prompt string that will be printed when mx is ready for another command. This option is useful when you initiate an interactive session with the option --file -. For example, if you invoke an interactive session with the following command, mx will print a % prompt when it completes a command. mx --prompt ’%’ --file – --numeric Causes hosts to be specified by their numeric IP addresses instead of by their hostnames.
Chapter 2: mx Commands Class Matrix Object snapshot Snapshot vfs Virtual CIFS Server vfs_share Virtual File Share vhost Virtual host vsql Virtual SQL Server vsqlinstance Virtual SQL Server instance To specify a command affecting a class, use this syntax: For example, this command displays the status of servers that are up: mx server status --up mx application – manage applications Use the following commands to manage PolyServe Matrix Server applications: Rename
Chapter 2: mx Commands 50 mx device – device monitor commands Use the following commands to configure device monitors or to display their status. Add a device monitor: mx device add --servers ,,... [optional-arguments] ... --servers specifies the server or servers that use the monitored device. The can include up to 32 characters. The arguments are: [--application ] The application associated with this device monitor.
Chapter 2: mx Commands 51 [--parameters ] The available parameters depend on the type of monitor: • DISK device monitor. The parameter is a partition on the disk. The monitor will attempt to read the first block on this partition to determine whether the disk is operating normally. • GATEWAY device monitor. The IP address of the gateway device (such as a router). The IP address must be on a different subnet than the servers in the matrix. • CUSTOM device monitor.
Chapter 2: mx Commands 52 [--startScript