HP-UX System Administrator's Guide: Routine Management Tasks HP-UX 11i Version 3 HP Part Number: 5992-4616 Published: September 2008 Edition: 4
© Copyright 2008 Hewlett-Packard Development Company, L.P Legal Notices Proprietary computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor’s standard commercial license. Warranty The information contained herein is subject to change without notice.
Table of Contents Preface.......................................................................................................................................17 Publication History.............................................................................................................17 Conventions........................................................................................................................17 Intended Audience..................................................................
Setting the PRI, HAA, and ALT Boot Paths Using the HP-UX setboot Command:..........................................................................................................46 Setting the PRI, HAA, and ALT Boot Paths Using the Boot Option Maintenance Menu in the EFI Boot Manager:..........................................................................47 Changing the Contents of an AUTO File on a Boot Device.......................................48 Booting into Single-User Mode........................
On-line Addition and Replacement of PCI Cards (OLA/R)....................................92 Configuring Dump Devices................................................................................................92 3 Managing Systems...................................................................................................................95 Managing Disks - Quick Reference Examples....................................................................95 Adding a Disk to a Volume Group.................
Determining What Data to Back Up............................................................................127 Defining What Files and Directories to Back Up...................................................127 Determining How Often to Back Up Data..................................................................128 Full Backups vs. Incremental Backups...................................................................128 Backup Levels........................................................................
Local versus Remote Home Directories.................................................................145 Adding a User to Several Systems: A Case Study.................................................146 Exporting a Local Home Directory........................................................................148 Exporting a File System (HP-UX to HP-UX)...............................................................149 Moving Resources.............................................................................
SD-UX Software Structure...........................................................................................179 Location of Software....................................................................................................181 SD-UX Tasks................................................................................................................181 Adding Software....................................................................................................
The top Command.......................................................................................................201 OpenView Products.....................................................................................................201 GlancePlus and GlancePlus Pak.............................................................................202 Kernel Resource Monitor (KRM).................................................................................202 A Using High Availability Strategies........
List of Figures 3-1 5-1 5-2 Adding a User to Several Systems............................................................................146 Sample DVD Certificate............................................................................................184 SD-UX Roles .............................................................................................................
List of Tables 1 2 2-1 2-2 2-3 3-1 3-2 3-3 4-1 4-2 4-3 4-4 5-1 5-2 HP-UX 11i Releases.....................................................................................................20 Finding HP-UX Information and Documents.............................................................21 How autoboot and autosearch Flag Settings Affect the Boot Sequence.....................59 SpeedyBoot Tests.........................................................................................................
List of Examples 2-1 2-2 2-3 2-4 2-5 2-6 2-7 2-8 2-9 2-10 2-11 2-12 2-13 2-14 2-15 2-16 2-17 2-18 2-19 2-20 2-21 2-22 2-23 2-24 2-25 2-26 2-27 2-28 2-29 3-1 3-2 Setting the autoboot delay using the EFI Boot Manager’s Boot Options:...................43 Setting the autoboot delay using the EFI Shell’s autoboot command:........................43 Enable Autoboot (using EFI Shell’s autoboot command)...........................................43 Disable Autoboot (using EFI Shell’s autoboot command)...............
Preface Publication History The manual publication date and part number indicate its current edition. The publication date will change when a new edition is released. To ensure that you receive the new editions, you should subscribe to the appropriate product support service. See your HP sales representative for details. First Edition February 2007, 5991-6483, HP-UX 11i version 3 (B.11.31) Printed, DVD (Instant Information), and Web (http://www.docs.hp.
Term ComputerOut UserInput Command Variable [] {} ... | The defined use of an important word or phrase. Text displayed by the computer. Commands and other text that you type. A command name or qualified command phrase. The name of a variable that you may replace in a command or function or information in a display that represents several possible values. The contents are optional in formats and command descriptions. The contents are required in formats and command descriptions.
□ □ □ Logical Volume Management Security Management Routine Management Tasks Kernel Configuration Configuring Users and Groups Network (Initial configuration) Documents how to configure physical volumes, volume groups, and logical volumes using the HP Logical Volume Manager (LVM). Documents the data and system security features of HP-UX 11i. Documents many of the ongoing tasks you need to perform to keep your system running smoothly.
Table 1 HP-UX 11i Releases Release Identifier Release Name Supported Processor Architecture B.11.11 HP-UX 11i Version 1 PA-RISC B.11.23 HP-UX 11i Version 2 Itanium-based B.11.23 HP-UX 11i Version 2 , September 2004 PA-RISC and Itanium-based B.11.31 HP-UX 11i Version 3 , February 2007 PA-RISC and Itanium-based B.11.31 HP-UX 11i Version 3 , September 2007 PA-RISC and Itanium-based B.11.
Finding HP-UX Information The following table outlines where to find basic system administration information for HP-UX. This table does not include information for specific products. Table 2 Finding HP-UX Information and Documents If you need to. . . Go to . . . Located at . . .
1 Introduction This chapter provides an introduction to the management tools used to perform routine system tasks. Configuration Tools There are three ways (at least) to configure your HP-UX system: • • • Via the web with the HP Systems Insight Manager (HP SIM). Directly on the system with the text-based HP-UX System Management Homepage (HP SMH) or via the web with the web-based HP SMH. Directly with HP-UX commands.
X-Window-based displays have been retained. See “System Management Homepage (Text-Based)” (page 28). HP-UX Commands HP-UX commands provide you with the finest granularity of access to system configuration but they require you to be careful to complete all the steps correctly. In some cases, such as root home directory reconfiguration (see “Create the Root Home Directory” in the HP-UX System Administrator’s Guide: Configuration Management), they may be the only way to do it.
Configure Groups Configure Local Users or Configure NIS Users Configure User Templates See “Configuring Users and Groups in the HP-UX System Administrator’s Guide: Configuration Management. (Also accessible with /usr/sbin/ugweb.) • Audit Configuration Audit Events Audit System Calls Audit Users See “Audit Administration” in HP-UX System Administrator’s Guide: Security Management.
• Evweb Subscription Administration (Also accessible with /opt/sfm/bin/evweb) • IPMI Event Viewer Event Viewer • Kernel Configuration Alarms Modules Tunables See “Configuring the Kernel in the HP-UX System Administrator’s Guide: Configuration Management.
Configure Printers or Plotters Manage Print Requests Save or Restore Print Spooler Configuration See “Configuring Printers” in the HP-UX System Administrator’s Guide: Configuration Management. • Resource Management Event Monitoring Service • Resource Monitors Monitor Configuration X Server Configuration • Security Attributes Configuration Local Users or NIS Users System Defaults See “Configuring System and User Security” in the HP-UX System Administrator’s Guide: Configuration Management.
http://targetsystem:2301/ You will see a Web page with the message: Please Wait... You will be redirected to the System Management Homepage If the hpsmh daemon has not been started on the target system, it is automatically started. After a brief wait, you will see the login Web page for HP SMH. Enter a valid HP SMH login name (for example, root) and the password. https://targetsystem:2381/ • • If the hpsmh daemon is running on the target system, you will see the login Web page for HP SMH.
— System Security Policies — Authenticated Commands See the HP-UX System Administrator’s Guide: Security Management. • c - Security Attributes Configuration Topics include password aging and default umask. — s - System Defaults Configure system-wide values of security attributes. See security(4). — l - Local Users Configure per-user values of security attributes of local users (if NIS is not configured). See userdb(4).
• f - Disks and File Systems — f - File Systems View or Manage File Systems — l - Logical Volumes View or Manage Logical Volumes — v - Volume Groups View or Manage Volume Groups — d - Disks View or Manage Disk Devices See HP-UX System Administrator’s Guide: Overview and HP-UX System Administrator’s Guide: Logical Volume Management.
(Also accessible with /usr/sbin/kcweb -t) • n - Networking and Communications — s - Network Services Configuration ◦ b - Bootable Devices – b - DHCP Device Groups Booting from This Server – r - Devices for which Boot Requests are Relayed to Remote Servers – f - Fixed-Address Devices Booting from This Server ◦ v - DHCPv6 c - Configuring DHCPv6 Server s - Configuring Default DHCPv6 Client Settings h - Configuring a Host to Act as a DHCPv6 Relay Agent r - Configuring DHCPv6 Relay Interface Mappings p - Config
b - NTP Broadcasting n - NTP Network Time Sources See “Configuring Networking” in the HP-UX System Administrator’s Guide: Configuration Management. See also NFS Services Administrator's Guide. (Also accessible with /usr/sbin/ncweb -t) — i - Network Interfaces Configuration ◦ n - Network Interface Cards See HP-UX LAN Administrator's Guide. ◦ v - Virtual LANs See HP-UX VLAN Administrator's Guide.
— g - Groups View or Configure Groups. — t - Templates View or Configure User Templates. See “Configuring Users and Groups” in the HP-UX System Administrator’s Guide: Configuration Management. (Also accessible with /usr/sbin/ugweb -t) Starting Text-Based HP SMH To run HP SMH, you must be superuser or have been granted access (see “Giving User’s Limited Access to Text-Based HP SMH” in the HP-UX System Administrator’s Guide: Configuration Management).
# ( unset DISPLAY ; /usr/sbin/ugweb ) Giving Users Limited Access to Text-Based HP SMH As system administrator, you can give limited text-based HP SMH access to non-superusers individually by user name and collectively by primary group name. NOTE: The privileges assigned to users and groups by the text-based restricted HP SMH do not apply to the web-based HP SMH. 1. Activate Restricted HP SMH. # /usr/sbin/smh -r 2. 3. You can assign text-based HP SMH privileges by user and by group.
HP SMH try to run smh, they will receive a message that they must be superuser to execute HP SMH. When a restricted version of HP SMH is running, there are no shell escapes on terminals and the list menu is disabled. This prevents users from getting superuser access to restricted areas of HP SMH.
2 Booting and Shutdown This chapter contains information on the following topics: • “Booting Systems” (page 37) — “Booting HP-UX on HP Integrity Servers: Details and Variations” (page 38) — “Booting HP-UX on HP 9000 (PA-RISC) Systems: Details and Variations” (page 57) — “Speeding the Boot: SpeedyBoot” (page 70) • • “Customizing Start-up and Shutdown” (page 80) “Shutting Down Systems” (page 84) — “Types of Shutdown” (page 85) — “Special Considerations for Shutting Down Certain Systems” (page 90) — “Avoidi
Storage Area Management (http://docs.hp.com/en/netsys.html#Storage%20Area%20Management). HP-UX 11i v3 Device Special Files HP-UX 11i v3 introduces persistent DSFs (Device Special files) for mass storage devices. A single persistent DSF is created for each LUN, not bound to the path to the device as in prior HP-UX releases, but to the LUN’s Worldwide Identifier (WWID), a unique and permanent identifier of the LUN.
• • When you need to boot your system into LVM Maintenance mode to correct a problem with your computer’s logical volumes or volume groups. When you are installing, or updating to a new release of HP-UX. Here is a detailed look at the boot process, and its variations. CAUTION: ACPI Configuration for HP-UX Must Be “default” on nPartitionable HP Integrity Servers HP-UX will not boot on an nPartition-capable system if the ACPI configuration value is not set to “DEFAULT”.
HAA The High-Availability Alternate boot path is the path you want your system to boot from should your primary boot path fail. ALT The ALTernate boot path is the hardware path to an alternate boot source (for example, a tape drive, network-based boot source, or optical disc drive). On HP Integrity Servers, the PRI boot path is tried during an automatic boot. You can manually override an automatic boot by interrupting the boot process before the AUTOBOOT DELAY expires.
Usually, the primary boot path points to the device from which you most frequently boot and that device is available. If the autoboot flag is enabled, your system will automatically boot from the selected boot device (following a preset time-out). autoboot on If the autoboot flag is set to on, hpux.efi will attempt to boot using the items in the boot options list, in the order specified. It reads the \EFI\HPUX\AUTOfile from the EFI file system on the device that you are booting from. hpux.
Procedure 2-2 Booting from the EFI Shell 1. Access the EFI Shell. From the system console, use the up/down arrow keys to select the “EFI Shell” entry from the EFI Boot Manager menu to access the shell. 2. Access the EFI System Partition for the HP-UX boot device. Use the map EFI Shell command to list the file systems (fs0, fs1, and so on) that are known and have been mapped. To select a file system to use, enter its mapped name followed by a colon (:).
Example 2-1 Setting the autoboot delay using the EFI Boot Manager’s Boot Options: 1. 2. 3. 4. Select “Boot Option Maintenance Menu” from the boot manager’s main menu. Select “Auto Boot TimeOut” from the boot option maintenance menu. Select “Set TimeOut Value”. Enter the number of seconds you want to use for the boot delay (for example 30).
Booting from an Alternate Boot Device You can boot from an alternate device in following ways. If your system is set up to automatically boot you will need to override the autoboot sequence by hitting any key on the console keyboard during the autoboot delay (time-out) period.
vmunix” which references the file vmunix in the /stand file system on the selected boot device. If you normally boot from the kernel file /stand/vmunix but (for example) need to temporarily boot from an alternate kernel file, follow this procedure substituting your kernel file name for testvmunix: 1. 2. 3. If your system automatically boots, interrupt the autoboot sequence by hitting any key on the console keyboard during the autoboot (time-out) delay.
Changing the PRI, HAA, and ALT Boot Paths On HP Integrity Servers, the primary, high-availability alternate, and alternate boot paths are based on the first, second, and third items that appear in the boot options list for the server, respectively. You can manage the boot paths using the setboot command when HP-UX is running, or by using the “Boot Option Maintenance Menu” in the EFI Boot Manager.
NOTE: The boot device path that you specify in the setboot command (path in the following examples) must be a valid HP-UX hardware path to a bootable HP-UX device. Starting with HP-UX 11i version 3, the persistent DSF name and the lunpath hardware path are valid entries to the setboot command, in addition to the legacy hardware path. Regardless of the type of argument passed in input to setboot, setboot stores in stable storage and displays in output an active lunpath hardware path to the device.
Add a Boot Option Delete Boot Option(s) Change Boot Order 3. Presents you with a list of possible boot devices and allows you to select one to add to your boot options list Allows you to interactively delete one or more entries from your boot options list Allows you to reorder your boot options list When the boot options list for your system is as you want it, select “Exit” to return to the EFI Boot Manager’s main menu (which should now reflect your new edits to the boot options list).
1. Access the EFI Shell environment using the server’s (or nPartition’s) system console. Access the system console either via the server’s management processor (MP) or via a hardwired console terminal. If necessary, interrupt the autoboot process by hitting a key during the autoboot time-out period. The EFI Boot Manager will display the boot options menu (the EFI main menu). From the boot options menu, select EFI Shell. 2. Select the device with the AUTO file that you want to change.
3. Change directories to where the AUTO file is located. In the EFI file system for each HP-UX bootable device the AUTO file is located in the \EFI\HPUX directory: fs0:\> cd \EFI\HPUX The prompt changes again to reflect your new location: fs0:\EFI\HPUX> a.
NOTE: Because the EFI Shell (EFI file system) is not case sensitive “auto” and “AUTO” (in the previous example) are considered equivalent. As with HP-UX shells, in the above example the “>” character causes the echo command’s output to be redirected to the “auto” file. If auto exists its contents are overwritten. If auto does not exist it is created and will contain the output of the echo command. 5. Verify the new contents of the AUTO file.
boot kernel boot option kernel Specifies to boot from the named kernel file. For example: setauto boot testvmunix creates an AUTO file that contains only the boot testvmunix command. Specifies to boot the specified kernel file using the loader option given. For example: setauto boot -is vmunix command creates an AUTO file containing boot -is vmunix (which indicates to boot in single-user mode, as specified by the -is option).
1. Copy the AUTO file from the EFI partition on the boot device to a file on an HP-UX file system. Use the efi_cp command to do this. See efi_cp(1M) for details.
3. If the logical volume containing the /stand file system contains more than one physical device, you have a little more work to do. You have to determine which of them you booted from, or more importantly, which one you will boot from after changing its AUTO file. Though not always, it is usually the device associated with your PRI (primary) boot path.
1. Access the EFI Shell environment for the nPartition on which you want to boot HP-UX in single-user mode. Login to the service processor (MP or GSP) and enter CO to access the Console list. Select the nPartition console. When accessing the console, confirm that you are at the EFI Boot Manager menu (the main EFI menu). If at another EFI menu, select the Exit option from the sub-menus until you return to the screen with the EFI Boot Manager heading.
Press Any Key to interrupt Autoboot \efi\hpux\AUTO ==> boot vmunix Seconds left till autoboot 9 [User Types A Key to Stop the HP-UX Boot Process and Access the HPUX.EFI Loader ] Type ’help’ for help HPUX> 5. At the HPUX.EFI interface (the HP-UX Boot Loader prompt, HPUX>) enter the boot -is vmunix command to boot HP-UX (the /stand/vmunix kernel) in single-user (-is) mode. If you are booting from a different kernel file into single-user mode substitute the other file’s name for vmunix.
Booting HP-UX on HP 9000 (PA-RISC) Systems: Details and Variations A Standard Boot (PA-RISC Systems) Here are more details about what happens during a typical HP-UX boot-up sequence on an HP 9000 System. If you are booting an HP Integrity Server see “Booting HP-UX on HP Integrity Servers: Details and Variations” (page 38). 1.
Usually, the primary boot path points to the device from which you most frequently boot and that device is available. Once the boot device has been initialized, PDC (firmware routines) access a specially formatted area on the boot device, called a LIF volume. PDC loads the Initial System Loader (ISL) into memory and transfers control to it. 4.
The following table describes how the autoboot and autosearch flag settings affect the boot sequence: Table 2-1 How autoboot and autosearch Flag Settings Affect the Boot Sequence autoboot autosearch Boot Type What happens OFF OFF Manual Boot The BCH interacts with the user to obtain the bootable device path OFF ON Boot Search The BCH skips the primary path and tries alternate path.
Procedure 2-11 Setting Autoboot and Autosearch Flags Using the Boot Console Handler NOTE: Starting with HP-UX 11i v3, the boot path may be specified using either the legacy hardware path format or the lunpath hardware path format for mass storage devices. When using the lunpath hardware path format, a few things need to be noted. • Some elements of the lunpath hardware path (the target address and the LUN address) may have a size up to 64 bits. The BCH interface can only handle a maximum size of 32 bits.
2. Access the BCH Configuration menu by entering CO at the Main menu, and set the boot action for each boot path, as desired, by using the PATHFLAGS command.
Example 2-9 Enabling the Autoboot Flag Using setboot /usr/sbin/setboot -b on Example 2-10 Disabling the Autoboot Flag Using setboot /usr/sbin/setboot -b off Example 2-11 Enabling the Autosearch Flag Using setboot /usr/sbin/setboot -s on Example 2-12 Disabling the Autosearch Flag Using setboot /usr/sbin/setboot -s off Changing the PRI, HAA, and ALT Boot Paths HP 9000 systems allow you to define a primary boot path and an alternate boot path, and in many cases a high-availability alternate boot path.
NOTE: The boot device path that you specify in the setboot command (path in the following examples) must be a valid HP-UX hardware path to a bootable HP-UX device. Starting with HP-UX 11i version 3, the persistent DSF name and the lunpath hardware path are valid entries to the setboot command, in addition to the legacy hardware path. Regardless of the type of argument passed in input to setboot, setboot stores in stable storage and displays in output an active lunpath hardware path to the device.
2. Enter one of the following BCH commands (depending on your needs): Example 2-13 Setting the PRI (Primary Boot Path) Using the BCH Example: Set the primary boot path address to 0/0/0/2/0.5 Main Menu: Enter Command > pa pri 0/0/0/2/0.5 TIP: In the above command pa is a shortcut for the path command. In the Boot Console Handler interface, you can often abbreviate commands and options (pri for “primary”). See the help system in the BCH interface for acceptable abbreviations.
Booting from an Alternate Device There are times when you will need to boot from a device other than the device that you normally boot from. For example, if your primary boot disk fails, you might need to boot your system either from a different disk or from a recovery tape. Procedure 2-13 Using the Boot Console Handler to Boot from an Alternate Boot Device 1.
2. Use the BCH boot command to specify where you want to boot the system from. You can issue the BOOT command in any of the following ways: • BOOT Issuing the BOOT command with no arguments boots the device at the primary (PRI) boot path. • BOOT bootvariable This command boots the device indicated by the specified boot path, where bootvariable is the PRI, HAA, or ALT boot path. For example, BOOT HAA boots the high-availability alternate boot path. • BOOT LAN INSTALL or BOOT LAN.
P2 0/0/2/0/0.0 Random access media Main Menu: Enter command or menu > boot P2 Example 2-20 Boot from the default HP-UX install server Main Menu: Enter command or menu > boot lan Example 2-21 Boot from the HP-UX install server at 192.nn.xx.yyy Main Menu: Enter command or menu > boot lan.192.nn.xx.
Changing the Contents of the Autoexecute File On HP 9000 systems, an important part of what makes an automatic boot possible is a file known as an autoexecute file that contains the command that you normally use to boot the HP-UX operating system (the hpux command that you would enter at the ISL> prompt). The contents of this file are used during the boot process when some or all of the hpux command elements have been omitted from the command given to ISL, as in the case of automatic booting.
Main Menu: Enter command or menu > BOOT ALT Alternate Boot Path: 0/0/0/3/0.6 Do you wish to stop at the ISL prompt prior to booting? (y/n) >> y Initializing boot Device. Boot IO Dependent code (IODC) Revision 2 Boot Path Initialized. HARD Booted. ISL Revision A.00.44 Mar 12, 2003 ISL> 3.
INIT: SINGLE USER MODE 4. If you accessed the system console and service processor (management processor) interfaces via a network, exit the console and service processor interfaces if finished using them. To exit the BCH environment type ^B (Control-B); this exits the nPartition or system console and returns to the service processor Main Menu. To exit the service processor, type X at the Main Menu.
boots. There are several ways to define which tests are performed.
System Boot Tests When your system boots, it performs the tests described in Table 2-2. These are keywords for the hardware tests that are executed by processor-dependent code (PDC) or firmware upon a boot or reboot of the system. Table 2-2 SpeedyBoot Tests Test Name Values Description all on off partial All the listed tests. SELFTESTS on off partial Includes the early_cpu and late_cpu tests. This is equivalent to the SELFTESTS option in the boot console handler (BCH) service menu.
Table 2-2 SpeedyBoot Tests (continued) Test Name Values Description Memory_init on off When on, enables full destructive memory tests. When off, do not perform full destructive memory tests. Supported only on HP Integrity Servers. IO_HW on off IO hardware tests. When on, enables system firmware (or EFI drivers) to perform all the tests of IO hardware (for boot devices only). When off, do not perform these tests. Supported only on HP Integrity Servers.
Example 2-24 Displaying Current SpeedyBoot Settings for your System (HP 9000 sample output) setboot -v TEST ---all SELFTESTS early_cpu late_cpu FASTBOOT full_memory PDH CEC CURRENT ------partial partial off on partial off on off SUPPORTED --------partial yes yes yes yes yes yes no DEFAULT ------partial on on on on on on off NEXT BOOT --------partial partial off on partial off on off Example 2-25 Displaying Current SpeedyBoot Settings for your System (HP Integrity Server sample output) setboot -v Primar
Table 2-3 SpeedyBoot Status Table Headers (continued) Column Description Default The default values for each test. on, off, and partial are the same as for Current. Next Boot The values for each test that will be used on the next boot. If they are different from Current, the Current values will be reestablished after the next boot. on, off, and partial are the same as for Current.
Configuring Boot-Time System Tests from the EFI Shell (HP Integrity Servers Only) From the EFI Shell environment use the boottest command to manage the SpeedyBoot settings for a system (or nPartition). 1. Access the EFI Shell environment for your system (or the nPartition you want to configure). To access the EFI Shell, reboot or reset your system (or nPartition).
boottest testname on boottest testname off 3. Enable the specified test (testname). For example: boottest io_hw on enables the boot-time I/O hardware self tests. Disable the specified test (testname). For example: boottest Chipset off disables the Chipset boot-time system test. Repeat Step 2 until the settings reflect your desired settings, then reboot your system.
Configuring Boot-Time System Tests from a Booted System SpeedyBoot tests are configured with three setboot options: -v -ttestname=value Displays a status table of the SpeedyBoot test settings. Change the value for the test testname in nonvolatile memory to value for all following boots. The changes are reflected in the Current and Next Boot columns of the SpeedyBoot table.
Current column, are restored after the boot. testname and value are the same as for the -t option. Using setboot to Configure SpeedyBoot Settings The following extended example shows the results of various changes on the SpeedyBoot status table. It is a good idea to include the -v option in each command so that the table is displayed after the changes are made. Let’s start off in the default state (CEC is not supported in this example system, so its default is off, and it can’t be changed.
Autoboot is ON (enabled) Autosearch is OFF (disabled) TEST ---all SELFTESTS early_cpu late_cpu FASTBOOT full_memory PDH CEC CURRENT ------partial partial off on partial on off off SUPPORTED --------partial yes yes yes yes yes yes no DEFAULT ------partial on on on on on on off NEXT BOOT --------partial partial off on partial on off off Finally, let’s set up the next boot to test everything, and then test only late_cpu on subsequent boots.
1. Decide at what run level(s) you want the subsystem to start and stop. Typically, subsystems get stopped at one run level lower than the one they were started in, so a subsystem started at run level 3 will be stopped at run level 2. You will probably want to start your subsystem at level 1, 2 or 3.
1. Decide on run level: a. See what’s started at run level 2: ls /sbin/rc2.d/S* /sbin/rc2.d/S008net.sd /sbin/rc2.d/S560SnmpMaster /sbin/rc2.d/S100swagentd /sbin/rc2.d/S565SnmpHpunix... b. See what’s started at run level 3: ls /sbin/rc3.d/S* /sbin/rc3.d/S100nfs.server /sbin/rc3.d/S100nfs.server is a link to /sbin/init.d/nfs.server, which starts up portmap, rpc.mountd, nfsd and related functions.
# source the configuration file if [ -f /etc/rc.config.d/web_productname] then . /etc/rc.config.d/web_productname else echo "ERROR: /etc/rc.config.d/web_productname fi MISSING" # Check to see if the web_productname daemon exists, # is executable and should be started if [ "$WEB_PRODUCTNAME" -eq 1 -a -x "$WEB_PRODUCTNAMEHOME/$web_productname_daemon" ] then cd $WEB_PRODUCTNAMEHOME .
NOTE: Setting the start-up variable (WEB_PRODUCTNAME in this case) to 0, rather than deleting the script, is the way to remove a subsystem from the start-up sequence. This is particularly important in the case of HP and third-party scripts; do not edit them, delete them or move them; simply change the variable in the appropriate script under /etc/rc.config.d/ to 0 if you don’t want the corresponding start-up script to run. 3.
— “Network Gateway” (page 91) — “NFS File Server” (page 91) — “NFS Client” (page 92) • “Avoiding a Shutdown When Possible” (page 92) For additional information on shutting down systems, see HP-UX System Administrator’s Guide: Overview. Types of Shutdown There are various types of shutdown, both planned, and unplanned.
1. Notify anyone who is likely to be affected by the shutdown of your system. You can do this by: • e-mail • the wall command (see wall(1M)) — only notifies users of your system, not users of other systems that are likely to be affected by a shutdown of your system • calling them on the phone, or speaking to them in person However you do it, the critical thing is to notify them as far in advance as possible of your planned shutdown.
2. Once everyone has been notified and had a chance to prepare for the shutdown, execute the shutdown command to initiate an ordered shutdown of your system. There are basically three types of system shutdown: 1. 2. 3.
NOTE: You must have permission to shut down an HP-UX system! Obviously, this command can have serious consequences and is therefore to be used with caution. It is not a command that everyone should be able to use. Permission to shut down the system is normally reserved for superusers only. However, there is a mechanism that you can use to assign permission to other users so that they can shut down the system should the need arise when a superuser is not around. The /etc/shutdown.
Many HP-UX systems can be equipped with uninterruptible power supplies (UPSs) to allow you to maintain power to your systems for a short while following the failure of your computer’s primary power source. If the power failure is brief, systems equipped with UPSs will not be affected by the power failure at all. If the power failure appears as though it will last for a long time, you can use the buffer period provided by an uninterruptible power supply to perform a normal shutdown.
For a more detailed discussion of using fsck to repair file systems, refer to the following manpages: • • • • fsck(1M) fsck_cachefs(1M) fsck_hfs(1M) fsck_vxfs(1M) System Crashes / HP-UX Panics Although rare, sometimes systems can shut themselves down unexpectedly in an event known as a system crash or system panic. For a detailed description of what to do if this happens, and an explanation of what takes place following a system crash, see “Configuring Dump Devices” (page 92).
And, of course, users receiving e-mail through your system will not be able to do so while your system is down. Name Server If your computer is a network name server (for example, a DNS name server), it is responsible for translating computer alias names into IP addresses for its own users and those who have configured their systems to use your computer as their name server.
The best course of action is to alert the administrators of systems who have NFS-mounted file systems from your computer to unmount the NFS-mounted file systems before you shut down your system! By doing this, they will simply need to re-mount the NFS file systems from your computer when your computer is back on line. No reboot of the other systems will be required. Refer to the mount_nfs(1m) manpage for information on mount options like “hard” and “soft”. NOTE: This can have a cascading effect.
For a discussion on what happens when the HP-UX system crashes, and the elements of the crash dump cycle, read the section called “Abnormal Shutdowns” in the HP-UX System Administrator’s Guide: Overview volume. Beginning with HP-UX 11i version 3, the preferred way to configure the dump behavior and dump devices on your system is to use the crashconf command. For details on using crashconf, see the crashconf(1M) manpage.
3 Managing Systems This chapter describes routine tasks when managing a single-user or multiuser system.
• • • “Adding a Mirror for an Existing Logical Volume Using Non-strict Mirroring” (page 109) “Removing a Mirror from a Logical Volume” (page 111) “Moving a Directory to a Logical Volume on Another System” (page 113) Adding a Disk to a Volume Group For detailed information and instructions on adding a disk, see Configuring HP-UX for Peripherals. What follows is a quick reference; we’ll be using HP SMH. 1. Shut down and power off the system. See “Shutting Down Systems” (page 84). 2. 3. 4.
6. Select Tools, Disks and File Systems, Disks. The new disk to be added should be present in the list of devices and display “unused” in the Use column. The disk can be added to an existing volume group or added to a new volume group. To add an unused disk to a new volume group, click on the Volume Groups tab. This will display existing volume groups. Click on the Create VG... action on the right side of the page. Enter a name for the new volume group. Click on Select Unused Disk(s)...
3. Find a volume group that has as much free space as you need. Select Tools, Disks and File Systems, File Systems. Click on the Volume Groups tab. This will display a list of volume groups and the free space for each. You might see, for example, that volume group vg01 has 600MB of free (unallocated) space. 4. 5. 6. 7. Identify a volume group with sufficient free space for your new Logical Volume. Click on the Logical Volumes tab. Select Create LV...
2. Decide how much disk space the logical volume will need. For example, you might be adding a new project that you expect to grow to 500MB. In this case you need a volume with at least 1000MB of free space, 500MB for the original and 500MB for the mirror copy. 3. 4. Access the HP SMH Homepage. Select Tools, Disks and File Systems, Volume Group. Select a volume group that has as much free space as you need.
2. Make sure no one has files open in any file system mounted to this logical volume and that it is no one’s current working directory, for example: fuser -cu /work/project5 NOTE: If the file system is shared with other systems (exported), use the fuser command to check on the systems it is shared with to verify that no one is using it. Then unmount it on those systems before unmounting it on the server. 3. Unmount the file system; for example: umount /work/project5 4. 5. 6. 7. 8.
NOTE: Extending the logical volume that contains the root directory (/) is a special case. This also applies to /stand if you have separate root and boot file systems. You will not be able to extend the root file system using the procedure described below because the current root file system cannot ever be unmounted as required by extendfs and it must also be contiguous. Thus, you will not be able to extend it even if you shut down to single-user mode.
Open LV Max PV Cur PV Act PV Max PE per PV VGDA PE Size (Mbytes) Total PE Alloc PE Free PE Total PVG 8 16 1 1 2000 2 4 249 170 79 0 The Free PEentry indicates the number of 4 MB extents available, in this case, 79 (316 MB) 3. Change to single-user state: /sbin/shutdown This will allow /usr to be unmounted (see below). 4.
Reducing a Logical Volume Here are several examples showing how to reduce the size of logical volumes containing mounted file systems. The specific procedure to do this varies depending on the type of file system you are working with.
• • Use lvreduce to reduce the size of the surrounding logical volume Verify and (only if necessary) restore any lost data to the newly resized logical volume To reduce the size of the logical volume/dev/vg01/lvol2 containing a VxFS file system currently mounted to the directory /work/project5 where the new (smaller) size of the logical volume is to be 500MB: 1.
Though you should have made a backup of your data in the previous step for safety, fsadm usually eliminates the need to use that backup to restore lost data.2 In this example: fsadm -b 512000 /work/project5 NOTE: For VxFS file systems, the fsadm command uses DEV_BSIZE-byte sectors as the units for the -b option. In this example (and probably on your system)3, DEV_BSIZE=1024. Therefore, -b 512000 represents 500MB in the above command. 4.
NOTE: If the reason you are reducing the size of the logical volume is to use it for a different purpose, you might want to mount it to a different directory. This is fine. 8. Verify that the data (if any) contained in the newly resized and remounted file system has not been damaged. If necessary restore any damaged data (or to be safe, the entire file system) from the backup you previously made. For example: cd /somewhere_else pax -rw .
1. Make sure no one has files open in any file system on the logical volume and that no one’s current working directory is contained within the file system: fuser -cu /work/project5 NOTE: If the file system is shared with other systems, check on those other systems that no one is using it (fuser works on NFS-mounted file systems as well as local ones). Then unmount it from the remote client systems before unmounting it from the server. 2.
430096, 435504, 440912, 446320, 451728, 457136, 462544, 467952, 473360, 478768, 484176, 489584, 494992, 500400, 505808, 511216, 516112, 521520 # 6. Mount the new (smaller) file system: mount /dev/vg01/lvol2 /work/project5 This mounts the file system back to the directory where it was previously mounted. NOTE: If the reason you are reducing the size of the logical volume is to use it for a different purpose, you might want to mount it to a different directory. This is fine. 7.
Adding a Mirror for an Existing Logical Volume Using Non-strict Mirroring For detailed discussion of mirroring see “Creating and Modifying Mirrored Logical Volumes” in the HP-UX System Administrator’s Guide: Logical Volume Management. The following example uses HP SMH. 1. 2. 3. 4. Decide how many mirror copies you want. For the purposes of this example, we’ll assume you want one mirror and the size of the logical volume is 500MB. There will be two copies of the data, the original and a mirror copy.
Adding a Mirror to an Existing Logical Volume Using Strict Mirroring For detailed discussion of mirroring and allocation policies see “Creating and Modifying Mirrored Logical Volumes” in the HP-UX System Administrator’s Guide: Logical Volume Management. The following example uses HP SMH. HP recommends that you use strict mirroring because it keeps the “mirror” data on a separate disk from the original data. This free space must be on a disk or disks not currently used by the file system you want to mirror.
Removing a Mirror from a Logical Volume For detailed discussion of mirroring see HP-UX System Administrator’s Guide: Logical Volume Management. The following is a quick reference; we’ll be using HP SMH. 1. 2. 3. 4. 5. Access the HP SMH Homepage. Select Tools, Disks and File Systems, Logical Volumes. This will display a list of the logical volumes. Select the logical volume for which you want to remove one or more mirror data images and click on the Remove Mirror(s)...
Once the command completes, proceed to the next step. 5. 6. Physically disconnect the bad disk and connect the replacement. If you are replacing a mirror of the boot disk, set up the boot area on the disk. a. If this is an HP Integrity Server, partition the disk using the idisk command, as described in HP-UX System Administrator’s Guide: Logical Volume Management. You do not need to run insf or pvcreate, since you are replacing an existing physical volume. b.
NOTE: You can use the same procedure to replace a disk that contains unmirrored logical volumes. However, by removing the disk, you will permanently lose any unmirrored data on that disk. Therefore, before starting this procedure, confirm that you have a backup of any unmirrored logical volume, then halt any applications using it, and unmount any file system mounted on it.
or you can use HP SMH. Choose the Now and On Boot boxes for when to mount - choosing On Boot automatically creates an entry in /etc/fstab. 4. Do this step on each NFS client in the workgroup. Edit /etc/fstab (or /etc/checklist) to remove the NFS import of /projects from wsb2600 and replace it with an NFS import from fp_server (you must be superuser on each system).
NOTE: In this example, we are changing the file system’s name, as well as moving it, so tar cv /projects is not the right way to back it up; specify an absolute path name only if you want tar to recover the data to that path name. 8. Do this step on the new server, that is, the system you are moving the directory to,fp_server in this example.
Managing Large Files HP-UX supports large files (greater than 2 GB), however, when working with large files be aware of these issues: • You cannot perform interactive editing on large files. For example, if you try to run vi on a large file, the following error message appears: vi large_file "large_file" Value too large to be stored in data type • • You cannot mail a large file. You cannot print a large file.
/usr/sbin/mkfs -F vxfs -o nolargefiles /dev/vg02/rlvol1 /usr/sbin/newfs -F vxfs -o nolargefiles /dev/vg02/rlvol1 Changing from a Large-Files File System You can change a file system back and forth between largefiles and nolargefiles using the HP System Management Homepage (HP SMH) or the fsadm command (shown below). To make the change using the HP System Management Homepage: 1. 2. 3.
VxFS file systems: Unlike HFS file systems, VxFS file systems can be switched between largefiles and nolargefiles without unmounting (and without requiring an fsck operation to verify file system state). However, as with HFS file systems, you must remove any large files (files with size greater than 2GB) from the file system before a switch between largefiles to nolargefiles will succeed. NOTE: largefiles and nolargefiles are mount options to file systems.
If no option is provided to mount, it will use the state of the file system itself to determine if it is mounted as largefiles or nolargefiles. NOTE: Changing VxFS file systems between largefiles and nolargefiles updates the mount attributes online (in the file /etc/mnttab). It does not update the file /etc/fstab. If you explicitly specify largefiles or nolargefiles in an fstab entry and the current attributes of the file system do not match, future mounts may fail.
(The -l option logs all commands sent to the ftpd server into syslog. The -d option logs debugging information into syslog.) • To disable the /etc/ftpd/ftpaccess file, specify the -A option for the ftp entry in the /etc/inetd.conf file. For example, ftp stream tcp nowait root /usr/lbin/ftpd ftpd -A -L -d The FTP configuration files enable you to define how ftp works, as described in the following table.
Creating an FTP Shutdown Message The ftpshut command allows you to create a shutdown message file that warns users before FTP shuts down. The FTP daemon checks this file at intervals to determine the shutdown time. (You must be superuser to execute ftpshut.) After the shutdown has occurred, you must enter the ftprestart command to remove all the shutdown message files from the real, anonymous, and virtual user accounts. These message files are created by the ftpshut utility.
Setting Up Virtual FTP Support Virtual FTP support allows you to manage an FTP server for two or more separate domains on the same machine. Using virtual FTP, you can configure systems so that user1 connecting via ftp to ftp.domain1.com gets one FTP banner and FTP directory, while user2 connecting via ftp to ftp.domain2.com gets another banner and directory. You can create a different set of configuration files ftpaccess, ftpconversions, ftphosts, ftpusers, and ftpgroups for each virtual FTP site.
computing environment, minimizing the downtime that can result from the loss of use of a specific server or some of its peripherals. This section deals with data backups. For additional information on the other ways of protecting your data (mentioned above), see Appendix A (page 205). There are many utilities to back up your data to offline media (for example, optical media or magnetic tape such as DLT cartridges). Table 3-3 compares several commonly used utilities based on many important backup criteria.
NOTE: To ensure against the possible destruction of your system and its data, store the backup media away from your system. Use Table 3-2: “Criteria for Selecting Media ” (page 124) to help you determine which storage device to use for your backups. This table compares the supported device types relative to each other; it does not give specific values. For detailed information, consult the documentation that came with your tape or disk drive for capacity information about the storage media.
For a detailed description, see the HP OpenView Omniback II Administrator’s Guide. Choosing an HP-UX Backup/Recovery Utility Table 3-3 compares several HP-UX backup utilities based on selected tasks. For details about specific commands, see the associated manpage. Table 3-3 A Comparison of HP-UX Backup/Recovery Utilities Task Backup Utility fbackup frecover cpio tar dump restore1 vxdump vxrestore2 Recover from tape Minimal data errors loss. Not possible. resync option causes some data loss.
Table 3-3 A Comparison of HP-UX Backup/Recovery Utilities (continued) Task Backup Utility fbackup frecover 126 cpio tar dump restore1 vxdump vxrestore2 Do an incremental backup Has a powerful Use find to multilevel locate new or backup. modified files. Possible on a Use the -u option to add single file system only. any new or modified files to the end of archive. Possible on a single file system only. List files as they are backed up or restored Possible. Use -v option.16 Possible.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 For High Performance File Systems (HFS) only. For remote systems, use rdump/rrestore For Journaled File Systems (JFS or VxFS).
Graph files Identify excluded files with the -e option to the fbackup command or with a graph file (described below) Graph files are text files that contain a list of directories and files to back up. If you use HP SMH to back up your system, HP SMH creates the graph files for you (in /etc/sam/br) using the included and excluded files. Graph files contain one entry per line. Entries that begin with the character i indicate included files; those that begin with the character e indicate excluded files.
This brings up the question, “how does fbackup know when the previous backup was created?” This information is contained in the file /var/adm/fbackupfiles/dates, a file that is updated only when all of the following conditions are true: • • • • The -u option is used with fbackup. A graph file is used to indicate which files should be included/excluded when a backup is performed.
Example of Setting Backup Levels Assume you want the following three backup levels: • • • Level 0 - full monthly backup Level 1 - weekly backup on Friday Level 2 - daily backup, except Friday There are three ways you can implement these levels: use HP SMH, enter the fbackup command and specify a backup level on the command line, or automate the commands (see “Setting Up an Automated Backup Schedule” (page 134)). The figure below illustrates the level numbers for implementing this example.
NOTE: As fbackup does its work, it will not back up files that are active (open) when it encounters them. For this reason, it is best to back up your system when there are few or no users logged in. If you can do so, you should change your system’s run-level to the system administration state (single-user mode) before using fbackup. This will insure that you are the only one logged in when the backup is run.
the online index, which is produced after the last volume has been written (the index created using the fbackup -I option). Also, fbackup assumes all files remaining to be backed up will fit on the current tape for the index contained on that media. Therefore, if you did not use the -I option on fbackup or removed the index file, extract an index from the last media of the set. Use the /usr/sbin/frecover utility to list the contents of the index at the beginning of a backup volume made with fbackup.
Because this will be a full backup, we’ll use the backup level 0. Any backup level would do as long as it is the lowest backup level in use. See “Backup Levels” (page 128) for details about how backup levels are interpreted by fbackup.
Backing Up Files on a Remote System If you are administering a workgroup, it is likely that only some of the systems in the workgroup will have storage devices such as tape drives or optical disk drives attached locally. In this situation you will need to perform remote backups.
NOTE: If you schedule fbackup using the crontab utility, be aware that fbackup is an interactive utility. If fbackup needs attention (tape change, device not online, and so on), it will prompt for input. If the input is not provided, an automated backup may fail or not complete. Creating an Automated Backup Schedule Use the crontab utility to specify an input file containing information about the backup procedures you want to automate.
3 4 * * 5 incrback >> fribackup 3 4 * * 6 fullback >> satbackupfull In the above example incrback and fullback are example shell scripts. Be sure to set the PATH variable appropriately or use complete paths to any scripts that you include in the crontab input file. Scripts like these may be used to: • • • • • Warn any users who are logged in that the system is going down (for backup purposes). Shutdown the system (to single user mode). Mount any file systems that you wish to back up.
Backing Up If You Are Using LVM If you are running LVM, you must maintain the backup configuration files for each volume group. After making changes to the configuration of the disks or the logical volumes within a given volume group, the vgcfgbackup command is run automatically to record the group’s configuration (vgcfgbackup saves the configuration of each volume group in /etc/lvmconf/volume_group_name.conf).
If a backup contains large files and an attempt is made to restore the files on a file system that does not support large files, the large files will be skipped. Backing Up a JFS Snapshot File System NOTE: Creating and backing up a JFS snapshot file system requires that you have the optional HP OnLineJFS product installed on your system. The Journaled File System (JFS) enables you to perform backups without putting the file system off-line.
3. Make and mount the snapshot file system. In the following example, a snapshot is taken of logical volume /dev/vg00/lvol4, contained in logical volume /dev/vg02/lvol1, and mounted on /tmp/house: mount -F vxfs -o snapof=/dev/vg00/lvol4 \ /dev/vg02/lvol1 /tmp/house See mount_vxfs(1M) for syntax. 4. Back up the snapshot file system with any backup utility except dump.
Ensure that your system can access the device from which you will restore the backup files. You might need to add a disk or tape drive to your system; refer to Configuring HP-UX for Peripherals for more information.
Restoring Large Files If you use fbackup to back up large files (> 2 GB), then those files can only be restored on a large file system. For instance, suppose that you back up a 64-bit file system containing large files; you cannot restore those files to a 32-bit file system that is not enabled for large files. If a backup contains large files and an attempt is made to restore the files on a file system that does not support large files, the large files will be skipped.
Recovering From a System Crash IMPORTANT: To protect your data, you should create a recovery plan to be used in the event of a system crash. You can create a recovery archive of an existing system using Ignite-UX.. To obtain the system recovery features and manpages, install Ignite-UX from the Application Release media and choose the bundle that matches your release. For detailed information, see the Installing and Updating Ignite-UX and HP-UX 11i v3 Installation and Update Guide.
• To extract a directory (and any of its sub-directories) tar x /users/me/mystuff • To restore all the files on the tape (write them back to disk): tar x NOTE: tar recreates the directories on the tape if they aren’t already on the system. How To: Determining What Version of the HP-UX Operating System is Running To determine what version of operating system you are running and on which platform, use the uname command with the -a option: uname -a HP-UX tavi B.11.
Scheduling a cron Job To schedule a job in cron (as root): 1. 2. Run the command: crontab -e root (you can replace root with a different user name to edit the respective user's crontab file). This will open an editor, allowing you to create or change crontab entries. Edit the entries as appropriate: Add an entry; for example, 0 12 * * * tar cv /work /home >/tarlog 2>&1 takes a tar backup of /work and /home every day at noon.
For example, suppose user thomas has a UID of 200 on system tmsystem1 and imports files to tmsystem2 where he has a UID of 330. If the files created on tmsystem1 have permissions of -rw-------, then they will not be accessible to him from tmsystem2. HP-UX determines file ownership by the UID, not by the user name. As system administrator, you should ensure that each new user login name has a corresponding UID that is unique within the workgroup, site, or network that the user needs to reach.
See “Adding a User to Several Systems: A Case Study” (page 146) for steps to create a home directory on a remote system. Adding a User to Several Systems: A Case Study The following example shows how to import Tom’s home directory and work directory from the file server, flserver, and import Emacs and Netscape from the application server, appserver.
1. On the file server,share Tom’s home directory (/home/tom) and the projects directory where he does his work (/projects/work): a. Add an entry to the /etc/dfs/dfstab file to share Tom’s home directory: share -F nfs -o -async,anon=65534 -d “home dir” /home/tom If the directory is already shared, simply add the user’s system to the access list. b.
3. On Tom’s system, wsb2600, do the following: a. Create Tom’s account. See HP-UX System Administrator’s Guide: Configuration Management. If Tom’s login has already been set up on another system (for example on flserver) you may want to cut the line from flserver’s /etc/passwd file and paste it into the /etc/passwd file on wsb2600 to ensure that Tom’s account has the same UID number on both systems. b. Create empty directories for the file systems to be imported. mkdir mkdir mkdir mkdir mkdir c.
2. On the remote system, do the following: a. Create an empty directory: mkdir /home/lisa b. Add entry to /etc/fstab : mailserver:wsj6700:/home/lisa /home/lisa nfs rw,suid 0 0 c. Mount all directories: mount -a See “Exporting a File System (HP-UX to HP-UX)” (page 149) for more information. Exporting a File System (HP-UX to HP-UX) Use either of the following procedures to set up NFS shares on the server.
NOTE: If no systems are specified for a particular file system, then all systems have permission to import the file system; if any systems are listed, then only those systems can import the file system. See dfstab(4) for more information. 4. Share the directories:. shareall -F nfs Moving Resources Moving a System This is a cookbook for moving a system from one subnet to another, changing the system’s host name, IP address, and Domain Name Server. NOTE: 1. Do steps 1-10 before moving the system.
Moving a Directory (within a File System) From time to time, a user needs to move a directory, say from /home/user to /work/project5. The following may be helpful as a cookbook. 1. cp -r /home/user/subdir /work/project5/subdir Do not create /work/project5/subdir first. 2. 3. 4. 5. 6. ll -R /home/user/subdir ll -R /work/project5/subdir Compare the output of the last two commands; if they match, proceed to the next step. rm -r /home/user/subdir Change permissions if necessary.
each server in the workgroup, and keep it up to date as you add and replace disks and modify the configuration. 1. 2. 3. Access the HP SMH Homepage. Select Tools → Disks and File Systems → Disks. This will display a list of the disks in the system. For each disk this screen shows you: • Hardware path (e.g., 1/0/0/3/0.6.0). • Usage (e.g., LVM). • Volume group (e.g., vg00). • The disk’s total capacity.
6. select the logical volumes one at a time to obtain similar detailed information for each logical volume. Clicking on the Volume Groups or File Systems tabs at the top of the page will display additional information such as overall storage available and file system distribution.
NOTE: bsize in the resulting output is the configured block size, in bytes, of the file system /work. But in JFS file systems, the configured block size determines only the block size of the direct blocks , typically the first blocks written out to a new file. Indirect blocks, typically those added to a file as it is updated over time, all have a block size of 8 kilobytes. See mkfs_vxfs(1M) for an explanation of each field in the output.
CAUTION: Before attempting these procedures, please read the manuals mentioned above. Turning off power to certain PCI slots can have disastrous effects; for example if the PCI slot connects to an unmirrored root or swap disk, the system will crash. Further, the I/O card itself needs to be checked for OL* functional compatibility as well as compatibility to the specific PCI slot; for example, you cannot insert a 33 MHz card to a slot running a 66 MHz bus.
directory contains an entry wy100, you have probably found the correct file. To be sure, examine the contents of the file with more. You will see a screen full of special characters, but near the beginning you will see wy100|100|wyse 100. This verifies the correct file and shows that you can refer to the Wyse 100 by any of the names wy100, 100, or wyse 100. If there is a terminfo file for the terminal you want to add, skip the next step and go to Step 4.
emulators such as HP AdvanceLink (running on a Vectra PC) or X Window terminal processes (such as hpterm and xterm). Also see “Other Terminal Problems” (page 161). Unresponsive Terminals There are many things that can cause a terminal not to respond (no characters are displayed except, perhaps, those which are displayed by the terminal’s local echo setting). Here is a procedure you can use to find many of them. 1. Check the status of the system.
from the terminal to the computer, it can be restarted by sending the computer an XON signal (type ctrl-q from the problem terminal’s keyboard). Sending the XON signal does not harm anything even if no XOFF signal was previously sent. If the problem is an application program that’s looping or not functioning properly, try pressing the break key and then try ctrl-C to see if you can get a shell prompt back (ctrl-C is the default interrupt character; you might use a different one).
ps -ef The output will look similar to this: UID root root root root root root stevem PID 95 94 22095 22977 14517 107 20133 PPID 1 0 1 1 1 1 1 C 0 0 0 0 0 0 0 STIME Jul 20 Jul 20 13:29:17 14:42:28 Jul 21 Jul 20 11:20:24 TTY ? tty0p5 ? ? ttyd1p4 ? ttyd2p5 TIME 0:00 0:00 0:00 0:00 0:01 0:00 0:00 COMMAND /usr/sbin/getty /usr/sbin/getty /usr/sbin/getty /usr/sbin/getty -csh [csh] /usr/sbin/getty -csh [csh] -h -h -h -h ttyd1p0 tty0p5 ttyd2p1 ttyd2p0 9600 9600 9600 9600 -h ttyd3p0 9600 Look in the col
If the file’s permissions are set to allow write access and the file isn’t displayed on the terminal, check the major and minor numbers of the device file. You can list them with the ll command. You can use the lssf command to interpret the major and minor numbers and display the results.
11. Other things to check. • Make sure yourinittab entries are active If you are just adding this terminal and have made a new entry in the /etc/inittab file by editing it, remember that this doesn’t automatically make your new entry active. To do that you need to, enter the command: init -q This tells the init process to scan the /etc/inittab file to update the information in its internal tables. • Check for functioning hardware. Now is the time to check the hardware.
on the screen. Garbage on the screen comes in two types: garbage intermixed with valid data characters and complete garbage. What to check for when garbage is mixed with valid data The following is a list of possible reasons for garbage characters intermixed with your valid data: • Noise on the data line: — RS-232 Cable too long (maximum recommended length is 50 feet) — Data cable near electrically noisy equipment (motors, etc.
4 Managing Printers NOTE: The term “plotter” can be used interchangeably with the term “printer” throughout this section. Thus, all features ascribed to printers can be performed with plotters. • • For conceptual information about print management, see HP-UX System Administrator’s Guide: Overview. For procedures to configure a print management system, see HP-UX System Administrator’s Guide: Configuration Management.
Using HP SMH 1. 2. Access the HP SMH homepage as root. Select Tools,Printer Management,Save or Restore Print Spooler Configuration. This will display a tool launching page. NOTE: If your client console is a PC, you must have an X Window Server running before executing this function. 3. Click on the Run button. This will display a printer management X Window. From the Actions pull-down menu, • Choose Stop Print Spooler to stop the LP spooler. HP SMH asks for confirmation before stopping the LP spooler.
Using HP-UX Commands To allow print requests to be sent to a printer or to a printer class, use the accept command. For example: /usr/sbin/accept laser1 jet2 lj See accept(1M) for details. To prevent print requests from being sent to a printer or printer class, use the reject command.
/usr/sbin/lpshut For more information, see “Stopping and Restarting the LP Spooler ” (page 163). 3. Set the printer’s fence priority (use a value from 0 to 7). For example: /usr/sbin/lpfence myprinter 5 4. Restart the LP spooler: /usr/sbin/lpsched Changing a Printer’s Default Request Priority 1. 2. Ensure that you have superuser capabilities. Stop the LP spooler: /usr/sbin/lpshut For more information, see “Stopping and Restarting the LP Spooler ” (page 163). 3. Change the priority.
Table 4-1 Additional Printing Tasks (continued) Task Example Additional Information Move all print requests lpshut from one printer lpmove lj1 lj2 destination to another. lpsched lj1 and lj2 are source and destination printers or printer classes. You must issue lpshut and lpsched. See lpmove(1M) and lpsched(1M). View the status of printers and print requests. For detailed status information on the spooler, print requests, and printers, use the -t option to lpstat. See lpstat(1).
Table 4-2 Printer Problems and Solutions (continued) Problem Solution Printing does not resume To restart a listing from the beginning: after paper jam or paper out. 1. Take printer offline 2. Issue the disable command 3. Clear jam or reload paper 4. Put printer online 5. Issue the enable command To restart a listing from the stopping point: 1. Take printer offline. 2. Clear jam or reload paper 3. Put printer online. 4.
Table 4-3 LP Spooler User Commands (continued) Command Description disable(1) Changes the status of a named printer to deactivate it and disable it from printing spooled requests. lpalt(1) Alters a printer request; issues a new request ID. LP administrators can change the configuration of the system, mark printers in and out of service, start and stop the system. Table 4-4 LP Administrator Commands Command Description lpshut(1M) Shuts down the printer scheduler.
Initializing the LP Spooler Before you can use the LP spooler, you must initialize it. Using HP SMH If you use HP SMH to add a printer, it will prompt you to initialize the LP spooler. Using HP-UX Commands You can use HP-UX commands to initialize the LP spooler by following these steps: 1. Add at least one printer to the LP spooler. See “Adding a Local Printer to the LP Spooler ” (page 170). 2. Tell the LP spooler to accept print requests for this printer.
3. Add the printer to the LP spooler. For example: /usr/sbin/lpadmin -plocal_printer -v/dev/lp -mHP_model -g7 See lpadmin(1M) for details on the options. See HP-UX System Administrator’s Guide: Overview for choices for the -m option. 4. If the printer being added will be the default printer, execute the following: /usr/sbin/lpadmin -dlocal_printer Allow print requests to be accepted for the newly added printer.
2. Select Tools, Printer Management, Configure Printers or Plotters. This will display a Tool Launch page. NOTE: If your client console is a PC, you must have an X Window Server running before executing this function. 3. 4. 5. 6. If needed, enter the address of the target display console. Click on the Run button. An X Window is displayed showing the printer configuration page. From the Action pulldown menu, choose AddRemotePrinter/Plotter ....
lpadmin -plocal_printer-v /dev/null -mrmodel \ -ormremote_machine -orpremote_dest-ocmrcmodel \ -osmrsmodel -ob3 See lpadmin(1M) for details on the options. Also see HP-UX System Administrator’s Guide: Overview for information to provide to the -m option. 4. Allow print requests to be accepted for the newly added remote printer. For example: /usr/sbin/accept local_printer 5. If the printer being added will be the default printer, execute the following: /usr/sbin/lpadmin -dlocal_printer 6.
12. Test the printer using the LP spooler, then check the LP spooler’s status. For example: lp -dlocal_printer /etc/passwd lpstat -t Adding a Network-Based Printer Using HP SMH You can use HP SMH to add a network-based printer that uses the HP JetDirect Network Interface.
5. Restart the LP spooler: /usr/sbin/lpsched Removing a Printer from the LP Spooler Using HP SMH 1. 2. Access the HP SMH homepage as root. Select Tools, Printer Management, Configure Printers or Plotters. This will display a Tool Launch page. NOTE: If your client console is a PC, you must have an X Window Server running before executing this function. 3. 4. If needed, enter the address of the target display console. Click on the Run button.
been removed and users try to send a request, they will see the message “Destination printer_name non-existent”. See “Controlling the Flow of Print Requests” (page 164). 6. (Optional): Determine if there are any jobs in the printer’s queue. For example: /usr/bin/lpstat -o laser1 7. (Optional): Disable the printer to be removed. For example: /usr/bin/disable -r"Printer laser1 is disabled.
For more information, see “Stopping and Restarting the LP Spooler ” (page 163). 3. Remove the printer from the class. For example: /usr/sbin/lpadmin -plaser1 -rclass 4. Restart the LP spooler: /usr/sbin/lpsched See lpshut(1M), lpadmin(1M), and lpsched(1M) for details on the command options. Removing a Printer Class See HP-UX System Administrator’s Guide: Overview to familiarize yourself with this concept. NOTE: You cannot use HP SMH to remove a printer class. Using HP-UX commands 1. 2.
5 Managing Software The following applications help you manage your applications and operating system software: • • • Software Distributor enables you to manage and distribute both operating system software and application software. See “Software Distributor (SD-UX)” below. Software Package Builder provides a visual method to create and edit software packages using the HP-UX Software Distributor (SD) package format. See “Software Package Builder (SPB)” (page 186).
Bundles Collections of filesets, possibly from several different products, encapsulated by HP for a specific purpose. All HP-UX 11.x operating system software is packaged in bundles. Example of a bundle is: HPUXMinRuntime B.11.31 English HP-UX Minimum Runtime Environment Products Collections of subproducts (optional) and filesets. The SD-UX commands focus on products but still allow you to specify subproducts and filesets.
Location of Software Software, packaged in SD-format, is stored in a depot. Any system can store one or more depots. A depot is a repository which holds all the needed pieces for installation of the software. You create a depot by copying software directly to it (using the SD-UXswcopy command) from either a tape or CD/DVD or by creating a software package within it (using the swpackage command). Before you can use the depot you must register it (using the swreg command).
The following table shows lists some of the other SD-UX functions.
To see all subsets belonging to a bundle or product, chooseOpen. You can do this when only one item is selected. To see a description of the item (if there is one), select the item and choose Show Description Of Software. To update all parts of your operating system with new software found on the update media, select Match What Target Has. NOTE: By default, swinstall does not reinstall filesets if the same revision already exists on your system.
The codeword for a particular software product is found on the DVD certificate which you receive from HP. It shows the codeword along with the customer ID for which the codeword is valid. One codeword usually unlocks all the products on a DVD which you have purchased. When an additional HP software product is purchased, an additional codeword will be provided by HP. Just enter the new codeword and customer ID and they will be merged with any previously entered codewords.
Table 5-2 Example Tasks and Commands Example Task Command To list the software installed at root (/) on your local system swlist To list the software in the depot named /mydepot swlist -d @ /mydepot To list the depots on appserver swlist -l depot @ appserver To list all files that are part of the LVM product swlist -l file LVM To list files using the SD-UX graphical user interface on 11.x swlist -i You can use HP SMH to list software: 1. 2. Access the HP SMH Homepage.
A local host is any system where software is to be installed or managed. A network host contains one or more depots and is connected to a network. It can act as a common software installation source for other network clients. You copy software from a depot to the network host. From the network host, you can copy software to systems as needed.
• • • With control scripts, further customize how the software is handled when installing or removing it on the destination system. Validate the PSF against packaging policies to ensure successful installation with the swpackage command and creation of an SD depot. Edit and validate the PSF automatically as part of the nightly build process using SPB’s command line interface. See Getting Started with Software Package Builder for more information.
/usr/sbin/swreg -l depot /cdrom 3. Copy all or part of the contents of the DVD to hard disk and use that as a network software depot. (It is better to copy too much than too little.
From there you can obtain a list of patches and their descriptions. You can also search for and download available patches. Other useful information about patches can be found at the following URLs: • • • http://devresource.hp.com/drc/STK http://software.hp.com http://itresourcecenter.hp.com (This URL requires a free registration.) Additionally, HP-UX Patch Management, a guide to patching HP-UX 11.x systems, can be found at http://docs.hp.com.
6 Managing System Performance This chapter provides some guidelines and suggestions for improving the performance of a system or workgroup. • • • • “Performance Bottlenecks” (page 191) “Guidelines” (page 192) “Measuring Performance” (page 194) “Making Changes” (page 197) Performance Bottlenecks A system may perform slowly or sluggishly for a variety of reasons, and you may need to do considerable investigation to determine the source of bottlenecks on a given system.
NOTE: Put your most frequently accessed information on your fastest disks, and distribute the workload evenly among identical, mounted disks so as to prevent overload on a disk while another is under-utilized. This can often be accomplished by moving swap areas and heavily accessed file systems off the root disk, or by using disk striping, LVM, and/or disk mirroring to spread I/Os over multiple disks. See also “Checking Disk Load with sar and iostat” (page 194).
• Enable asynchronous writes on shared file systems. See “Checking for Asynchronous Writes” (page 195). • Make sure enough nfsd daemons are running on the servers. As a rule, the number of nfsds running should be twice the number of disk spindles available to NFS clients. For example, if a server is sharing one file system, and it resides on a volume group comprising three disks, you should probably be running six nfsds on the server.
To compare memory use by the processes currently running, run ps -efl. Look under the SZ column of the resulting display. Measuring Performance The saying, “you can’t manage what you don’t measure,” is especially true of system and workgroup performance. Here are some ways to gauge your workgroup’s performance against the “Guidelines” (page 192) earlier in this section.
NOTE: For a JFS file system, you can use mkfs -m to see the parameters the file system was created with. But adjusting the client’s read/write buffer size to match is probably not worthwhile because the configured block size does not govern all of the blocks. See “Examining File System Characteristics” (page 153). • On the NFS client, use HP SMH to check read/write block size. Go to Tools, Disks and File Systems, File Systems and select each imported file system in turn to view read and write buffer sizes.
2. 3. Select Tools → Network Services Configuration → Networked File Systems → Share/Unshare File Systems (Export FS). The Share page will be displayed. Select the desired file system and a table of shared file properties will be displayed. Check to see that Asynchornous Writes are allowed. If needed you can change the setting of the Asynchronous Writes flag, while the file system is still mounted and shared. • Select View/Modify Shared (exported) File System...
server, try starting more nfsds; see “Increasing the Number of nfsd Daemons” (page 197). Checking for Network Overload with netstat -i If you have followed all the “Guidelines” (page 192) and are still seeing poor response time, the problem may be with the network itself - either with a particular piece of hardware or with the configuration of the network.
Defragmenting an HFS File System Defragmenting an HFS file system could improve throughput by reducing disk seek time. In practice, though, most experts believe it will usually make little or no difference to performance. You should do it only if you have good reason to believe, or have received expert advice, that your system will really benefit. NOTE: This applies only to HFS file systems. JFS file systems do need to be defragmented regularly. See “Defragmenting a JFS File System” (page 199).
Defragmenting a JFS File System • • • • “To defragment a JFS file system using HP SMH” (page 199) “To defragment a JFS file system using fsadm ” (page 199) “Daily Defragmentation ” (page 199) HP-UX System Administrator’s Guide: Configuration Management To maintain performance, particularly on file systems with very large files, JFS provides the means to reorder disk space to regain contiguous areas on which to write files. This process of defragmentation should be performed periodically.
NOTE: Tunable kernel parameters can be static or dynamic (not requiring a system reboot or kernel rebuild). The list of dynamic tunables is continually growing. To determine which tunables are dynamic on your system, use the kmtune command (see the kmtune(1M) manpage), or see the Kernel Configuration portion of HP SMH. In HP SMH’s Tunables screen. You can tell at a glance whether or not the value of a particular tunable can be changed without a reboot. Use the kctune command or the kcweb web interface.
• • HP patches On-demand support HP System Management Homepage (HP SMH) The HP System Management Homepage (HP SMH) tool allows you to perform many system administration tasks without having to know all the HP-UX commands involved. For more information on the HP SMH’s capabilities, use HP SMH's online help or see the manpage smh(1M). See also “System Management Homepage (Web-Based)” (page 24). To start HP SMH, launch a browser and enter the following http://system:2301/. A login screen will be displayed.
For complete and current information on HP OpenView products, service, and support, go to http://www.openview.hp.com. GlancePlus and GlancePlus Pak HP GlancePlus is a diagnostic performance tool which provides detailed immediate performance information about your system. It has built-in bottleneck alarms and zoom-in capabilities to make performance troubleshooting easier. The HP GlancePlus Pak combines the HP GlancePlus and HP MeasureWare products.
For more information see Support Plus: Diagnostics User’s Guide, and EMS Hardware Monitors User’s Guide on the Instant Information DVD or at http://docs.hp.com/hpux/systems/.
A Using High Availability Strategies High availability is the term used to describe computer systems that have been configured so as to minimize the percentage of time that they will be down or otherwise unavailable, and as a result, allow for the greatest degree of usefulness. High system availability is achieved by minimizing the possibility that a hardware failure or a software defect will result in a loss of the use of the system or in a loss of its data.
continue to work without interruption. The bad disk can be replaced at a more convenient time when the system can be brought down without causing problems. Once the system is rebooted, the mirroring software will cause the mirrored data to be copied back to the replacement disk and the process of mirroring will begin again. With three-way disk mirroring, two copies of each disk’s data are maintained.
Mirroring (RAID Level 1) In a RAID 1 configuration, all data is duplicated on two or more disks. In hardware mirroring, each disk has a “twin,” a backup disk containing an exact copy of its data. Some RAID 1 implementations duplicate not only the disks but the array controller and the power supply as well.
Pros and Cons You may not write to a RAID 3 array, except in full data stripe logical blocks. This limits application design flexibility and also the user’s ability to have different arrays run at different RAID levels on the same system. RAID 3 is not well suited for multiple process I/O (long or short) and is especially not suited for any application that requires a high I/O per second rate with any degree of randomness.
RAID 5 is a good choice where multitasking applications require a large history database with a high read rate, or a database that uses a normal or less-than-normal percentage of write operations, where writes are 33% or less of all I/O operations. RAID 5 provides consistently high performance for large input/output operations, greater or equal to 64 KB, but poor for smaller I/O sizes.
Using High Available Storage Systems (HASS) High Available Storage Systems (HASS) provide two internal SCSI busses, each with their own connectors, power cords, power supplies, and fans. This hardware redundancy, when combined with software ing, can prevent most single point of failure problems. HASS do not provide any RAID support on their own. Pros and Cons of HASS There are many advantages of systems protected by HASS.
have the software support that enables and controls the transfer of applications to another server or network after a failure. Serviceguard provides the following support: • In the case of LAN failure, Serviceguard transparently switches to a standby LAN. • In the case of a node failure, an application is automatically transferred from a failed processor to a functioning processor and in a minimum amount of time.
Serviceguard Advanced Tape Services (ATS) You can use shared tape devices in an Serviceguard cluster allowing high availability backups using tape libraries and tools such as Omniback. The ATS facility allows a two-node to four-node cluster to share standalone magnetic tape devices and/or tape library robotic devices. As a result, even after a package fails on one node, a backup of the package data continues or restarts on an alternate node.
several third-party database management systems. The master toolkit is a collection of specific product toolkits, which include the following: • HA Foundation Monitor toolkit, designed to monitor the status of an entire mission critical environment. • HA Internet toolkits for use with HP Domain server products. • Database toolkits for Oracle, Informix, Sybase, and Progress database management systems. HP Reference Enterprise Cluster Master Toolkit Version B.01.
The product consists of a set of configuration tools, a monitor that sends notification of cluster-down events, and a command that moves packages from one cluster to another. In addition, Continental Clusters includes the following components: • Cluster Object Manager, which provides the ability to query ServiceGuard cluster status. • A special package control script template to implement physical data replication between HP SureStore XP256 or HP512 disk arrays.
Index Symbols /etc/dfs/dfstab and nfsd, 150 /etc/inetd.conf, 173 /etc/services, 173 /stand/vmunix, 40, 44 /usr extending logical volume, 100 /usr/share/lib/terminfo/*, 155 /var/adm/fbackupfiles/dates, 128 /var/adm/inetd.
hpux, 67, 70 boot manager.
copying software, 187 dynamic tunable kernel parameters, 199 E early_cpu system self test, 72 EFI determining EFI disk partition, 53 full screen editor, 50 EFI Boot Manager, 41 setting boot paths, 47 setting the autoboot timeout, 42 EFI file system copying files from, 53 EFI shell changing autoexecute file, 48 configuring system self tests, 76 EDIT command, 50 manual boot, 41 map command, 44, 45, 49, 55 setting autoboot timeout, 43 setting the autoboot flag, 43 efi_cp, 53 EMS, 202 enable, 165, 167 environm
booting to single-user mode, 54 manually booting, 41 HP JetDirect, 174 HP SMH, 201 adding a disk, 96 adding a local printer, 170 adding a logical volume, 97 adding a remote printer, 171 adding LV with mirroring, 98 adding network-based printer, 174 adding printer, 170 asynchronous writes, 195 automated backup schedule, 134 diagramming server’s disks, 151 enabling or disabling a printer, 165 extending a logical volume, 99 order of printing, 165 print requests, 164 printer class, 174 removing a logical volume
lpcancel, 176 lpdmin, 177 lpfence, 166 lpmove, 166, 176, 177 lpsched, 166, 171 lpshut, 166, 174 LPspooler adding remote printer, 171 lpstat, 164, 166, 176, 177 lshut, 170, 172 lvdisplay, 53 LVM adding a directory from another system, 113 adding a disk, 96 adding a logical volume, 97 adding LV with mirroring, 98 backup, 137 configuration information, 70 diagramming system’s disks, 151 extending a logical volume, 99, 100 reducing a logical volume, 103 removing a logical volume, 108 removing a mirror, 109, 110
nfsstat -rc server overload, 196 non-HP terminals, 155 NONHPTERM fileset, 155 O OL*, 154 OL* (PCI), 92, 154 OnlineJFS resizing, 199 OpenView products, 201 operating system version, determining, 143 P panics when booting HP Integrity Servers, 39 panics.
retrieving index from tape, 132 to a new location, 141 restoring large files, 137 returning to last directory, 151 rlpdaemon, 173 rrestore, 124 run level checking, 143 run-level configuration, 80 runstate, 157 rvxdump, 124 rvxrestore, 124 S scheduling a cron job, 144 SELFTESTS system self test, 72 server diagramming disks, 151 measuring memory usage, 196 NFS, /etc/dfs/dfstab, 150 NFS, configuring, 149 NFS, configuring (HP SMH), 149 NFS, shareall -F nfs, 150 NFS,LVM examples, 95 overload, 196 performance, 1
Full_memory, 72 full_memory, 72 IO_HW, 73 late_cpu, 72 Memory_init, 73 PDH, 72 Platform, 72 SELFTESTS, 72 system self tests all, 79 bypassing, 70 configuring, 70 configuring from a booted system, 78 configuring from the Boot Console Handler, 75 configuring from the EFI shell, 76 definitions of, 72 FASTBOOT, 75 full_memory, 79 how system panics effect execution, 71 HP recommendations, 75 late_cpu, 79 T tape copying software, 188 tar, 124 examples, 142 scheduling (cron example), 144 tcio, 141 TERM, 155 termi