HP-UX System Administrator's Guide: Routine Management Tasks HP-UX 11i Version 3 HP Part Number: B3921-90023 Published: September 2010 Edition: 5
© Copyright 2010 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.......................................................................................................................................15 Publication History.............................................................................................................15 Conventions........................................................................................................................15 Intended Audience..................................................................
Changing the PRI, HAA, and ALT Boot Paths........................................................44 Setting the PRI, HAA, and ALT Boot Paths Using the HP-UX setboot Command:..........................................................................................................45 Setting the PRI, HAA, and ALT Boot Paths Using the Boot Option Maintenance Menu in the EFI Boot Manager:..........................................................................
Avoiding a Shutdown When Possible...........................................................................90 On-line Addition and Replacement of PCI Cards (OLA/R)....................................90 Configuring Dump Devices................................................................................................90 3 Managing Systems...................................................................................................................93 Managing Disks - Quick Reference Examples........
Choosing an HP-UX Backup/Recovery Utility......................................................123 Determining What Data to Back Up............................................................................125 Defining What Files and Directories to Back Up...................................................125 Determining How Often to Back Up Data..................................................................126 Full Backups vs. Incremental Backups.........................................................
Checking the System’s Run Level................................................................................141 Scheduling a cron Job..................................................................................................142 Adding Users to a Workgroup....................................................................................142 Accessing Multiple Systems...................................................................................142 Sharing Remote Work Directories...............
Removing a Printer from a Printer Class....................................................................174 Removing a Printer Class............................................................................................175 5 Managing Software................................................................................................................177 Software Distributor (SD-UX)...........................................................................................
Daily Defragmentation ..........................................................................................197 Configurable Kernel Parameters.................................................................................197 Configuring Kernel Tunable Parameters Using HP SMH.....................................198 Other Performance Management Tools............................................................................198 HP System Management Homepage (HP SMH)......................................
HP ServiceControl.......................................................................................................210 Index........................................................................................................................................
List of Figures 3-1 5-1 5-2 Adding a User to Several Systems............................................................................144 Sample DVD Certificate............................................................................................182 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 12 HP-UX 11i Releases.....................................................................................................18 Finding HP-UX Information and Documents.............................................................19 How autoboot and autosearch Flag Settings Affect the Boot Sequence.....................58 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:...................41 Setting the autoboot delay using the EFI Shell’s autoboot command:........................41 Enable Autoboot (using EFI Shell’s autoboot command)...........................................41 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.
it may be a hot link to the manpage itself. From the HP-UX command line, you can enter “man audit” or “man 5 audit” to view the manpage. See man(1). Book Title The title of a book. On the web and on the Instant Information DVD, it may be a hot link to the book itself. KeyCap The name of a keyboard key. Note that Return and Enter both refer to the same key. Emphasis Text that is emphasized. Emphasis Text that is strongly emphasized. Term The defined use of an important word or phrase.
HP-UX System Administrator’s Guide (volume list) Overview Provides a high-level view of HP-UX 11i, its components, and how they relate to each other. Configuration Management There are many sub-systems and system settings you can configure to customize the behavior of HP-UX to your needs. Configuration Management describes many of the customization tasks you need to perform.
• • Chapter 6: “Managing System Performance” (page 189) Appendix A: “Using High Availability Strategies” (page 201) HP-UX 11i Release Names and Release Identifiers With HP-UX 11i, HP delivers a highly available, secure, and manageable operating system that meets the demands of end-to-end Internet-critical computing. HP-UX 11i supports enterprise, mission-critical, and technical computing environments. HP-UX 11i is available on both PA-RISC systems and Intel® Itanium®-based systems.
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 using the HP Systems Insight Manager (HP SIM). [Multi-system Management] Directly on the system with the text-based HP-UX System Management Homepage (HP SMH) or via the web using the web-based HP SMH. Directly with HP-UX commands.
you can launch Virtualization Manager from HP SIM to display and manage your VSE resources. For information about HP Insight Dynamics — VSE, see HP Insight Dynamics Software HP-UX System Management Homepage (Web-Based) NOTE: Not all management functions can be performed using HP SMH. See volume one of the HP-UX System Administrator’s Guide: Overview for additional information. The HP-UX System Management Homepage (HP SMH) is a web-based interface for managing one HP-UX system at a time.
HP-UX Commands HP-UX commands provide you with the finest granularity of access to system configuration, but you must 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. In other cases, such as tweaking non-password data in the password file, it is just easier to run a command such as vipw.
(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. • Authenticated Commands (PAM) Configure Account Authentication Configure Password Authentication Configure Session Authentication Configure User Authentication See “Authenticating Users with PAM” in HP-UX System Administrator’s Guide: Security Management.
Event Viewer • Kernel Configuration Alarms Modules Tunables See “Configuring the Kernel in the HP-UX System Administrator’s Guide: Configuration Management.
See “Configuring Printers” in the HP-UX System Administrator’s Guide: Configuration Management. • Resource Management Event Monitoring Service See “Configuring Printers” in the HP-UX System Administrator’s Guide: Configuration Management. • Resource Monitors Monitor Configuration X Server Configuration • Security Attributes Configuration Local Users or NIS Users System Defaults See “Configuring Peripherals” in the HP-UX System Administrator’s Guide: Configuration Management.
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 webpage 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 webpage for HP SMH. Enter a valid HP SMH login name (for example, root) and the password.
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). — n - NIS USers Configure per-user values of security attributes of NIS users (if NIS is 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 35) — “Booting HP-UX on HP Integrity Servers: Details and Variations” (page 36) — “Booting HP-UX on HP 9000 (PA-RISC) Systems: Details and Variations” (page 56) — “Speeding the Boot: SpeedyBoot” (page 69) • • “Customizing Start-up and Shutdown” (page 79) “Shutting Down Systems” (page 82) — “Types of Shutdown” (page 83) — “Special Considerations for Shutting Down Certain Systems” (page 88) — “Avoidi
A new feature, the Storage Enclosure Framework feature, has been added to this release. The Storage Enclosure Framework enables HP-UX to identify enclosures attached to the system and to identify the LUNs, lunpaths, target paths, and target ports associated with an enclosure. For more information about the Storage Enclosure Framework, see scsimgr(1M) For more information about the mass storage stack, see the Next Generation Mass Storage Stack white paper.
covers the boot process more thoroughly because there are times when you need to manually control the boot process; for example: • When you need to boot your system from a device other than the device from which you normally boot. • When you need to boot your system from a kernel file other than the kernel file from which you normally boot. • When you need to boot the system into Single-User Mode to ensure that special tasks you are doing are not affected by other users of the system.
3. Boot device selection: Your system (or the nPartition you are booting) must locate a kernel file from which to boot. There are two parts to the search: Part 1 determine the hardware path to the boot device Part 2 determine which kernel file on the hardware path to boot (see Step 4) Path variables stored in non-volatile memory set up to three possible boot paths from which to attempt a boot: PRI The PRImary boot path is the first boot path to try.
Automatic Versus Manual Booting Whether your system boots automatically (providing for the option of unattended booting in the case of a power failure or other unexpected boot situations) or requires manual intervention is determined by several things, most notably: • the setting of the autoboot flag in non-volatile memory • whether an AUTO file is present in the EFI partition on the selected boot device • whether you intend to boot from your system’s primary boot device • whether your primary boot device (
• • • Specify a boot device (other than that which would be automatically used) Specify a boot kernel file (other than that which would be automatically used) View or adjust your system’s pre-boot settings At this point, you can select a device from which to boot using the options provided in the EFI Boot Manager’s main menu, or you can choose to interact with the EFI shell to boot your system.
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.
NOTE: On partitionable systems, the default is not to search all cells and their interface cards for devices, this is done to allow the boot process to proceed faster. If the device from which you want to boot is not attached to an I/O card on the core cell, you must use the search command at the EFI prompt to allow you to find additional devices on other cells and I/O slots.
3. Make sure the selected boot device is the one that contains the kernel file from which you want to boot. If you are not sure: a. Enter map at the EFI shell prompt to list bootable devices on your system. The devices will be listed with entries that begin with fs#: (where # is a number such as 0, 1, 2, 3, etc.).
Setting the PRI, HAA, and ALT Boot Paths Using the HP-UX setboot Command: When you use setboot to configure the first (PRI), second (HAA), or third (ALT) item in the boot options list, the new device path that you specify either replaces the original boot option, or it is inserted in the original’s place (with the original item being shifted toward the end of the boot options list): □ If the boot option is currently not set to an HP-UX device, the new boot device path is inserted as a new item in the boot
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.
your PRI, HAA, and ALT boot paths (and any additional boot paths you want to add to the list): Add a Boot Option Presents you with a list of possible boot devices and allows you to select one to add to your boot options list 3.
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 Specifies to boot from the named kernel file. For example: setauto boot testvmunix creates an AUTO file that contains only the boot testvmunix command. boot option kernel 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 36). 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).
3. boottest testname on Enable the specified test (testname). For example: boottest io_hw on enables the boot-time I/O hardware self tests. boottest testname off 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.
NOTE: The -t option (lowercase t) is supported only on HP 9000 Systems. To change SpeedyBoot settings for all subsequent boots on an HP Integrity Server, use the pre-boot environment, the EFI shell. See “Configuring Boot-Time System Tests from the EFI Shell (HP Integrity Servers Only)” (page 75) for details. -T testname=value Change the value for the test testname for the next system boot only. The changes are reflected in the Next Boot column of the SpeedyBoot table.
---all SELFTESTS early_cpu late_cpu FASTBOOT full_memory PDH CEC ------off off off off off off off off --------partial yes yes yes yes yes yes no ------partial on on on on on on off --------off off off off off off off off Now, let us change the previous to set the normal boot to do only the late_cpu and the full_memory tests, skipping the slower early_cpu tests and the PDH tests: # setboot -t late_cpu=on -t full_memory=on -v Primary bootpath : 10/0.0.0 Alternate bootpath : 10/12/5.0.
are prompted to log in, but occasionally, if something has gone wrong (for example if a critical subsystem has failed to start for some reason) you may want to abort the boot. You can do this by entering Control-| CAUTION: You should now shut down the system immediately. Customizing Start-up and Shutdown This section explains how to make applications and services start automatically on boot and stop on shutdown. To automate starting and stopping a subsystem you need to do all of the following: 1.
differences in start-up/shutdown configuration between the test system and the production system may invalidate the test. Example: This example shows one way to automate the start-up of a server daemon, called web_productname_daemon: 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.
'start_msg') # message that appears in the startup checklist echo "Starting the web_productname daemon" ;; 'stop_msg') # message that appears in the shutdown checklist echo "Stopping the web_productname daemon" ;; 'start') # 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.
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 89) — “NFS File Server” (page 89) — “NFS Client” (page 90) • “Avoiding a Shutdown When Possible” (page 90) 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)) — notifies only 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, see 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 90).
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. See 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 107) “Removing a Mirror from a Logical Volume” (page 109) “Moving a Directory to a Logical Volume on Another System” (page 111) Adding a Disk to a Volume Group For detailed information and instructions about adding a disk, see HP-UX System Administrator's Guide: Logical Volume Management. What follows is a quick reference; we’ll be using HP SMH. 1. Shut down and power off the system.
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 PE entry 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 “Using High Availability Strategies” (page 201). There are many utilities to back up your data to offline media (for example, optical media or magnetic tape such as DLT cartridges).
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.
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 some HP-UX Backup/Recovery Utilities Task Backup Utility fbackup frecover cpio tar dump restore1 vxdump vxrestore2 Recover from tape Minimal data errors loss. resync option causes some data loss. Not possible. Skips over bad Skips over bad tape. tape. Efficient use of tape Medium. Low.
Table 3-3 A Comparison of some HP-UX Backup/Recovery Utilities (continued) Task Backup Utility fbackup frecover 124 cpio tar dump restore1 vxdump vxrestore2 Use the -u option to add any new or modified files to the end of archive. Possible on a single file system only. Possible on a single file system only. Possible. Use -v Possible. Use option.17 the -v option. Possible (on a restore only). Possible (on a restore only). Do a backup Not 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).
• Included Files Included files are directories and files to include in your backup. When you specify a directory, all of the files and subdirectories are included in the backup. Identify includes files with the -i option of the fbackup command or with a graph file (see the following definition). • Excluded files Excluded files are files within your included directories to excluded from the backup. In other words, they are the exceptions.
NOTE: A full backup does not mean a backup of every file on your system. It means a backup of every file on your include list, regardless of when it was last backed up. To ensure consistency, do not modify or use different graph files between full and incremental backups. Other backup utilities, such as tar, cpio, and pax, do not support the concept of incremental backups, but can maintain timestamp data for files in the archives they make.
distinguish between the two types of incremental backup. This is accomplished with backup levels. The file /var/adm/fbackupfiles/dates contains information about when the last backup at each backup level was performed. This information is used by fbackup, along with the modification date stamps on the files themselves, to determine when files in the specified set are to be included with the backup that is currently being created. As previously stated, you can have up to 10 backup levels.
Backing Up Your Data Using the fbackup Command The /usr/sbin/fbackup command is the recommended HP-UX backup utility.
Creating the Index File on the Local Device If you use the fbackup command, an index is written at the beginning of each tape listing all files in the graph file being backed up. However, since this index is written before the files are actually backed up, if a file is removed after the index is written but before the file is backed up to tape (or something else happens that prevents the file from being backed up), the index will not be completely accurate.
This example will back up the entire structure except the invoices directory. The device file for this example is /dev/rmt/1h, specified using the -f option. For this example, we need to plan for the incremental backup (next example), so we must do three things: 1. Use a graph file to specify which files will be included/excluded. 2. Specify the -u option to update the file /var/adm/fbackupfiles/dates. 3. Specify a backup level. Because this will be a full backup, we'll use the backup level 0.
For ecample, to back up every file on the entire system to the two magnetic tape drives represented by device files, /dev/rmt/0m and /dev/rmt/2,m, enter: fbackup -f /dev/rmt/0m -f /dev/rmt/1m -i / -I /tmp/index You would typically use both tape drives in the same tape density mode. 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.
If you use HP-UX commands, you can automate your backup procedure using the crontab utility, which uses with cron, the HP-UX process scheduling facility. For details, see cron(1M) and see crontab(1). Creating an Automated Backup Schedule Use the crontab utility to specify an input file containing information about the backup procedures you want to automate.
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. Run fbackup to perform the actual backup. Return the system to multiuser operating mode.
to record the group’s configuration (vgcfgbackup saves the configuration of each volume group in /etc/lvmconf/volume_group_name.conf). To ensure recovery of LVM information following disk corruption, you must back up both the /dev and /usr directories. Include the /usr directory in the root volume group during your backup. If, however, the /usr directory was not originally part of the root volume group, you can still create a new logical volume in the root volume group and move the /usr directory within it.
Backing Up a VxFS Snapshot File System NOTE: Creating and backing up a VxFS snapshot file system requires that you have the optional Veritas File System (HP OnLineJFS) product installed on your system. The Journaled File System (JFS) enables you to perform backups without putting the file system off-line. You do this by making a snapshot of the file system, a read-only image of the file system at a moment in time. The primary file system remains online and continues to change.
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.
Before Restoring Your Data Gather the following information and materials before you begin: • • • • A list of files you need to restore The media on which the data resides The location on your system to restore the files (original location or relative to some other location) The device file corresponding to the backup device used for restoring the files Restoring Your Data Using HP SMH You can use HP SMH or HP-UX commands to restore data. Generally, HP SMH is simpler than HP-UX commands.
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 144) 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, flserver, 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 147) 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.
Diagramming a System’s Disk Usage It’s useful (and in some circumstances essential) to have a hardcopy diagram of a system’s disks and how they are used. You should create such a diagram at least for 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.
to add the model number (e.g., HP C3010) and device driver name (for example, SCSI). 5. 6. You can get information on the logical volumes by clicking on the Logical Volumes tab at the top of the page. This will display a list of logical volumes. You can then select the logical volumes one at a time to obtain similar detailed information for each logical volume.
NOTE: bsize in the resulting output is the configured block size, in bytes, of the file system /work. But in VxFS 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.
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. If there is no terminfo file for the terminal you want to add, you will need to create one. See the next step for details. 3. To create a terminfo file, follow the directions in terminfo(4). To adapt an existing file, follow these steps: a. b. Log in as superuser.
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. Is the system still up? If not, you’ve probably found your problem. You will need to reboot the system. Is the system in single user state? If so, the only active terminal will be the system console.
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).
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 COMMAND 0:00 /usr/sbin/getty 0:00 /usr/sbin/getty 0:00 /usr/sbin/getty 0:00 /usr/sbin/getty 0:01 -csh [csh] 0:00 /usr/sbin/getty 0:00 -csh [csh] -h -h -h -h ttyd1p0 tty0p5 ttyd2p1 ttyd2p0 9600 9600 9600 9600 -h ttyd3p0 9600 Look in the column marke
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 161). 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 161). 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 168). 2. Tell the LP spooler to accept print requests for this printer.
/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. For example: /usr/sbin/accept local_printer See “Controlling the Flow of Print Requests” (page 162) for information on accept. 5.
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 162). 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 161). 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 184).
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, Patch Management User Guide for HP-UX 11.x Systems, a guide to patching HP-UX 11.x systems, can be found at HP-UX Core Docs.
6 Managing System Performance This chapter provides some guidelines and suggestions for improving the performance of a system or workgroup. • • • • “Performance Bottlenecks” (page 189) “Guidelines” (page 190) “Measuring Performance” (page 192) “Making Changes” (page 195) 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 192).
• Enable asynchronous writes on shared file systems. See “Checking for Asynchronous Writes” (page 193). • 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 190) earlier in this section.
NOTE: For a VxFS 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 151). • On the NFS client, use HP SMH to check read/write block size.
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 195). Checking for Network Overload with netstat -i If you have followed all the “Guidelines” (page 190) 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. VxFS file systems do need to be defragmented regularly. See “Defragmenting a VxFS File System” (page 197).
Defragmenting a VxFS File System • • • • “To defragment a VxFS file system using HP SMH” (page 197) “To defragment a VxFS file system using fsadm ” (page 197) “Daily Defragmentation ” (page 197) HP-UX System Administrator’s Guide: Configuration Management To maintain performance, particularly on file systems with very large files, VxFS 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 23). To start HP SMH, launch a browser and enter the following http://system:2301/. A login screen will be displayed.
• • • VantagePoint Network Management Security Management For complete and current information on HP Operation Center products go to the following website:http://www.operations.com. HP GlancePlus Pak Software HP GlancePlus Pak 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.
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.
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. This strategy is even more robust than two-way mirroring which is described above and it eliminates the need to bring the system down at all in order to replace a bad disk.
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 mirroring, 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 . 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, 148 /etc/inetd.conf, 171 /etc/services, 171 /stand/vmunix, 38, 43 /usr extending logical volume, 98 /usr/share/lib/terminfo/*, 153 /var/adm/inetd.
High-Availability Alternate, 38, 44, 56, 61 primary, 38, 44, 56, 61 setting, 44, 61 boot sequence on HP 9000 Systems, 56 on HP Integrity Servers, 36 standard, 37, 56 booting accelerating, 69 automatic versus manual, 38, 57 breaking out of boot screen, 78 from an alternate boot source, 41 from an alternate device, 42, 64 from an alternate kernel file, 43, 44, 66 HP 9000 Systems, 56 HP Integrity Servers, 36 LVM maintenance mode, 55, 69 primary boot path, 66 single-user mode, 53, 68, 88 SpeedyBoot, 69 boottest
full screen editor, 49 EFI Boot Manager, 39 setting boot paths, 46 setting the autoboot timeout, 40 EFI file system copying files from, 52 EFI shell changing autoexecute file, 47 configuring system self tests, 75 EDIT command, 49 manual boot, 40 map command, 42, 44, 48, 54 setting autoboot timeout, 41 setting the autoboot flag, 41 efi_cp, 52 EMS, 200 enable, 163, 165 environment variable PATH, 86 TERM, 153, 154 Event Montoring Service, 200 extending a logical volume HP SMH, 97 extending logical volume comma
order of printing, 163 print requests, 162 printer class, 172 removing a logical volume, 106 removing a mirror from a logical volume, 107, 108 sharing file system, 147 stopping and restarting the LP spooler, 161 web client, 26 HP System Insight Manager, 21 HP System Management Homepage (see HP SMH) web-based, 23 HP-UX supported architectures, 35 HP-UX commands, 23 HP-UX runstate, 155 HP-UX System Management Homepage text-based, 22 web-based, 22 hpux, 69 hpux.
extending a logical volume, 97, 98 reducing a logical volume, 101 removing a logical volume, 106 removing a mirror, 107, 108 LVM maintenance mode, 55, 69 M machine model, determining, 141 mail server shutting down, 88 maintenance mode (LVM), 55 major number, 157 managing large files, 114 manual booting using the EFI shell, 40 map, 44, 48, 54 measuring performance, 192 memory usage (vmstat), 194 Memory_init system self test, 72 minor number, 157 mirroring adding logical volume with, 96 removing from logical
default setting, 86 PCI OL*, 90, 152 PDH system self test, 71 performance asynchronous writes, 193 file system defragmenting, 195 guidelines, 190 improvement, 193 increasing number of nfsd daemons, 195 measuring, 192 memory usage, 194 network overload, 195 socket overflows, 194 system, 189 peripherals adding, 152 local printer, 168 network-based printer, 172 permissions changing for a subtree, 149 Platform system self test, 71 plotters features, 161 popping the directory stack, 149 POSIX shell environment v
NFS,LVM examples, 93 overload, 194 performance, 189 performance, measuring, 192 sharingl home directories, 144 socket overflows, 194 Serviceguard, 206 setboot, 53, 73, 76, 77, 78 setting boot paths, 45, 61, 63 setting the autoboot flag, 41, 60 setting the autosearch flag, 61 setting up network host depot, 185 share sharing new file systems, 148 SharedPrint when adding a local printer, 168 sharing home directories (server), 144 HP SMH, 147 HP-UX commands, 147 HP-UX to HP-UX, 147 local home directory, 146 mov
T tape copying software, 186 tar, 122 examples, 140 scheduling (cron example), 142 tcio, 139 TERM, 153 terminal configuration, 156 terminal, resetting, 156 terminals, 154, 159 /usr/share/lib/terminfo/*, 153 creating a terminfo file, 154 non-HP, 153 terminating processes, 156 terminfo creating a new file, 154 files, 153 tic, 154 timeout autoboot, 40, 56 troubleshooting network overload, 195 performance, 192 printer problems, 165 tunable parameters, 197 U uid issues in a workgroup, 143 unclean shutdowns, 87