HP-UX System and Network
Administration I
H3064S J.00
Student guide
2 of 3
Use of this material to deliver training without prior written permission from HP is prohibited.
HP-UX System and Network
Administration I
H3064S J.00
Student guide
2 of 3
Use of this material to deliver training without prior written permission from HP is prohibited.
© Copyright 2010 Hewlett-Packard Development Company, L.P.
The information contained herein is subject to change without notice. The only warranties for HP products
and services are set forth in the express warranty statements accompanying such products and services.
Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for
technical or editorial errors or omissions contained herein.
This is an HP copyrighted work that may not be reproduced without the written permission of HP. You may
not use these materials to deliver training to any person outside of your organization without the written
permission of HP.
UNIX® is a registered trademark of The Open Group.
X/Open® is a registered trademark, and the X device is a trademark of X/Open Company Ltd. in the UK
and other countries.
Export Compliance Agreement
Export Requirements. You may not export or re-export products subject to this agreement in violation of
any applicable laws or regulations.
Without limiting the generality of the foregoing, products subject to this agreement may not be exported,
re-exported, otherwise transferred to or within (or to a national or resident of) countries under U.S.
economic embargo and/or sanction including the following countries:
Cuba, Iran, North Korea, Sudan and Syria.
This list is subject to change.
In addition, products subject to this agreement may not be exported, re-exported, or otherwise transferred
to persons or entities listed on the U.S. Department of Commerce Denied Persons List; U.S. Department of
Commerce Entity List (15 CFR 744, Supplement 4); U.S. Treasury Department Designated/Blocked
Nationals exclusion list; or U.S. State Department Debarred Parties List; or to parties directly or indirectly
involved in the development or production of nuclear, chemical, or biological weapons, missiles, rocket
systems, or unmanned air vehicles as specified in the U.S. Export Administration Regulations (15 CFR
744); or to parties directly or indirectly involved in the financing, commission or support of terrorist
activities.
By accepting this agreement you confirm that you are not located in (or a national or resident of) any
country under U.S. embargo or sanction; not identified on any U.S. Department of Commerce Denied
Persons List, Entity List, US State Department Debarred Parties List or Treasury Department Designated
Nationals exclusion list; not directly or indirectly involved in the development or production of nuclear,
chemical, biological weapons, missiles, rocket systems, or unmanned air vehicles as specified in the U.S.
Export Administration Regulations (15 CFR 744), and not directly or indirectly involved in the financing,
commission or support of terrorist activities.
Printed in the US
HP-UX System and Network Administration I
Student guide (2 of 3)
September 2010
Contents
Module 9 — Managing Swap Space
9–1. SLIDE: HP-UX Memory Concepts .......................................................................................... 9-2
9–2. SLIDE: HP-UX Swap Concepts............................................................................................... 9-4
9–3. SLIDE: HP-UX Swap Types..................................................................................................... 9-6
9–4. SLIDE: HP-UX Pseudoswap.................................................................................................... 9-8
9–5. SLIDE: Enabling Swap from the Command Line ............................................................... 9-10
9–6. SLIDE: Enabling Swap via /etc/fstab............................................................................ 9-14
9–7. SLIDE: Monitoring Swap Space ........................................................................................... 9-16
9–8. SLIDE: Disabling Swap.......................................................................................................... 9-19
9–9. SLIDE: Guidelines for Selecting Device Swap Areas......................................................... 9-21
9–10. SLIDE: Guidelines for Selecting File System Swap Areas .............................................. 9-23
9–11. LAB: Managing Swap Space................................................................................................ 9-24
9–12. LAB SOLUTIONS: Managing Swap Space......................................................................... 9-27
Module 10 ⎯ Maintaining Logical Volumes and File Systems
10–1. SLIDE: Maintaining Logical Volumes and File Systems .................................................. 10-2
10–2. SLIDE: Defragmenting a File System................................................................................. 10-3
10–3. SLIDE: Repairing a Corrupted File System....................................................................... 10-6
10–4. SLIDE: Monitoring File System Free Space.................................................................... 10-10
10–5. SLIDE: Reclaiming Wasted File System Space............................................................... 10-12
10–6. SLIDE: Extending a Volume Group ................................................................................. 10-14
10–7. SLIDE: Extending a Logical Volume................................................................................ 10-17
10–8. SLIDE: Extending a File System ...................................................................................... 10-19
10–9. SLIDE: Reducing a File System ........................................................................................ 10-21
10–10. SLIDE: Reducing a Logical Volume ............................................................................... 10-23
10–11. SLIDE: Removing a Logical Volume .............................................................................. 10-24
10–12. SLIDE: Reducing a Volume Group ................................................................................. 10-26
10–13. SLIDE: Removing a Volume Group................................................................................ 10-28
10–14. SLIDE: Removing a Physical Volume ............................................................................ 10-30
10–15. LAB: Maintaining Logical Volumes and File Systems.................................................. 10-32
10–16. LAB SOLUTIONS: Maintaining Logical Volumes and File Systems........................... 10-39
Module 11 ⎯ Preparing for Disasters
11–1. SLIDE: Disaster Recovery Concepts ................................................................................. 11-2
11–2. SLIDE: Part 1: Mirroring the Boot Disk............................................................................. 11-4
11–3. SLIDE: Mirroring Concepts................................................................................................. 11-5
11–4. SLIDE: Part 2: Dynamic Root Disks................................................................................... 11-7
11–5. SLIDE: DRD Concepts......................................................................................................... 11-8
11–6. SLIDE: Using DRD Clones to Minimize Unplanned Downtime...................................... 11-9
11–7. SLIDE: Using DRD Clones to Minimize Planned Downtime......................................... 11-10
11–8. SLIDE: Installing DRD ....................................................................................................... 11-11
11–9. SLIDE: Using the drd Command ..................................................................................... 11-12
11–10. SLIDE: Creating a DRD Clone ........................................................................................ 11-15
11–11. SLIDE: Synchronizing a DRD Clone .............................................................................. 11-19
11–12. SLIDE: Verifying the DRD Clone’s Status ..................................................................... 11-22
11–13. SLIDE: Accessing Inactive Images via DRD-Safe Commands .................................... 11-24
11–14. SLIDE: Managing Software via DRD-Safe Commands ................................................ 11-26
http://education.hp.com
H3064S J.00
i
© 2010 Hewlett-Packard Development Company, L.P.
Contents
11–15.
11–16.
11–17.
11–18.
11–19.
11–20.
11–21.
11–22.
11–23.
11–24.
11–25.
11–26.
11–27.
11–28.
SLIDE: Managing Kernel Tunables via DRD-Safe Commands ....................................11-31
SLIDE: Accessing Inactive Images via Other Commands............................................11-34
SLIDE: Activating and Deactivating an Inactive DRD Image ......................................11-38
SLIDE: Part 3: Ignite-UX Recovery Tools ......................................................................11-41
SLIDE: make_*_recovery Concepts.........................................................................11-42
SLIDE: Customizing the make_*_recovery Archive Contents .............................11-43
SLIDE: Creating a make_tape_recovery Archive...................................................11-46
SLIDE: Creating a make_net_recovery Archive....................................................11-48
SLIDE: Using a make_*_recovery Archive...............................................................11-51
SLIDE: Interacting with the Recovery Process.............................................................11-55
TEXT PAGE: System Recovery Checklist .....................................................................11-57
TEXT PAGE: For Further Study .....................................................................................11-58
LAB: Creating and Managing DRD Clones ....................................................................11-59
LAB SOLUTIONS: Creating and Managing DRD Clones..............................................11-62
Module 12 — Accessing the System Console
12–1. SLIDE: Introducing the MP..................................................................................................12-2
12–2. SLIDE: Viewing the Console/MP Ports ..............................................................................12-5
12–3. SLIDE: Connecting MP Serial Ports ...................................................................................12-7
12–4. SLIDE: Connecting the MP LAN Port.................................................................................12-9
12–5. SLIDE: Accessing the MP ..................................................................................................12-10
12–6. SLIDE: Navigating the MP Core Menus (Older)..............................................................12-11
12–7. SLIDE: Navigating the MP Core Menus (Newer)............................................................12-13
12–8. SLIDE: Navigating the MP Web Interface........................................................................12-15
12–9. SLIDE: Accessing an nPar Console Interface .................................................................12-17
12–10. SLIDE: Accessing a vPar Console Interface..................................................................12-19
12–11. SLIDE: Accessing an Integrity VM Console Interface ..................................................12-20
12–12. SLIDE: Accessing the MP Virtual Front Panel ..............................................................12-22
12–13. SLIDE: Accessing the MP Console Log..........................................................................12-25
12–14. SLIDE: Accessing the MP Event Log..............................................................................12-27
12–15. SLIDE: Accessing the MP Help Menu ............................................................................12-30
12–16. SLIDE: Accessing the MP Command Menu...................................................................12-32
12–17. SLIDE: Configuring the MP LAN Interface....................................................................12-35
12–18. SLIDE: Enabling MP Remote Access .............................................................................12-39
12–19. SLIDE: Managing MP User Accounts .............................................................................12-41
12–20. SLIDE: Managing MP User Access Levels .....................................................................12-43
12–21. SLIDE: Managing MP Login Sessions.............................................................................12-45
12–22. SLIDE: Rebooting via the MP..........................................................................................12-48
12–23. LAB: Accessing the System Console via the MP...........................................................12-51
12–24. LAB SOLUTIONS: Accessing the System Console via the MP...................................12-56
Module 13 — Booting PA-RISC Systems
13–1. SLIDE: HP-UX Shutdown and Reboot ...............................................................................13-2
13–2. SLIDE: PA-RISC Boot Process Major Players ...................................................................13-6
13–3. SLIDE: PA-RISC Boot Disk Structures...............................................................................13-8
13–4. SLIDE: PA-RISC Boot Process Overview ........................................................................13-10
13–5. SLIDE: Autoboot versus Manual Boot .............................................................................13-12
13–6. SLIDE: Interacting with the BCH......................................................................................13-13
13–7. SLIDE: Interacting with the ISL/IPL .................................................................................13-17
13–8. LAB: Booting PA-RISC Systems........................................................................................13-20
13–9. LAB SOLUTIONS: Booting PA-RISC Systems.................................................................13-27
H3064S J.00
ii
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Contents
Module 14 ⎯ Booting Integrity Systems
14–1. SLIDE: HP-UX Shutdown and Reboot ............................................................................... 14-2
14–2. SLIDE: Part 1: Integrity Boot Process Concepts .............................................................. 14-6
14–3. SLIDE: Integrity Boot Process Major Players................................................................... 14-7
14–4. SLIDE: Integrity Boot Disk Structures .............................................................................. 14-9
14–5. SLIDE: Integrity Boot Disk System Partition Structure ................................................ 14-12
14–6. SLIDE: Integrity Boot Disk OS Partition Structure........................................................ 14-15
14–7. SLIDE: Integrity Boot Disk HPSP Structure ................................................................... 14-17
14–8. SLIDE: PARISC/Integrity Boot Process Comparison .................................................... 14-19
14–9. SLIDE: Part 2: EFI Addressing Concepts ........................................................................ 14-21
14–10. SLIDE: EFI Address Overview ....................................................................................... 14-22
14–11. SLIDE: SCSI EFI Hardware Addresses.......................................................................... 14-24
14–12. SLIDE: FC EFI Hardware Addresses ............................................................................. 14-28
14–13. SLIDE: Viewing EFI Hardware Addresses .................................................................... 14-32
14–14. SLIDE: Part 3: Interacting with the EFI Boot Manager ............................................... 14-34
14–15. SLIDE: Autoboot versus Manual Boot........................................................................... 14-35
14–16. SLIDE: Booting from Primary and Alternate Boot Devices........................................ 14-36
14–17. SLIDE: Booting from an Arbitrary Boot Device ........................................................... 14-38
14–18. SLIDE: Booting from an Install DVD ............................................................................. 14-41
14–19. SLIDE: Booting from an Ignite-UX Install Server......................................................... 14-43
14–20. SLIDE: Booting from an Ignite-UX Recovery Tape...................................................... 14-45
14–21. SLIDE: Managing the Boot Menu and Boot Settings ................................................... 14-54
14–22. SLIDE: Managing Console Settings................................................................................ 14-59
14–23. SLIDE: Interacting with the EFI Shell ........................................................................... 14-63
14–24. SLIDE: Interacting with the hpux.efi OS Loader.......................................................... 14-69
14–25. SLIDE: For Further Study ............................................................................................... 14-71
14–26. LAB: Booting Integrity Servers....................................................................................... 14-73
14–27. LAB SOLUTIONS: Booting Integrity Servers ................................................................ 14-86
Module 15 ⎯ Configuring the HP-UX Kernel
15–1. SLIDE: Why Reconfigure the Kernel?................................................................................ 15-2
15–2. SLIDE: Part 1: Managing Kernel Configurations .............................................................. 15-4
15–3. SLIDE: Kernel Configuration Concept .............................................................................. 15-5
15–4. SLIDE: Special Kernel Configurations............................................................................... 15-6
15–5. SLIDE: Kernel Configuration Command Overview ......................................................... 15-9
15–6. SLIDE: Example: Modifying the Current Configuration ............................................... 15-11
15–7. SLIDE: Example: Creating a Named Configuration....................................................... 15-13
15–8. SLIDE: Example: Copying a Config to another Host ..................................................... 15-15
15–9. SLIDE: Example: Loading a Named Configuration........................................................ 15-17
15–10. SLIDE: Part 2: Managing Kernel Modules ..................................................................... 15-19
15–11. SLIDE: Kernel Module Concept Review........................................................................ 15-20
15–12. SLIDE: Kernel Module States ......................................................................................... 15-22
15–13. SLIDE: Kernel Module State Changes ........................................................................... 15-24
15–14. SLIDE: Viewing Module States with kcmodule .......................................................... 15-25
15–15. SLIDE: Managing Module States with kcmodule ....................................................... 15-27
15–16. SLIDE: Part 3: Managing Kernel Tunables .................................................................... 15-29
15–17. SLIDE: Kernel Module Tunable Parameters ................................................................. 15-30
15–18. SLIDE: Types of Tunables............................................................................................... 15-31
15–19. SLIDE: Viewing Tunables with kctune........................................................................ 15-33
15–20. SLIDE: Managing Tunables via kctune ....................................................................... 15-35
http://education.hp.com
H3064S J.00
iii
© 2010 Hewlett-Packard Development Company, L.P.
Contents
15–21.
15–22.
15–23.
15–24.
15–25.
15–26.
15–27.
15–28.
15–29.
15–30.
15–31.
15–32.
15–33.
15–34.
15–35.
15–36.
15–37.
SLIDE: Managing Tunables with tuneserver............................................................15-38
SLIDE: Learning More about Tunable Parameters.......................................................15-41
SLIDE: Part 4: Monitoring Kernel Resources ................................................................15-44
SLIDE: Kernel Resource Monitoring ..............................................................................15-45
SLIDE: Monitoring Resource Usage via kcusage .......................................................15-47
SLIDE: Kernel Resource Alarms.....................................................................................15-49
SLIDE: Viewing Resource Alarms with kcalarm ........................................................15-50
SLIDE: Setting Resource Alarms with kcalarm..........................................................15-51
SLIDE: Part 5: Kernel Troubleshooting..........................................................................15-53
SLIDE: Kernel Troubleshooting Overview ....................................................................15-54
SLIDE: Viewing the Kernel Change Log with kclog ...................................................15-55
SLIDE: Booting from an Alternate Kernel .....................................................................15-57
SLIDE: Booting with Override Parameters ...................................................................15-59
SLIDE: Booting to Tunable Maintenance Mode............................................................15-60
SLIDE: Kernel Recovery Roadmap.................................................................................15-62
LAB: Configuring HP-UX 11i v2 and v3 Kernels............................................................15-64
LAB SOLUTIONS: Configuring HP-UX 11i v2 and v3 Kernels.....................................15-71
Module 16 — Managing Software with SD-UX
16–1. SLIDE: Introducing SD-UX ..................................................................................................16-2
16–2. SLIDE: SD-UX Software Structure .....................................................................................16-4
16–3. SLIDE: SD-UX Software Depots .........................................................................................16-6
16–4. SLIDE: SD-UX IPD................................................................................................................16-8
16–5. SLIDE: SD-UX Daemons and Agents..................................................................................16-9
16–6. SLIDE: Listing Software.....................................................................................................16-10
16–7. SLIDE: Installing and Updating Software ........................................................................16-12
16–8. SLIDE: Removing Software ...............................................................................................16-16
16–9. LAB: Managing Software with SD-UX ..............................................................................16-18
16–10. LAB SOLUTIONS: Managing Software with SD-UX .....................................................16-21
H3064S J.00
iv
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 9 — Managing Swap Space
Objectives
Upon completion of this module, you will be able to do the following:
•
Explain the concept of demand paging.
•
Define physical, available, and lockable memory.
•
Define device swap, file system swap, and pseudoswap.
•
Configure device swap from the command line.
•
Configure file system swap from the command line.
•
Determine the amount of configured physical, available, and lockable memory.
•
Determine the amount of swap space currently configured and in use.
•
Disable swap space.
•
List considerations for selecting appropriate file system and device swap areas.
http://education.hp.com
H3064S J.00
9-1
© 2010 Hewlett-Packard Development Company, L.P.
Module 9
Managing Swap Space
9–1. SLIDE: HP-UX Memory Concepts
HP-UX Memory Concepts
Physical Memory
/stand/vmunix
Available (xx% Lockable)
Student Notes
Physical memory is the random access memory (RAM) installed in your computer. At
system startup, the system console displays the amount of physical memory installed:
Physical: xxxxxxx Kbytes
Not all physical memory is available to HP-UX processes. Some memory is reserved for
kernel code and data structures. The remaining memory is referred to as available memory.
Available memory may be used by processes and applications on your system. During
system startup, the system console displays the amount of available memory:
Available: xxxxxxx Kbytes
Physical memory may be supplemented by specially configured space on disk known as
swap. When a system is under a heavy load, the virtual memory subsystem may temporarily
move data from physical memory out to the system’s configured swap areas. When a process
requests data that has been sent to swap, the virtual memory subsystem brings that data back
into physical memory. This allows HP-UX to run more concurrent processes than would
otherwise be possible.
H3064S J.00
9-2
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 9
Managing Swap Space
All or part of available memory can be locked by a subsystem or by user processes. Locked
memory cannot be swapped out to disk. Typically, locked memory holds frequently accessed
programs or data structures. By keeping them memory-resident, process performance
improves. If most of the available memory is locked, the system may deadlock. Some nonlockable memory must be available to prevent deadlock.
During system startup, the system console displays the amount of memory that can be
locked:
lockable: xxxxxxx Kbytes
Available memory minus the memory locked by subsystems or user processes is the memory
that is actually usable for virtual memory demand paging. The unlockable_mem kernel
parameter determines the amount of memory that cannot be locked.
The dmesg command and /var/adm/syslog/syslog.log file report selected messages
that have appeared on the system console, including the amounts for physical, available, and
lockable memory in kilobytes (KB). Simply grep for “Physical” to find the appropriate
lines.
# dmesg | grep Physical
Physical: 4182796 Kbytes, lockable: 2920484 Kbytes, available:
3308380 Kbytes
# grep Physical /var/adm/syslog/syslog.log
Jul 27 19:42:35 rx26u521 vmunix: Physical: 4182796 Kbytes, lockable:
2920484 Kbytes, available: 3308380 Kbytes
On Integrity servers, the machinfo command provides another mechanism for reporting the
amount of physical memory.
# machinfo | grep Memory
Memory: 4084 MB (3.99 GB)
http://education.hp.com
H3064S J.00
9-3
© 2010 Hewlett-Packard Development Company, L.P.
Module 9
Managing Swap Space
9–2. SLIDE: HP-UX Swap Concepts
HP-UX Swap Concepts
Swap space supplements physical memory, enabling HP-UX
to run more applications than would otherwise be possible
D
D
D
D
D
D
D
D
D
D
D
D
D
D
T T T
Process
Physical Memory
D D D
D D
Data
Swap Logical Volume
T T
Executable
File System: /opt
Student Notes
Every process running on an HP-UX system requires space in memory. Space is allocated to
processes in units known as “pages”. Some of a process’s pages are used to store the
process’s binary executable (“text”), while other pages are used to store the process’s “data.”
Physical memory is a finite resource on any computer, and oftentimes there aren’t enough
pages in physical memory for all the processes your users wish to run. The HP-UX virtual
memory subsystem allows the total size of all user processes to exceed the size of physical
memory by using an approach termed demand paging. Using demand paging, HP-UX brings
portions of a process into memory as needed (on demand), and pushes pages that haven’t
been recently referenced out to disk.
Since executables are static, the text portion of a process may be loaded in physical memory
on-demand from the on-disk copy of a program’s executable.
A process’s data, on the other hand, is dynamic. Data pages that languish unreferenced in
physical memory may be sent out to a swap area on disk. When the data is accessed again,
the virtual memory subsystem copies the needed pages from swap back into physical
memory.
H3064S J.00
9-4
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 9
Managing Swap Space
Two daemons manage the virtual memory subsystem.
vhand
The kernel always tries to maintain a threshold of free pages in order to keep the system
running efficiently. As long as this threshold, referred to as lotsfree, is maintained, no paging
occurs. When the number of free pages drops below this threshold, a daemon known as
vhand selects pages that haven’t been recently referenced, copies them out to swap, then
adds the pages to the free page list. This is referred to as a page-out. A page fault occurs
when a process tries to access a page that is not currently in memory. The page will then be
copied into RAM via a page-in, either from the swap space or from the executable on disk.
On systems with very demanding memory needs (for example, systems that run many large
processes), the paging daemons can become so busy swapping pages in and out, that the
system spends all of its time paging, and not enough time running processes. When this
happens, system performance degrades rapidly. At this point, the system is said to be
thrashing. If you suspect that your system may be thrashing, check the ps output to see how
much CPU time the vhand process is using. If vhand is consuming a large amount of CPU
time, consider purchasing more physical memory!
swapper
When the system begins thrashing, or when free memory falls below another threshold,
known as minfree, the swapper becomes active. The swapper deactivates processes,
which prevents them from running, and thus reduces the rate at which new pages are
accessed. This gives vhand an opportunity to send the unreferenced pages out to swap, and
free pages in physical memory. When swapper detects that available memory has risen
above the minfree threshold and the system is no longer thrashing, it will reactivate the
deactivated processes.
Evaluating Swap Space Needs
Before you install your system, try to guess how much swap space you will need. Most
application programs need a minimum amount of swap space to operate properly. This
figure is usually contained in the documentation that comes with the application.
After initially installing the system, monitor swap space usage and make adjustments as
necessary. We will see how to do this later in this module.
http://education.hp.com
H3064S J.00
9-5
© 2010 Hewlett-Packard Development Company, L.P.
Module 9
Managing Swap Space
9–3. SLIDE: HP-UX Swap Types
HP-UX Swap Types
HP-UX supports several different types of swap areas
/data
Whole Disk
Device Swap
Whole Disk
Device Swap
LVM Device Swap
Use an entire disk…
Use a logical volume...
paging
File System Swap
Use extra file system space...
Student Notes
HP-UX supports several different types of swap space.
Whole Disk or LVM Device Swap
Swap space that resides on a dedicated disk, partition, or logical volume is known as device
swap. Logical volumes or disks configured as device swap don’t contain file systems; they
are managed and accessed exclusively by the virtual memory subsystem.
Using the whole disk approach, you can either use an entire disk for swap, or reserve space
at the end of the disk for swap by using the -R option on newfs. For example, the following
command creates a file system on a disk and reserves 1024MB at the end of the disk for
swap:
# newfs -R 1024 /dev/rdisk/disk3
H3064S J.00
9-6
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 9
Managing Swap Space
Using the LVM approach, you create a separate logical volume for device swap. The
following is an example of an lvcreate command used to create a 1024MB device swap
logical volume. The –C y option ensures that the logical volume is contiguous, which is
recommended.
# lvcreate -L 1024 -n swapvol –C y /dev/vg01
After a logical volume is enabled for use as device swap, the logical volume may not be
reduced or removed, nor may it be configured for use as a file system.
File System Swap
File system swap is a form of secondary swap. It can be configured dynamically. File system
swap allows vhand to utilize unused space in an existing file system if it needs more than the
designated device swap space. File system swap should only be used when device swap
space is insufficient to meet demand-paging needs. You can limit file system swap to a fixed
size to prevent vhand from consuming too much space.
When file system swap is enabled in a file system, a directory called /paging is created
under the root directory of the file system. A file is created for each swapchunk used in the
file system. By default, a swapchunk is 2 megabytes.
Note that once a file system has been enabled for file system swap, it isn't possible to
unmount that file system until the swap is disabled during the next system reboot.
Primary versus Secondary Swap
Your system must have at least one device swap area available for use during the boot
process. This area is known as primary swap. By default, primary swap is located on the
same disk as the root file system.
If you are using LVM, the location of the primary swap area is stored in the boot data
reserved area (BDRA) in the LVM structures on disk. The lvlnboot command may be used
to view the name of the primary swap logical volume:
# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/disk/disk1_p2 -- Boot Disk
Boot: lvol1
on:
/dev/disk/disk1_p2
Root: lvol3
on:
/dev/disk/disk1_p2
Swap: lvol2
on:
/dev/disk/disk1_p2
Dump: lvol2
on:
/dev/disk/disk1_p2, 0
Additional secondary swap areas may be configured to supplement primary swap. These
secondary swap areas may be configured either as device or file system swap on any disk or
logical volume.
Secondary swap can be enabled automatically at boot time or dynamically while the system
is running.
http://education.hp.com
H3064S J.00
9-7
© 2010 Hewlett-Packard Development Company, L.P.
Module 9
Managing Swap Space
9–4. SLIDE: HP-UX Pseudoswap
HP-UX Pseudoswap
Pseudoswap allows the kernel to treat a portion of physical memory as if it is swap space in order to
satisfy the swap reservation policy. Pseudo-swap is enabled by default in all current versions of HPUX.
I've got 1GB of swap
and 4GB of available
memory. Can I start a
2GB process?
Yes!
With Pseudoswap
1GB Device Swap
3GB Pseudo Swap (75% of 4GB)
4GB Reservable Swap
Without Pseudoswap
No!
1GB Device Swap
0GB Pseudo Swap
1GB Reservable Swap
Student Notes
Swap Reservation
The swap subsystem reserves swap space at process creation time. However, swap space
isn’t actually allocated to a process until the process is paged out to disk. Reserving swap at
process creation protects the virtual memory subsystem from running out of swap space.
When the system can’t reserve enough swap space for a new process, it won’t allow the
process to start
Relaxing the Swap Reservation Policy with Pseudo-Swap
In the early days of HP-UX, the swap reservation policy described above was strictly
enforced: a process could only be started if the system could reserve enough swap space
such that the entire process could be sent out to swap if necessary. However, since vhand
will never page everything in RAM out to swap simultaneously, a large percentage of swap
space may be reserved, but never used.
H3064S J.00
9-8
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 9
Managing Swap Space
In order to more efficiently use disk and memory resources, HP-UX uses a concept known as
pseudo-swap to relax the swap reservation restrictions. If pseudo-swap is enabled, then HPUX allows processes to reserve more swap space (up to 75% of available memory) than has
actually been configured on the system.
Consider a system with 4 GB of available physical memory, and 1 GB of swap. With pseudoswap disabled, this system could only run 1 GB worth of processes. With pseudo-swap
enabled, processes on this system could reserve up to 4GB of swap (1 GB + 75% of 4 GB).
NOTE:
Note that pages will never actually be "swapped out" to physical
memory: pseudo-swap simply relaxes the swap reservation
restrictions! This is possible since it will never be necessary to page
the entire contents of physical memory out to swap.
Pseudo-swap is enabled by default in all current versions of HP-UX. In 11i v1 and v2,
pseudoswap can be disabled by changing the swapmem_on kernel parameter value to 0. In
11i v3, pseudoswap is always enabled and the swapmem_on kernel parameter no longer
exists.
http://education.hp.com
H3064S J.00
9-9
© 2010 Hewlett-Packard Development Company, L.P.
Module 9
Managing Swap Space
9–5. SLIDE: Enabling Swap from the Command Line
Enabling Swap from the Command Line
Use swapon to enable device and file system swap
Examples:
How do I
enable swap?
1 # swapon [-f] /dev/vg01/swapvol
2 # swapon [-f] /dev/disk/disk2
3 # swapon [-f] –e /dev/disk/disk3
4 # swapon -p 4 -l 1024m /data
Explanation:
1
2
3
4
Swap on a logical volume
Swap on a whole disk device
Swap on the end of a whole disk device
Swap on a file system
Student Notes
Both file system and device swap can be enabled from the command line using the
swapon(1m) command. The examples on the slide show several common uses of swapon:
1. The first example enables the /dev/vg01/swapvol logical volume for use as device
swap. The entire logical volume will be claimed as swap, so it will no longer be available
for use as a file system. If the logical volume contains old file system structures, use the
-f force option to overwrite the volume contents.
# swapon [-f] /dev/vg01/swapvol
2. The second example enables device swap on the whole disk /dev/disk/disk2. If the
disk contains a file system, include the –f force option. LVM and file system structures
on the disk will be destroyed.
# swapon [-f] /dev/disk/disk2
H3064S J.00
9-10
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 9
Managing Swap Space
3. The third example enables a file system and swap to coexist on a disk configured using
the whole disk approach. The file system must be created using newfs and the –R option
to reserve space on the end of the disk for swap. swapon -e enables device swap in the
reserved space.
# newfs –R 1024 /dev/rdisk/disk3
# swapon [-f] –e /dev/dsk/disk3
Executing the swapon command enables vhand to use the reserved space on the end of
the disk. The –e option on swapon should only be used on disks configured using the
whole disk approach.
4. The fourth example enables the file system mounted on /myfs2 for use as file system
swap. The -p option sets the priority for this swap area to 4, and the -l ensures that
vhand can take no more than 1024MB from the file system for use as swap.
# swapon –p 4 –l 1024m /data
NOTE:
You cannot unmount a file system while the file system is activated for
use as file system swap.
Enabling Device Swap Using swapon
Use the swapon command to enable device swap.
# swapon [-p priority] [-e|-f] device
priority
Indicates the order in which space is taken from the file systems and
devices used for swapping. 0 is the highest and 10 is the lowest (default
is 1).
-e
Uses space after the end of the file system on block device for paging.
This option cannot be used with the -f option. This option is to be used
with the "whole disk" approach, when a disk contains both a file system,
and swap space. The example below configures a file system at the top
of the disk, reserving 1024MB at the end of the disk for use as swap
space. This option should not be used when configuring LVM swap
logical volumes.
# newfs –R 1024 /dev/rdisk/disk1
# swapon –e /dev/disk/disk1
-f
Forcibly enables device swapping to a device where an unmounted file
system exists, destroying the file system.
device
Block special file which is to be used for paging.
http://education.hp.com
H3064S J.00
9-11
© 2010 Hewlett-Packard Development Company, L.P.
Module 9
Managing Swap Space
Enabling Device Swap Using swapon
Use the swapon command to enable device swap.
# swapon [-m min][-l limit][-r reserve][-p priority] directory
-m min
min specifies the amount of paging space the paging system will initially
take from the file system. min can be specified in units of kilobytes (k
suffix), megabytes (M suffix), or file system blocks (no suffix).
-l limit
limit specifies the maximum space the swap system is allowed to take
from the file system. limit can be specified in units of kilobytes (k
suffix), megabytes (M suffix), or file system blocks (no suffix). (The
default is no limit.)
-r reserve
reserve specifies the space, in addition to the space currently occupied
by the file system, that is reserved for file system use only, making it
unavailable to the paging system. This reserved space is in addition to
the minimum free space specified by the administrator when the file
system was created.
-p priority
Same as for device swap.
directory
The directory where the file system swapping occurs. The system
creates a directory named paging under the root of the file system for
swap.
NOTE:
You cannot unmount a file system once the file system has been
marked for use as file system swap.
Swap Size Limitations
Several kernel tunable parameters limit the amount of swap that can be made available.
•
Swap space in the kernel is managed using 'chunks' of physical device space.
swchunk does not determine the size of the swap I/O transactions. Rather, it determines
the number of blocks that will be placed on one swap device (or file system) before
proceeding to the next swap device. Interleaving swap chunks over many devices
reduces the possibility of any single device becoming a system bottleneck.
The swchunk kernel parameter specifies the swap chunk size in 1KB physical disk
blocks. Allowed values range from 2048 to 65536 blocks per chunk. The default value is
2048 blocks.
In 11i v1, the maxswapchunks kernel parameter determines the maximum number of
swap chunks allowed. The default value is 256. Thus, in 11i v1, the default kernel
parameters allow 512MB of swap space:
256 chunks * 2048 blocks per chunk * 1 KB per block = 512MB of swap space
H3064S J.00
9-12
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 9
Managing Swap Space
In 11i v2 and v3, maxswapchunks is no longer configurable. The kernel allows up to
2,147,483,648 swap chunks. Thus, the default swchunk value (2048) allows up to 4TB of
swap space:
2,147,483,648 chunks * 2048 blocks per chunk * 1 KB per block = 4TB of swap space
Administrators who wish to configure more than 512MB of swap space in 11i v1 or 4TB of
swap space in 11i v2 and v3 may need to increase the swchunk size.
Changes to this tunable take effect at the next reboot. Review the swchunk(5) man
page carefully before modifying this kernel parameter.
•
The nswapdev kernel parameter determines the maximum number of device swap areas
allowed. Values vary from release to release. Changing this parameter requires a reboot.
11i v1:
11i v2:
11i v3:
•
default=10
default=10
default=32
maximum=25
maximum=25
maximum=1024
The nswapfs kernel parameter determines the maximum number of file system swap
areas allowed. Values vary from release to release. Changing this parameter requires a
reboot.
11i v1:
11i v2:
11i v3:
default=10
default=10
default=32
http://education.hp.com
maximum=25
maximum=25
maximum=1024
H3064S J.00
9-13
© 2010 Hewlett-Packard Development Company, L.P.
Module 9
Managing Swap Space
9–6. SLIDE: Enabling Swap via /etc/fstab
Enabling Swap via /etc/fstab
Use /etc/fstab to permanently enable device and file system swap
# vi /etc/fstab
# vi /etc/fstab
/dev/vg01/datavol
/data
vxfs
defaults
0 2
1
/dev/vg01/swapvol
.
swap
defaults
0 0
2
/dev/disk/disk2
.
swap
defaults
0 0
3
4
/dev/disk/disk3
.
swap
end
0 0
/dev/vg01/datavol
/data
swapfs
pri=4,lim=400m 0 0
# swapon -a
Explanation:
1
2
3
4
Swap on a logical volume
Swap on a whole disk device
Swap on the end of a whole disk device
Swap on a file system
Student Notes
In order to ensure that a swap area is enabled at every system boot, define the swap area in
the /etc/fstab file. During the boot process, the swapon -a command enables all
/etc/fstab swap entries. Fields in the /etc/fstab file are described below:
block device
The block special file name.
directory
The name of the root of the mounted file system, if there is one. If type
is swapfs, it can be the name of any directory.
type
swap, swapfs, and ignore are the supported swap-related fstab
entry types. If the type field is swap, directory, backup-frequency, and
pass_number are ignored. If the type field is swapfs, block device,
backup-frequency, and pass_number are ignored.
options
Options to the swapon command, if the type is swap or swapfs.
H3064S J.00
9-14
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 9
Managing Swap Space
min= min
Amount of paging space the paging system will initially take from the
file system. Same as swapon -m option.
lim= limit
Maximum space the paging system can take from the file system.
Same as swapon -l option.
res= reserve
Space reserved for files in the file system. Same as swapon -r
option.
pri= priority
Swap priority. Same as swapon -p option.
end
Use space after end of file system. Same as swapon -e option. Only
applies to swap areas configured via the whole disk layout approach.
backup frequency
Reserved for future use.
pass number
Unused with swap and swapfs (used by the fsck command to
determine the order in which file system checks are done).
comment
Optional field that starts with #.
Listing a swap device in /etc/fstab ensures that the swap device is automatically enabled
after every system reboot. The /sbin/init.d/swap_start system startup script
executes swapon –a during system startup. The -a option instructs the system to read
/etc/fstab for swap information and activate all swap areas.
NOTE:
After making changes to /etc/fstab swap entries, run swapon -a.
This forces the system to reread the fstab file and enable any newlydefined swap entries, and report possible syntax errors.
http://education.hp.com
H3064S J.00
9-15
© 2010 Hewlett-Packard Development Company, L.P.
Module 9
Managing Swap Space
9–7. SLIDE: Monitoring Swap Space
Monitoring Swap Space
Use swapinfo to monitor swap space usage
Examples:
How much swap
space do I have?
1
# swapinfo
2
3
# swapinfo -f
4
# swapinfo -tm
# swapinfo -d
Explanation:
1
2
3
4
Report usage of all swap areas
Report only on file system swap
Report only on device swap
Report values in MB, with a total line
Student Notes
After configuring one or more swap areas on your system, monitor the use of those swap
areas over time using swapinfo(1m). swapinfo lists the configured swap areas and
reports what percentage of each is currently in use. If you are running low on swap space,
you may need to configure an additional swap area to ensure that your users are able to run
the applications they need.
Selected swapinfo options:
-t
Include a total line at the end of the report.
-m
Display information in megabytes instead of kilobytes.
-d
Show information about device swap areas only.
-f
Only report information about file system swap areas.
-q
Quiet mode. Print only a total Kb AVAIL.
H3064S J.00
9-16
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 9
Managing Swap Space
Sample swapinfo output:
# swapinfo -tm
TYPE
dev
dev
dev
dev
localfs
reserve
memory
total
Kb
AVAIL
2048
16
296
1001
4
91
3456
Kb
USED
0
0
0
0
0
80
54
133
Kb
PCT
FREE USED
2048
0%
16
0%
296
0%
1001
0%
4
0%
-80
4%
37
59%
3474
4%
START/
Kb
LIMIT RESERVE PRI NAME
0 - 1 /dev/vg00/lvol2
0 - 1 /dev/vg01/swapvol
0 - 1 /dev/disk/disk2
0 - 1 /dev/disk/disk3
0 - 4 /data/paging
0
Explanation of the output columns:
TYPE
dev
Device swap.
localfs
File system paging space on a file system residing on a
local disk.
network
File system paging space on an NFS mounted file system.
reserve
Paging space on reserve. This is the amount of paging
space that may be needed by processes that are currently
running, but that has not yet been allocated from one of
the above paging areas.
memory
Memory paging area (also known as pseudo-swap). This
line appears only if memory paging is enabled.
Kb AVAIL
The total available space from the paging area including any paging space
already in use. For file system paging areas the value is not necessarily
constant. It is the current space allocated for paging (even if not currently
used), plus the free blocks available on the file system to ordinary users,
minus RESERVE (but never less than zero).
Kb Used
The current number of 1-Kbyte blocks used for paging in the paging area.
For the memory paging area, this count also includes memory used for
other purposes and thus unavailable for paging.
Kb FREE
The amount of space that can be used for future paging.
PCT USED
The percentage of capacity in use, based on Kb USED divided by Kb
AVAIL; 100% if Kb AVAIL is zero.
http://education.hp.com
H3064S J.00
9-17
© 2010 Hewlett-Packard Development Company, L.P.
Module 9
Managing Swap Space
START/LIMIT
For device paging areas, START is the block address on the mass storage
device of the start of the paging area. For file system paging areas, LIMIT is
the maximum number of KBs that will be used for paging, the same as the
limit value specified by swapon -l.
RESERVE
For device paging areas, this value is always “–“. For file system paging
areas, this value is the number of KBs reserved for file system use by
ordinary users, the same as the reserve value specified by swapon -r.
PRI
The same as the priority value given to swapon. This value indicates the
order in which space is taken from the devices and file systems used for
paging. Space is taken from areas with lower priority values first.
Priorities range from 0 to 10. The system uses priority 0 swap areas first,
and priority 10 swap areas last.
NAME
For device paging areas, the block special file name whose major and
minor numbers match the device's ID. For file system swap areas, NAME is
the name of a directory on the file system in which the paging files are
stored.
H3064S J.00
9-18
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 9
Managing Swap Space
9–8. SLIDE: Disabling Swap
Disabling Swap
• When a swap space is no longer needed, disable it
• In 11i v1 and v2, disabling a swap device requires a reboot
• In 11i v3, device swap can be dynamically disabled via swapoff
In 11i v1and v2, remove the device from /etc/fstab and reboot
# vi /etc/fstab
# shutdown –ry 0
In 11i v3, execute swapoff and remove the device from /etc/fstab
# swapoff /dev/vg01/swapvol
# vi /etc/fstab
Student Notes
If swapinfo suggests that a system is underutilizing its swap space, consider disabling one
or more swap devices. Once a swap device has been disabled, the device may be repurposed
or removed.
In 11i v1 and v2 it isn’t possible to dynamically disable a swap device. Rather, you must
comment the device out of /etc/fstab and reboot.
# vi /etc/fstab
# shutdown –ry 0
The 11i v3 September 2008 software pack introduced an optional swapoff command patch,
which you can use to dynamically disable swap devices. The swapoff command does not
modify /etc/fstab. Be sure to manually remove the device from /etc/fstab.
# swapoff /dev/vg01/swapvol
# vi /etc/fstab
http://education.hp.com
H3064S J.00
9-19
© 2010 Hewlett-Packard Development Company, L.P.
Module 9
Managing Swap Space
swapoff will not disable a swap device if the current available system swap space without
the device is insufficient for the system to operate. Also, swapoff may not be used to
disable file system swap, or primary swap space on the system boot disk.
H3064S J.00
9-20
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 9
Managing Swap Space
9–9. SLIDE: Guidelines for Selecting Device Swap Areas
Guidelines for Selecting Device Swap Areas
• Two swap areas on different disks are better than one single swap area
• Only configure one swap area per disk
• Device swap areas should be of similar size
• Consider the speed of the disks
Swap LV
Swap LV
Swap LV
Swap LV
No!
Swap LV
Yes!
Student Notes
To ensure optimal performance, you should follow the guidelines shown on the slide.
From the point of view of performance, two swap areas on different disks are better than one
swap area with the equivalent amount of space. Also for performance reasons, multiple swap
sections on the same disk should not be used.
Don't create a separate device swap area on the disk containing the primary swap area,
because this causes excessive head movement on that disk and may degrade performance.
If you are using LVM, set up multiple device swap areas in logical volumes that are on
different physical volumes.
Device swap areas should be of similar sizes for best performance. Otherwise, when all the
space in the smaller device swap area is used, interleaving is no longer possible.
http://education.hp.com
H3064S J.00
9-21
© 2010 Hewlett-Packard Development Company, L.P.
Module 9
Managing Swap Space
How Swap Space Is Prioritized
All swap devices and file systems enabled for swap are assigned a priority ranging in value
from 0 to 10. The priority number determines which swap areas will be used first. The
priority is set by swap activation with the -p option of swapon. The default priority number
is 1. Pages are sent out to your configured swap areas according to the following rules:
•
Start at the highest priority swap device or file system. The lower the number, the higher
the priority; that is, space is taken from a system with priority “0” before it is taken from a
system with priority “1”.
•
If multiple devices have the same priority, swap space is allocated from the devices in a
round-robin fashion. Thus, to interleave swap requests among a number of devices, the
devices should be assigned the same priority. Similarly, if multiple file systems have the
same priority, requests for swap are interleaved among the file systems.
It is recommended that you assign the same swapping priority to most swap devices, unless a
device is significantly slower than the rest. Assigning equal priorities limits disk head
movement, which improves swapping performance.
H3064S J.00
9-22
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 9
Managing Swap Space
9–10. SLIDE: Guidelines for Selecting File System Swap Areas
Guidelines for Selecting File System Swap Areas
• Avoid file system swap altogether if possible
• Avoid using busy file systems such as the root file system
• Avoid using file systems already near capacity
• Avoid using file systems on disks that already have swap configured
• Set priorities appropriately
– Choose faster devices over slower devices
– Choose infrequently-used file systems over busier file systems
Student Notes
When you need more swap space and you have no disk space available for additional device
swap, you can dynamically configure file system swap. File system swap is significantly
slower than device swap, though, so it should only be configured as a last resort.
The guidelines on the slide are provided to help the system administrator decide which file
system sections should be used for swap space.
http://education.hp.com
H3064S J.00
9-23
© 2010 Hewlett-Packard Development Company, L.P.
Module 9
Managing Swap Space
9–11. LAB: Managing Swap Space
Directions
Perform the following tasks. Write the commands you use, and the answers to any questions
that are asked.
1. The exercises in this lab assume that you already have the following logical volumes:
/dev/vg01/swapvol
/dev/vg01/datavol
If you already have these logical volumes, you can skip ahead to the next question.
Otherwise, create an LVMv2.2 volume group called vg01 with your spare disk. Specify
maximum volume group size 1TB with a 4MB extent size. Create two 32MB logical
volumes in vg01 called datavol and swapvol
2. How much physical memory does your system have?
How much available memory?
How much lockable memory?
3. How much device swap is currently configured on your system?
How much file system swap is currently configured?
How much swap space has been reserved by processes on your system?
4. As you add new applications on your system, your application vendor may ask you to
configure additional swap space. Enable device swap on the /dev/vg01/swapvol
volume.
H3064S J.00
9-24
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 9
Managing Swap Space
5. In crunch periods, you may need to configure file system swap to supplement already
configured device swap. Enable file system swap on /home. Set the priority level to 4 to
ensure that this file system swap is only used when your device swap areas are full. Also
ensure that no more than half of the file system will be used as swap.
6. Execute swapinfo again to verify that your new swap areas are configured properly.
7. Do whatever is necessary to ensure that your new swap areas are automatically enabled
after the next reboot.
8. Can you unmount a file system that has file system swap enabled? Try it.
9. You should have discovered in the previous question that once swap is enabled in a file
system, it is impossible to unmount that file system. Is this a problem? Explain.
http://education.hp.com
H3064S J.00
9-25
© 2010 Hewlett-Packard Development Company, L.P.
Module 9
Managing Swap Space
10. Use swapoff to disable the /dev/vg01/swapvol swap device.
11. Before proceeding to the next chapter, remove both swap entries from /etc/fstab and
reboot the system. This will remove the file system swap in preparation for the next lab.
H3064S J.00
9-26
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 9
Managing Swap Space
9–12. LAB SOLUTIONS: Managing Swap Space
Directions
Perform the following tasks. Write the commands you use, and the answers to any questions
that are asked.
1. The exercises in this lab assume that you already have the following logical volumes:
/dev/vg01/swapvol
/dev/vg01/datavol
If you already have these logical volumes, you can skip ahead to the next question.
Otherwise, create an LVMv2.2 volume group called vg01 with your spare disk. Specify
maximum volume group size 1TB with a 4MB extent size. Create two 32MB logical
volumes in vg01 called datavol and swapvol.
Answer:
#
#
#
#
pvcreate
vgcreate
lvcreate
lvcreate
-f
–V
-L
-L
/dev/rdisk/diska
2.2 –S 1t –s 4 vg01 /dev/disk/diska
32 -n swapvol vg01
32 -n datavol vg01
2. How much physical memory does your system have?
How much available memory?
How much lockable memory?
Answer:
All three questions may be answered by looking for the physical memory line that
appears on the system console during the system boot process. In most cases, this
console message may be viewed after system boot via the dmesg command or the
syslog.log log file.
# dmesg | grep Physical
Physical: 4182796 Kbytes, lockable: 2920484 Kbytes, available:
3308380 Kbytes
# grep Physical /var/adm/syslog/syslog.log
Jul 27 19:42:35 rx26u521 vmunix: Physical: 4182796 Kbytes,
lockable: 2920484 Kbytes, available: 3308380 Kbytes
http://education.hp.com
H3064S J.00
9-27
© 2010 Hewlett-Packard Development Company, L.P.
Module 9
Managing Swap Space
3. How much device swap is currently configured on your system?
How much file system swap is currently configured?
How much swap space has been reserved by processes on your system?
Answer:
# swapinfo –d
# swapinfo –f
# swapinfo
Lists device swap areas.
Lists file system swap areas.
Lists all swap areas, including a “reserve” line.
Your classroom system should have one device swap logical volume, but no file system
swap at this point. The amount of memory currently reserved will vary, depending on the
number of processes currently running on your system.
4. As you add new applications on your system, your application vendor may ask you to
configure additional swap space. Enable device swap on the /dev/vg01/swapvol
volume.
Answer:
# swapon /dev/vg01/swapvol
5. In crunch periods, you may need to configure file system swap to supplement already
configured device swap. Enable file system swap on /home. Set the priority level to 4 to
ensure that this file system swap is only used when your device swap areas are full. Also
ensure that no more than half of the file system will be used as swap.
Answer:
# swapon –p 4 -l 24M /home adjust your "limit" to match half of the /home LV
6. Execute swapinfo again to verify that your new swap areas are configured properly.
Answer:
# swapinfo
7. Do whatever is necessary to ensure that your new swap areas are automatically enabled
after the next reboot.
Answer:
Replace /dev/vg00/lvolx below with your /home file system’s logical volume DSF.
# vi /etc/fstab
/dev/vg01/swapvol ...
/dev/vg00/lvolx
/home
# swapon –a
swap
defaults
0 0
swapfs pri=4,lim=24M 0 0
H3064S J.00
9-28
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 9
Managing Swap Space
8. Can you unmount a file system that has file system swap enabled? Try it.
Answer:
# umount /home
Fails! After file system swap has been enabled on a file system, it can never be
unmounted.
9. You should have discovered in the previous question that once swap is enabled in a file
system, it is impossible to unmount that file system. Is this a problem? Explain.
Answer:
Some administrative tasks require a file system to be unmounted. Enabling file system
swap makes it very difficult to perform those tasks. File system swap should truly only
be used as a last resort.
10. Use swapoff to disable the /dev/vg01/swapvol swap device.
Answer:
# swapoff /dev/vg01/swapvol
11. Before proceeding to the next chapter, remove both swap entries from /etc/fstab and
reboot the system. This will remove the file system swap in preparation for the next lab.
Answer:
# vi /etc/fstab
# shutdown –ry 0
http://education.hp.com
H3064S J.00
9-29
© 2010 Hewlett-Packard Development Company, L.P.
Module 9
Managing Swap Space
H3064S J.00
9-30
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 10 ⎯ Maintaining Logical Volumes and File
Systems
Objectives
Upon completion of this module, you will be able to do the following:
•
Defragment file systems.
•
Repair corrupted file systems.
•
Reclaim wasted file system space.
•
Monitor file system and volume group free space.
•
Extend, reduce, and remove volume groups.
•
Extend, reduce, and remove logical volumes.
•
Extend, reduce, and remove file systems.
http://education.hp.com
H3064S J.00
10-1
© 2010 Hewlett-Packard Development Company, L.P.
Module 10
Maintaining Logical Volumes and File Systems
10–1. SLIDE: Maintaining Logical Volumes and File Systems
Maintaining Logical Volumes and File Systems
Proactive monitoring and maintenance can help ensure healthy, efficient file systems
Defragment file systems when necessary
Repair file system corruption when necessary
Monitor free disk space regularly
Reclaiming wasted space
– Remove core files
– Trim log files
– Purge large, old files
Add disk space when necessary
– Extend volume groups
– Extend logical volumes
– Extend file systems
Reduce or remove underutilized file systems and volumes when necessary
– Reduce file systems
– Reduce logical volumes
– Reduce volume groups
Student Notes
The system administrator is responsible not only for initially configuring file systems and
logical volumes, but also for ensuring that those file systems and logical volumes continue to
meet the needs of the system’s users and applications. This chapter discusses several
techniques you can use to monitor and maintain logical volumes and file systems.
H3064S J.00
10-2
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 10
Maintaining Logical Volumes and File Systems
10–2. SLIDE: Defragmenting a File System
Defragmenting a File System
Regularly run the fsadm online defragmentation utility to optimize performance
• Directory defragmentation directories to reclaim space and optimize path resolution
• Extent defragmentation reorganizes blocks and extents to minimize fragmentation
After
Before
Report directory and extent fragmentation
# fsadm –F vxfs –DE /data
Report and fix directory and extent fragmentation
# fsadm -F vxfs -DEde -t 600 /data
Student Notes
When a JFS file system is first created, the file system free space is consolidated in a small
number of very large extents. However, as files and directories are created, extended,
reduced, and removed, the file system gradually becomes "fragmented" into many smaller
extents. Over time, fragmentation may seriously degrade system performance.
HP recommends "defragmenting" JFS file systems on a regular basis with the fsadm utility.
fsadm reports fragmentation, and optionally attempts to reorganize and consolidate file
extents, free extents, and directories to ensure the best possible file system performance.
Reporting Fragmentation with fsadm
fsadm is able to report, as well as fix, file system fragmentation. -D reports directory
fragmentation, and -E reports extent fragmentation. These options may be used
independently, or concurrently:
# fsadm -F vxfs -E /data
# fsadm -F vxfs -D /data
# fsadm -F vxfs -DE /data
http://education.hp.com
report extent fragmentation
report directory fragmentation
report directory and extent fragmentation
H3064S J.00
10-3
© 2010 Hewlett-Packard Development Company, L.P.
Module 10
Maintaining Logical Volumes and File Systems
Here's a sample fragmentation report:
# fsadm -F vxfs -DE /data
Directory Fragmentation Report
Dirs
Total
Immed
Searched
Blocks
Dirs
345
812
210
Extent Fragmentation Report
Total
Average
Files
File Blks
216
30
blocks
% Free
% Free
% blks
Immeds
to Add
3
Average
# Extents
1
Dirs to
Reduce
6
Blocks to
Reduce
13
Total
Free Blks
3973
used for indirects: 12
blocks in extents smaller than 64 blks: 29.12
blocks in extents smaller than 8 blks: 1.33
allocated to extents 64 blks or larger: 30.05
Free Extents By Size
1:
3
8:
24
64:
8
512:
0
4096:
0
2:
16:
128:
1024:
8192:
3
33
6
1
0
4:
32:
256:
2048:
16384:
11
12
2
0
0
Here are a few of the key fields you should look at:
Immeds to Add: (Smaller is better)
Most directories have an inode that records the permissions on the directory, and
data blocks that record the names of the files included in the directory. If a directory
contains very few files, JFS can actually store the file names in the directory's inode
rather than a separate data block. The "Immeds to Add" field reports the number of
directories that could be optimized in this manner if fsadm were executed.
Dirs to Reduce: (Smaller is better)
Directory defragmentation attempts to reclaim wasted space in directories. The "Dirs
to Reduce" field indicates how many directories could be reduced via directory
defragmentation.
Blocks to Reduce: (Smaller is better)
Indicates the number of blocks that could be reclaimed via directory defragmentation.
Average # Extents: (Smaller is better; "1" is ideal)
Describes the average number of extents occupied by each file.
% Free blocks in extents smaller than 64 blks: (Smaller is better and should be less than 50%.)
JFS prefers to have a few large extents of free blocks rather than many smaller
extents of free blocks. Larger free-block extents make it easier for JFS to allocate
space for new files.
H3064S J.00
10-4
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 10
Maintaining Logical Volumes and File Systems
% Free blocks in extents smaller than 8 blks: (Smaller is better.)
JFS prefers to have a few large extents of free blocks rather than many smaller
extents of free blocks. Larger free-block extents make it easier for JFS to allocate
space for new files.
Defragmenting File Systems with fsadm
Many administrators use -DE in conjunction with -de:
# fsadm -F vxfs -DEde /data
-D and –E report directory and extent fragmentation. –d and –e actually defragment the
directories and extents. Used together, these options generate a pre-defrag fragmentation
report, defragment the file system, then generate a post-defrag report, too. By comparing the
pre- and post-defragmentation report values after a day of system activity, a week of system
activity, and a month of system activity, you can determine how frequently fsadm needs to
be executed. If you run fsadm -DEde after one week of system activity and see little
difference between the pre- and post-values, you may be able to run the utility monthly rather
than weekly.
Note that the file system must be mounted while fsadm is running! Users can access the file
system while fsadm runs, but performance will be somewhat degraded.
The amount of time required for the defragmentation process to complete varies, depending
on the degree of fragmentation, disk speed, and the number of inodes in the file system. If
your production schedule allows only a brief period of time for system maintenance
activities, you can define a fixed period of time for fsadm to execute. fsadm then processes
as many extents and directories as possible within the given interval, then exits gracefully.
The example below defragments the file system for 600 seconds, then terminates:
# fsadm -F vxfs -de -t 600 /data
To simplify administration and minimize the impact on users, many administrators choose to
run fsadm automatically as a batch job after hours on a monthly or weekly basis.
For More Information
See the fsadm(1m) man page for more information.
http://education.hp.com
H3064S J.00
10-5
© 2010 Hewlett-Packard Development Company, L.P.
Module 10
Maintaining Logical Volumes and File Systems
10–3. SLIDE: Repairing a Corrupted File System
Repairing a Corrupted File System
• Power outages or improper system shutdowns may cause file system corruption
• HP-UX runs fsck automatically during system startup after improper shutdowns
• The administrator can also run fsck manually to find and fix file system corruption
Manually run an intent log “replay” on a VxFS file system
# mount -v
# umount /data
# fsck -F vxfs /dev/vg01/rdatavol
# mount /data
Manually run a complete file system check on a VxFS file system
# mount -v
# umount /data
# fsck -F vxfs –o full,nolog /dev/vg01/rdatavol
# mount /data
Student Notes
Occasionally, an improper shutdown or system crash can leave one or more file systems in a
corrupted state. During the system boot process, HP-UX automatically checks to ensure that
all file systems were properly unmounted during the last system shutdown. If a file system
was not properly unmounted, HP-UX automatically runs the fsck "file system check" utility
to identify and correct corrupted metadata structures. In most cases, fsck will fix the
corrupted file systems during the boot process without any interaction with the system
administrator. However, if extreme file system corruption occurs, you may be asked to run
fsck manually. The procedure for running fsck manually is described below:
1. Start by issuing the mount -v command to determine which file systems are mounted
where. Also note which file systems are HFS and which are JFS. You will need to know
the file system type when you run fsck.
# mount –v
H3064S J.00
10-6
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 10
Maintaining Logical Volumes and File Systems
2. fsck should only be executed on quiescent file systems; unmount the file system(s)
before proceeding.
# umount /dev/vg01/datavol
3. Run fsck. fsck can repair both HFS and JFS file systems. Just be sure to specify the
proper file system type. For optimal performance, specify the raw device file of the
logical volume or disk containing the file system to check.
# fsck -F vxfs /dev/vg01/rdatavol
When run on a JFS file system, fsck simply replays the intent log, and completes any
pending transactions. See the detailed explanation of JFS options in the notes below for
more information. When checking an HFS file system, fsck examines the specified file
system several times, examining a different file system structure with each pass. When
fsck identifies a file system inconsistency, it reports the problem, and asks if corrective
action should be taken.
If the administrator answers "yes," fsck attempts to fix the problem. If the administrator
answers "no," fsck ignores the inconsistency and continues. There are very few
occasions when a "no" response is appropriate.
4. Once fsck completes, remount the file system(s).
# mount /dev/vg01/datavol
5. Restore any corrupted files. In order to fix severely corrupted file systems, fsck may
have to remove one or more files. Watch for "REMOVE" messages in the fsck output,
and be sure to restore the affected files from tape.
If you see any "RECONNECT" messages while running fsck, you may need to investigate
one or more "orphaned" files. Orphaned files are files that have valid inodes and data
blocks but no corresponding directory entries. fsck places these files in a lost+found
directory that is created at the root of each file system. Hopefully, by looking at the
orphaned files' attributes and contents you will be able to determine their proper
filenames. The following commands might be used to investigate the orphaned file in the
/data file system under inode #1743:
#
#
#
#
#
cd /data/lost+found
ll \#1743
file \#1743
strings \#1743
mv \#1743 new_file_name
http://education.hp.com
go to the lost+found directory
determine who owns the orphaned files
check the file types
check the file contents
move & rename the orphaned files as appropriate
H3064S J.00
10-7
© 2010 Hewlett-Packard Development Company, L.P.
Module 10
Maintaining Logical Volumes and File Systems
Some General fsck Options
There are several common options that may be used on fsck when checking either HFS or
JFS file systems:
-n
Assume a "no" response to all questions from fsck; fsck checks the file system
but doesn't correct inconsistencies. You can use this option to assess the state
of a file system, but then be sure to run fsck again to actually fix any identified
problems.
-y
Assume a "yes" response to all questions. Beware that data may be removed as
a result of a "yes" answer. Consider using this option after running fsck with
-n to assess the state of your file systems.
Some Special HFS fsck Options
The following fsck options only apply to HFS file systems:
-b block#
This option tells fsck to use the superblock at the specified block# as the
superblock for the file system check instead of the default superblock. This is
useful if the primary superblock becomes lost or corrupted. All backup
superblock locations are written to the /var/adm/sbtab file. If you can't
access this file, try block #16, which always contains the first alternate
superblock.
-f
By default, fsck gives a warning message and requests confirmation when
asked to repair a mounted file system. -f forces fsck to run, even if the
specified file system is mounted. This option should only be used in single-user
mode. After running fsck, reboot immediately with the -n option. By default,
the reboot and shutdown commands flush buffer cache, which may overwrite
the corrections made by fsck. Reboot using reboot -n to take the system
down without flushing buffer cache.
Some Special JFS fsck Options
Because of the JFS intent log mechanism, improper shutdowns shouldn’t corrupt JFS file
system metadata. After an improper shutdown, fsck need only complete any pending intent
log transactions to bring a JFS file system to a consistent state. This is known as an intent
log replay. fsck requires minutes or even hours to repair an HFS file system, but can
complete a JFS intent log replay in a matter of seconds.
# mount -v
# umount /data
# fsck -F vxfs /dev/vg01/rdatavol
file system is clean - log replay is not required
# mount /data
H3064S J.00
10-8
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 10
Maintaining Logical Volumes and File Systems
If you wish, you can force fsck to bypass the intent log and do a full check of all the
metadata structures in a JFS file system with the -o full,nolog option. This may be
useful if the intent log area is physically damaged, or if other more serious structural
problems exist with the file system metadata.
# mount -v
# umount /data
# fsck -F vxfs –o full,nolog /dev/vg01/rdatavol
pass0 - checking structural files
pass1 - checking inode sanity and blocks
pass2 - checking directory linkage
pass3 - checking reference counts
pass4 - checking resource maps
OK to clear log? (ynq)y
flush fileset headers? (ynq)y
set state to CLEAN? (ynq)y
# mount /data
NOTE:
There are several fsck man pages:
• fsck(1m) describes general fsck features
• fsck_hfs(1m) describes HFS-specific fsck features.
• fsck_vxfs(1m) describes JFS-specific fsck features
http://education.hp.com
H3064S J.00
10-9
© 2010 Hewlett-Packard Development Company, L.P.
Module 10
Maintaining Logical Volumes and File Systems
10–4. SLIDE: Monitoring File System Free Space
Monitoring File System Free Space
• Regularly run bdf and du to monitor file system free space
• When necessary, purge files, or extend the file system and logical volume
Monitor file system free space
# bdf
Filesystem
/dev/vg00/lvol5
/dev/vg00/lvol4
/dev/vg01/datavol
with bdf
kbytes
294912
24576
15893
used
261523
19333
14006
avail
31352
4978
297
%used
89%
80%
98%
Mounted on
/opt
/home
/data
Determine space used by directory subtrees with du
# du -sk /data/*
844
/data/data1
1327
/data/data2
4
/data/lost+found
Student Notes
Disk space is often at a premium. The system administrator should monitor disk free space
regularly, and take steps to prevent users from encountering "file system full" messages. The
bdf command provides a simple tool for determining the amount of file system free space.
The bdf output has several fields:
Filesystem
Kbytes
Used
Avail
%used
Mounted on
Block device file of the file system
The number of kilobytes of total disk space on the file system
The number of kilobytes of disk space used by existing files
The number of kilobytes of available disk space on the file system
The percentage of disk space used by files
Directory to which the indicated file system is mounted
The -i option adds three columns to the output that report inode availability, too.
Iused
Ifree
%used
Number of inodes currently in use on the file system
Number of free inodes on the file system
Percentage of inodes used on the file system
H3064S J.00
10-10
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 10
Maintaining Logical Volumes and File Systems
To determine how much space is used beneath a directory, you can do this with the du
command. By default, du shows the amount of space in blocks of 512 bytes. The command
operates recursively, reporting disk usage in the specified directory, and in all of the
subdirectories below the specified directory.
The most commonly used du options include:
-k
Report output in kilobytes.
-s
Print only the grand total of disk usage for each of the specified directory
operands.
For further information refer to the du man page.
http://education.hp.com
H3064S J.00
10-11
© 2010 Hewlett-Packard Development Company, L.P.
Module 10
Maintaining Logical Volumes and File Systems
10–5. SLIDE: Reclaiming Wasted File System Space
Reclaiming Wasted File System Space
• Regularly trim log files and purge unnecessary files to reclaim wasted space
Trim
# >
# >
# >
# >
log files that grow without bound
/var/adm/wtmp
/var/adm/wtmps
/var/adm/btmp
/var/adm/btmps
Consider purging core files:
# find / -name core -exec rm -i {} \;
Consider purging large, old files:
# find / -atime +30 -size +1000c -exec ll -ud {} \;
Student Notes
There are some proactive measures that the administrator can take to prevent full file
systems.
Trimming Log Files
The /var file system is often among the first to cause “file system full" messages. /var
contains system log files and spool files that can quickly fill the file system if they aren't
monitored carefully.
Use the following syntax to purge existing messages from system log files:
> logfile
This command removes the contents of the log file without changing the file permissions,
owner, or group. You may wish to schedule a nightly or weekly batch job to trim your log
files automatically on a regular basis.
H3064S J.00
10-12
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 10
Maintaining Logical Volumes and File Systems
The examples on the slide trim four log files. /var/adm/wtmp and /var/adm/wtmps are
binary log files that record successful login attempts. Use the last command to view these
files. /var/adm/btmp and /var/adm/btmps are binary log files that record successful
login attempts. Use the lastb command to view these files.
Never trim a log file with the rm command, as doing so may cause the log file permissions to
be set improperly when the system recreates the log file.
Removing Core Files
A "core" file is occasionally created when a process terminates abnormally as a result of a
serious error condition or the QUIT signal. A core file resulting from either of these
situations contains a core image of the terminated process that can be used to troubleshoot
application bugs.
Core files can be quite large and should be removed from the system when no longer needed.
You can easily find and remove core files on the system with the find command:
# find / -name core -exec ll -d {} \;
# find / -name core -exec rm -i {} \;
list core files
remove core files
Large, Old Files
Often, users create large files, then forget to remove the files when they are no longer
needed. Periodically search for large files that haven't been recently accessed, and determine
if the files are still needed. Removing or archiving large, unneeded files may reclaim a
significant amount of disk space.
The find command can be used for this purpose. The example below finds and lists all files
in /tmp that are over 1000 characters in length, and haven't been accessed in at least 30 days:
# find /tmp -atime +30 -size +1000c -exec ll -ud {} \;
Print the resulting list of files, then contact the file owners to determine which files can be
removed. Note that the ll -u command lists file access times; without the -u option, the
ll command lists modification time stamps instead.
Extending a File System
If a file system reaches 100 percent of capacity and you have already purged all core and
large old files, you may need to add additional disk space. The next few slides describe the
process required to add a disk to a volume group, extend a logical volume, and extend a file
system.
http://education.hp.com
H3064S J.00
10-13
© 2010 Hewlett-Packard Development Company, L.P.
Module 10
Maintaining Logical Volumes and File Systems
10–6. SLIDE: Extending a Volume Group
Extending a Volume Group
• If a volume group is full, use vgextend to add additional disks
vg01
/dev/disk/disk1 /dev/disk/disk2
/dev/disk/disk3
# pvcreate -f /dev/rdisk/disk3
# vgextend vg01 /dev/disk/disk3
# vgdisplay -v vg01
Student Notes
In order to extend a file system, it may first be necessary to add a disk to the volume group
containing that file system's logical volume.
Adding a Disk to a Volume Group
Adding a disk to a volume group is a two-step process. First, pvcreate the new disk to
create the necessary LVM data structures. After creating the necessary LVM data structures
on the disk with pvcreate, add the disk to the existing volume group with vgextend. The
example on the slide adds disk disk3 to volume group vg01:
# pvcreate /dev/rdisk/disk3
Physical volume "/dev/rdisk/disk3" has been successfully created.
# vgextend vg01 /dev/disk/disk3
Volume group "vg01" has been successfully extended.
Volume Group configuration for /dev/vg01 has been saved in
/etc/lvmconf/vg01.conf
H3064S J.00
10-14
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 10
Maintaining Logical Volumes and File Systems
The vgextend command accepts multiple physical volumes as arguments, if you need to
add multiple disks to the volume group.
Checking the Volume Group Configuration
Use the pvdisplay and vgdisplay commands to verify that the disk was successfully
added to the volume group. Verify that the new physical volume is included in the
vgdisplay -v physical-volume list, and that the number of Free PE’s in the volume group
has increased. Also note the "VG Name" field in the pvdisplay output.
LVMv1 results:
# vgdisplay -v vg01
--- Volume groups --VG Name
VG Write Access
VG Status
Max LV
Cur LV
Open LV
Max PV
Cur PV
Act PV
Max PE per PV
VGDA
PE Size (Mbytes)
Total PE
Alloc PE
Free PE
Total PVG
Total Spare PVs
Total Spare PVs in use
VG Version
VG Max Size
VG Max Extents
/dev/vg01
read/write
available
2047
2
2
511
3
3
262144
6
4
750
8
742
0
0
0
2.2
this line only appears in 11i v3
1t
this line only appears in 11i v3
262144 this line only appears in 11i v3
--- Logical volumes --... list of vg01's logical volumes ...
--- Physical volumes --PV Name
PV Status
Total PE
Free PE
Autoswitch
Proactive Polling
/dev/disk/disk1
available
250
242
On
On
PV Name
PV Status
Total PE
Free PE
/dev/disk/disk2
available
250
250
http://education.hp.com
H3064S J.00
10-15
© 2010 Hewlett-Packard Development Company, L.P.
Module 10
Maintaining Logical Volumes and File Systems
PV Name
PV Status
Total PE
Free PE
Autoswitch
Proactive Polling
/dev/disk/disk3
available
250
250
On
On
H3064S J.00
10-16
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 10
Maintaining Logical Volumes and File Systems
10–7. SLIDE: Extending a Logical Volume
Extending a Logical Volume
• If a file system is full, use lvextend to extend the file system’s volume
Before
After
swapvol
swapvol
datavol
datavol
free
free
# lvextend -L 32 /dev/vg01/datavol /dev/disk/disk1
# lvdisplay -v /dev/vg01/datavol
Student Notes
After adding a disk to a volume group, you can allocate the physical extents from the new
disk to logical volumes within the volume group. Extending a logical volume requires just
one command: lvextend.
The example on the slide extends the /dev/vg01/datavol logical volume from 16MB to
32MB. The /dev/disk/disk1 argument forces LVM to allocate the new physical extents
from disk disk1. If you don't specify where LVM should allocate the new extents, LVM
simply uses the first available extents in the volume group. After extending the logical
volume, use lvdisplay to verify the results.
# lvextend -L 32 /dev/vg01/datavol /dev/disk/disk1
Logical volume "/dev/vg01/datavol" has been successfully extended.
Volume Group configuration for /dev/vg01 has been saved in
/etc/lvmconf/vg01.conf
http://education.hp.com
H3064S J.00
10-17
© 2010 Hewlett-Packard Development Company, L.P.
Module 10
Maintaining Logical Volumes and File Systems
# lvdisplay -v /dev/vg01/datavol
--- Logical volumes --LV Name
/dev/vg01/datavol
VG Name
/dev/vg01
LV Permission
read/write
LV Status
available/syncd
Mirror copies
0
Consistency Recovery
MWC
Schedule
parallel
LV Size (Mbytes)
32
Current LE
8
Allocated PE
8
Stripes
0
Stripe Size (Kbytes)
0
Bad block
on
Allocation
strict
IO Timeout (Seconds)
default
--- Distribution of logical volume --PV Name
LE on PV PE on PV
/dev/disk/disk1
8
8
--- Logical extents --LE
PV1
0000 /dev/disk/disk1
0001 /dev/disk/disk1
0002 /dev/disk/disk1
0003 /dev/disk/disk1
0004 /dev/disk/disk1
0005 /dev/disk/disk1
0006 /dev/disk/disk1
0007 /dev/disk/disk1
PE1
0004
0005
0006
0007
0008
0009
0010
0011
Status 1
current
current
current
current
current
current
current
current
NOTE:
A logical volume can span multiple physical volumes, but it cannot span
multiple volume groups. A logical volume can only be extended to other disks
in the logical volume's volume group.
NOTE:
Simply lvextending a logical volume does not extend the file system within
the logical volume. Turn to the next slide to learn how to make the new space
in the logical volume available to the file system.
H3064S J.00
10-18
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 10
Maintaining Logical Volumes and File Systems
10–8. SLIDE: Extending a File System
Extending a File System
• After extending a logical volume, manually extend the volume’s file system
/data
/data
After
file system
file system
Before
/dev/vg01/datavol
/dev/vg01/datavol
Extend a file system using OnlineJFS
# fsadm -F vxfs -b 32m /data
# bdf /data
Extend a file system without OnlineJFS
# umount /data
# extendfs -F vxfs /dev/vg01/rdatavol
# mount /data
# bdf /data
Student Notes
Simply extending a logical volume does not make the new space available for use by the file
system in the logical volume. The new space in the logical volume won’t be used until the file
system’s superblock, and other metadata structures have been notified that the new space is
available.
Extending a File System without OnlineJFS
In order to extend an HFS file system, or a JFS file system if you don’t have the OnlineJFS
product, the file system must be unmounted. After unmounting the file system, use
extendfs to make additional extents available for use by the file system, then remount and
check the file system size with bdf.
The example below extends the VxFS file system in /dev/vg01/datavol to fill the logical
volume.
# umount /data
# extendfs –F vxfs /dev/vg01/rdatavol
# mount /data
http://education.hp.com
H3064S J.00
10-19
© 2010 Hewlett-Packard Development Company, L.P.
Module 10
Maintaining Logical Volumes and File Systems
# bdf /data
The entire /dev/vg01/datavol logical volume is now available for use by the /data file
system.
Extending a File System with OnlineJFS
OnlineJFS makes it possible to extend a file system without unmounting. This proves
invaluable in high availability environments that can’t afford downtime.
The example below extends the file system in /dev/vg01/datavol to fill the 32MB logical
volume.
# fsadm –F vxfs –b 32M /data
# bdf /data
H3064S J.00
10-20
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 10
Maintaining Logical Volumes and File Systems
10–9. SLIDE: Reducing a File System
Reducing a File System
• If a file system is underutilized, use fsadm to reduce the file system size
/data
/data
Before
file system
file system
After
/dev/vg01/datavol
/dev/vg01/datavol
# fsadm -F vxfs -b 16M /data
# bdf /data
Student Notes
Although users typically ask for more disk space, not less, it is sometimes necessary to
reduce the size of a file system:
•
Removing an application or multiple user accounts may leave some file systems
underutilized; reduce the underutilized file system.
•
Changing priorities may require disk space previously allocated to one file system be
reallocated to another; doing so may require the original file system to be reduced.
Reducing a JFS File System with Online JFS
The Online JFS product provides the ability to reduce the size of a mounted file system. In
most cases, the JFS fsadm command will be able to reduce a file system successfully.
However, if JFS has already used some of the blocks at the end of the file system, the fsadm
command may fail, leaving the file system size unchanged.
http://education.hp.com
H3064S J.00
10-21
© 2010 Hewlett-Packard Development Company, L.P.
Module 10
Maintaining Logical Volumes and File Systems
The example below reduces the/data file system from 32MB to 16MB.
# fsadm -F vxfs -b 16m /data
# bdf /data
Note that the fsadm command allows you to specify the new file system size in 1MB units by
simply adding the suffix "M" to the size. With no suffix, the command expects that the size is
expressed in 1K blocks (DEV_BSIZE).
Reducing an HFS File System, or a JFS File System without OnlineJFS
In order to reduce an HFS file system, or a JFS file system without OnlineJFS, backup the file
system to tape, recreate it at the new size, and restore data from tape. The example below
reduces the size of the /data file system from 32MB to 16MB.
#
#
#
#
#
#
tar -c /data
(use your preferred backup utility here)
umount /data
newfs -F hfs -s 16384 /dev/vg01/rdatavol
mount /data
tar -x /data
(use your preferred restore utility here)
bdf /data
The –s option on the newfs command expects the file system size to be specified in
DEV_BSIZE blocks (1024 bytes each), not megabytes. 16MB is equivalent to 16,384 1024-byte
blocks.
NOTE:
Reducing a file system does not automatically reduce the logical volume that
the file system is in. The examples on the next slide explain how to reduce a
logical volume.
H3064S J.00
10-22
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 10
Maintaining Logical Volumes and File Systems
10–10. SLIDE: Reducing a Logical Volume
Reducing a Logical Volume
• After reducing a file system, use lvreduce to reduce the file system’s logical volume
After
Before
swapvol
swapvol
datavol
datavol
free
free
# bdf /data
# lvreduce -L 16 /dev/vg01/datavol
# lvdisplay -v /dev/vg01/datavol
Student Notes
The procedures described on the previous page only reduce the size of the file system within
a logical volume. After reducing a file system, be sure to reduce the logical volume
containing the file system, too. This is fairly straightforward. Execute bdf to verify that the
file system within the logical volume has been successfully reduced, then simply execute the
lvreduce command. A logical volume may be reduced while file systems are mounted, and
while the file system within the logical volume is being accessed!
The example below reduces the size of the /dev/vg01/datavol logical volume to 16MB.
# bdf /data
# lvreduce -L 16 /dev/vg01/datavol
# lvdisplay -v /dev/vg01/datavol
WARNING:
Reducing a logical volume without first reducing the file system within
the logical volume may irreparably corrupt the file system. Always
execute the bdf command before reducing a logical volume
containing a file system.
http://education.hp.com
H3064S J.00
10-23
© 2010 Hewlett-Packard Development Company, L.P.
Module 10
Maintaining Logical Volumes and File Systems
10–11. SLIDE: Removing a Logical Volume
Removing a Logical Volume
• If a logical volume is no longer needed, use lvremove to remove it
Before
After
swapvol
swapvol
datavol
free!
#
#
#
#
free!
umount /data
lvremove -f /dev/vg01/datavol
vi /etc/fstab
vgdisplay -v vg01
Student Notes
When a file system or logical volume is no longer needed, you may wish to remove it so its
space may be used for some other purpose.
A logical volume cannot be removed while it is still “open." Unmount the file system
contained in the logical volume. You may optionally decide to remove the file system’s
mount point, too.
# umount /data
Next, issue the lvremove command to remove the logical volume. If lvremove recognizes
file system structures in the logical volume, it will request confirmation before proceeding.
To avoid the confirmation message, use the –f (force) option on lvremove.
# lvremove -f /dev/vg01/datavol
H3064S J.00
10-24
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 10
Maintaining Logical Volumes and File Systems
Be sure to remove the logical volume’s entry from the /etc/fstab, too! Otherwise, the
next system boot will generate errors when the system attempts to mount a non-existent
logical volume.
# vi /etc/fstab
After the logical volume has been removed, check the vgdisplay command output to verify
that the number of free physical extents in the volume group has increased.
# vgdisplay -v vg01
WARNING:
The lvremove command clobbers the specified logical volume, as well as
the file system and/or data contained in the logical volume. There is no way
to “unremove” a logical volume!
http://education.hp.com
H3064S J.00
10-25
© 2010 Hewlett-Packard Development Company, L.P.
Module 10
Maintaining Logical Volumes and File Systems
10–12. SLIDE: Reducing a Volume Group
Reducing a Volume Group
• If a volume group is underutilized, use vgreduce to remove a disk
vg01
/dev/disk/disk1 /dev/disk/disk2
#
#
#
#
/dev/disk/disk3
pvdisplay -v /dev/disk/disk3
pvmove /dev/disk/disk3 /dev/disk/disk2
vgreduce vg01 /dev/disk/disk3
vgdisplay -v vg01
Student Notes
If only a small percentage of the physical extents in a volume group are currently in use,
consider removing one or more disks from the volume group so they may be more effectively
utilized elsewhere.
To remove a disk from a volume group, first verify that none of the extents on the disk are
currently in use. Use pvdisplay to determine which logical volumes touch the chosen disk.
# pvdisplay –v /dev/disk/disk3
If any extents on the disk are still in use, use the pvmove command to move them to another
disk in the volume group. The example shown below moves all of the extents from
/dev/disk/disk3 to /dev/disk/disk2. The destination disk specified by the second
argument must be another disk within the same volume group. Note that pvmove may be
executed while file systems are mounted and active!
# pvmove /dev/disk/disk3 /dev/disk/disk2
H3064S J.00
10-26
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 10
Maintaining Logical Volumes and File Systems
After removing the remaining extents from the disk, use vgreduce to take the disk out of
the volume group. Multiple disks can be removed from the volume group simultaneously by
listing multiple disk device files as arguments on the end of the vgreduce command.
# vgreduce vg01 /dev/disk/disk3
Finally, check the output from vgdisplay. The disk should no longer appear in the list of
physical volumes.
# vgdisplay –v vg01
http://education.hp.com
H3064S J.00
10-27
© 2010 Hewlett-Packard Development Company, L.P.
Module 10
Maintaining Logical Volumes and File Systems
10–13. SLIDE: Removing a Volume Group
Removing a Volume Group
• If a volume group is no longer needed, use vgremove to remove it.
• A volume group may only be removed if:
– it has exactly one physical volume
– no logical volumes
vg01
/dev/disk/disk1 /dev/disk/disk2
Remove a volume group in 11iv1 and v2:
# vgreduce vg01 /dev/disk/disk2
# vgremove vg01
# vgdisplay -v
# rm -ir /dev/vg01
Remove a volume group in 11iv3:
# vgreduce vg01 /dev/disk/disk2
# vgremove -X vg01
Student Notes
If a volume group is no longer needed, remove it to make the group’s disks available for use
elsewhere on the system.
NOTE:
A volume group may not be removed until all of its logical volumes have been
lvremoved, and all but one of its disks have been vgreduced out of the
volume group.
First, use the vgreduce command to remove all but one of the disks from the volume group.
The vgremove command that follows in the next step requires that the volume group
contain exactly one disk.
# vgreduce vg01 /dev/disk/disk2
H3064S J.00
10-28
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 10
Maintaining Logical Volumes and File Systems
After removing all but one disk, remove the volume group itself with the vgremove
command. In 11i v1 and v2, the vgremove command leaves one last vestige of the volume
group intact: the volume group device file directory. Be sure to manually remove the volume
group directory before proceeding.
# vgremove vg01
# rm -ir /dev/vg01
In 11i v3, the vgremove –X option automatically removes both the volume group and the
volume group device file.
# vgremove –X vg01
Shortcut
vgremove only works if all of the logical volumes in a volume group have been lvremove’d,
and all but one disk have been vgreduce’d from the volume group. When removing volume
groups with many disks and logical volumes, some administrators use the following shortcut
rather than vgremove.
First, unmount all of the file systems in the volume group and remove them from
/etc/fstab.
# umount /data
# vi /etc/fstab
Then use the vgchange –a n command to “deactivate” the volume group. Deactivating the
volume group makes the volume group temporarily inaccessible on the system.
# vgchange –a n vg01
Next, use vgexport to permanently remove the volume group from the system’s
/etc/lvmtab configuration file. vgexport is intended to be used when moving a volume
group from system to system. However, it can also be used to remove a volume group, even
if the volume group contains multiple disks and logical volumes. It also automatically
removes the volume group’s device file sub-directory.
# vgexport vg01
Unlike vgremove, vgexport leaves the volume group’s on-disk LVM headers in tact. Use
the pvcreate command with the –f force option to overwrite the old headers on each disk
with new LVM headers.
# pvcreate –f /dev/rdisk/disk1
# pvcreate –f /dev/rdisk/disk2
http://education.hp.com
H3064S J.00
10-29
© 2010 Hewlett-Packard Development Company, L.P.
Module 10
Maintaining Logical Volumes and File Systems
10–14. SLIDE: Removing a Physical Volume
Removing a Physical Volume
After removing a physical volume from a volume group, if the disk won’t be re-used
in a different volume group, use pvremove to remove the disk’s LVM headers
After
Before
PVRA/VGRA
disk1
disk1
Remove LVM headers
# pvremove /dev/rdisk/disk1
Scrub all remaining data from the disk (optional, only supported in 11i v3)
# mediainit –S –c 0 –t 3 /dev/rdisk/disk1
Student Notes
After removing a physical volume group from a volume group, if the physical volume is no
longer needed by LVM, use pvremove to remove the disk’s LVM headers. VxVM and other
disk managers may refuse to use a disk that contains a PVRA, even if the disk no longer
belongs to an active volume group.
# pvremove /dev/rdisk/disk1
11i v3 administrators can optionally scrub any remaining file system and user data from the
rest of the disk via the enhanced mediainit -S (scrub) option introduced in 11.31.0903.
Disk scrubbing is the process of repeatedly overwriting an entire disk with a single character.
The –c option specifies which character mediainit should repeatedly write to the disk. It
supports any character 0-9, a-z, or A-Z. The –t option specifies how many times mediainit
should overwrite the disk. The default is 3 times.
# mediainit –S –c 0 –t 3 /dev/rdisk/disk1
H3064S J.00
10-30
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 10
Maintaining Logical Volumes and File Systems
Beware: scrubbing a disk can take a long time!
11i v1 and 11i v2 administrators can scrub disks using the unsupported open source
diskscrub utility from http://sourceforge.net/projects/diskscrub/.
http://education.hp.com
H3064S J.00
10-31
© 2010 Hewlett-Packard Development Company, L.P.
Module 10
Maintaining Logical Volumes and File Systems
10–15. LAB: Maintaining Logical Volumes and File Systems
Directions
Record the commands used to complete the exercises below, and answer all questions.
Part 1: Preliminary Steps
1. The exercises in this lab assume that you already have the following logical volumes:
/dev/vg01/swapvol
/dev/vg01/datavol
If you already have these logical volumes, you can skip ahead to Part 2 of the lab.
Otherwise, create an LVMv2.2 volume group called vg01 with your spare disk. Specify
maximum volume group size 1TB with a 4MB extent size. Create two 32MB logical
volumes in vg01 called datavol and swapvol.
H3064S J.00
10-32
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 10
Maintaining Logical Volumes and File Systems
Part 2: Removing Logical Volumes and Volume Groups
Occasionally, changing priorities may require you to reallocate your system’s disk space;
some logical volumes may need to be removed in order to make space for others to be
created. The goal of this first part of the lab exercise is to remove the vg01 volume group
that you created in the previous chapters. This will free your spare disk for use in the next
part of the lab.
1. First, see what happens if you simply try to vgremove vg01.
# vgremove vg01
What happens? Can you remove a volume group that still contains logical volumes?
2. Hopefully, the previous question demonstrated that you can’t remove a volume group that
still contains logical volumes. Try removing some of the logical volumes in vg01.
# lvremove /dev/vg01/swapvol
# lvremove /dev/vg01/datavol
What happens?
3. Do whatever is necessary to remove all the logical volumes in vg01, as well as the
volume group itself.
4. Use pvremove to remove the LVM headers from the top of the disk. To save time, do not
scrub the disk via mediainit.
5. Be sure to remove /data from /etc/fstab before proceeding. Otherwise, your next
system boot will hang!
http://education.hp.com
H3064S J.00
10-33
© 2010 Hewlett-Packard Development Company, L.P.
Module 10
Maintaining Logical Volumes and File Systems
Part 3: Extending Volume Groups, Logical Volumes, and File
Systems
Users and applications constantly create and extend files and directories on HP-UX systems.
If a file system isn’t carefully monitored, you may end up with a full file system. This exercise
gives you an opportunity to experience that problem!
1. You should have a script on your system called /labs/fillfs.sh. The fillfs.sh
script will fill one of your file systems to capacity. Run fillfs.sh. As the script
executes, you may see a number of file system full messages scroll across your screen.
Don't worry — yet!
# /labs/fillfs.sh
2. Which file system appears to be full? Which logical volume contains the file system?
3. What happens at this point if a user tries to copy a file to the full file system? Is anything
recorded in syslog.log? Copy a large file (e.g., /stand/vmunix) to /home to find
out!
4. Purging unneeded files from a file system is one approach to solving full file system
problems. Are there any core files in the problem file system that can be removed? If
so, remove them.
H3064S J.00
10-34
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 10
Maintaining Logical Volumes and File Systems
5. You may be able free some space in the file system by purging files, but in many cases,
you will need to add some additional space to the file system. First, add a second disk to
vg00 to ensure that you have space to extend your logical volume. Use vgdisplay to
ensure that the new disk was successfully added to the volume group.
6. Use lvdisplay to determine the current size of the logical volume containing the
/home file system, and record the size below.
7. Add 64MB to the logical volume containing /home. Which disk contains the new extents?
What command did you use to find out?
8. Using bdf, check to see if the /home file system contained in the logical volume you just
extended increased in size. Does extending a logical volume automatically extend the file
system within the logical volume?
9. Use extendfs to extend the /home file system to take advantage of the additional
space in the logical volume.
http://education.hp.com
H3064S J.00
10-35
© 2010 Hewlett-Packard Development Company, L.P.
Module 10
Maintaining Logical Volumes and File Systems
10. Add another 64MB to the logical volume containing /home.
11. Now extend the file system, too. This time, use OnlineJFS. What is the advantage of
using the OnlineJFS functionality?
12. What happens if you try to extend the file system, without increasing the size of the
logical volumes? Use fsadm to extend /home to 1024MB. Explain the resulting
message.
13. Before moving on, remove the "bigfiles" from user5's home directory.
# rm /home/user5/bigfile*
H3064S J.00
10-36
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 10
Maintaining Logical Volumes and File Systems
Part 4: Reducing File Systems, Logical Volumes and Volume
Groups
Before moving on, reduce the /home file system back to its original size and remove the
second disk from vg00.
1. At this point, very little space in /home is actually in use. Try reducing the logical volume
containing the file system back to its original size. Does this succeed?
# lvreduce –L 80 /dev/vg00/lvolx
Use your LV’s name and original size.
2. Do whatever is necessary to reduce the file system back to its original size using
OnlineJFS.
3. Verify that the previous step succeeded.
4. Now reduce the logical volume containing /home, too. You will probably be prompted
with a warning, noting that “useful data may be lost”. Assuming that the bdf command in
the previous question confirmed that the file system was actually reduced, proceed with
the lvreduce despite the warning.
5. Most likely, none of the extents on the second disk in the volume group are in use
currently. Use pvdisplay –v to verify that the disk is empty, then remove it from vg00.
http://education.hp.com
H3064S J.00
10-37
© 2010 Hewlett-Packard Development Company, L.P.
Module 10
Maintaining Logical Volumes and File Systems
Part 5: (Optional) Defragmenting and Repairing File Systems
Over time, a file system may become fragmented and degrade performance. Improper
shutdowns and other disasters may introduce file system corruption. This portion of the lab
provides an opportunity to explore these scenarios.
1. First, let’s defragment the /home file system. Include the options required to display
before and after fragmentation reports.
2. How successful was the defragmentation utility? Check the before and after values for
“Directories to reduce” and “Average number of extents”
3. Next, unmount the /home file system and run fsck to check for file system corruption.
Does fsck identify any problems? Leave the file system unmounted.
4. Run fsck on the /home file system again, but this time use the–o full,nolog options.
When asked if you wish to clear the intent log, flush fileset headers, and mark the file
system CLEAN, answer y (yes). How does fsck behave differently this time?
5. Mount all of the vg00 file systems before proceeding to the next chapter.
H3064S J.00
10-38
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 10
Maintaining Logical Volumes and File Systems
10–16. LAB SOLUTIONS: Maintaining Logical Volumes and File
Systems
Directions
Record the commands used to complete the exercises below, and answer all questions.
Part 1: Preliminary Steps
1. The exercises in this lab assume that you already have the following logical volumes:
/dev/vg01/swapvol
/dev/vg01/datavol
If you already have these logical volumes, you can skip ahead to Part 2 of the lab.
Otherwise, create an LVMv2.2 volume group called vg01 with your spare disk. Specify
maximum volume group size 1TB with a 4MB extent size. Create two 32MB logical
volumes in vg01 called datavol and swapvol.
Answer:
#
#
#
#
pvcreate
vgcreate
lvcreate
lvcreate
-f
–V
-L
-L
/dev/rdisk/diska
2.2 –S 1t –s 4 vg01 /dev/disk/diska
32 -n swapvol vg01
32 -n datavol vg01
http://education.hp.com
H3064S J.00
10-39
© 2010 Hewlett-Packard Development Company, L.P.
Module 10
Maintaining Logical Volumes and File Systems
Part 2: Removing Logical Volumes and Volume Groups
Occasionally, changing priorities may require you to reallocate your system’s disk space;
some logical volumes may need to be removed in order to make space for others to be
created. The goal of this first part of the lab exercise is to remove the vg01 volume group
that you created in the previous chapters. This will free your spare disk for use in the next
part of the lab.
1. First, see what happens if you simply try to vgremove vg01.
# vgremove vg01
What happens? Can you remove a volume group that still contains logical volumes?
Answer:
The command fails. A volume group can’t be removed until all the logical volumes in the
volume group have first been removed.
2. Hopefully, the previous question demonstrated that you can’t remove a volume group that
still contains logical volumes. Try removing some of the logical volumes in vg01.
# lvremove /dev/vg01/swapvol
# lvremove /dev/vg01/datavol
What happens?
Answer:
Attempting to remove an unused logical volume like /dev/vg01/swapvol may yield a
confirmation message, but does ultimately succeed. Attempting to remove a logical
volume containing a mounted file system like /dev/vg01/datavol fails.
3. Do whatever is necessary to remove all the logical volumes in vg01, as well as the
volume group itself.
Answer:
# umount /data
# lvremove /dev/vg01/datavol
# vgremove –X vg01
4. Use pvremove to remove the LVM headers from the top of the disk. To save time, do not
scrub the disk via mediainit.
Answer:
# pvremove /dev/rdisk/diska
H3064S J.00
10-40
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 10
Maintaining Logical Volumes and File Systems
5. Be sure to remove /data from /etc/fstab before proceeding. Otherwise, your next
system boot will hang!
Answer:
# vi /etc/fstab
/dev/vg01/datavol /data vxfs defaults 0 3
http://education.hp.com
H3064S J.00
10-41
© 2010 Hewlett-Packard Development Company, L.P.
Module 10
Maintaining Logical Volumes and File Systems
Part 3: Extending Volume Groups, Logical Volumes, and File
Systems
Users and applications constantly create and extend files and directories on HP-UX systems.
If a file system isn’t carefully monitored, you may end up with a full file system. This exercise
gives you an opportunity to experience that problem!
1. You should have a script on your system called /labs/fillfs.sh. The fillfs.sh
script will fill one of your file systems to capacity. Run fillfs.sh. As the script
executes, you may see a number of file system full messages scroll across your screen.
Don't worry — yet!
# /labs/fillfs.sh
2. Which file system appears to be full? Which logical volume contains the file system?
Answer:
# bdf
The /home file system should be nearly 100% full. The name of the logical volume
containing /home may vary.
3. What happens at this point if a user tries to copy a file to the full file system? Is anything
recorded in syslog.log? Copy a large file (e.g., /stand/vmunix) to /home to find
out!
Answer:
# cp /stand/vmunix /home
# tail /var/adm/syslog/syslog.log
The cp command will generate an error message on the screen, and the administrator
will see a message in /var/adm/syslog/syslog.log, too.
4. Purging unneeded files from a file system is one approach to solving full file system
problems. Are there any core files in the problem file system that can be removed? If
so, remove them.
Answer:
# find /home –name core
# rm /home/user5/core
The find command should find one core file in /home/user5.
H3064S J.00
10-42
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 10
Maintaining Logical Volumes and File Systems
5. You may be able free some space in the file system by purging files, but in many cases,
you will need to add some additional space to the file system. First, add a second disk to
vg00 to ensure that you have space to extend your logical volume. Use vgdisplay to
ensure that the new disk was successfully added to the volume group.
Answer:
# pvcreate –f /dev/rdisk/diska
# vgextend vg00 /dev/disk/diska
# vgdisplay –v
disk DSF name will vary
disk DSF name will vary
The vgdisplay command should now show two physical volumes in the volume group.
Also, the number of free physical extents should increase dramatically with the addition
of the second disk to the volume group.
6. Use lvdisplay to determine the current size of the logical volume containing the
/home file system, and record the size below.
Answer:
# lvdisplay –v /dev/vg00/lvolx
LV name will vary
7. Add 64MB to the logical volume containing /home. Which disk contains the new extents?
What command did you use to find out?
Answer:
# lvextend –L 128 /dev/vg00/lvolx size will vary
# lvdisplay –v /dev/vg00/lvolx
verify the new LV size
lvextend should have taken the first free physical extents in the volume group, which,
very likely, are on the first disk in the volume group.
8. Using bdf, check to see if the /home file system contained in the logical volume you just
extended increased in size. Does extending a logical volume automatically extend the file
system within the logical volume?
Answer:
# bdf /home
bdf suggests that the file system hasn’t changed in size. The file system won’t take
advantage of the additional space in the logical volume until you execute extendfs or
fsadm.
http://education.hp.com
H3064S J.00
10-43
© 2010 Hewlett-Packard Development Company, L.P.
Module 10
Maintaining Logical Volumes and File Systems
9. Use extendfs to extend the /home file system to take advantage of the additional
space in the logical volume.
Answer:
#
#
#
#
umount /home
extendfs –F vxfs /dev/vg00/rlvolx
mount /home
bdf /home
LV name will vary
10. Add another 64MB to the logical volume containing /home.
Answer:
# lvdisplay –v /dev/vg00/lvolx
# lvextend –L 192 /dev/vg00/lvolx
LV name will vary
Size will vary
11. Now extend the file system, too. This time, use OnlineJFS. What is the advantage of
using the OnlineJFS functionality?
Answer:
# bdf /home
# fsadm –F vxfs –b 192m /home
# bdf /home
Size will vary
Advantage: OnlineJFS doesn’t require unmounting the file system.
12. What happens if you try to extend the file system, without increasing the size of the
logical volumes? Use fsadm to extend /home to 1024MB. Explain the resulting
message.
Answer:
# bdf /home
# fsadm –F vxfs -b 1024m /home
# bdf /home
The file system can’t be extended any further because there isn’t any more space in the
logical volume. However, no harm was done.
13. Before moving on, remove the "bigfiles" from user5's home directory.
# rm /home/user5/bigfile*
H3064S J.00
10-44
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 10
Maintaining Logical Volumes and File Systems
Part 4: Reducing File Systems, Logical Volumes and Volume
Groups
Before moving on, reduce the /home file system back to its original size and remove the
second disk from vg00.
1. At this point, very little space in /home is actually in use. Try reducing the logical volume
containing the file system back to its original size. Does this succeed?
# lvreduce –L 80 /dev/vg00/lvolx
Use your LV’s name and original size.
Answer:
The command should fail. LVM won’t let you reduce the logical volume until you first
reduce the file system in the logical volume.
2. Do whatever is necessary to reduce the file system back to its original size using
OnlineJFS.
Answer:
# fsadm –F vxfs –b 80m /home
3. Verify that the previous step succeeded.
Answer:
# bdf /home
4. Now reduce the logical volume containing /home, too. You will probably be prompted
with a warning, noting that “useful data may be lost”. Assuming that the bdf command in
the previous question confirmed that the file system was actually reduced, proceed with
the lvreduce despite the warning.
Answer:
# lvreduce –L 80 /dev/vg00/lvolx
LV name and size will vary
5. Most likely, none of the extents on the second disk in the volume group are in use
currently. Use pvdisplay –v to verify that the disk is empty, then remove it from vg00.
Answer:
# pvdisplay -v /dev/disk/diska | more
# vgreduce vg00 /dev/disk/diska
# vgdisplay –v vg00
http://education.hp.com
Disk DSF name will vary
Disk DSF name will vary
H3064S J.00
10-45
© 2010 Hewlett-Packard Development Company, L.P.
Module 10
Maintaining Logical Volumes and File Systems
Part 5: (Optional) Defragmenting and Repairing File Systems
Over time, a file system may become fragmented and degrade performance. Improper
shutdowns and other disasters may introduce file system corruption. This portion of the lab
provides an opportunity to explore these scenarios.
1. First, let’s defragment the /home file system. Include the options required to display
before and after fragmentation reports.
Answer:
# fsadm -F vxfs -deDE /home
Output will vary.
2. How successful was the defragmentation utility? Check the before and after values for
“Directories to reduce” and “Average number of extents”
Answer:
Most likely, your file system had very little fragmentation to begin with, so the utility
provided little benefit this time.
3. Next, unmount the /home file system and run fsck to check for file system corruption.
Does fsck identify any problems? Leave the file system unmounted.
Answer:
# umount /home
# fsck -F vxfs /dev/vg00/rlvolx
LV name may vary
There shouldn't be any corruption since the file system was properly unmounted.
4. Run fsck on the /home file system again, but this time use the–o full,nolog options.
When asked if you wish to clear the intent log, flush fileset headers, and mark the file
system CLEAN, answer y (yes). How does fsck behave differently this time?
Answer:
# fsck -F vxfs –o full,nolog /dev/vg00/rlvolx LV name may vary
With the –o full,nolog options, fsck ignores the intent log and performs a complete
check of the file system.
5. Mount all of the vg00 file systems before proceeding to the next chapter.
Answer:
# mount –a
H3064S J.00
10-46
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11 — Preparing for Disasters
Objectives
Upon completion of this module, you will be able to do the following:
•
Describe the benefits of HP’s boot disk mirroring alternatives.
•
Describe the benefits of HP’s Dynamic Root Disk (DRD) product.
•
Describe the benefits of HP’s Ignite-UX make_*_recovery recovery tools.
•
Install the DRD product.
•
Create or update a DRD clone, with or without a mirror.
•
Access inactive DRD images via DRD-safe SD-UX commands.
•
Access inactive DRD images via other commands.
•
Activate or deactivate an inactive DRD image.
•
Create a make_tape_recovery system recovery archive.
•
Create a make_net_recovery system recovery archive.
•
List steps needed to document the system configuration to ensure a successful recovery.
http://education.hp.com
H3064S J.00
11-1
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
11–1. SLIDE: Disaster Recovery Concepts
Disaster Recovery Concepts
• Natural disasters, hardware failures, or administrator errors may render a
system unbootable or unusable
• This module considers several HP-UX utilities that you can use to ensure a
fast, successful boot disk recovery:
– Boot Disk Mirroring
– Dynamic Root Disk
– Ignite-UX Recovery Tools
My boot disk
crashed! Help!
lvol1
lvol2
lvol3
boot disk
NOTE:
My boot disk
crashed, but I’ve
got a DRD clone
and a recovery
tape that I can
boot from!
The tools described in this chapter backup vg00 only
Be sure to backup user and application data, too!
Student Notes
Even the most carefully administered systems may be rendered unbootable
• By flood, fire, or other natural disasters
• By a serious server, HBA, or disk hardware failure
• By careless system administration errors
This module explores several HP-UX solutions designed to ensure that when a failure or
disaster does occur, you can successfully boot your system.
•
Use a LVM Mirrordisk/UX, VxVM mirroring, HP’s SmartArray controller cards, or a
SAN-based mirroring solution to create a mirror copy of the boot disk. If the primary
mirror fails, the operating system can continue running via the boot disk mirror.
•
Use HP’s Dynamic Root Disk (DRD) product to create a bootable “clone” image of the
boot disk. If the boot disk becomes corrupted or unusable, simply reboot from the
H3064S J.00
11-2
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
DRD clone.
•
Use HP’s Ignite-UX recovery tools to create a bootable recovery tape or bootable
network recovery archive. In case of disaster, use the recovery archive to restore the
operating system to a new server.
A Note about User and Application Data
This chapter focuses on operating system recovery tools only. Most HP-UX customers today
use HP’s DataProtector product, or similar third party enterprise backup/recovery solutions
to backup user and application data.
If you do not have a third party backup solution, 11i v1/v2 administrator can use SAM’s
simple fbackup/frecover backup/recovery interface. 11i v3 administrators should use
the SMH’s pax backup/recovery interface. See the SMH help screens for details.
HP-UX also includes standard UNIX backup tools such as tar, cpio, dd, dump, and
restore. For more information on these tools, see the man pages.
http://education.hp.com
H3064S J.00
11-3
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
11–2. SLIDE: Part 1: Mirroring the Boot Disk
Preparing for
Disasters
Part 1: Mirroring the Boot Disk
Student Notes
H3064S J.00
11-4
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
11–3. SLIDE: Mirroring Concepts
Mirroring Concepts
•
•
•
Mirroring the boot disk creates and maintains an identical copy of the primary
boot disk that remains accessible if the primary boot fails
Mirroring the boot disk does not protect against administrator error,
or server hardware failures
Mirroring solutions:
– LVM Mirrordisk/UX
– VxVM mirroring
– HP SmartArray Controller
– SAN-based mirroring solutions
/stand
/stand
swap
swap
/
/
n?
isk dow
Boot D blem!
No pro
Student Notes
HP highly recommends that all HP-UX implement a boot disk mirroring solution.
Mirroring solutions create and maintain a duplicate copy of one or more disks or volumes. If
one of the disks fails, the operating system can continue running via the mirror. Mirroring
ensures that your data remains accessible when a disk, HBA, or array controller card fails.
Mirroring does not protect against server failure, software defects, or administrator error. To
ensure that you can quickly restore the operating system if a serious administrator error,
software defect, or hardware failure renders an entire system unbootable, you should also
create an offline DRD clone disk and make_*_recovery archive as described later in this
chapter.
HP offers several different mirroring solutions.
LVM Mirrordisk/UX
Mirrordisk/UX is an optional product that may be used to mirror both boot disk and data
volumes on an HP-UX system. Mirrordisk/UX is a “software” mirroring solution, which does
http://education.hp.com
H3064S J.00
11-5
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
require an additional software license, but does not require special hardware. This is the
most common HP-UX boot disk mirroring solution.
The PARISC and Integrity boot modules later in this course include optional boot disk
mirroring cookbook labs. For more information, attend HP’s in-depth LVM administration
course, course# H6285S.
VxVM Mirroring
VxVM also provides software-based mirroring for both boot and data volumes. HP-UX
includes a VxVM boot disk mirroring license. Mirroring data volumes, however, requires an
additional license. Customers who choose to use VxVM to manage data disks frequently
choose to use VxVM to mirror the operating system volumes across their systems’ internal
boot disks, too.
For more information, attend HP’s in-depth VxVM administration course, course# HB505S.
HP SmartArray Controller
Many of HP’s current server products offer an optional SmartArray Controller Card. The
SmartArray Controller Card provides hardware-based RAID mirroring for internal SCSI or
SAS disks. The SmartArray Controller Card is easy to manage, and because it is hardwarebased, it imposes no additional overhead on the HP-UX kernel.
To learn more, read the HP Smart Array SAS Controllers for Integrity Servers Support
Guide: HP-UX 11i v2 and 11i v3 on http://docs.hp.com.
SAN-Based Mirroring Solutions
Most HP-UX systems today use SAN-based, RAID-protected LUNs to store user and
application data. You can also install the operating system itself on a SAN-based LUN as long
as your fibre channel HBA offers boot support. See your server and HBA QuickSpecs to
verify that your fibre channel card provides boot support.
To learn more, and to decide if a SAN boot solution is appropriate for your environment, read
HP’s HP-UX boot over SAN white paper on http://docs.hp.com.
H3064S J.00
11-6
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
11–4. SLIDE: Part 2: Dynamic Root Disks
Preparing for
Disasters
Part 2: Dynamic Root Disks
Student Notes
http://education.hp.com
H3064S J.00
11-7
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
11–5. SLIDE: DRD Concepts
DRD Concepts
DRD enables the administrator to create a point-in-time clone of the vg00 volume group
• Original vg00 image remains active
• Cloned vg00 image remains inactive until needed
• Unlike boot disk mirrors, DRD clones are unaffected by vg00 changes
DRD is an optional, free product on the 11i v2 and v3 application media
lvol1
lvol2
lvol3
lvol1
lvol2
lvol3
lvol1
lvol2
lvol3
lvol1
lvol2
lvol3
boot disk boot mirror
clone disk
clone mirror
original vg00 (active)
cloned vg00 (inactive)
Student Notes
Most HP-UX administrators implement disk mirroring to protect against disk hardware
failures. However, a careless typo by a system administrator, security breaches, or a critical
software defect could corrupt both mirrors.
HP’s Dynamic Root Disk (DRD) product is a new tool that enables software maintenance and
recovery on an HP-UX operating system with minimum system down time. Using DRD, you
can easily and safely copy a system image from an existing boot volume group or disk group
to a “clone” volume group.
DRD ensures that the clone volume group’s LVM structure, file systems, files, and directories
are identical to the original volume group. If the original boot disk is mirrored, DRD can
optionally create a mirror in the clone volume group, too.
After the clone is initially created, the clone remains unchanged when the administrator
makes changes on the active boot disk. Thus, administrator errors may affect both boot disk
mirrors, while leaving the DRD untouched.
H3064S J.00
11-8
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
11–6. SLIDE: Using DRD Clones to Minimize Unplanned
Downtime
Using DRD Clones to Minimize Unplanned Downtime
Without DRD: In case of OS mis-configuration, it may be necessary to restore from tape
With DRD: In case of OS mis-configuration, simply activate and boot the clone
Original
boot VG is
corrupted
lvol1
lvol2
lvol3
lvol1
lvol2
lvol3
boot disk boot mirror
original vg00 (unusable)
So activate
the clone!
lvol1
lvol2
lvol3
lvol1
lvol2
lvol3
boot disk boot mirror
original vg00 (unusable)
lvol1
lvol2
lvol3
lvol1
lvol2
lvol3
clone disk
clone mirror
cloned vg00 (inactive)
lvol1
lvol2
lvol3
lvol1
lvol2
lvol3
clone disk
clone mirror
cloned vg00 (active)
Student Notes
Mirroring an LVM boot disk ensures that a system remains accessible even if the primary
boot disk fails. However, system administration errors, security breaches, and critical
software defects could render both mirrors unbootable.
If both boot disk mirrors are corrupted, but a DRD clone is available, the administrator can
quickly bring the system back online by activating and booting the DRD clone.
http://education.hp.com
H3064S J.00
11-9
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
11–7. SLIDE: Using DRD Clones to Minimize Planned Downtime
Using DRD Clones to Minimize Planned Downtime
Without DRD: Software and kernel management may require extended downtime
With DRD: Install/remove software on the clone while applications continue running
Install patches &
tune the kernel
on the clone;
applications
remain running
Activate the
clone to make
changes take
effect
lvol1
lvol2
lvol3
lvol1
lvol2
lvol3
boot disk boot mirror
vg00 (active)
lvol1
lvol2
lvol3
lvol1
lvol2
lvol3
boot disk boot mirror
vg00 (inactive)
lvol1
lvol2
lvol3
lvol1
lvol2
lvol3
clone disk
clone mirror
cloned vg00 (inactive/patched)
lvol1
lvol2
lvol3
lvol1
lvol2
lvol3
clone disk
clone mirror
cloned vg00 (active/patched)
Student Notes
DRD can minimize planned downtime, too.
Installing software and patches and tuning the kernel sometimes requires system downtime.
Using DRD commands, you can apply patches, tune the kernel, and even update the
operating system on the cloned system image without affecting the active system image.
Then, during the next convenient maintenance window, reboot the system from the
patched/cloned system image with very minimal downtime. If the changes cause problems,
simply reboot using the original disk!
H3064S J.00
11-10
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
11–8. SLIDE: Installing DRD
Installing DRD
• DRD is included in current 11i v2 and v3 operating environments or ...
• Download and install DRD from http://software.hp.com
Review current DRD installation instructions
# firefox http://docs.hp.com/en/DRD
Download DRD
# firefox http://software.hp.com
Install DRD with swinstall (no reboot required)
# swinstall –s /tmp/DynRootDisk*.depot DynRootDisk
Student Notes
DRD is now included in the 11i v2 and 11i v3 operating environments. Alternatively,
download and install the latest version of the product from http://software.hp.com.
Before installing DRD, review the installation instructions on the
http://docs.hp.com/en/DRD documentation site for the current list of patches and
dependencies.
Installing the DRD product does not require a reboot.
# swinstall –s /tmp/DynRootDisk*.depot DynRootDisk
http://education.hp.com
H3064S J.00
11-11
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
11–9. SLIDE: Using the drd Command
Using the drd Command
• Most DRD tasks require a single command, drd, which supports multiple “modes”
Example:
# drd clone –t /dev/dsk/cytydy –x overwrite=true
Other available modes:
# drd
# drd clone ...
# drd sync ...
# drd mount ...
# drd umount ...
# drd runcmd ...
# drd activate ...
# drd deactivate
# drd status
view available modes and options
create a DRD clone
Synchronize/update a DRD clone
mount the DRD clone’s file systems
unmount the DRD clone’s file systems
execute a command on the clone’s file systems
make the DRD clone the default boot disk after next reboot
retain the current active image as the default boot disk
display information about active/inactive DRD images
DRD offers several common options that are supported in all modes
# drd mode -?
view available options
# drd mode –x ?
view available extended options
# drd mode [-x verbosity=3] ...
specify stdout/stderr verbosity, 0-5
# drd mode [-x log_verbosity=4] ... specify log file verbosity, 0-5
# drd mode [-qqq|qq|q|v|vv|vvv] ... alternative to –x verbosity=n
# drd mode [–p] ...
preview but don’t execute the operation
Student Notes
Most DRD tasks require a single command, drd, which supports multiple DRD operation
modes. The mode specified determines what the drd command does. Most modes support
some options, as well as some extended options that offer even greater flexibility. Consider
the example below:
# drd clone –t /dev/dsk/cytydy –x overwrite=true
# drd clone –t /dev/disk/disk3 –x overwrite=true
•
•
•
•
OR
The clone mode creates a clone of the current active boot disk.
The -t /dev/dsk/cytydy option identifies the target disk to be configured as a clone.
The –t /dev/disk/disk3 option identifies the target disk using persistant DSF’s
The –x overwrite extended option indicates that the target disk may be overwritten if it
contains LVM and/or file system headers.
H3064S J.00
11-12
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
The list below provides a brief description of supported drd modes. The next few slides
describe each mode in detail.
#
#
#
#
#
#
#
#
#
#
#
drd
drd
drd
drd
drd
drd
drd
drd
drd
drd
drd
mode -?
mode –x ?
clone ...
sync ...
mount ...
umount ...
runcmd ...
activate ...
deactivate
status
View available modes
View options available for the specified mode
View extended options available for the specified mode
Create a DRD clone
Synchronize/update a DRD clone
Mount the DRD clone’s file systems
Unmount the DRD clone’s file systems
Execute a command on the clone’s file systems
Make the inactive image the default boot disk at next reboot
Retain the active image as the default boot disk at next reboot
Displays information about the active/inactive DRD images
DRD also supports a feature called “re-hosting” that makes it possible to clone the boot disk
on one system and “rehost” network and host-specific settings on the such that the clone can
serve as a boot disk for a new system, assuming the new system has identical hardware.
Rehosting is beyond the scope of this course. See the DRD Administrator’s Guide on
http://docs.hp.com for details.
# drd rehost ...
# drd unrehost ...
Prepare the DRD clone to serve as a boot disk on another host
Undo the rehost operation
All drd operations require root privileges.
Common Options
All drd modes support the options described below. Some modes support mode-specific
options, too, which are described later in the chapter.
# drd mode -?
Displays a list of options supported by the specified mode.
# drd mode -x ?
Displays a list of “extended” options supported by the specified mode. Several common
extended options are described below.
# drd mode -x verbosity=3 ...
Specifies the level of verbosity reported by drd on STDOUT/STDERR. Allowed log levels
range from 0 to 5 as shown in the table below. 3 is the default STDOUT/STDERR log
verbosity level.
0
1
2
3
4
5
Only ERRORS and the starting/ending BANNER messages.
Adds WARNING messages.
Adds NOTE messages.
Adds INFO messages (informational messages preceded by the * character.)
Adds verbose INFO messages.
Adds additional detailed INFO messages.
http://education.hp.com
H3064S J.00
11-13
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
# drd mode -x log_verbosity=4
Specifies the level of verbosity reported by drd in the /var/opt/drd/drd.log file.
Allowed log levels range from 0 to 5 as shown in the table above. 4 is the default log file
verbosity level.
The /var/opt/drd/drd.log file is maintained on the active system image. The log on
the active system image will be complete, ending with the final banner message.
Since the log file is located in the /var file system, it will be copied during the clone
operation to the /var file system on the clone. However, since the clone file systems
must be unmounted before drd writes the final log messages, the record of the clone
operation in the log on the clone will be truncated at the message indicating that file
systems are being copied. The next message in the log on the clone will be issued by the
next DRD command executed on the clone itself after it is booted.
# drd mode [-qqq|qq|q|v|vv|vvv] ...
These options provide an alternative to the –x verbosity=n option. The log verbosity
level decreases by one for each q, and increases by one for each v, from a minimum value
of 0 to a maximum value of 5.
# drd mode -p
Enables preview mode. When executed with the -p option, drd determines if the
operation can be completed, but doesn’t perform the operation. This option isn’t
supported with drd runcmd.
H3064S J.00
11-14
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
11–10. SLIDE: Creating a DRD Clone
Creating a DRD Clone
Use the drd clone command to create a DRD clone of the active boot disk
• DRD identifies the current active boot disk
• DRD builds a similarly structured clone disk
• DRD copies the current disk’s file system contents to the clone
• DRD builds a mirror of the clone, too, if requested
• DRD records log messages in /var/opt/drd/drd.log
Identify an available disk
# ioscan –funC disk
# strings /etc/lvmtab
# vxdisk list
# diskinfo /dev/rdisk/disk3
list all disks on the system
which disks are LVM disks?
which disks are VxVM disks?
verify the disk size
Clone the current active boot disk
# drd clone –t /dev/disk/disk3 \
[–x overwrite=false] \
[-x mirror_disk=/dev/disk/disk4]
specify a target disk (required!)
overwrite data on target
create a mirror of the DRD
Student Notes
After installing the DRD product, use the drd clone command to create a clone of the
active boot disk.
•
DRD identifies the current active boot disk
•
DRD builds a similarly structured clone disk
•
DRD copies the current disk’s file system contents to the clone
•
DRD builds a mirror of the clone, too, if requested
•
DRD records log messages in /var/opt/drd/drd.log
http://education.hp.com
H3064S J.00
11-15
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
Identifying Available Disks
First, identify an available disk for use in the cloned volume group. Use ioscan –funC
disk to display a list of disks on the system. Review the contents of the /etc/lvmtab file
and the output from vxdisk list to determine which disks are already being used by LVM
and VxVM. If the vxdisk command displays an IPC error, VxVM isn’t enabled on your
system, and you can assume that none of the disks contain VxVM headers. Use the
diskinfo command to verify that the selected disk is at least as large as the existing boot
disk.
#
#
#
#
ioscan –funNC disk
strings /etc/lvmtab
vxdisk list
diskinfo /dev/rdisk/disk3
If the existing boot disk is mirrored, you may wish to include two disks in the cloned volume
group to ensure that the system is mirrored, no matter which system image you boot.
If a disk currently belongs to an imported LVM volume group or VxVM disk group, the disk
must be removed from the group before DRD can use the disk. If a disk already contains an
outdated clone image that you wish to overwrite, execute drd umount to unmount and
export the existing volume group clone, then include the –x overwrite=true option when
you create the new clone.
Creating a Clone
After choosing a disk (or disks) to include in the new system image, use the drd clone
command to create the clone. The options are described below.
# drd clone –t /dev/disk/disk3 \
[-x mirror_disk=/dev/disk/disk4] \
[–x overwrite=false]
-t /dev/disk/disk3
This required option specifies the block device special file of a single physical disk on
which the cloned system image is to be written. The block device special file must exist
on the system and be writeable. By default, the disk must not contain LVM headers,
VxVM headers, or an existing clone image. See the –x overwrite description to
override this restriction.
-x mirror_disk=/dev/disk/disk4
Specifies the block device special file of a disk you wish to configure as a clone mirror.
DRD automatically configures the disk as a bootable mirror of the cloned boot disk. The
device special file should refer to an entire disk, not to a partition. The disk must not
contain LVM headers, VxVM headers, or an existing clone image. See the –x
overwrite description to override this restriction.
H3064S J.00
11-16
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
-x overwrite=false
By default, drd clone executes with -x overwrite=false, which prevents drd
from overwriting disks that contain LVM headers, VxVM headers, or an existing clone
image. Use the -x overwrite=true option to allow drd to overwrite existing volume
manager headers. Note that even with the –x overwrite=true option DRD won’t
overwrite a disk associated with a locally imported LVM volume group or VxVM disk
group.
If a disk currently belongs to an imported LVM volume group or VxVM disk group, the
disk must be removed from the group before DRD can use the disk. If a disk already
contains an outdated clone image, execute drd umount to ensure that the image is
unmounted, then include the –x overwrite=true option to overwrite the target disk.
After running drd clone, you will have identical system images on the system disk and the
target disk. The image on the system disk is the active system image. The image on the target
disk is the inactive system image.
The drd clone command generates the following return values:
0
1
2
Success
Error
Warning
For more details, examine the DRD log messages in /var/opt/drd/drd.log.
Example
The system in the example that follows has two mirrored boot disks in vg00, disk1 and
disk2. The drd clone command clones vg00 to disk3 and disk4:
# drd clone -t /dev/disk/disk3 -x mirror_disk=/dev/disk/disk4
======= 10/10/07 11:54:39 EDT BEGIN Clone System Image
(user=root) (jobid=myhost)
*
*
*
*
*
*
*
*
*
*
Reading Current System Information
Selecting System Image To Clone
Selecting Target Disk
Selecting Volume Manager For New System Image
Analyzing For System Image Cloning
Creating New File Systems
Creating Mirror of New System Image
Copying File Systems To New System Image
Making New System Image Bootable
Unmounting New System Image Clone
======= 10/10/07 12:38:34 EDT
(user=root)(jobid=myhost)
END Clone System Image succeeded.
Note that cloning the disk doesn’t change anything in the mount table since the clone is
currently inactive. To improve readability, several fields have been truncated from the
screenshot below.
http://education.hp.com
H3064S J.00
11-17
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
# mount -v
/dev/vg00/lvol3
/dev/vg00/lvol1
/dev/vg00/lvol8
/dev/vg00/lvol7
/dev/vg00/lvol6
/dev/vg00/lvol5
/dev/vg00/lvol4
-hosts
on
on
on
on
on
on
on
on
/
/stand
/var
/usr
/tmp
/opt
/home
/net
type
type
type
type
type
type
type
type
vxfs
hfs
vxfs
vxfs
vxfs
vxfs
vxfs
autofs
...
...
...
...
...
...
...
...
Active versus Inactive System Images
In the slides that follow, The terms “active image” and “active system image” refer to the copy
of the root volume group that is currently booted.
The terms “inactive system image” and “inactive image” refer to the copy of the root volume
group which is not currently booted. The inactive image is often the clone. However, if the
system was booted from the clone, then the inactive image is the original root volume group.
H3064S J.00
11-18
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
11–11. SLIDE: Synchronizing a DRD Clone
Synchronizing a DRD Clone
• Over time, the contents of your boot disk will change
• Use drd sync to synchronize the clone’s files to match the updated boot disk
• DRD synchronization does not synchronize all files; see details in the student notes
Determine which files need to be synchronized on the clone
# drd sync –p
Review the list of files to be synchronized
# view /var/opt/drd/sync/files_to_be_copied_by_drd_sync
…
/etc/passwd
/root/.sh_history
…
Synchronize the files on the clone
# drd sync
Alternative approach: Rebuild the clone entirely!
# drd clone –t /dev/disk/disk3 \
–x overwrite=true \
[-x mirror_disk=/dev/disk/disk4]
specify a target disk (required!)
overwrite data on target
create a mirror of the DRD
Student Notes
Over time, the contents of your boot disk will change as you modify the system configuration.
DRD now supports a “synchronize” feature that automatically synchronizes the file system
contents on a DRD clone to match the file system contents on the active boot disk. The drd
sync command does not synchronize the clone’s LVM structure, installed product database,
temporary files, or kernel configuration; it only synchronizes file system contents.
Furthermore, a file in the root LVM volume group or VxVM disk group on the booted system
image is copied to the inactive clone only if all of the following criteria are satisfied:
•
The file on the booted original system has a modification time newer than the clone
creation time.
•
The copy of the file on the inactive clone has a modification time older than the clone
creation time.
http://education.hp.com
H3064S J.00
11-19
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
•
The file is not a temporary file in /tmp, /var/opt/drd/tmp, or /var/tmp. DRD does
not synchronize temporary files.
•
The file does not reside in /stand. Use the drd runcmd kctune command to modify
the kernel configuration in the DRD clone. A slide later in this module describes this
procedure.
•
The file is not a binary file, library file, etc. that was installed via SD-UX with attribute
is_volatile=false. You can view a list of files installed via SD-UX by running
swlist –l file –a is_volatile. Use drd runcmd swinstall to update
software installed on the clone.
If a file contains blocks of binary files, drd sync converts the file to a sparse file on the
clone.
Example: Synchronizing a Clone
First, execute the drd sync command in preview mode. This should only take several
minutes. drd sync mode does not modify the clone; it simply creates a file that lists the
files that need to be synchronized.
# drd sync -p
======= 04/23/10 18:22:44 EDT
(user=root)
(jobid=myhost)
BEGIN Synchronizing Images Preview
* Locating System Images
* Identifying Inactive System Image for synchronization
* Selected inactive system image "sysimage_001" on disk
"/dev/disk/disk3".
* Accessing Inactive System Image for synchronization
* Identifying Files to Be Synchronized
* The modification time of files on the booted system will be
compared to the time of the most recent clone.
* The time of the most recent clone was 04/22/10 15:07:34
EDT.
* The synchronization list of root group files with
modification time newer than the reference date
is being determined.
* The list of files that will be copied to the inactive
image has been written to the file
"/var/opt/drd/sync/files_to_be_copied_by_drd_sync"
* Identifying system image to be unmounted
* Selected system image "sysimage_001" is on disk
"/dev/disk/disk3" to unmount.
* Unmounting Inactive System Image
======= 04/23/10 18:24:12 EDT END Synchronizing Images Preview
succeeded. (user=root) (jobid=rxmyhost)
H3064S J.00
11-20
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
Next, review the list of files that need to be synchronized.
# view /var/opt/drd/sync/files_to_be_copied_by_drd_sync
…
/etc/hosts
/etc/passwd
/etc/group
/etc/mail
/etc/mail/aliases.db
/etc/mail/sendmail.pid
…
Finally, execute drd sync without the preview option to update the clone image.
# drd sync
======= 04/24/10 00:05:22 EDT BEGIN Synchronizing Images
(user=root)(jobid=myhost)
* Locating System Images
* Identifying Inactive System Image for synchronization
* Selected inactive system image "sysimage_001" on disk
"/dev/disk/disk3".
* Accessing Inactive System Image for synchronization
* Identifying Files to Be Synchronized
* The modification time of files on the booted system will be
compared to the time of the most recent clone.
* The time of the most recent clone was 04/22/10 15:07:34
EDT.
* The synchronization list of root group files with
modification time newer than the reference date is being
determined.
* The list of files that will be copied to the inactive image
has been written to the file
"/var/opt/drd/sync/files_to_be_copied_by_drd_sync"
* Running command to synchronize files
* Identifying system image to be unmounted
* Unmounting Inactive System Image
======= 04/24/10 00:06:24 EDT END Synchronizing Images succeeded.
(user=root)(jobid=myhost)
Example: Rebuilding the Clone Entirely
Alternatively, if you have modified the LVM configuration, installed software, modified the
kernel, or made other more significant changes on the boot disk, you may have to rebuild the
clone entirely. Use the same drd clone command discussed on the previous page, but
include the –x overwrite=true option.
# drd clone –t /dev/disk/disk3 \
specify a target disk (required!)
–x overwrite=true \
overwrite data on target
[-x mirror_disk=/dev/disk/disk4]
http://education.hp.com
H3064S J.00
11-21
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
11–12. SLIDE: Verifying the DRD Clone’s Status
Verifying the DRD Clone’s Status
After cloning the boot disk, use the drd status command to verify which disks
contain images, and which image is currently active
Determine the status of the DRD images
# drd status
======= 07/23/08 12:13:57 EDT BEGIN Displaying DRD Clone Image
Information (user=root) (jobid=myhost)
* Clone Disk:
/dev/disk/disk3
* Clone EFI Partition:
Boot loader and AUTO file present
* Clone Creation Date:
07/18/08 21:07:29 EDT
* Clone Mirror Disk:
None
* Mirror EFI Partition:
None
* Original Disk:
/dev/disk/disk1
* Original EFI Partition:
Boot loader and AUTO file present
* Booted Disk:
Original Disk (/dev/disk/disk1)
* Activated Disk:
Original Disk (/dev/disk/disk1)
======= 07/23/08 12:14:04 EDT END Displaying DRD Clone Image
Information succeeded. (user=root) (jobid=myhost)
Student Notes
After cloning the boot disk, you can use the drd status command to:
•
•
•
verify which disks contain images
verify that each image contains a valid boot loader and AUTO file
verify which image is currently the active image
# drd status
======= 07/23/08 12:13:57 EDT BEGIN Displaying DRD Clone
Image Information (user=root) (jobid=myhost)
*
*
*
*
*
*
Clone Disk:
Clone EFI Partition:
Clone Creation Date:
Clone Mirror Disk:
Mirror EFI Partition:
Original Disk:
/dev/disk/disk3
Boot loader and AUTO file present
07/18/08 21:07:29 EDT
None
None
/dev/disk/disk1
H3064S J.00
11-22
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
* Original EFI Partition:
Boot loader and AUTO file present
* Booted Disk:
* Activated Disk:
Original Disk (/dev/disk/disk1)
Original Disk (/dev/disk/disk1)
======= 07/23/08 12:14:04 EDT END Displaying DRD Clone
Image Information succeeded. (user=root) (jobid=myhost)
http://education.hp.com
H3064S J.00
11-23
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
11–13. SLIDE: Accessing Inactive Images via DRD-Safe
Commands
Accessing Inactive Images via DRD-Safe Commands
• Files in the inactive system image aren’t accessible, by default, to HP-UX commands
• Admins can execute “DRD-Safe” commands on the inactive image via drd runcmd
– Temporarily imports and mounts the inactive image’s volume group and file systems
– Executes the specified command using executables & files on the inactive image
– Ensures that the active image remains untouched
– Unmounts and exports the inactive image’s file systems and volume group
DRD-safe commands currently include:
•
•
•
•
•
•
•
•
•
swinstall
swremove
swlist
swmodify
swverify
swjob
kctune
update-ux
view
Student Notes
Files residing on an inactive system image are not accessible via standard HP-UX commands.
In fact, the inactive system image’s file systems do not appear in the mount table, and its
disks do not appear in /etc/lvmtab.
You can still execute commands on the inactive image, though, via the drd runcmd utility.
DRD includes safeguards to ensure that commands executed via this utility never affect the
active system image. drd runcmd can only be used to execute “DRD-Safe” commands.
Attempts to use drd runcmd to execute commands that are not DRD-Safe fail. The current
DRD-Safe list includes seven commands:
•
swinstall
•
swremove
•
swlist
H3064S J.00
11-24
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
•
swmodify
•
swverify
•
swjob
•
kctune
•
update-ux
•
view
These DRD-Safe utilities allow the administrator to install and manage patches on an inactive
system image while applications continue running on the active system image.
Without drd runcmd, installing software that includes kernel filesets generally requires an
immediate reboot. Using drd runcmd, the administrator can install kernel filesets on the
inactive system image at any time, then wait to activate/boot the inactive system image
during the next convenient maintenance window.
In many cases, drd runcmd can reduce planned downtime required to manage software and
patches.
Executing a command via drd runcmd does the following:
•
Temporarily imports and mounts the inactive image’s volume group and file systems
under /var/opt/drd/mnts/sysimage_001/
•
Executes the specified command using files on the inactive system image
•
Ensures that the inactive image remains untouched
•
Exports and unmounts the inactive image’s volume group and file systems
http://education.hp.com
H3064S J.00
11-25
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
11–14. SLIDE: Managing Software via DRD-Safe Commands
Managing Software via DRD-Safe Commands
• Installing patches and software sometimes requires a reboot and downtime
• Minimize downtime by installing software/patches/updates on an inactive image
• Changes take effect when you activate and boot the inactive image
• Only “DRD safe” patches/products can be installed via DRD
List software installed on the inactive image using the DRD-Safe swlist command
# drd runcmd swlist
Install software on the inactive image using the DRD-Safe swinstall command
# drd runcmd swinstall –s server:/mydepot PHSS_NNNNN
Remove software from the inactive image using the DRD-Safe swremove command
# drd runcmd swremove PHSS_NNNNN
View the inactive image’s SDUX log file using the DRD-Safe view command
# drd runcmd view /var/adm/sw/swagent.log
Update
# drd
# drd
# drd
to a more recent 11i v3 media kit
runcmd swinstall –s server:/mydepot Update-UX
runcmd update-ux –s server:/mydepot
runcmd view /var/adm/sw/update-ux.log
Student Notes
Installing software updates and patches occasionally requires reboots and/or down time,
particularly when the installation affects kernel filesets. To minimize downtime related to
software management tasks, use drd runcmd to install patches and updates on the inactive
DRD image, then simply activate the image and reboot to make the changes take effect.
Example 1: Listing Installed Software
This first drd runcmd example lists software installed on the inactive image using the DRDSafe swlist command
# drd runcmd swlist
======= 10/10/07 15:18:53 EDT BEGIN Executing Command On Inactive
System Image (user=root) (jobid=myhost)
* Checking for Valid Inactive System Image
* Analyzing Command To Be Run On Inactive System Image
* Reading Current System Information
H3064S J.00
11-26
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
*
*
*
*
*
Locating Inactive System Image
Accessing Inactive System Image for Command Execution
Setting Up Environment For Command Execution
Executing Command On Inactive System Image
Executing command: "/usr/sbin/swlist"
...swlist output...
* Command "/usr/sbin/swlist" completed with the return code "0".
* Cleaning Up After Command Execution On Inactive System Image
======= 10/10/07 15:19:43 EDT END Executing Command On Inactive
System Image succeeded. (user=root) (jobid=myhost)
Example 2: Installing a Product or Patch
The next example uses the DRD-Safe swinstall command to install a patch on the inactive
system image. When swinstalling via drd runcmd, the –x autoreboot option isn’t
required, and is in fact ignored, even if the patch contains kernel filesets. drd runcmd may
only be used to install software from an inactive image if the source depot is a directory
depot on the active image, or depot on a network depot server. drd runcmd doesn’t
support installing software from depot files or from depots located on the inactive image.
# drd runcmd swinstall –s server:/mydepot PHSS_NNNNN
======= 10/10/07 15:36:36 EDT BEGIN Executing Command On Inactive
System Image (user=root) (jobid=myhost)
* Checking for Valid Inactive System Image
* Analyzing Command To Be Run On Inactive System Image
* Reading Current System Information
* Locating Inactive System Image
* Accessing Inactive System Image for Command Execution
* Setting Up Environment For Command Execution
* Executing Command On Inactive System Image
* Using unsafe patch list version 20061206
* Starting swagentd for drd runcmd
* Executing command: "/usr/sbin/swinstall -s server:/mydepot
PHSS_NNNNN”
...swinstall output here...
* Command "/usr/sbin/swinstall -s server:/mydepot PHSS_NNNNN"
completed with the return code "0”.
* Cleaning Up After Command Execution On Inactive System Image
======= 10/10/07 15:37:29 EDT END Executing Command On Inactive
System Image succeeded. (user=root) (jobid=myhost)
Example 3: Removing a Product or Patch
The example below uses a similar swremove operation to remove the patch installed in the
previous step.
# drd runcmd swremove PHSS_NNNNN
======= 10/10/07 15:49:59 EDT BEGIN Executing Command On Inactive
System Image (user=root) (jobid=myhost)
* Checking for Valid Inactive System Image
* Analyzing Command To Be Run On Inactive System Image
http://education.hp.com
H3064S J.00
11-27
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
*
*
*
*
*
*
Reading Current System Information
Locating Inactive System Image
Accessing Inactive System Image for Command Execution
Setting Up Environment For Command Execution
Executing Command On Inactive System Image
Executing command: "/usr/sbin/swremove PHSS_NNNNN"
...swremove output...
* Command "/usr/sbin/swremove PHSS_NNNNN" completed with
return code: "0"
* Cleaning Up After Command Execution On Inactive System
Image
======= 10/10/07 15:53:26 EDT END Executing Command On Inactive
System Image succeeded. (user=root) (jobid=myhost)
Example 4: Viewing the SD-UX Logs
When you use drd runcmd to install, remove, or update software on the inactive system
image, SD-UX log messages are logged in several places that correspond to the locations at
which the processes were executed. Because DRD runs on the booted system, DRD records
DRD log messages in /var/opt/drd/drd.log. Any SD-UX commands that you run on the
inactive image log messages to the /var/adm/sw/* log files on the inactive image. Use the
following command to view log files in the inactive system image:
# drd runcmd view /var/adm/sw/swagent.log
Example 5: Updating the Operating System
With the current version of DRD, it is even possible to update the entire OS via drd runcmd!
Create an SD-UX network depot containing the full contents of the latest HP-UX media kit,
install the latest version of Update-UX on the inactive image, then use drd and update-ux
to update the rest of the operating system on the inactive image.
# drd runcmd swinstall –s server:/mydepot Update-UX
# drd runcmd update-ux –s server:/mydepot
# drd runcmd view /var/adm/sw/update-ux.log
During your next maintenance window, activate and boot the inactive image to make the
changes take effect. If you encounter any problems with the new version, simply reactivate
the original image.
NOTE:
DRD only supports updating from 11.31.0709, 11.31.0803, or 11.31.0809 to
11.31.0903 or later releases. DRD may not be used to update from 11i v2 to 11i
v3.
Always review the latest HP-UX Install and Update Guide on
http://docs.hp.com before installing or updating HP-UX.
Limitations and Warnings
The nature of DRD-Safe commands places restrictions on their use:
H3064S J.00
11-28
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
•
The DRD-Safe commands can be specified by their base names (swinstall, swlist,
etc.) or their full paths, such as /usr/sbin/swinstall, /usr/sbin/swremove.
However, paths that are symlinks to DRD-Safe commands are not supported.
•
You cannot use DRD-Safe commands to modify depot contents.
•
If you use double quotation marks (“) or wild card symbols (*, ?) in the command line,
you have to “escape” each one by preceding it with a backslash (\), as shown with the *
wild card in the following example:
# drd runcmd swinstall -s server:/mydepot \*
•
If you reference any files in the command line, they must reside in the inactive system
image, and must be referenced in the DRD-Safe command using pathnames relative to the
inactive system image root rather than the active system image’s root.
•
Patches may include Special Installation Instructions, or SIIs, which contain specific
tasks for the user to perform when they install certain patches. If you install patches with
SIIs on an inactive DRD system image, ensure the following:
You must not stop/kill or restart any processes or daemons. Because the patch is being
installed on an inactive DRD system image, these actions are not needed, and in fact
could leave the running system in an undesirable state.
Only make kernel changes by executing: drd runcmd kctune as described on the
next slide.
•
Some SD-UX packages include checkinstall and postinstall scripts that could
potentially impact the running system when installed on an inactive system image. These
products and patches should not be installed using the drd runcmd procedure
described above.
All patches for 11i v2 and later versions of HP-UX go through a certification process for
DRD-Safeness. A few 11i v2 patches created between September 2004 and December
2004 are not DRD-Safe. The DRD product includes a file that lists these unsafe patches.
The version of SD-UX required by DRD consults this list and will not install or remove
any patch on the list. If the list file is missing, swinstall exits with a failure return
code.
You can download an updated list of non-DRD safe patches from
ftp://ftp.itrc.hp.com/export/DRD/drd_unsafe_patch_list. Copy this file
to /etc/opt/drd/drd_unsafe_patch_list on both the active and inactive system
images to prevent swinstall from installing non-DRD-safe patches via drd runcmd.
#
#
#
#
cd /etc/opt/drd/
firefox ftp://ftp.itrc.hp.com/export/DRD/drd_unsafe_patch_list
drd mount
cp drd_unsafe_patch_list \
/var/opt/drd/mnts/sysimage_001/etc/opt/drd/drd_unsafe_patch_list
# drd umount
http://education.hp.com
H3064S J.00
11-29
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
System administrators can have confidence that the DRD toolset, and the requisite
version of SD, will not process patches that are not DRD-Safe. If the administrator
attempts to install or remove an unsafe patch, the operation fails, displaying the following
message:
ERROR: Could not apply the software selection "PHXX_XXXX" because
there are no variations that are DRD-safe.
See the Managing Rare DRD-Unsafe Patches white paper on http://docs.hp.com
for more details.
•
Firmware patches can’t be installed via drd runcmd. Such patches affect underlying
firmware that could negatively impact both the active and inactive system images.
Firmware patches either appear on the drd_unsafe_patch_list or supply a
checkinstall script to block installation via DRD. You can only install firmware
patches on the active system image.
H3064S J.00
11-30
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
11–15. SLIDE: Managing Kernel Tunables via DRD-Safe
Commands
Managing Kernel Tunables via DRD-Safe Commands
• Modifying kernel tunables sometimes requires a reboot and downtime
• Minimize downtime by modifying tunables on the inactive image
• Changes take effect when you activate and boot the inactive image
View kernel tunables in the inactive image
# drd runcmd kctune nswapdev
Modify a tunable in the inactive image
# drd runcmd kctune nswapdev=64
Review the kernel change log
# drd runcmd view /var/adm/kc.log
Student Notes
Most of the commonly modified HP-UX kernel parameters are now dynamically tunable.
Modifying some kernel parameters, though, requires a reboot. DRD can minimize downtime
when modifying these parameters.
Example 1: Viewing kernel tunables in the inactive image
# drd runcmd kctune nswapdev
======= 04/24/09 19:21:19 EDT BEGIN Executing Command On Inactive
System Image (user=root) (jobid=myhost)
* Checking for Valid Inactive System Image
* Analyzing Command To Be Run On Inactive System Image
* Locating Inactive System Image
* Accessing Inactive System Image for Command Execution
* Setting Up Environment For Command Execution
* Executing Command On Inactive System Image
* Executing command: "/usr/sbin/kctune nswapdev"
http://education.hp.com
H3064S J.00
11-31
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
Tunable
Value Expression
nswapdev
32 Default
* The command "/usr/sbin/kctune nswapdev" succeeded.
* Cleaning Up After Command Execution On Inactive System
Image
======= 04/24/09 19:21:48 EDT END Executing Command On Inactive
System Image succeeded. (user=root) (jobid=myhost)
Example 2: Modifying a tunable in the inactive image
# drd runcmd kctune nswapdev=64
======= 04/24/09 19:22:40 EDT BEGIN Executing Command On Inactive
System Image (user=root) (jobid=myhost)
* Checking for Valid Inactive System Image
* Analyzing Command To Be Run On Inactive System Image
* Locating Inactive System Image
* Accessing Inactive System Image for Command Execution
* Setting Up Environment For Command Execution
* Executing Command On Inactive System Image
* Executing command: "/usr/sbin/kctune nswapdev=64"
==> Update the automatic 'backup' configuration first? once
* The automatic 'backup' configuration has been updated.
* Future operations will ask whether to update the backup.
* The requested changes have been applied to the currently
running configuration.
Tunable
Value Expression
nswapdev (before)
32 Default
(now)
64 64
* The command "/usr/sbin/kctune nswapdev=64" succeeded.
* Cleaning Up After Command Execution On Inactive System
Image
======= 04/24/09 19:23:27 EDT END Executing Command On Inactive
System Image succeeded. (user=root) (jobid=myhost)
Review the kernel change log
Example 3: Viewing the Kernel Change Log
# drd runcmd view /var/adm/kc.log
======= 04/24/09 19:25:30 EDT BEGIN Executing Command On Inactive
System Image (user=root) (jobid=myhost)
* Checking for Valid Inactive System Image
* Analyzing Command To Be Run On Inactive System Image
* Locating Inactive System Image
* Accessing Inactive System Image for Command Execution
* Setting Up Environment For Command Execution
* Executing Command On Inactive System Image
* Executing command: "/usr/bin/view /var/adm/kc.log"
…log file contents…
* The command "/usr/bin/view /var/adm/kc.log" succeeded.
H3064S J.00
11-32
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
* Cleaning Up After Command Execution On Inactive System
Image
======= 04/24/09 19:30:43 EDT END Executing Command On Inactive
System Image succeeded. (user=root) (jobid=myhost)
http://education.hp.com
H3064S J.00
11-33
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
11–16. SLIDE: Accessing Inactive Images via Other Commands
Accessing Inactive Images via Other Commands
• The drd runcmd utility only executes DRD-safe executables on an inactive image
• To access other files on the inactive image, mount the image via drd mount
– Imports the inactive image’s volume group as drd00
– Mounts the image’s file systems under /var/opt/drd/mnts/sysimage_001/
• Warnings:
– Be careful not to unintentionally modify the active system image!
– Only use read-only commands like view and diff to access inactive images
Mount the inactive image‘s file systems
# drd mount
# mount -v
Access the inactive images’ file systems, being careful not to modify the active image!
# diff /etc/passwd /var/opt/drd/mnts/sysimage_001/etc/passwd
Unmount the inactive image’s file systems
# drd umount
# mount -v
Student Notes
The drd runcmd utility only executes DRD-safe executables on an inactive image. To
access other files and executables in the inactive image, mount the image via drd mount.
Temporarily mounting the inactive image offers several useful benefits:
•
If you accidentally delete a critical file on the active system image, you can copy the
deleted file back from the inactive system image.
•
If you want to determine if the inactive system image is up to date, mount the inactive
image and use diff and cksum to compare its files to the active system image.
•
If changes on the active system image introduce problems on the system, mount the
inactive image and compare files to determine what changes may have caused the
problem on the active system image.
H3064S J.00
11-34
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
drd mount does the following:
•
Imports the inactive image’s volume group as volume group drd00.
•
Mounts all of the image’s file systems under /var/opt/drd/mnts/sysimage_001/:
/dev/drd00/lvol3
/dev/drd00/lvol1
/dev/drd00/lvol4
/dev/drd00/lvol5
/dev/drd00/lvol6
/dev/drd00/lvol7
/dev/drd00/lvol8
on /var/opt/drd/mnts/sysimage_001
on /var/opt/drd/mnts/sysimage_001/stand
on /var/opt/drd/mnts/sysimage_001/home
on /var/opt/drd/mnts/sysimage_001/opt
on /var/opt/drd/mnts/sysimage_001/tmp
on /var/opt/drd/mnts/sysimage_001/usr
on /var/opt/drd/mnts/sysimage_001/var
If the system is currently booted from a clone image created by the drd clone
command, drd mount mounts the original system image’s file systems under
/var/opt/drd/mnts/sysimage_000 rather than
/var/opt/drd/mnts/sysimage_001.
•
Warning: To avoid unintentionally modifying the active system image, only use read-only
commands like view and diff, etc. to access files on the inactive image.
Even if you run executables stored on the inactive image, they may modify files on the
active image. For instance, /var/opt/drd/mnts/sysimage_001/usr/sbin/vipw
modifies /etc/passwd on the active image, not
/var/opt/drd/mnts/sysimage_001/etc/passwd on the inactive image.
Also, the system may have symbolic links on the inactive system to file paths on the
active image. /var/opt/drd/mnts/sysimage_001/var/adm/rc.log
links to /etc/rc.log, not /var/opt/drd/mnts/sysimage_001/etc/rc.log
Be careful!
Example
The system in the example below has two mirrored boot disks in vg00, disk1 and disk2,
cloned to disk3 and disk4. The absence of /dev/drd00/* device files in the mount –v
output below suggests that the inactive system image isn’t mounted. To improve readability,
the output below was truncated to fit the page.
# mount -v
/dev/vg00/lvol3
/dev/vg00/lvol1
/dev/vg00/lvol8
/dev/vg00/lvol7
/dev/vg00/lvol6
/dev/vg00/lvol5
/dev/vg00/lvol4
-hosts
http://education.hp.com
on
on
on
on
on
on
on
on
/
/stand
/var
/usr
/tmp
/opt
/home
/net
type
type
type
type
type
type
type
type
vxfs
hfs
vxfs
vxfs
vxfs
vxfs
vxfs
autofs
...
...
...
...
...
...
...
...
H3064S J.00
11-35
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
The example below uses the drd mount command to import the inactive image as volume
group drd00 and mount all of the inactive system image’s file systems. mount –v confirms
that the file systems mounted successfully. To improve readability, the mount output below
was truncated to fit the page.
# drd mount
======= 10/10/07 17:16:13 EDT BEGIN Mount Inactive System Image
(user=root)(jobid=myhost)
* Checking for Valid Inactive System Image
* Locating Inactive System Image
* Mounting Inactive System Image
======= 10/10/07 17:16:50 EDT END Mount Inactive System Image
succeeded. (user=root) (jobid=myhost)
# mount -v | awk '{print $1,$2,$3,$4,$5, "..."}'
/dev/vg00/lvol3 on / type vxfs ...
/dev/vg00/lvol1 on /stand type hfs ...
/dev/vg00/lvol8 on /var type vxfs ...
/dev/vg00/lvol7 on /usr type vxfs ...
/dev/vg00/lvol6 on /tmp type vxfs ...
/dev/vg00/lvol5 on /opt type vxfs ...
/dev/vg00/lvol4 on /home type vxfs ...
-hosts on /net type autofs ...
/dev/drd00/lvol3 on /var/opt/drd/mnts/sysimage_001 type vxfs ...
/dev/drd00/lvol1 on /var/opt/drd/mnts/sysimage_001/stand type hfs ...
/dev/drd00/lvol4 on /var/opt/drd/mnts/sysimage_001/home type vxfs ...
/dev/drd00/lvol5 on /var/opt/drd/mnts/sysimage_001/opt type vxfs ...
/dev/drd00/lvol6 on /var/opt/drd/mnts/sysimage_001/tmp type vxfs ...
/dev/drd00/lvol7 on /var/opt/drd/mnts/sysimage_001/usr type vxfs ...
/dev/drd00/lvol8 on /var/opt/drd/mnts/sysimage_001/var type vxfs ...
Access the inactive image’s file systems as desired. This example uses the diff command to
determine if any changes have been made to the /etc/passwd file since the clone was
created.
# diff /etc/passwd /var/opt/drd/mnts/sysimage_001/etc/passwd
45d44
< user25:*:107:20::/home/user25:/sbin/sh
After executing the desired commands, use drd umount to unmount the inactive image’s
file systems and export the drd00 volume group. mount –v confirms that the file systems
unmounted successfully. To improve readability, the mount output below was truncated to
fit the page.
# drd umount
======= 10/10/07 10:39:47 EDT BEGIN Unmount Inactive System Image
(user=root) (jobid=myhost)
* Checking for Valid Inactive System Image
* Locating Inactive System Image
* Unmounting Inactive System Image
H3064S J.00
11-36
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
======= 10/10/07 10:40:37 EDT END Unmount Inactive System Image
succeeded. (user=root) (jobid=myhost)
# mount -v
/dev/vg00/lvol3
/dev/vg00/lvol1
/dev/vg00/lvol8
/dev/vg00/lvol7
/dev/vg00/lvol6
/dev/vg00/lvol5
/dev/vg00/lvol4
-hosts
http://education.hp.com
on
on
on
on
on
on
on
on
/
/stand
/var
/usr
/tmp
/opt
/home
/net
type
type
type
type
type
type
type
type
vxfs
hfs
vxfs
vxfs
vxfs
vxfs
vxfs
autofs
...
...
...
...
...
...
...
...
H3064S J.00
11-37
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
11–17. SLIDE: Activating and Deactivating an Inactive DRD
Image
Activating and Deactivating an Inactive DRD Image
Use drd activate to make the inactive image the primary boot disk
• DRD updates the boot menu
• DRD can optionally reboot the system immediately
Promote the inactive system image to become primary boot disk
# drd activate \
[-x reboot=false] \
reboot immediately?
[-p]
preview only
If –x reboot=true wasn’t specified, manually reboot
# shutdown –ry 0
If you change your mind before rebooting, use drd deactivate to undo the activation
# drd deactivate
Use drd status to determine which disk is the currently active boot disk
# drd status
Student Notes
The administrator can use the drd activate command to reboot the system using the
inactive system image at any time. Booting from the inactive system image offers a number
of benefits:
•
If accidental (or intentional!) changes to the active system image cause problems, boot
from the inactive image to restore system functionality without a time consuming tape
restore.
•
After installing patches on the inactive system image with drd runcmd swinstall,
activate the inactive system image during the next maintenance window to make the new
patches take effect.
The drd activate command modifies stable storage to indicate that the inactive system
image should become the active system image after the next reboot. Either manually reboot
the system during the next maintenance window or force an immediate reboot by adding the
–x reboot=true option to the drd activate command. In either case, after the reboot,
H3064S J.00
11-38
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
the formerly inactive system image becomes the active system image and the formerly active
system image becomes the inactive system image.
drd activate does not affect the alternate boot path, high availability alternate boot path,
or BCH/EFI autoboot flags. To modify these paths and flags manually, see the
setboot(1m) man page.
The example below activates the inactive system image on disk 0/0/0/0.0x3.0x3, and
immediately reboots the system.
# drd activate –x reboot=true
=======
07/23/08 12:34:37 EDT BEGIN Activate Inactive System Image
(user=root) (jobid=myhost)
*
*
*
*
*
*
*
*
*
*
*
*
Checking for Valid Inactive System Image
Reading Current System Information
Locating Inactive System Image
Determining Bootpath Status
Primary bootpath : 0/0/0/0.0x1.0x1 before activate.
Primary bootpath : 0/0/0/0.0x3.0x3 after activate.
Alternate bootpath : 0/0/0/0.0x2.0x2 before activate.
Alternate bootpath : 0/0/0/0.0x2.0x2 after activate.
HA Alternate bootpath : before activate.
HA Alternate bootpath : after activate.
Activating Inactive System Image
Rebooting System
SHUTDOWN PROGRAM
10/10/07 13:04:10 EDT
Broadcast Message from root (console) Fri Oct 10 13:04:10...
SYSTEM BEING BROUGHT DOWN NOW ! ! !
Alternatively, skip the reboot=true option and manually reboot the system during the next
maintenance window.
# shutdown -ry
If, after rebooting, you decide to revert back to the original image, simply execute drd
activate and reboot again.
If you change your mind before rebooting, and decide to retain the existing active image as
the default boot disk, execute drd deactivate. The example below restores the current
boot disk path, 0/0/0/0.0x1.0x1, as the primary boot disk path in NVRAM.
# drd deactivate
=======
07/23/08 12:38:57 EDT BEGIN Deactivate Inactive
System Image (user=root) (jobid=myhost)
http://education.hp.com
H3064S J.00
11-39
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
*
*
*
*
*
*
*
*
*
=======
Checking for Valid Inactive System Image
Reading Current System Information
Locating Inactive System Image
Determining Bootpath Status
Primary bootpath : 0/0/0/0.0x3.0x3 before deactivate.
Primary bootpath : 0/0/0/0.0x1.0x1 after deactivate.
Alternate bootpath : 0/0/0/0.0x2.0x2 before deactivate.
Alternate bootpath : 0/0/0/0.0x2.0x2 after deactivate.
Deactivating Inactive System Image
07/23/08 12:39:04 EDT END Deactivate Inactive
System Image succeeded. (user=root) (jobid=myhost)
As noted earlier in the chapter, you can always execute drd status to determine the
current status of the DRD images.
# drd status
=======
07/23/08 12:13:57 EDT BEGIN Displaying DRD Clone
Image Information (user=root) (jobid=myhost)
*
*
*
*
*
*
*
*
*
=======
Clone Disk:
Clone EFI Partition:
Clone Creation Date:
Clone Mirror Disk:
Mirror EFI Partition:
Original Disk:
Original EFI Partition:
Booted Disk:
Activated Disk:
/dev/disk/disk3
Boot loader and AUTO file present
07/18/08 21:07:29 EDT
None
None
/dev/disk/disk1
Boot loader and AUTO file present
Original Disk (/dev/disk/disk1)
Original Disk (/dev/disk/disk1)
07/23/08 12:14:04 EDT END Displaying DRD Clone
Image Information succeeded. (user=root) (jobid=myhost)
H3064S J.00
11-40
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
11–18. SLIDE: Part 3: Ignite-UX Recovery Tools
Preparing for
Disasters
Part 3: Ignite-UX Recovery Tools
Student Notes
http://education.hp.com
H3064S J.00
11-41
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
11–19. SLIDE: make_*_recovery Concepts
make_*_recovery Concepts
To ensure successful recovery if your boot disk and DRD clone fail:
• Create a system recovery tape with make_tape_recovery or
• Store a network recovery archive via make_net_recovery
vg00
make_tape_recovery
Boot Area
LVM structures
or…
system recovery tape
lvol1 (/stand)
lvol2 (swap)
make_net_recovery
lvol3 (/)
system recovery archive
Student Notes
DRD clones ensure that you can minimize planned and unplanned downtime. However, the
DRD active and inactive images typically reside in the same data center as the server itself.
What if the entire data center becomes unavailable?
The make_tape_recovery and make_net_recovery commands are designed precisely
for this situation. Both commands create a bootable image of the system boot disk. The
make_*_recovery images may be used to quickly restore the OS image to a server onsite,
or at a disaster recovery site. make_tape_recovery writes the bootable recovery archive
to tape. make_net_recovery writes the recovery image to a file on a specially configured
local or remote server running HP’s Ignite-UX software.
Neither utility is intended to be a replacement for regular full/incremental user and
application data backup solutions. The make_*_recovery tools only backup/recover the
files and structures needed to boot the system. After restoring the system to a minimal state
using the make_*_recovery archive, use your preferred system backup/recovery utility to
restore the remaining files and directories from the most recent tape backup.
H3064S J.00
11-42
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
11–20. SLIDE: Customizing the make_*_recovery Archive
Contents
Customizing the make_*_recovery Archive Contents
• By default, the make_*_recovery tools only archive the critical OS files &
directories
• Use additional options to include additional critical volume groups, files, or directories
• But, use an enterprise backup/recovery solution to backup user and application data
View the list of files included by default
# view /opt/ignite/recovery/mnr_essentials
Interactively specify the files to include/exclude
# make_tape_recovery -i
Include an additional file or directory
# make_tape_recovery -x include=filename|dirname …
Include an additional file or directory, crossing mount points as necessary
# make_tape_recovery -x inc_cross=filename|dirname …
Include an entire volume group, and all of its files and directories
# make_tape_recovery -x inc_entire=vg00 …
Exclude a specific file or subdirectory
# make_tape_recovery -x inc_entire=vg00 –x exclude=/tmp …
Modify the default include/exclude settings
# vi /var/opt/ignite/recovery/archive_content
tape
# vi /var/opt/ignite/clients/client/recovery/archive_content network
Student Notes
By default, a make_*_recovery archive includes:
•
A boot image.
•
LVM configuration information for the root volume group.
•
An archive of the critical files and directories contained in the file systems in vg00.
By default, the archive portion of make_*_recovery only includes the critical files and
directories from vg00 that are required to boot the system. The
/opt/ignite/recovery/mnr_essentials file lists the files that are included in the
archive by default:
/sbin
/dev
/stand
/stand/vmunix
http://education.hp.com
H3064S J.00
11-43
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
/usr/bin
/usr/ccs
/usr/conf
/usr/lbin
/usr/lib
/usr/newconfig
/usr/sbin
/usr/sam
/usr/share
/usr/obam
/usr/include
/bin
/lib
/etc
Including Additional Files and Volume Groups in the Recovery Archive
Administrators may choose to include additional files and directories in the recovery archive.
For instance, HP Data Protector users may wish to include Data Protector executables,
libraries, and other critical files in the make_*_recovery archive.
When executed with the –i (interactive) option, the make_*_recovery commands display
a GUI interface that may be used to interactively specify which files and directories should be
included/excluded from the archive.
The archive contents can also be customized via the –x option in conjunction with the
following arguments:
-x include=filename|dirname
Includes the specified filename or directory and all subdirectories and associated
files. Mount points are not crossed and symbolic links are not followed. Be sure to
use full path names. File names may not end with a space.
-x inc_cross=filename|directory
Includes the specified filename or directory and all subdirectories and files below the
named directory. Local mount points are crossed but symbolic links are not followed.
Be sure to use full path names. File names may not end with a space.
-x inc_entire=VG|disk
Include the entire specified volume group (e.g.: "vg00") or disk block device file (e.g.:
"/dev/dsk/c0t5d0"). Do not specify a disk if it is part of a volume group.
-x exclude=filename|directory
Exclude the specified filename or directory and all subdirectories and files contained
under the subdirectories. File names may not end with a space.
Multiple –x options may be specified on a single command line. For example:
# make_tape_recovery –x inc_entire=vg00 \
–x inc_entire=vg01 \
-x exclude=/tmp
H3064S J.00
11-44
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
Modifying the Include/Exclude Defaults
To ensure that the same files, directories, and volume groups are included in every backup,
these options can be stored in a configuration file. make_tape_recovery references the
/var/opt/ignite/recovery/archive_content file on the client.
# vi /var/opt/ignite/recovery/archive_content
inc_entire vg00
exclude /tmp
exclude /var/tmp
make_net_recovery references the
/var/opt/ignite/clients/client/recovery/archive_content file on the IgniteUX Server. The file syntax is similar to the following:
# vi /var/opt/ignite/clients/client/recovery/archive_content
inc_entire vg00
exclude /tmp
exclude /var/tmp
See the make_tape_recovery(1m) and make_net_recovery(1m) man pages for more
information.
WARNING:
The make_*_recovery tools are intended only to create or recover a
recovery archive. The recovery archive will include the operating
system and a reasonable amount of user data. They are not intended
to be a general purpose backup and restoration tool, and should not be
used for that objective.
http://education.hp.com
H3064S J.00
11-45
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
11–21. SLIDE: Creating a make_tape_recovery Archive
Creating a make_tape_recovery Archive
If your system has a tape drive, execute make_tape_recovery to create a
bootable recovery tape any time you significantly modify your system
configuration
Put a tape in the tape drive
Verify that the Ignite-UX product is installed on the client
# swlist IGNITE
Run make_tape_recovery
# make_tape_recovery \
-a /dev/rtape/tape0_BESTn \ specify a tape drive (use the no-autorewind DSF!)
-x inc_entire=vg00 \
include all of vg00
-d “my client archive“
assign a descriptive archive label
Review the log files in
# more /var/opt/ignite/recovery/latest/recovery.log
Recreate the system recovery tape when necessary
Student Notes
Step 1 — Put a Tape in the Default Tape Drive
By default, make_tape_recovery writes the archive to tape drive
/dev/rtape/tape0_BESTn. Insert a non-write-protected tape in the drive before
proceeding any further.
Step 2 — Install the Ignite-UX Product
make_tape_recovery is included in HP’s Ignite-UX product. You can install Ignite-UX
from the HP-UX 11i Core DVD, or from the HP software depot web site
(http://software.hp.com/). Use the swlist comment to verify that IGNITE is
installed.
# swlist –l product IGNITE
H3064S J.00
11-46
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
Step 3 — Run make_tape_recovery
Run make_tape_recovery to create the recovery tape. Be patient: creating the recovery
tape may take thirty minutes or more, depending on your tape drive and the number of files
included in the archive.
# make_tape_recovery \
-a /dev/rtape/tape0_BESTn \
-x inc_entire=vg00 \
-d “my client archive“
The –a option specifies an alternate tape device (by default, make_tape_recovery uses
/dev/rtape/tape0_BESTn). If you specify a tape drive, be sure to use the no-auto-rewind
device file.
The –x inc_entire=vg00 option includes the entire vg00 volume group in the archive.
The –d option assigns a descriptive name to the archive, which appears in the recovery
interface. Consider including the hostname or a timestamp in the description.
The make_tape_recovery(1m) man page describes many additional options.
Step 4 — Check the make_tape_recovery Log Files
make_tape_recovery creates a number of log files that you should check once the
program terminates. Be sure to review the
/var/opt/ignite/recovery/latest/recovery.log file.
Step 5 — Update the System Recovery Tape when Necessary
Periodically recreate the recovery archive as you add hardware, software, patches, and major
configuration changes. Many administrators create a new recovery tape on a daily or weekly
basis as part of their normal system backup procedures. Other administrators only choose to
recreate the recovery tape on an as-needed basis. To create a new recovery archive, simply
repeat the steps shown on the slide. To create a new recovery tape, simply repeat the steps
shown on the slide.
NOTE:
Since different models require different drivers and different configurations, a
make_tape_recovery tape should generally only be restored on the system
on which it was created.
Administrators who wish to “clone” a system configuration to other servers
should consider using the Ignite-UX make_sys_image utility instead.
To learn more about this utility, and other Ignite-UX features, attend HP
Customer Education’s Ignite-UX class, H1978S.
http://education.hp.com
H3064S J.00
11-47
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
11–22. SLIDE: Creating a make_net_recovery Archive
Creating a make_net_recovery Archive
If you maintain multiple systems, or if you manage servers in a remote datacenter
without onsite staff to rotate tapes, consider creating make_net_recovery archives
on a centralized Ignite-UX server rather than make_tape_recovery tapes
Verify that the Ignite-UX server administrator has enabled access for the client
Verify that the Ignite-UX product on the client matches the server’s Ignite-UX version
# swlist IGNITE
Check disk space availability on the server
# bdf /var/opt/ignite/recovery/archives/
Run make_net_recovery on the client:
# make_net_recovery \
-s servername \
specify the Ignite server name
-x inc_entire=vg00 \
include all of vg00
-n 3 \
how many archive versions should be preserved?
-d “my client archive“
assign a descriptive archive label
Review the server’s log files
# cd /var/opt/ignite/clients/client/recovery/
Recreate the system recovery archive when necessary
Student Notes
If you maintain multiple systems, or if you manage servers in a remote datacenter without
onsite staff to rotate tapes, consider creating make_net_recovery archives on a
centralized Ignite-UX server rather than make_tape_recovery tapes.
Step 1 — Verify that the Ignite-UX server has enabled access for the client
Several directories and files on the Ignite-UX server must be modified for each
make_net_recovery client. To learn how to configure and Ignite-UX server and how to
use other Ignite-UX features, attend HP Customer Education’s Ignite-UX class (H1978S) or
review the Ignite-UX Administration Guide on http://docs.hp.com.
Step 2 — Verify that the Ignite-UX product on the client matches the server’s
Ignite-UX version
make_net_recovery is included HP’s Ignite-UX product. You can install Ignite-UX from
the HP-UX 11i Core DVD, or from the HP software depot web site
(http://software.hp.com/). Use the swlist comment to verify that IGNITE is
H3064S J.00
11-48
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
installed. Also verify that the Ignite version on the client is at least as current as the Ignite
version on the server.
# swlist IGNITE
Step 3 — Check Disk Space Available in /var
Make sure that the server has sufficient space to store the client’s make_net_recovery
archive. Ignite creates a separate subdirectory below
/var/opt/ignite/recovery/archives/ for each client. The amount of space
required varies depending on the number of files included in the archive.
# bdf /var/opt/ignite/recovery/archives/
Step 4 — Run make_net_recovery on the Client
Run make_net_recovery to create the archive. Use the –s option to specify the IgniteUX server’s hostname. Add the –x inc_entire=vg00 option to include the entire vg00
volume group in the archive. See the make_tape_recovery(1m) man page for additional
options.
Be patient: creating the recovery archive may take thirty minutes or more, depending on your
network performance and the number of files included in the archive.
make_net_recovery supports many options; see the make_net_recovery(1m) man
page for details.
# make_tape_recovery \
-s servername \
-x inc_entire=vg00 \
-n 3 \
-d “my client archive“
The –s option specifies the Ignite-UX server hostname.
The –x inc_entire=vg00 option includes the entire vg00 volume group in the archive.
The –n option specifies the number of archives that should remain on the server at any given
time. The default is two. If the number of existing archives this client already has on the
server equals the argument following the –n option, make_net_recovery removes the
oldest archive after successfully creating the newest archive.
The –d option assigns a descriptive name to the archive, which appears in the recovery
interface. Consider including the hostname or a timestamp in the description.
The make_tape_recovery(1m) man page describes many additional options.
Step 5 — Check the make_net_recovery Log Files
make_net_recovery creates a number of log files for each client (replace client with
your client’s hostname):
http://education.hp.com
H3064S J.00
11-49
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
# ls /var/opt/ignite/clients/client/recovery/latest/
Be sure to review the client’s
/var/opt/ignite/clients/client/recovery/latest/recovery.log file. The
actual archives are stored in the /var/opt/ignite/recovery/archives/client/
directory.
Step 6 — Update the System Recovery Tape when Necessary
Periodically recreate the recovery archive as you add hardware, software, patches, and major
configuration changes. Many administrators create a new recovery archive on a daily or
weekly basis as part of their normal system backup procedures. Other administrators only
choose to recreate the recovery archive on an as-needed basis. To create a new recovery
archive, simply repeat the steps shown on the slide.
Be sure to include the make_net_recovery -n option described above to reclaim space
from older archives automatically.
Using the make_net_recovery Archive to Create a Bootable Recovery DVD
Ignite-UX now includes a make_media_install script that you can use to create a custom,
bootable recovery DVD from a make_net_recovery image on the Ignite-UX server. See
the Ignite-UX Administrator’s Guide on http://docs.hp.com for details, or the
comments embedded in the script.
# view /opt/ignite/data/scripts/examples/make_media_install
NOTE:
Since different models require different drivers and different configurations, a
make_net_recovery archive should generally only be restored on the
system on which it was created.
Administrators who wish to “clone” a system configuration to other servers
should consider using the Ignite-UX make_sys_image utility instead.
H3064S J.00
11-50
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
11–23. SLIDE: Using a make_*_recovery Archive
Using a make_*_recovery Archive
vg00
Booting from the system recovery archive:
• Recreates the boot disk boot area
• Restores LVM structures in vg00
Boot Area
LVM structures
• Recreates file systems in vg00
• Restores select, critical files in vg00
lvol1 (/stand)
system recovery tape
lvol2 (swap)
lvol3 (/)
system recovery archive
Student Notes
The archive created by the make_*_recovery tools can be used to boot your system and
reinstall the created image automatically if your boot disk becomes corrupted.
To recover a non-bootable system:
•
Power-on the system.
•
Interrupt the boot process.
•
Boot from the tape or Ignite-UX server.
•
Let Ignite rebuild the boot disk.
•
Let Ignite rebuild the LVM structures.
•
Let Ignite rebuild the file systems.
•
Let Ignite restore the critical files and directories from the archive.
http://education.hp.com
H3064S J.00
11-51
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
•
Verify the recovery.
•
Use your preferred backup/recovery software to restore your most recent system backup.
The process required to initiate the restore varies depending on the platform and archive
type. The boot modules elsewhere in the course describe the PARISC and Integrity boot
processes in detail.
After initiating the restore process, though, regardless of the system type, you should see
messages similar to the following:
Press <Return> within 10 seconds to cancel batch-mode installation:
* Using client directory: /var/opt/ignite/clients/0x0060B0A37808
* Checking configuration for consistency...
WARNING: The disk at: 8/16/5.6.0 (SEAGATE_ST34572N) appears to contain a
file system and boot area. Continuing the installation will destroy any
existing data on this disk.
Press > within 10 seconds to cancel batch-mode installation:
* Continuing despite above warnings.
* Attempting a non-interactive installation.
======= 06/22/98 15:32:11 EDT Starting system configuration...
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
Configure_Disks: Begin
Will install B.11.00 onto this system.
Creating LVM physical volume "/dev/rdsk/c1t6d0" (8/16/5.6.0).
Creating volume group "vg00".
Creating logical volume "vg00/lvol1" (/stand).
Creating logical volume "vg00/lvol2" (swap_dump).
Creating logical volume "vg00/lvol3" (/).
Creating logical volume "vg00/lvol4" (/home).
Creating logical volume "vg00/lvol5" (/opt).
Creating logical volume "vg00/lvol6" (/tmp).
Creating logical volume "vg00/lvol7" (/usr).
Creating logical volume "vg00/lvol8" (/var).
Extending logical volume "vg00/lvol1" (/stand).
Extending logical volume "vg00/lvol2" (swap_dump).
Extending logical volume "vg00/lvol3" (/).
Extending logical volume "vg00/lvol4" (/home).
Extending logical volume "vg00/lvol5" (/opt).
Extending logical volume "vg00/lvol6" (/tmp).
Extending logical volume "vg00/lvol7" (/usr).
Extending logical volume "vg00/lvol8" (/var).
Making HFS filesystem for "/stand", (/dev/vg00/rlvol1).
Making VxFS filesystem for "/", (/dev/vg00/rlvol3).
Making VxFS filesystem for "/home", (/dev/vg00/rlvol4).
Making VxFS filesystem for "/opt", (/dev/vg00/rlvol5).
Making VxFS filesystem for "/tmp", (/dev/vg00/rlvol6).
Making VxFS filesystem for "/usr", (/dev/vg00/rlvol7).
Making VxFS filesystem for "/var", (/dev/vg00/rlvol8).
Setting rotational delay to 0 for "/stand".
H3064S J.00
11-52
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
*
*
x
x
Configure_Disks: Complete
Download_mini-system: Begin
./sbin/fs/hfs/mkfs, 237568 bytes, 464 tape blocks
./sbin/fs/hfs/newfs, 114688 bytes, 224 tape blocks
(extraction of the rest of the essential rebuild tools...)
* Download_mini-system: Complete
* Loading_software: Begin
* Installing boot area on disk.
* Enabling swap areas.
* Backing up LVM configuration for "vg00".
* Processing the archive source (recovery).
* Mon Jun 22 15:36:03 EDT 1998: Starting archive load of the source
(Recovery Archive).
* Positioning the tape (/dev/rtape/tape0_BESTn).
* Archive extraction from tape is beginning. Please wait.
* Mon Jun 22 16:00:56 EDT 1998:Completed archive load of the source
(Recovery Archive).
* Executing user specified script:
"/opt/ignite/data/scripts/os_arch_post_l".
Running in recovery mode.
NOTE: Could not save /etc/resolv.conf from archive: file not found
NOTE: Could not save /etc/eisa/system.sci from archive: file not found
* Running the ioinit command ("/sbin/ioinit -c")
NOTE: tlinstall is searching filesystem - please be patient
NOTE: Successfully completed
* Setting primary boot path to "8/16/5.6.0".
* Executing user specified commands.
* Loading_software: Complete
* Build_Kernel: Begin
NOTE: Since the /stand/vmunix kernel is already in place, the kernel
will not be re-built. Note that no mod_kernel directives will be
processed.
* Build_Kernel: Complete
* Boot_From_Client_Disk: Begin
* Rebooting machine as expected.
NOTE: Rebooting system.
* Running the ioinit command ("/sbin/ioinit -c")
* Boot_From_Client_Disk: Complete
* Run_SD_Configure_Scripts: Begin
* Run_SD_Configure_Scripts: Complete
* Run_Postconfigure_Scripts: Begin
* Applying the networking information.
* Executing user specified script:
"/opt/ignite/data/scripts/os_arch_post_c".
* Running in recovery mode.
* Run_Postconfigure_Scripts: Complete
======= 06/22/98 16:03:36 EDT Installation complete: Successful
http://education.hp.com
H3064S J.00
11-53
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
After Booting from the Archive
Remember that the recovery archive only restores your system to a bootable state. After the
process finishes, restore your most recent full and incremental backups using HP Data
Protector or a similar enterprise backup/recovery application.
H3064S J.00
11-54
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
11–24. SLIDE: Interacting with the Recovery Process
Interacting with the Recovery Process
During the recovery process, you can optionally interrupt batch-mode installation to
select an alternate disk or change LVM and network parameters
Press <Return> within 10 seconds to cancel batch-mode installation
+-------++----------++--------++-------------++----------+
| Basic || Software || System || File System || Advanced |
|
\-------------------------------------------------------+
|
|
| Configurations: [ Recovery Archive ->] [ Description... ]
|
| Environments:
[ Recovery Archive ->] (HP-UX B.11.31)
|
| [ Root Disk... ] HP_73.4GST373405LC, 0/1/1/0.1.0, 70007 M
|
| File System:
[ HP-UX save_config layout ->]
|
| [ Root Swap (MB)... ] 4096
Physical Memory (RAM) = 4088 MB |
| [ Languages... ] English [ Keyboards... ] [ Additional... ] |
|
|
+---------------------------------------------------------------+
| [ Show Summary... ]
[ Reset Configuration ]
|
+---------------------------------------------------------------+
| [ Go!
]
[ Cancel ]
[ Help ] |
+---------------------------------------------------------------+
Student Notes
You can use a make_*_recovery image to restore a system in either of two modes.
Booting from the archive “non-interactively” restores the archive’s configuration and files
verbatim. This is the normal mode that you should normally use when recovering a
corrupted boot disk.
Alternatively, you may choose to interrupt the recovery procedure to tweak the system
configuration. You can use this “interactive” mode to:
•
•
•
•
Convert file systems from HFS to VxFS.
Change the size of the root file system.
Change the size of the primary swap logical volume.
Change the system’s network configuration.
If you wish to do an interactive recovery, press [Return] when the following message appears
on the console:
http://education.hp.com
H3064S J.00
11-55
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
Press <Return> within 10 seconds to cancel batch-mode installation
Interrupting the automated restore process provides an opportunity to interact with the
Ignite-UX menu interface:
+-------++----------++--------++-------------++----------+
| Basic || Software || System || File System || Advanced |
|
\-------------------------------------------------------+
|
|
| Configurations: [ Recovery Archive ->] [ Description... ]
|
|
|
| Environments:
[ Recovery Archive ->] (HP-UX B.11.31)
|
|
|
| [ Root Disk... ] HP_73.4GST373405LC, 0/1/1/0.1.0, 70007 M
|
|
|
| File System:
[ HP-UX save_config layout ->]
|
|
|
| [ Root Swap (MB)... ] 4096
Physical Memory (RAM) = 4088 MB |
|
|
| [ Languages... ] English [ Keyboards... ] [ Additional... ] |
|
|
+---------------------------------------------------------------+
| [ Show Summary... ]
[ Reset Configuration ]
|
+---------------------------------------------------------------+
| [ Go!
]
[ Cancel ]
[ Help ] |
+---------------------------------------------------------------+
The OS install chapter later in the course describes this interface in detail.
H3064S J.00
11-56
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
11–25. TEXT PAGE: System Recovery Checklist
To ensure that you are able to recover from a crashed disk, we recommend that you keep
each item on this checklist at hand. With help from your HP Support Representative and this
list, you stand a good chance of timely recovery.
•
Recent full and incremental system backup tapes, containing backups of your data.
•
Recent make_*_recovery archive, which could be used to rebuild vg00.
•
Tape backup of /etc/lvmconf, which contains a backups of your LVM configuration.
•
Printed print_manifest output, summarizing your basic system configuration.
•
Printed vgdisplay -v output for each Volume Group.
•
Printed lvdisplay -v output for each Logical Volume.
•
Printed pvdisplay -v for each physical volume.
•
Printed output of lvlnboot -v, which describes your LVM boot disk configuration.
•
Printed /etc/fstab, which lists your file systems.
•
Printed copy of output from a recent bdf(1m).
•
Printed output of swapinfo(1m).
•
Printed ioscan –kfn (11i v1 and v2) or..
Printed ioscan –kfnN (11i v3).
•
Printed information from any software or database packages that use logical volumes for
raw data storage. The backup and recovery utilities discussed on this chapter only do not
backup the contents of raw logical volumes! See your application documentation to learn
how to obtain this information.
http://education.hp.com
H3064S J.00
11-57
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
11–26. TEXT PAGE: For Further Study
Student Notes
To learn more about LVM Mirrordisk/UX, attend HP Education’s LVM course, course#
H6285S or read the LVM documentation on http://docs.hp.com.
To learn more about VxVM mirroring, attend HP Education’s VxVM course, course# HB505S
or read the VxVM documentation on http://docs.hp.com.
To learn more about HP’s SmartArray Controller Cards, read the HP Smart Array SAS
Controllers for Integrity Servers Support Guide: HP-UX 11i v2 and 11i v3 on
http://docs.hp.com.
To learn more about SAN boot options, read the HP-UX boot over SAN white paper on
http://docs.hp.com.
To learn more about DRD, visit the DRD product website at http://www.hp.com/go/DRD
or see the following DRD Manuals on http://docs.hp.com:
Dynamic Root Disk Administrator's Guide
Managing Rare DRD-Unsafe Patches
Using Dynamic Root Disk Activate to Recover from Boot Problems
Using the DRD Toolset to Extend the /stand File System in an LVM Environment
Using the Dynamic Root Disk Toolset
To learn more about Ignite-UX, attend HP Education’s Ignite-UX course, course# H1978S or
read the Ignite-UX Administration Guide on http://docs.hp.com.
H3064S J.00
11-58
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
11–27. LAB: Creating and Managing DRD Clones
Directions
This part of the lab walks through the steps required to clone, mount, unmount, and activate
DRD clones. Ask your instructor which disk you should use as your boot disk clone.
New DRD clone
= ______________________ (represented as diska below)
1. Verify that the DynRootDisk product is installed on your system.
# swlist DynRootDisk
2. Clone the existing boot volume group. Include –x overwrite=true in case there are
old headers remaining on the clone disk from previous labs. Copying the files to the new
disk may take up to an hour, depending on your lab system configuration. Be patient.
# drd clone -t /dev/disk/diska -x overwrite=true
3. Execute drd status to verify that the clone was successfully created.
4. Check the contents of the mount table. The clone is currently inactive, so shouldn’t
appear in the mount table.
5. Let’s simulate an “accidental” boot disk mis-configuration and see how DRD can help
recover. Execute the vipw command to edit the /etc/passwd file on the active image.
Delete the line in /etc/passwd associated with user www, which is used by the Apache
web server. Then try to start Apache.
# vipw
www:*:30:1::/:
# /opt/hpws/apache/bin/apachectl start
You should get a message indicating that the daemon can’t start because the www
username is missing:
httpd: bad user name www
Fortunately you have a backup copy of the /etc/passwd file on the DRD clone!
http://education.hp.com
H3064S J.00
11-59
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
6. Temporarily mount the clone’s file systems.
7. Use the diff command to view differences between the active and inactive system
images’ /etc/passwd files.
8. Use vipw and the output from the diff command to add the www line back into the
active image’s /etc/passwd file.
9. Try to start Apache again. This time it should work.
Stop the daemon before proceeding.
# /opt/hpws/apache/bin/apachectl start
# /opt/hpws/apache/bin/apachectl stop
10. Unmount the DRD clone file systems.
11. DRD allows the administrator to manage software without affecting the active system
image. Use drd runcmd to list the software installed on the inactive DRD image.
12. Activate the cloned system image to verify that it works.
13. Shutdown and reboot from the clone disk.
# shutdown –ry 0
H3064S J.00
11-60
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
14. When the system returns, execute drd status again to verify that the system booted
from the clone disk.
15. Run drd activate and and reboot again to reactivate the original system image.
16. Clobber the clone that you created by overwriting the top of the disk with zeroes.
# dd if=/dev/zero of=/dev/rdisk/diska bs=1048576 count=1024
http://education.hp.com
H3064S J.00
11-61
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
11–28. LAB SOLUTIONS: Creating and Managing DRD Clones
Directions
This part of the lab walks through the steps required to clone, mount, unmount, and activate
DRD clones. Ask your instructor which disk you should use as your boot disk clone.
New DRD clone
= ______________________ (represented as diska below)
1. Verify that the DynRootDisk product is installed on your system.
# swlist DynRootDisk
2. Clone the existing boot volume group. Include –x overwrite=true in case there are
old headers remaining on the clone disk from previous labs. Copying the files to the new
disk may take up to an hour, depending on your lab system configuration. Be patient.
# drd clone -t /dev/disk/diska -x overwrite=true
3. Execute drd status to verify that the clone was successfully created.
Answer:
# drd status
4. Check the contents of the mount table. The clone is currently inactive, so shouldn’t
appear in the mount table.
Answer:
# mount –v
5. Let’s simulate an “accidental” boot disk mis-configuration and see how DRD can help
recover. Execute the vipw command to edit the /etc/passwd file on the active image.
Delete the line in /etc/passwd associated with user www, which is used by the Apache
web server. Then try to start Apache.
# vipw
www:*:30:1::/:
# /opt/hpws/apache/bin/apachectl start
You should get a message indicating that the daemon can’t start because the www
username is missing:
httpd: bad user name www
Fortunately you have a backup copy of the /etc/passwd file on the DRD clone!
H3064S J.00
11-62
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 11
Preparing for Disasters
6. Temporarily mount the clone’s file systems.
Answer:
# drd mount
# mount –v
The clone’s file systems should be mounted on mount points under
/var/opt/drd/mnts/sysimage_001/.
7. Use the diff command to view differences between the active and inactive system
images’ /etc/passwd files.
Answer:
# diff /etc/passwd /var/opt/drd/mnts/sysimage_001/etc/passwd
8. Use vipw and the output from the diff command to add the www line back into the
active image’s /etc/passwd file.
Answer:
# vipw
www:*:30:1::/:
9. Try to start Apache again. This time it should work.
Stop the daemon before proceeding.
# /opt/hpws/apache/bin/apachectl start
# /opt/hpws/apache/bin/apachectl stop
10. Unmount the DRD clone file systems.
Answer:
# drd umount
11. DRD allows the administrator to manage software without affecting the active system
image. Use drd runcmd to list the software installed on the inactive DRD image.
Answer:
# drd runcmd swlist
12. Activate the cloned system image to verify that it works.
Answer:
# drd activate
http://education.hp.com
H3064S J.00
11-63
© 2010 Hewlett-Packard Development Company, L.P.
Module 11
Preparing for Disasters
Activating the image simply changes the boot paths in NVRAM. The clone disk should
now be the primary boot device.
13. Shutdown and reboot from the clone disk.
# shutdown –ry 0
14. When the system returns, execute drd status again to verify that the system booted
from the clone disk.
Answer:
# drd status
15. Run drd activate and reboot again to reactivate the original system image.
Answer:
# drd activate –x reboot=true
16. Add a new user account on the system.
# useradd –m –s /usr/bin/sh user25
17. Will drd sync recognize this change in /etc/passwd? Execute drd sync in preview
mode to find out!
# drd sync –p
may take several minutes
18. Review the list of files that need to be synchronized.
# view /var/opt/drd/sync/files_to_be_copied_by_drd_sync
19. Run the synchronization command without the preview option.
# drd sync
may take several minutes
20. Clobber the clone that you created by overwriting the top of the disk with zeroes.
# dd if=/dev/zero of=/dev/rdisk/diska bs=1048576 count=1024
H3064S J.00
11-64
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12 — Accessing the System Console
Objectives
Upon completion of this module, you will be able to do the following:
•
Describe the console connectivity options for HP-UX servers and workstations.
•
Describe the purpose of the Management Processor (MP).
•
Connect and configure the MP serial port.
•
Connect and configure the MP LAN console port.
•
Configure MP user accounts and access levels.
•
Navigate the MP menu interface.
•
Navigate the MP help menus.
•
Access Virtual Front Panel (VFP) interfaces via the MP.
•
Access console and Event Logs via the MP.
•
Access nPar, vPar, and VM console interfaces.
•
Reset, TOC, power-up, and power-down systems via the MP.
http://education.hp.com
H3064S J.00
12-1
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
12–1. SLIDE: Introducing the MP
Introducing the MP
• All of HP’s current servers support a Management Processor card
• The MP provides full remote console access via a variety of interfaces & protocols
• Some models also include serial/VGA/USB console ports for local console access
VT100 Emulator
PC w/ modem
Serial/Console
Serial/Remote Support Modem
telnet client
telnet
SSH client
SSH
web browser
MP
card
HTTP/HTTPS
Student Notes
One of the most important hardware components on any HP-UX system is the system
console. The system console is the terminal used by the administrator during system
shutdown and startup, and is the only terminal on which some critical administrative tasks
may be performed. HP supports several different console options.
Introducing the MP, GSP, and iLO 2 MP
Many HP-UX servers today are located in data centers, many miles from the administrator
responsible for managing the servers. All of HP’s recent server models support a
management processor that facilitate console access locally through a serial console, or
remotely via a modem, telnet, ssh, or https. Using the management processor,
administrators can remotely install, manage, reboot, reinstall, and even power cycle HP-UX
servers.
Older HP-UX servers supported remote console access through a “Guardian Service
Processor” (GSP). Later servers offered remote console access through HP’s next generation
“Management Processor” (MP). The latest entry level servers support the new “Integrated
H3064S J.00
12-2
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
Lights Out Management Processor” (iLO 2 MP), with a number of exciting new features, and
an optional web interface that’s very similar to the iLO interface on HP’s ProLiant servers.
In the interest of brevity, the remaining slides in this chapter use the general acronym “MP”,
but the features and commands discussed, except where noted otherwise, apply to the GSP
and iLO 2 MP, too. See your system’s documentation for additional model- and firmwarespecific features.
Accessing the MP
All MP cards include an RS232 port that may be connected via a serial cable to an HP ASCII
terminal, or a PC terminal emulator. The local console port is the easiest console solution to
configure, and is the most secure console access mechanism.
Some models also provide console access via an MP "remote access/support modem" port.
Enabling the remote support modem makes it possible to dial into the MP via an external
modem to obtain console level access.
All MPs provide a dedicated console LAN interface with an IP network address that is
independent of the server's standard LAN interface card. Administrators can access the MP
LAN interface via several industry standard network protocols. These protocols are built into
the MP firmware, so they remain accessible no matter what state the server itself is in – even
when the server is rebooted or power-cycled!
•
All current servers support MP access via the TELNET protocol. This option provides
remote console access from any PC or workstation with a telnet client. telnet is a
notoriously unsecure protocol, so this option isn’t recommended.
•
Most current servers support secure web-based console interface access via the HTTP
and/or HTTPS protocol. This convenient option provides remote console access from
any PC workstation with a Firefox or Internet Explorer web browser. The HTTPS option
uses Secure Socket Layer (SSL) technology to encrypt and authenticate all traffic
between the browser and GSP/MP.
•
Some newer servers also support MP access via the Secure Shell (SSH). This option
provides encryption and public key authentication, but is only available on newer servers,
and in some cases requires an extra license.
•
Newer servers also support MP access via the Intelligent Platform Management Interface
(IPMI). IPMI doesn’t provide an interactive console shell interface. Rather, it’s an
interface that is used by management applications to remotely monitor and control fans,
power supplies, temperature sensors, and other hardware components. On cell-based
systems, IPMI may also be used to remotely reconfigure node partitions.
The local console port provides the best security, but may not be practical for remote
administrators. The TELNET protocol should be avoided on production servers since it
passes data – including usernames and passwords – between the server and client in clear
text. HTTPS and SSH are more secure alternatives.
http://education.hp.com
H3064S J.00
12-3
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
Powering the MP
The MP draws its power from an auxiliary power plane, guaranteeing that the MP remains
accessible as long as the server is plugged into a power source, even if the server itself is
powered off. There is no need for an external power source to keep the MP active when the
server is shut down.
Securing the MP
As noted above, network traffic between the MP and the administrator’s desktop may be
secured via SSH or SSL. In order to access the MP, users must also provide a valid MP
username and password.
Interacting with the MP
Early model MPs provided a simple menu-based interface. Later model MPs added an
option/argument based CLI interface. Most MPs provide a web interface accessible through
any browser, too.
System Monitoring via the MP
The MP provides the ability to remotely monitor system indicator LEDs, and the status of
cooling, power, and other hardware components. It maintains a detailed Forward Progress
Log of system operation during boot, crash and any other abnormal conditions. This log can
be used to extensively troubleshoot the server. Tee MP’s a console message buffer allows the
administrator to review past console log messages.
Integrating with the MP
HP’s System Insight Manager, HP’s web-based application for managing multiple systems in a
data center environment, provides easy access to MP features when managing multiple
servers.
The new iLO 2 MP also supports the LDAP, DHCP, and DDNS protocols to simplify MP userand network- configuration in large data center networks.
Other non-MP Console Options
Though many administrators access console functionality via the MP, some servers offer
other options, too.
Some servers provide a serial console port on the core I/O card, independent of the MP/GSP.
HP-UX workstations provide a core I/O serial console port. To use the core I/O console port,
simply run an RS-232 cable from the console/serial port to an HP ASCII terminal, and poweron the terminal.
Many of the current entry level servers include a VGA graphics adapter for connecting a
graphics monitor, and USB ports for connecting a mouse and keyboard.
See your server’s owner or installation manual for details regarding supported monitors and
USB devices.
H3064S J.00
12-4
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
12–2. SLIDE: Viewing the Console/MP Ports
Viewing the Console/MP Ports
•
•
•
•
The MP is accessible via several ports on the system backplane
The MP offers a LAN console port, serial console port, and status indicators
The MP reset button returns the MP to its factory default configuration
Some servers have USB/VGA/serial ports independent of the MP
1
1.
2.
3.
4.
5.
6.
2
3
PCI-x/PCI-e slots
Core I/O LAN ports
Smart Array Controller slot
Auxiliary serial port
VGA port
USB port
4
5
6
7
8
9 10
11
7. MP serial port
8. MP LAN port
9. MP status LEDs
10. MP reset button
11. Unit Identifier (UID) button and LED
Student Notes
On most current server models, the MP is located on the server backplane. The physical
arrangement of the ports varies somewhat from model to model, but the rx2660 shown on the
slide is representative of the current servers. MP- and console-related ports and components
are highlighted in yellow.
The first four ports/slots labeled in the graphic are unrelated to the MP/console.
1. PCIx/PCIe expansion slots for adding additional LAN and mass storage interface cards.
2. Core I/O LAN ports. These LAN interfaces are managed by the Operating System, to
provide network access for applications and OS services. Accessing the Core I/O LAN via
ssh or telnet provides access to an OS login prompt, but doesn’t provide access to MP
features such as the Virtual Front Panel.
3. Smart Array Controller slot. Newer entry-level servers support an optional Smart Array
Controller card that can provide hardware-level mirroring for the internal disks.
http://education.hp.com
H3064S J.00
12-5
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
4. Auxiliary Serial Port. Use this port to connect serial printers or other serial devices. A
serial terminal may be attached to the Auxiliary Serial Port in order to access an OS login,
but the auxiliary serial port does not provide access to MP features such as the Virtual
Front Panel.
Some servers support VGA and USB ports, for users who choose a desk-side configuration
with a direct attach VGA monitor and USB keyboard and mouse.
5. VGA port. Use this port to attach a local VGA monitor. This provides local console
access, but doesn’t provide access to MP features such as the VFP.
6. USB ports. Use the USB ports to attach a keyboard and mouse for local console access.
The remaining ports in the diagram are MP-related.
7. MP serial port. Use this DB9 serial port to attach a local ASCII serial terminal. Some
servers have a 25-pin port instead, which splits via a “W” or “M” cable into three DB9
ports for a serial terminal, remote support modem, and a UPS unit. See the next slide for
details.
8. MP LAN console port. This 10BaseT or 10/100BaseT LAN interface provides access to the
MP interface. Connect this port via Cat5 twisted pair cable to the datacenter network.
This LAN interface is independent from the Core I/O LAN interface that clients typically
use to access application server daemons. LAN console access protocols vary depending
on the server’s model, firmware revision, licenses, and MP configuration. Common
protocols supported by the MP include TELNET, SSH, and HTTPS.
9. MP LAN status LEDs. These indicator lights report MP activity and status. See your
server’s documentation for more information.
10. MP reset button. If the MP hangs for some reason, or if the administrator makes
significant changes to the MP configuration, it may be necessary to reset the MP. The
reset button terminates remote MP login sessions, but has no impact on the running OS
instance. On some servers, holding the reset button for a longer period of time resets the
MP to its factory default configuration. This is useful if you forget the MP’s network
address or password.
11. Unit Identifier (UID) button and LED. A single rack may contain dozens of servers,
sometimes making it difficult to determine which server is which. Executing the LOC
(locater) command from the MP command menu enables the UID locater LED. Use the
UID locater light to determine which server’s MP you are currently connected to.
H3064S J.00
12-6
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
12–3. SLIDE: Connecting MP Serial Ports
Connecting MP Serial Ports
•
•
•
•
Some MPs have a built-in RS232 ports
Some MPs require a “W” or ”M” cable to connect a modem/console/UPS
C-class blade servers require an “SUV” cable to connect a serial console
See your server’s installation manual for details
“SUV” cable
to: server blade SUV port
“W” or “M” cable
to: DB25 port
RS232
UPS
RS232
serial
modem
RS232
serial
console
2 USB
ports
VGA
RS232
serial
console
Student Notes
Some MPs have a built-in DB9 port for connecting an ASCII serial terminal.
Other MPs have a 25-pin port, to which an HP “W” or “M” cable may be attached. The cable
provides three DB9 ports: one to support a local serial console, one to support a remote
support modem, and one to provide connectivity to a UPS unit. See your server’s ordering
guide to determine the part number of the cable appropriate for your server.
HP’s c-Class Integrity BL860c server blades typically use wiring traces built into the blade
enclosure to access the MP LAN console. However, attaching HP’s Serial USB Video (SUV)
cable allows the administrator to attach a local serial terminal, VGA display, MP LAN cable,
or USB devices. The VGA port provides console access, but doesn’t provide access to
additional MP features such as the Virtual Front Panel. See your server’s documentation for
additional information.
Disconnect the SUV cable from the server port when it is not in use. The SUV port and
connector are not intended to provide a permanent connection. Use caution when walking
near the server blade when the SUV cable is installed. Hitting or bumping the cable can cause
http://education.hp.com
H3064S J.00
12-7
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
the port on the server blade to break. This can damage the system board, requiring it to be
replaced.
Whether using a built-in DB9 port, or an “M”, “W”, or SUV cable, be sure to set the terminal to
9600 baud, 8-bit parity, vt100 emulation mode when accessing the MP.
H3064S J.00
12-8
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
12–4. SLIDE: Connecting the MP LAN Port
Connecting the MP LAN Port
• All MPs include a 10BT or 10/100BT LAN console interface
• SSH and HTTPS traffic to the MP is encrypted; TELNET is not
• Ideally, LAN console ports should be connected to a private management LAN
Corporate Intranet
Secure Private Management LAN
Student Notes
Although the MP may be accessed via a remote support modem or a local serial console,
many administrators choose to access the MP remotely via the LAN console port. LAN
console access protocols vary depending on your server model, firmware revision, licenses,
and MP configuration, but may include TELNET, SSH, and/or HTTPS.
SSH and HTTPS protect traffic passing between the MP and the administrators desktop client
via strong encryption and public key authentication.
If you choose to enable telnet access to the LAN console port, note that telnet traffic
isn’t encrypted. Thus, if a hacker were able to gain access to a LAN port on your LAN
console port’s network, the hacker would very likely be able to gain console access on your
system. For this reason, if you use the telnet method to access the MP, the LAN console
port should NOT be connected to the Internet or your company’s intranet.
For improved security, MP LAN console ports should ideally be connected to a secure,
private management network that is only accessible within the data center.
http://education.hp.com
H3064S J.00
12-9
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
12–5. SLIDE: Accessing the MP
Accessing the MP
• When accessing the MP the first time, use the local serial console
• Configure the LAN interface and protocols and configure MP usernames/passwords
• After configuring the MP LAN, access the MP via any TELNET/SSH/HTTPS client
• A valid MP username/password is required when using the MP LAN interface
• Several MP users may login simultaneously to view a shared console interface
# ssh 192.168.1.1
Use any TELNET or SSH
client to access the MP IP
An MP username/password
is required to access the MP
LAN console
(c)Copyright 2000 Hewlett-Packard Co.
Welcome to
System Name: mysvr-MP
MP login: Admin
MP password: Admin
Student Notes
When accessing the MP for the first time, use the local serial console so you can configure an
appropriate MP LAN console IP address. Users accessing the MP through the LAN console
interface must provide an MP username and password. Username “Admin” and password
“Admin” are predefined. Slides later in the chapter describe the process required to
configure the MP LAN, usernames, and passwords.
After configuring the LAN console interface and MP usernames and passwords,
administrators can access the MP remotely via any TELNET/SSH/HTTPS client. Be sure to
use the MP console LAN’s IP address or hostname, not the Core I/O LAN interface IP address.
# telnet myserver-mp
# ssh myserver-mp
# firefox https://myserver-mp
Enter a valid MP username and password, and begin navigating the MP interface as described
on the next couple slides.
H3064S J.00
12-10
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
12–6. SLIDE: Navigating the MP Core Menus (Older)
Navigating the MP Core Menus (Older)
Enter here via serial/ssh/telnet
MP> co
# Console Interface
exit ^b
On older
systems,
connecting to
the MP placed
the user directly
at console
login.
Press ^b to
get to the MP>
menu and other
MP functions.
MP> vfp
MP> cl
q
MP>
MP> sl
q
MP> he
q
MP> x
q
Virtual Front Panel
Console Log Viewer
Chassis Log Viewer
Help Menu
MP session terminated
Student Notes
The MP provides a menu-based interface with several dozen commands for accessing and
managing the system. This slide introduces the general MP menu structure used on some
older systems. The next slide describes the somewhat different menu structure that is used
on many newer systems.
On these older systems, when you first login on the MP, you will immediately be placed in a
console interface in read-only mode. Recall that multiple users can connect to the MP
console simultaneously. In read-only mode, you should be able to view the commands being
typed by another MP user, but you won’t be able to execute any commands yourself. In order
to take control of the console, press ^e followed by cf and [return]. This console
interface may be used to shutdown, reboot, or perform any other administrative chores that
would normally be done on the system console.
If you wish to execute other MP commands, logout of your HP-UX session by typing exit,
and press ^b to return to the MP> prompt.
http://education.hp.com
H3064S J.00
12-11
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
Several core commands are available at the MP> prompt.
•
The co command returns to the console interface. To return to the main MP menu, exit
out of your login session and press ^b.
•
The vfp command provides access to a “Virtual Front Panel”. The VFP may be used to
determine the system’s current status, particularly in the early stages of the boot process
when the system is running hardware self-checks. Press q to exit the VFP and access the
console interface. From the console interface, you can press ^b to return to the MP>
prompt.
•
The cl command displays recent console messages and commands. This is useful if you
want to see which commands were recently executed, or if you want to review error or
status messages that may have been sent to the console during the last shutdown or
reboot. To return to the main MP menu, press q.
•
The sl command displays low level system event log messages generated by the system
hardware. Messages in these logs are written by the MP and can document problems and
potential problems inaccessible to the operating system or before affecting the operating
system. To return to the main MP menu, press q.
•
The he command provides access to an interactive help menu that describes the features
and commands available in the MP. To return to the main MP menu, press q.
•
The x command terminates your MP connection.
MP commands are not case-sensitive. Since the MP firmware varies somewhat from model
to model, this course only covers the most common commands that are available on all
models. See the MP help menus on your system for a complete list of commands on your
specific system model.
H3064S J.00
12-12
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
12–7. SLIDE: Navigating the MP Core Menus (Newer)
Navigating the MP Core Menus (Newer)
Several commands
and submenus are
available from the
initial MP main menu.
Enter here via serial/SSH/telnet
MP>
MP MAIN MENU:
CO:
VFP:
CM:
CL:
SL:
FW:
HE:
X:
Consoles
Virtual Front Panel
Command Menu
Console Logs
Show Event Logs
Firmware Update
Help
Exit Connection
MP>
MP> co
#exit ^b
# Console Interface
MP> vfp
^b
Virtual Front Panel
MP> cm
^b or ma
Command Menu
MP> cl
^b or q
Console Log Viewer
MP> sl
^b or q
Event Log Viewer
MP> fw
^b or q
Firmware Update (HP only)
MP> he
q
Help Menu
MP> x
MP session terminated
Student Notes
When you first login on the MP on HP’s newer systems, you will be placed in the MP main
menu. The MP main menu supports several commands.
•
The co command provides access to an interactive console for each nPar partition on the
system. These consoles may be used to shutdown, reboot, or perform other
administrative chores that would normally be done on the system console. To return to
the main MP menu, exit out of your login session and press ^b.
•
The vfp command provides access to a “Virtual Front Panel” for each nPar partition on
the system. These VFPs may be used to determine a partition’s current status,
particularly in the early stages of the boot process when the system is running hardware
self-checks. To return to the main MP menu, press ^b.
•
The cm command takes you to an MP command menu. The command menu may be used
to configure the MP LAN interface, add or remove MP users, reset or boot a partition, and
perform many other MP tasks. Later slides in the chapter discuss some common CM
commands in greater detail. To return to the main MP menu, press ^b or type ma.
http://education.hp.com
H3064S J.00
12-13
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
•
The cl command displays recent console messages and commands for each nPar
partition on the system. This is useful if you want to see what commands were recently
executed on an nPar’s console, or if you want to review error or status messages that may
have been sent to the console during the last shutdown or reboot. To return to the main
MP menu, press ^b or q.
•
The sl command displays low level event log messages generated by the system.
Messages in these logs are written by the MP and can document problems and potential
problems inaccessible to the operating system or before affecting the operating system.
To return to the main MP menu, press ^b or q.
•
The fw command provides a mechanism for updating the MP firmware. This function
should only be used by HP support personnel and requires an HP-proprietary password.
•
The he command provides access to an interactive help menu that describes the features
and commands available in the MP. To return to the main MP menu,
press q.
•
The x command terminates your MP connection.
MP commands are not case-sensitive. Since the MP firmware varies somewhat from model
to model, this course only covers the most common commands that are available on all
models. See the MP help menus on your system for a complete list of commands on your
specific model.
H3064S J.00
12-14
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
12–8. SLIDE: Navigating the MP Web Interface
Navigating the MP Web Interface
• The MP web interface provides a browser-based menu tab interface
• The MP web console interface provides full OS command-line access
Student Notes
Some administrators prefer to access the system console through the MP’s Web interface,
which is included on many of HP’s newer server models. The web interface allows
administrators to access the MP LAN interface via a secure SSL-protected connection to a
firmware-based web server. To access the MP web interface, enter
https://MPhostname/ in your web browser’s address bar. You will be prompted to enter
a valid MP username and password.
The resulting interface varies by model and firmware revision. The screenshot below shows
the basic interface provided in older firmware revisions. The screenshot on the slide shows
the sophisticated tab-based iLO 2 MP interface provided by the newer entry level servers.
The newer interface is very similar to the iLO 2 web interface by HP’s ProLiant servers.
http://education.hp.com
H3064S J.00
12-15
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
H3064S J.00
12-16
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
12–9. SLIDE: Accessing an nPar Console Interface
Accessing an nPar Console Interface
• The MP console interface provides access to all normal HP-UX console features
• Multiple MP users can “shadow” the console simultaneously
• To take control of the console interface, press ^e cf
• To return to the MP menu, exit out of HPUX, and press ^b
MP>
MP> co
# exit ^b
# Console Interface
(Use ^B to return to main menu.)
[A few lines of context from the console log:]
- - - - - - - - - - - - - - - - - - - - - - GenericSysName [HP Release B.11.23] (see /etc/issue)
Console Login:
Student Notes
The MP console interface provides full console access. This makes it possible to remotely
shutdown and reboot a system, install the OS, or even power on/off a system without missing
key console messages.
On systems supporting node partitions (nPars), after typing the co command, MP operators
and administrators are asked which partition they wish to access. Single-partition users and
administrators on systems that don’t support nPars won’t be prompted for a partition
number.
MP> co
Partitions available:
Part#
----0)
1)
Q)
Name
---Partition 0
Partition 1
Quit
http://education.hp.com
H3064S J.00
12-17
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
Please select partition number: 0
Connecting to Console: Partition 0
(Use ^B to return to main menu.)
[A few lines of context from the console log:]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GenericSysName [HP Release B.11.31] (see /etc/issue)
Console Login:
Several users can access the MP functionality, and can even concurrently execute different
MP commands. One might be viewing the VFP, while another views the event log, while yet
another executes commands from the MP:CM> prompt.
Several users can even access an nPar console interface concurrently. However, only one
MP user has keyboard control within an nPar’s console session. Other MP users can view the
commands executed within the console interface, but only one MP users can provide
keyboard input. If you join an MP console session and wish to take control of the console
keyboard, press ^e then cf.
The MP:CM> who command displays a list of currently logged-in MP users.
After logging in, you can determine which nPar console you are currently accessing by typing
parstatus –w. This command only works on node-partitionable systems.
# parstatus –w
The local partition number is 0.
When you are finished with an MP console session, be sure to exit out of your HP-UX shell,
then press ^b to return to the MP> main menu. If the HP-UX login session is not terminated
before returning to the MP> menu, the next user who accesses the MP console for that
partition will be able to access the console without entering an HP-UX username and
password.
To learn more about nPars, attend HP Education’s U5075S Partition Management course.
H3064S J.00
12-18
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
12–10. SLIDE: Accessing a vPar Console Interface
Accessing a vPar Console Interface
• Each nPar may contain multiple vPars
• To access a vPar console interface, access the nPar console first, ...
• Then press ^a to cycle through console interfaces for each vPar within the nPar
• On cell-based systems, you can access a console for any nPar
MP> co
MP>
# exit ^b
# nPar Console Interface
# vparstatus –w
The current partition is vpar0
^a
^a
# vparstatus –w
The current partition is vpar1
Student Notes
On systems running HP’s vPar software, each vPar has a console interface. In order to access
the vPar’s console, first access the nPar’s console interface via the MP.
After accessing the appropriate nPar’s console, cycle through the vPar console interfaces
within the nPar by pressing ^a. To determine which vPar console you are currently using,
execute the vparstatus -w command.
# vparstatus –w
The current partition is vpar0
To learn more about Virtual Partitions, attend HP Education’s U5075S Partition Management
course.
http://education.hp.com
H3064S J.00
12-19
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
12–11. SLIDE: Accessing an Integrity VM Console Interface
Accessing an Integrity VM Console Interface
• Each nPar or system may host multiple guest VMs
• To access a guest VM’s console interface, login on the VM host
− Then execute hpvmconsole to access any guest’s virtual MP
− Press co at the vMP prompt to access the guest’s console
− Press ^x to return to the VM guest vMP
# hpvmconsole -P myguest
vMP MAIN MENU
CO: Console
CM: Command Menu
CL: Console Log
SL: Show Event Logs
VM: Virtual Machine Menu
HE: Main Help Menu
X: Exit Connection
[myguest] vMP> co
GenericSysName [HP Release B.11.23] (see /etc/issue)
Console Login:
Student Notes
Some administrators prefer to partition systems using HP’s Integrity Virtual Machine product
rather than vPars. Integrity VMs are supported on all current entry level, midrange, high-end
Integrity servers. Within an nPar an administrator can configure vPars or Integrity VMs, but
not both.
Each virtual machine has its own “vMP” (virtual Management Processor) which provides MPlike features for the virtual machine. To access a VM’s console interface, log into the VM host
on the server or nPar containing the target VM guest. Although this process may be
performed from the server’s MP console, doing so isn’t recommended, as it is easy to confuse
the server’s physical MP and the VM guest’s vMP. Executing the vMP rs command resets a
single VM guest; accidentally executing the MP rs command impacts all of the VM guests
running on the server!
After logging into the VM host, use the hpvmconsole command to access the desired guest’s
vMP. The vMP menus provide many of the same commands and features as the physical MP.
Press co to access the vMP guest console; then press ^x to return to the vMP main menu.
H3064S J.00
12-20
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
# hpvmconsole -P myguest
vMP MAIN MENU
CO:
CM:
CL:
SL:
VM:
HE:
X:
Console
Command Menu
Console Log
Show Event Logs
Virtual Machine Menu
Main Help Menu
Exit Connection
[myguest] vMP> co
GenericSysName [HP Release B.11.23] (see /etc/issue)
Console Login:
Note that a vMP username and password aren’t required to access the vMP; any user who has
a shell login on the VM host can use the hpvmconsole command to access any VM guest
managed by the VM host. In order to ensure that VM guest administrators only access their
assigned VM guests, administrators sometimes configure VM host logins that automatically
launch a specific guest’s vMP console.
# useradd –m –d /home/vm1 \
–c “vm1 console” \
-s /opt/hpvm/bin/hpvmconsole
vm1
# passwd vm1
If the username is the same as the VM guest name, the VM host will automatically launch a
guest vMP session rather than an interactive shell for the user when they login on the host.
When the user exits the vMP, the login on the VM host will terminate, too.
To learn more about Integrity Virtual Machines, attend HP Education’s U5075S Partition
Management course or HB506S Integrity Virtual Machines course.
http://education.hp.com
H3064S J.00
12-21
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
12–12. SLIDE: Accessing the MP Virtual Front Panel
Accessing the MP Virtual Front Panel
• The VFP displays hardware status messages similar to LED displays on older servers
• Use the VFP to monitor system activity, especially during the boot process
• On cell-based systems, you can view a VFP for any nPar
MP>
MP> vfp
^b OR q
Virtual Front Panel
#
0
Partition state
--------------Cell(s) Booting
Activity
--------
#
1
2
Cell state
---------Memory discovery
Memory discovery
Activity
-------MEM_TEST_READ_WRITE
MEM_TEST_READ_WRITE
365 Logs
187 Logs
178 Logs
E indicates error since last boot
MP:VFP (Use ‘?’ to display help or ^B to Quit) >
Student Notes
Older servers traditionally had an LED front panel on the server chassis that displayed status
codes reflecting the system status. Since many administrators now manage servers remotely,
all of the newer servers have “Virtual Front Panels” (VFPs) that provide similar information
remotely via the MP interface.
The format of the information reported on the VFP varies from model to model. The sample
output on the slide was taken from an rx7620 nPar partition.
On cell-based systems, after initially typing the vfp command at the MP> prompt, the
MP:VFP> prompt expects the administrator to specify which partition’s VFP should be
displayed.
H3064S J.00
12-22
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
MP> vfp
Partitions available:
Part#
----0)
1)
Q)
Name
---Partition 0
Partition 1
Quit
Please select partition number: 0
#
0
Partition state
--------------Cell(s) Booting
Activity
--------
#
1
2
Cell state
---------Memory discovery
Memory discovery
Activity
-------MEM_TEST_READ_WRITE
MEM_TEST_READ_WRITE
365 Logs
187 Logs
178 Logs
E indicates error since last boot
MP:VFP (Use ‘?’ to display help or ^B to Quit) >
The output in the example above shows that partition 0 has two cell boards in cell slots 1
and, and that the partition is in the process of completing a sequence of memory self-checks
during the boot process.
The Partition state field reports the status of the selected partition. The Cell state
field reports the status of the cells included in the selected partition. The Activity field
reports what the cell or partition is currently doing. The Logs field reports the number of
event log entries generated by the selected partition or cell. Most event log messages are
informational. If there’s an E in the first column of any line, before either a partition or cell
number, it means that the current partition/cell status is the result of an error. If you see an
error, use the MP’s console and event log viewers to determine what caused the problem.
At the end of the boot process, you should see a blinking OS heartbeat asterisk in the
Partition state field. This indicates that the /sbin/init daemon is running.
#
0
Partition state
--------------OS heartbeat: *
Activity
--------
#
1
2
Cell state
---------Cell has joined partition
Cell has joined partition
Activity
--------
365 Logs
187 Logs
178 Logs
E indicates error since last boot
MP:VFP (Use ‘?’ to display help or ^B to Quit) >
http://education.hp.com
H3064S J.00
12-23
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
At any time, you can press ^b or q to leave the VFP and return to the MP> main menu.
The VFP output is significantly different on non-cell-based systems. The screenshot below
was captured on an rx2600. Note that some systems display additional power and attention
LED status information that doesn’t appear on the VFP for cell-based systems.
System state
-----------OS Running
Activity
-------OS heartbeat: *
# of logs since boot
-------------------711
E indicates error since last boot
LEDs
| LOCATOR
| SYSTEM
| POWER
-----------------------------------------------| OFF
| ON GREEN
| ON GREEN
-----------------------------------------------Status | System running normally.
------------------------------------------------
H3064S J.00
12-24
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
12–13. SLIDE: Accessing the MP Console Log
Accessing the MP Console Log
• Use the MP console logs to view recent activity on the console interface
• On cell-based systems, you can view a console log for any nPar
• WARNING: The console logs don’t deal well with screen-oriented output
MP>
MP> cl
^b OR q
Console Log Viewer
Start Highly Available cluster ................... N/A
Starting the Apache subsystem .................... OK
Start CDE login server ........................... OK
Transition to run-level 3 is complete.
GenericSysName [HP Release B.11.23] (see /etc/issue)
Console Login:
Student Notes
In order to prevent the administrator from missing critical console messages, the MP records
all console messages in a console log buffer. This is particularly useful after a system reboot,
as it allows you to review boot console messages after the boot process is complete.
Use the MP> cl command view the contents of the console log. On non-partitionable
systems, this will display the console log immediately. On partitionable systems, the MP asks
which partition’s console log you wish to view.
MP> cl
Partition Console Logs available:
Part# Name
----- ---0) Partition 0
1) Partition 1
C) Clear a partition's console log.
Q) Quit
http://education.hp.com
H3064S J.00
12-25
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
MP:CL> 0
Start Highly Available cluster ................... N/A
Starting the Apache subsystem .................... OK
Start CDE login server ........................... OK
Transition to run-level 3 is complete.
GenericSysName [HP Release B.11.31] (see /etc/issue)
Console Login:
(N)ext or <cr>, (P)revious, ^B to exit to menu
The commands required to navigate the console logs vary somewhat depending on your
platform and MP firmware revision. Press ? to view the navigation commands for your
system. Here is a sample list of navigation commands supported on many newer systems:
Console Log Navigation Command Help
+
Go to next page
Go to previous page
<CR>
Continue to next or previous page
C
Clear console log
D
Dump the entire log
F
Go to first page of history (oldest)
L
Go to last page of history (most recent)
?
Print this help menu
Ctrl-B Exit command, and return to the Main Menu
MP:CL (+, -, <CR>, C, D, F, L, ? for help, or Ctrl-B to Quit){Pg 1
of 57} >
Use ^b or q to return to the MP> main menu.
Note that the console log viewer doesn’t deal well with screen oriented output generated by
smh, swinstall , and similar TUI utilities.
H3064S J.00
12-26
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
12–14. SLIDE: Accessing the MP Event Log
Accessing the MP Event Log
• Use the MP event logs to view low level hardware error messages
• Messages can be viewed in a variety of formats; “text” is easiest to read
• Particularly watch for messages level 3 (Warning) or higher
MP>
MP> sl
^b OR q
Chassis Log Viewer
Select Chassis Code Buffer to be displayed:
Incoming, Activity, Error, Current boot or Last boot? (I/A/E/C/L)i
Set up filter options on this buffer? (Y/[N])
The first entry is the most recent Event Code
Type + CR and CR to go up (back in time),
Type - CR and CR to go down (forward in time),
Type Q/q CR to quit.
Student Notes
The MP> sl command displays system event logs, which may be useful when
troubleshooting hardware issues. This is particularly useful when you discover that an
attention light is blinking, if your system fails to boot, or if an E appears on the VFP indicating
that an error occurred. If you suspect that you have a hardware problem, but can’t determine
the meaning of a message in the event log, consider calling the HP Response Center to
troubleshoot the problem.
You can view past activity logs, past error logs, and live event logs (log messages reported in
real time) in a variety of formats. Use the t (text) command to view the logs in a humanreadable format. h (hexadecimal) and k (keyword) formats are also available.
You may filter the logs by severity level by pressing the a key. The table below describes the
various alert levels that are used on the newer systems (note that alert levels 4 and 6 are
currently unused):
http://education.hp.com
H3064S J.00
12-27
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
Alert Level
0
1
2
3
5
7
Description
Minor Forward Progress
Major Forward Progress
Informational
Warning
Critical
Fatal
The system generates many log messages at levels 0-2 as part of the normal system boot
process. Log messages at levels 3, 5, and 7 may deserve extra attention.
In the sample output below, the administrator chose to view system event log messages, at
alert level 5 (critical) or higher, in the human-readable text format. The resulting messages
report that there was a critical failure in one of the fan units, and a warning message
regarding a hardware problem in one of the mx2 processor modules. Note that the event log
viewer menus vary somewhat from model to model.
MP> sl
Event Log Viewer Menu:
Log Name
Entries
% Full
Latest Timestamped Entry
----------------------------------------------------------------E - System Event
6
0 %
25 Jun 2004 15:18:17
F - Forward Progress
6
0 %
25 Jun 2004 15:18:17
B - Current Boot
0
P - Previous Boot
0
C - Clear All Logs
L - Live Events
Enter menu item or [Ctrl-B] to Quit: e
Log Name
Entries
% Full
Latest Timestamped Entry
----------------------------------------------------------------E - System Event
6
0 %
25 Jun 2004 15:18:17
Event Log Navigation Help:
+
<CR>
D
F
L
J
H
K
T
A
View next block
(forward in time, e.g. from 3 to 4)
View previous block (backward in time, e.g. from 3 to 2)
Continue to the next or previous block
Dump the entire log
First entry
Last entry
Jump to entry number
View mode configuration - Hex
View mode configuration - Keyword
View mode configuration - Text
Alert Level Filter options
H3064S J.00
12-28
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
U
?
Q
Ctrl-B
Alert Level Unfiltered
Display this Help menu
Quit and return to the Event Log Viewer Menu
Exit command, and return to the MP Main Menu
MP:SL (+,-,<CR>,D,F,L,J,H,K,T,A,U,? for Help, Q or Ctrl-B to Quit) >a
Alert
1
2
3
5
7
Level Threshold Filter:
: Major Forward Progress
: Informational
: Warning
: Critical
: Fatal
Enter alert level threshold or [Q] to quit filter setup: 5
-> Alert threshold level 5 filter will be applied.
MP:SL (+,-,<CR>,D,F,L,J,H,K,T,A,U,? for Help, Q or Ctrl-B to Quit) >t
MP:SL (+,-,<CR>,D,F,L,J,H,K,T,A,U,? for Help, Q or Ctrl-B to Quit) >d
Confirm? (Y/[N]): y
Log Entry 0: 25 Jun 2004 14:43:23
Alert Level 5: Critical
Keyword: Type-02 0a0702 657154
Cooling unit failure
Logged by: Baseboard Management Controller;
Sensor: Cooling Device - Fan 2 (Pwr)
Data1: transition to Critical from less severe
0x2040DC3A0B020010 FFFF0207130A0300
Log Entry 4: 25 Jun 2004 14:48:17
Alert Level 3: Warning
Keyword: MX2_PAA_FAULT
An uncorrectable PAA fault has occurred on the MX2 module
Logged by: PDH Controller 0
Data: Location - Processor
0x4480142700E00050 00FFFF00FF00FF10
-> This is the last entry in the selected log.
MP:SL (+,-,<CR>,D,F,L,J,H,K,T,A,U,? for Help, Q or Ctrl-B to Quit) >q
Press ^b or q to return to the MP> main menu.
http://education.hp.com
H3064S J.00
12-29
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
12–15. SLIDE: Accessing the MP Help Menu
Accessing the MP Help Menu
Use the MP help menu to learn more about other MP commands
MP>
MP> he
q
Help Menu
==== MP Help =============================(Administrator)==
Hardware Revision A0 Firmware Revision C.02.12 Nov 10
MP Help System
Enter a command at
OVerview :
LIst
:
<COMMAND> :
TOPics
:
HElp
:
Q
:
the help prompt:
Launch the help overview
Show the list of MP commands
Enter the command name
Show all MP Help topics and commands
Display this screen
Quit help
MP HELP: li
Student Notes
If you need additional information about any of the features described in this chapter, take
advantage of the MP help interface, which includes comprehensive descriptions of all of the
MP commands.
First, type the he command at the main menu to access the interactive MP help sub-menu.
MP> he
==== MP Help ==================================================
MP Help System
Enter a command at the help prompt:
OVerview : Overview of MP capabilities and concepts
TOPics
: Show all MP Help topics and commands
<TOPIC>
: Enter the topic name for help on a particular topic
LIst
: Show the list of MP commands
<COMMAND> : Enter the command name for help on individual command
HElp
: Help on help
H3064S J.00
12-30
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
Q
: Quit help
MP:HELP (HE for main help, enter command name, or Q to quit)>
From the interactive help utility, you can view a number of non-command-specific help
screens. Type top for a complete list of these additional topics, or li for a list of all of the
supported MP commands. To view information about a specific command, simply type the
command name.
MP:HELP (HE for main help, enter command name, or Q to quit)> top
==== TOPics ==================================================
HELP TOPICS
The following topics can be entered for general information:
BOOTing
CHASsis logs
COMMand menu
COMPlex profiles
CONSole
FW
MP overview
HPterm and VT100
LIst of commands
MAIN menu
MODEM management
MODES
PASSwords
PORTS and connecting
POWER display and control
RESET, TOC, boot
VFP
WEB
MP:HELP (HE for main help, enter command name, or Q to quit)> who
==== MP Help: Connection ==========================
WHO : Display a list of MP connected users
This command displays the login name of the connected console client
users and the port on which they are connected. For the LAN console
clients the remote IP address is also displayed.
SEE ALSO:
TE
(TEll)
Press q to return to the MP> main menu.
http://education.hp.com
H3064S J.00
12-31
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
12–16. SLIDE: Accessing the MP Command Menu
Accessing the MP Command Menu
• The MP command menu provides many additional commands
• Commands vary from model to model and firmware revision to firmware revision
• Most commands are interactive, menu-based utilities
• Newer MP firmware revisions also support an option/argument interface
• For a complete list of commands on your model, type he (help), then li (list)
• Press ^b or type the ma command to return to the main MP menu
MP>
MP> cm
^b or MP:CM> ma
Command Menu
MP:CM> sysrev
View the system firmware revision
MP:CM> he
Access the help menus
MP:CM> ma
Return to the MP main menu
Student Notes
The commands discussed thus far represent the core MP functionality for accessing and
viewing the system console interface. There is also a rich collection of tools available for
managing the MP itself. Some of these will be described over the next couple slides. On
some older systems, these commands are available directly from the MP> main menu. On
newer systems, however, these commands are only available from the MP:CM> command
sub-menu. To get to the command menu, execute the MP> cm command.
MP> cm
MP:CM>
H3064S J.00
12-32
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
The commands available from this menu are model and firmware dependent. To determine
your current firmware revision, type the sysrev command at the MP:CM> prompt. This
command may not be supported on older models.
MP:CM> sysrev
SYSREV
Current firmware revisions
MP FW
: E.02.26
BMC FW
: 01.50
EFI FW
: 01.22
System FW : 02.21
Most of the MP commands are interactive, menu-based utilities. Newer MP firmware
revisions also provide a UNIX-like option/argument interface. You can access the help
interface described on the previous page directly from the command menu on most models
by typing he. To return to the command menu, press q at the help prompt. The sample
output below shows the lc command description on one of the newer Integrity servers.
MP:CM> he
MP:HE> lc
==== MP Help: Port Configuration
===========================(Admin)============
LC
: LAN Configuration usage (IP address, etc.)
This command modifies the LAN Configuration. Configurable
parameters: MP IP Address, MP host name, subnet mask, gateway, web
access port number, LAN speed, duplex, and autonegotiation. MP Host
Name set in this command is displayed at the MP command interface
prompt. Typically the DNS name for the LAN IP is entered. This
field can be programmed to any useful name or phrase. For clarity,
it is useful to enter: "MPNAME-on-SYSTEM" as the MP Host name, so
both names show up in the prompt (limit 19 chars, no spaces
allowed.)
Command line usage:
LC [-ip <ipaddr>][-host <text>][-subnet <subnet>]
[-web <n>][-gateway <ipaddr>][-link <auto|T(10baseT)>][ -nc ]
(ADMINISTRATOR level command.)
SEE ALSO: LS, SA (LAN Status, Set Access)
====
(HE for main help, enter command name, or Q to quit)
MP:HE> q
MP:CM>
http://education.hp.com
H3064S J.00
12-33
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
To return from the command menu to the main MP menu, type ma at the MP:CM> prompt or
press ^b.
MP:CM> ma
MP MAIN MENU:
CO:
VFP:
CM:
CL:
SL:
HE:
X:
Consoles
Virtual Front Panel (partition status)
Command Menu
Console Logs
Show chassis Logs
Help
Exit Connection
MP>
H3064S J.00
12-34
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
12–17. SLIDE: Configuring the MP LAN Interface
Configuring the MP LAN Interface
•
•
•
•
The MP LAN console port ships with a pre-configured non-routable IP address
Customize the network configuration for your network
DNS, DHCP, and SSH aren’t supported on all models; others require a license
Always reset the MP (but not the system!) after changing MP LAN parameters
MP>
MP> cm
^b or MP:CM> ma
Command Menu
MP:CM> ls
Display current LAN console port status
MP:CM> lc
Modify the static LAN configuration
MP:CM> dns
Modify the DNS configuration
MP:CM> so
Generate SSL/SSH certificates
MP:CM> xd
Restart the MP after changing the LAN configuration
MP:CM> dc
Reset the MP configuration to the factory defaults
Student Notes
Initially, the LAN console port is pre-configured with a non-routable IP address, which varies
from model to model. Check your owner’s manual for details. The MP provides several
commands for configuring and managing the MP LAN.
Viewing the LAN Configuration with ls
From the CM menu, you can use the ls (LAN status) command to view the current
configuration. Your server’s output may be slightly different.
MP:CM> ls
LS
Current LAN Configuration:
MAC Address
DHCP Status
IP Address
MP Host Name
http://education.hp.com
:
:
:
:
0x00306e3a4577
Disabled
10.10.33.201
rx26u501con
H3064S J.00
12-35
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
Subnet Mask
Gateway Address
Link State
Web Console Port Number
SSH Access Port Number
IPMI / LAN Port Number
:
:
:
:
:
:
255.255.0.0
10.10.33.201
Auto Negotiate
2023
22
623
LAN status: UP and RUNNING
Most servers have just one MP LAN port, but Superdomes have two:
•
A “customer” LAN connection, which is intended for connection to the customer’s LAN,
for normal administrative access to partition consoles; and
•
A “private” LAN connection, which is intended for support and diagnostic access only
over a separate local network with limited access.
Configuring the LAN Configuration with lc
You can change your LAN console port configuration via the lc (LAN configure) command:
MP:CM> lc
LC
At each prompt you may type DEFAULT to set default configuration or
Q to Quit
Current LAN Configuration:
- - MAC Address
D - DHCP Status
I - IP Address
M - MP Host Name
S - Subnet Mask
G - Gateway Address
L - Link State
W - Web Console Port Number
H - SSH Access Port Number
- - IPMI / LAN Port Number
:
:
:
:
:
:
:
:
:
:
0x00306e3a4577
Disabled
10.10.33.201
rx26u501con
255.255.0.0
10.10.33.201
Auto Negotiate
2023
22
623
Enter parameter(s) to change, A to modify All, or [Q] to Quit:
Specify the parameter you want to change, then answer the menu prompts that follow. If
you are connected to the MP via the LAN console interface and change the MP network
parameters, your connection may be terminated. The lc command interface varies
somewhat from model to model.
H3064S J.00
12-36
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
Configuring DNS Resolution with dns
Some MP firmware revisions support Domain Name Service (DNS) hostname resolution. Use
the dns command to enter the DNS domain name and name server addresses. HP’s System
and Network Administration 2 course (H3065S) discusses DNS server configuration.
MP:CM> dns
DNS
At each prompt you may type DEFAULT to set default configuration or
Q to Quit
Current DNS Configuration:
S - DHCP for DNS Servers
D - DHCP for DNS Domain Name
R - Register with DDNS Server
N - DNS Domain Name
1 - Primary DNS Server IP
2 - Secondary DNS Server IP
3 - Tertiary DNS Server IP
:
:
:
:
:
:
:
Enabled
Enabled
Yes
usvl.net
10.10.1.14
Enter parameter(s) to change, A to modify All, or [Q] to Quit:
Configuring SSH and SSL Certificates
Administrators who plan to access the MP via SSH or HTTPS must first use the so (security
options) command to create security certificates and keys. Some older systems require the
cg (certificate generate) command instead.
MP:CM> so
SO
This command allows you to modify the security options.
Current Security Options:
O - Login Options
L - SSL Certificate
H - SSH Key Pairs
Enter menu item or [Q] to Quit:
Disconnecting Remote Console Users with di
To immediately terminate all remotely connected console users, execute the di command. If
you yourself are logged into the MP remotely, note that your session will be terminated, too!
Before executing this command, use the who command to determine which other users are
logged into the MP, and the te (tell) command to warn them that they may be disconnected.
http://education.hp.com
H3064S J.00
12-37
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
MP:CM> di
This command disconnects console connections.
Remote console:
LAN console:
DISCONNECTED
CONNECTED (1)
Disconnect Remote console? (Y/[N])
Disconnect LAN console? (Y/[N]) y
Remote console:
LAN console:
y
DISCONNECTED
DISCONNECTED
WARNING: Answering yes will close this console.
Are you sure? (Y/[N]) y
<Your 'TELNET' connection has terminated>
Restarting the MP via xd
After modifying certificates or MP LAN settings, it may be necessary to restart the MP by
pressing the MP reset button or by executing the MP xd command. Note that this
disconnects all current MP sessions. Wait a minute or so for the MP to reboot, then
reconnect.
MP:CM> xd
Diagnostics Menu:
Non destructive tests:
P - Parameter checksum
I - I2C access (get BMC Device ID record)
L - LAN access (PING)
M - Modem selftests
Destructive tests:
R - Restart MP
Enter menu item or [Q] to Quit: r
Confirm? (Y/[N]): y
MP is now being reset...
Resetting the default MP configuration with dc
On some models, you can return the MP LAN port configuration to the factory default
configuration via the dc (default configuration) command. Be very cautious with the dc
command, as it also removes all defined MP user accounts! Some servers have an MP reset
button that has a similar effect. See your hardware owner’s manual for details.
WARNING:
Please don’t change the MP LAN configuration on your class lab
system!
H3064S J.00
12-38
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
12–18. SLIDE: Enabling MP Remote Access
Enabling MP Remote Access
• Use the sa (System Access) command to enable/disable remote MP access
• The MP console serial port is always enabled
• SSH access isn’t supported on some models; other models may require a license
MP>
MP> cm
^b or MP:CM> ma
Command Menu
MP:CM> sa
Display current LAN console port settings
This command allows you to enable/disable access to the MP.
Current Set Access Configuration:
R - Remote/Modem : OS SESSION
T - Telnet
: Enabled
H - SSH
: Enabled
W - Web SSL
: Enabled
I - IPMI over LAN : Enabled
Enter parameter(s) to change, A to modify All, or [Q] to Quit:
Student Notes
The MP supports remote access via TELNET, HTTPS, and, on some models, SSH. Since
every network service is a potential security liability, be sure to disable unnecessary ports
and protocols. The local serial port always remains enabled
On newer model systems, the sa (system access) command may be used to enable and
disable MP ports and protocols:
MP:CM> sa
This command allows you to enable/disable access to the MP.
Current Set Access Configuration:
R - Remote/Modem : OS SESSION
T - Telnet
: Enabled
H - SSH
: Enabled
W - Web SSL
: Enabled
I - IPMI over LAN : Enabled
Enter parameter(s) to change, A to modify All, or [Q] to Quit:
http://education.hp.com
H3064S J.00
12-39
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
Older systems provide separate commands for enabling/disabling each GSP/MP
port/protocol.
MP:CM>
MP:CM>
MP:CM>
MP:CM>
er
el
ew
dc
Toggle the remote support modem port on/off
Toggle TELNET access on/off
Toggle HTTPS web access on/off
Reset the default MP configuration to factory defaults
MP commands vary from model to model, so use the he (help) command to learn more about
the commands available on your system.
WARNING:
Please don’t change the MP system access settings on your class lab
system!
H3064S J.00
12-40
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
12–19. SLIDE: Managing MP User Accounts
Managing MP User Accounts
•
•
•
•
•
MP user accounts and passwords control access to the MP
At least one MP user account is predefined: Admin/Admin
Predefined account passwords should be changed as soon as possible
Additional MP user accounts may be created via the uc command
If an account is no longer needed, disable or remove it
MP>
MP> cm
^b or MP:CM> ma
Command Menu
MP:CM> uc
This command allows you to modify the user configuration.
User Configuration Menu:
L - List current users
N - Add a New user
C - Change a current user
D - Delete a current user
Enter menu item or [Q] to Quit:
Student Notes
In order to access the MP, users must enter a valid MP username and password.
The first MP user, by default, is the administrator. The MP administrator has full access to all
MP menus and commands and all node partitions on cell-based servers. The username for
this account is initially Admin, with password Admin. For security reasons, the Admin
account password should be changed as soon as possible.
The Admin user (or any other user with Administrator access rights) may configure up to
nineteen additional MP users via the uc (user configure) command on newer systems or the
so (security options) command on older systems. MP user accounts aren’t related to the
user accounts defined in the HP-UX /etc/passwd file. Entries in the HP-UX /etc/passwd
file determine who can login on a partition running HP-UX, while the MP password database
in NVRAM determines which users can access the MP menu interface.
http://education.hp.com
H3064S J.00
12-41
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
Each MP user account requires a unique user login id string, a 6-8 character password, and
access rights that determine which MP features the user will be allowed to use. The next
slide discusses access rights in detail.
MP:CM> uc
UC
This command allows you to modify the user configuration.
User Configuration Menu:
L - List current users
N - Add a New user
C - Change a current user
D - Delete a current user
Enter menu item or [Q] to Quit: n
Current User Parameters:
L - User Login ID
P - User Password
U - User Name
W - User Workgroup
R - User Access Rights
M - User Operating Mode
E - User Enabled/Disabled
D - Modem Dial-back
T - Modem Dial-back Phone
:
:
:
:
:
:
:
:
:
Console access
Multiple
Enabled
Disabled
Enter parameter(s) to change, A to modify All, or [Q] to Quit:
H3064S J.00
12-42
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
12–20. SLIDE: Managing MP User Access Levels
Managing MP User Access Levels
• When configuring MP users, the administrator assigns each MP user access rights
• Access rights determine which MP features the user can and can’t use
Some MP firmware revisions allow the administrator to specify individual access rights
C
M
P
U
A
N
=
=
=
=
=
=
Console access privilege (default)
MP configuration privilege
Power control privilege
MP user administration privilege
All rights
No rights
Some MP firmware revisions support just three access levels
Access Level
Administrator
Operator
Single-partition user
Rights Available
C,M,P,U
C,P
C,P
Partitions Available
All
All
One
Student Notes
The MP administrator assigns each MP user an access level that determines which MP menus
and features the user can access.
Access Privileges on Newer Systems
On newer model systems, each user may be assigned any combination of four privileges:
C
Allows the MP user to access the system console interface and VFP.
P
Allows the MP user to power the server on/off.
M
Provides access to MP configuration commands. For instance, this privilege allows
the user to enable or disable MP ports and protocols, or change the MP IP address.
U
Allows the MP user to add/modify/remove MP user logins.
http://education.hp.com
H3064S J.00
12-43
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
On newer model systems, use the MP uc (user configure) command to manage MP user
accounts. When prompted for a user’s access rights, enter a comma-separated list of rights,
or a for all or n for none.
Access Privileges on Older Systems
Older model systems support three MP access levels:
Administrator Users:
Administrator users have access to all GSP/MP commands, and all
partitions on the system.
Operators Users:
Operators have access to all commands necessary to access and
manage all partitions, but don’t have the ability to modify the
configuration of the GSP/MP itself.
Single-Partition Users:
Single-partition users have access to a limited number of GSP/MP
commands that are required to access, boot, and reboot a specified
partition.
Some of these systems use the MP so (security options) command to manage MP user
accounts; others use the uc command.
H3064S J.00
12-44
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
12–21. SLIDE: Managing MP Login Sessions
Managing MP Login Sessions
• Several commands are available for monitoring and managing MP login sessions
MP>
MP> cm
^b or MP:CM> ma
Command Menu
MP:CM> so
Modify login timeout values and settings
MP:CM> who
Determine which users are currently logged into the MP
MP:CM> te
Send (tell) a message to other logged in MP users
MP:CM> di
Terminate all current remote logins
MP:CM> dc
Reset the MP configuration to the factory defaults
Student Notes
The previous slide explained how to create and manage MP user accounts with the uc
command. Several commands are available for monitoring and managing MP login sessions.
See the notes below.
Configuring Login Parameters and User Accounts with so
The MP:CM> so (security options) command may be used to modify MP login timeout
parameters and a number of other security parameters. Options vary by system model and
firmware revision. The example below came from an rx2600.
MP:CM> so
SO
Current Security Options:
O - Login Options
L - SSL Certificate
H - SSH Key Pairs
http://education.hp.com
H3064S J.00
12-45
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
Enter menu item or [Q] to Quit: o
Current Security Options:
L - Login Timeout in minutes
: 1
N - Number of Password Faults allowed : 3
F - Allow MP Firmware upgrade via PCI : Enabled
R - Allow MP reset via IPMI
: Disabled
P - Allow MP password reset via IPMI : Disabled
Enter parameter(s) to change, A to modify All, or [Q] to Quit:
Determining who is Logged in via who
Recall that several users can login on the MP simultaneously. The who command reports
which users are currently logged in on the MP, and where they logged in from. The output
format varies from model to model; the example below came from an rx2600.
MP:CM> who
WHO
User Login
admin
admin
LDAP/Local Rights
Local
C, P, M, U
Local
C, P, M, U
Port Name
TELNET
WEB
IP Address
10.10.63.85
10.10.63.85
Mode
CM
MA
Communicating with Other MP Users via te
The te (tell) command to display a message to all users that are currently using the MP
command menu. This is particularly useful if you intend to reboot a partition, change the MP
configuration, or perform other tasks that might affect other MP users.
MP:CM> te system reset coming in 10 minutes
-> system reset coming in 10 minutes
-> Command successful.
To send a message to all users who are logged into HP-UX, use the HP-UX wall (write all)
command.
Disconnecting Remote Console Users with di
Use the di command to immediately terminate all MP remote login sessions. If you yourself
are logged into the MP remotely, note that your session will be terminated, too! Before
executing this command, use the who command to determine which other users are logged
into the MP, and the te command to warn them that they may be disconnected. Note that
this only disconnects users accessing the MP. OS applications and login sessions shouldn’t
be impacted.
MP:CM> di
This command disconnects console connections.
Remote console:
LAN console:
DISCONNECTED
CONNECTED (1)
H3064S J.00
12-46
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
Disconnect Remote console? (Y/[N])
Disconnect LAN console? (Y/[N]) y
Remote console:
LAN console:
y
DISCONNECTED
DISCONNECTED
WARNING: Answering yes will close this console.
Are you sure? (Y/[N]) y
<Your 'TELNET' connection has terminated>
Resetting the default MP configuration with dc
On some models, you can use the dc command to return the MP user configuration to factory
defaults. Some servers have an MP reset button that has a similar effect. See your hardware
owner’s manual for details.
http://education.hp.com
H3064S J.00
12-47
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
12–22. SLIDE: Rebooting via the MP
Rebooting via the MP
• To initiate a proper shutdown, access the console interface and type shutdown/reboot
• A hung partition may be reset or power-cycled via special commands at the MP
• The MP remains accessible throughout all of these procedures
MP>
MP> cm
^b or MP:CM> ma
Command Menu
MP:CM> rs
Reset
MP:CM> tc
Crash dump, then reset
MP:CM> pc or pe
Power system up or down (MP access is retained)
MP:CM> ps
View power status of system components
Student Notes
Normally, administrators should use the standard HP-UX shutdown and reboot commands
to shutdown and/or reboot systems. These commands are described in detail elsewhere in
the course.
On a hung system, or otherwise non-responsive system, though, it may not be possible to
access an HP-UX prompt that would allow you to shutdown properly. In this situation, it may
be necessary to reboot using MP:CM> commands.
The MP:CM> menu offers several alternatives.
rs
This command performs an immediate partition reset. The command immediately
halts all processing and I/O activity, and restarts the partition. The effect of this
command is very similar to cycling the system power - the OS is not properly
notified, and data corruption may result. On partitionable systems, you will be
asked which partition you wish to reset. If possible, you should always halt HPUX via shutdown or reboot rather than executing the rs command.
H3064S J.00
12-48
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
tc
Resets the partition via the INIT or TOC (Transfer of Control) signal. Execution
of this command immediately halts all system processing and I/O activity and
restarts the partition. Unlike the rs command, the tc command also signals the
processors to “dump state” before restarting. This results in a system core dump
under the /var/adm/crash/ directory that may be analyzed afterwards if the
system hang was due to an application or OS error. On partitionable systems, you
will be asked which partition you wish to TOC. On all systems, this command
should be used with caution: it may cause data corruption.
pc or pe
The pc (power control) and pe (power entity) commands may be used to control
power to your system. On cell-based systems, the pe command may be used to
toggle power to individual entities such as cell boards, I/O chassis, and entire
cabinets.
On non-partitionable systems, the pc command may be used to toggle power for
the entire system. Neither command affects power for the MP interface. If
possible, you should always halt HP-UX via shutdown or reboot before
executing these commands.
ps
The ps command reports power status for various system components. On
partitionable systems, the ps command allows the MP user to select an entity, and
displays its detailed status. On non-partitionable systems, the command displays
a single screen summary of the system power status. The sample output below
was generated on an rp7405. Output on other models may vary.
MP:CM> ps
Display detailed status of the selected MP bus device.
The following MP bus devices were found:
+---+----+----+-----+-----+-------+-----+
|
|
|
|
|
|
|
|
|
|
|LAN\| Sys |
| IO
|
|
|Cab| MP |SCSI|Bkpln|Cells|Chassis| BPS |
| # |M S|0 1|
| 0 1 | 0
1 | 0 1 |
+---+----+----+-----+-----+-------+-----|
| 0 |* *|* *| * | * * | *
* | * * |
+---+----+----+-----+-----+-------+-----+
You may display detailed power and hardware status for the
following items:
T
S
G
P
C
-
Cabinet
System Backplane
MP (Core I/O)
IO Chassis
Cell
Select Device: t
HW status for rp7410 cabinet : NO FAILURE DETECTED
http://education.hp.com
H3064S J.00
12-49
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
Power switch is on
Right Door is closed
Top Door is closed
Left Door is closed
Total
Total
Power
Power
Power Available 7200 VA
Power Needed 2215 VA
Redundancy : redundant
Viability : viable
Power Status
---------------+-----+-----+-------+-----+
|
|
|
|
|
| Sys |
| IO
|
|
|Bkpln|Cells|Chassis| BPS |
|
| 0 1 | 0
1 | 0 1 |
---------------+-----+-----+-------+-----|
Populated
| * | * * | *
* | * * |
Enabled
| * | * * | *
* | * * |
Power OK
| * | * * | *
* | * * |
Warning/Fault |
|
|
|
|
Attention LED |
|
|
|
|
AC Line status:
Line A0 Present
Line A1 NOT PRESENT
Line B0 Present
Line B1 NOT PRESENT
-- Press <CR> to continue, or 'Q' to Quit -Front Fan Speed
Rear Fan speed
I/O Bay Fan Speed
Temperature state
Fan Redundancy
Overtemp Shutdown
: normal
: normal
: normal
: normal
: redundant
Enabled
| BPS |
PCI
|
| Fans|
Fans
|
| 0 1 | 0 1 2 3 4 5 |
+-----------+-----+-------------+
Populated | * * | * * * * * * |
Failing
|
|
|
Failed
|
|
|
H3064S J.00
12-50
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
12–23. LAB: Accessing the System Console via the MP
Directions
Many critical, low-level administration tasks may only be accomplished via the system
console. On all of HP’s current server models, a virtual system console is accessible via the
Management Processor. This lab provides an opportunity for you to explore the MP’s
features and commands.
Your instructor will give you the connectivity information for your server’s Management
Processor. Record the username and network information below:
MP IP address:
__________________
MP hostname:
__________________
MP admin username: __________________
MP admin password: __________________
Assigned partition:
__________________ (only needed on nPar systems)
Part 1: Accessing and Exploring the MP
This portion of the lab shows you how to connect to your system’s MP. Operator access is
sufficient to complete this portion of the lab.
1. Open a telnet session to your server’s MP.
If you are using Virtual Lab equipment, simply click the console link on the VL lab page.
2. Login using the username and password provided by your instructor.
3. Some versions of the MP firmware immediately display the MP main menu. Others
immediately place MP users in the MP console interface. If your MP sent you directly to
the MP console interface, press ^b to return to the MP main menu.
http://education.hp.com
H3064S J.00
12-51
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
4. You should see several commands on the MP main menu. However, there are many other
commands that don’t appear in the main menu. Use the MP’s help menu to generate a list
of supported MP commands and fill-in the blanks below. After you answer the questions,
return to the MP main menu.
MP> cm
MP:CM>
MP:HE>
MP:HE>
MP:CM>
MP>
he
li
q
ma
a. The ____ command may be used to access the system console.
b. The ____ command may be used to access the virtual front panel.
c. The ____ command may be used to reset the system.
d. The ____ command may be used to configure MP user accounts.
e. The ____ command may be used to view the MP LAN configuration.
f.
The ____ command may be used to view the system’s power status.
g. The ____ command may be used to view a list of users currently using the MP.
H3064S J.00
12-52
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
Part 2: Accessing the System Console via the MP
Perhaps the most common reasons for accessing the MP is to access the system console.
Operator access is sufficient to complete this part of the lab.
1. Use the MP to access your system console.
2. Login as HP-UX user root, and run the hostname command to verify that you accessed
the right console.
3. From the console interface, you can return to the MP main menu at any time by pressing
^b. Without logging out from HP-UX, press ^b.
4. Access the console interface again. Are you prompted for a Unix username and password
this time?
5. Logout from HP-UX, and press ^b to return to the MP.
6. Access the console interface again. What happens?
7. Why is it important to logout of HP-UX before using ^b to return to the MP main menu?
http://education.hp.com
H3064S J.00
12-53
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
Part 3: Rebooting the System via the MP Console
When you reboot the system, it is important to do so via the MP console interface to ensure
that you don’t miss any important messages. Try it! This portion of the lab only requires MP
operator privileges.
1. If you aren’t already logged in as root on the MP console, login now.
2. While logged in as root, type shutdown –hy 0 to halt your system or nPar. Watch the
resulting shutdown messages.
# shutdown –hy 0
3. When the shutdown appears to be complete, return to the MP main menu by pressing
^b.
4. Send a reset to your system and reboot. (Note: Some systems automatically power-off
when halted via shutdown –h. If your system is powered-off, power it back on again
with the pc command. This should automatically boot the system, too).
5. Now monitor the system’s self-tests via the VFP.
6. Watch the VFP for a few minutes, then access the console log to see some of the console
messages generated by the HP-UX startup process.
7. When your system finishes booting, access the console interface again and login as root
to verify the boot succeeded.
MP> co
Console Login: root
Password: **
Enter your root password here
8. Return to the MP main menu before proceeding.
# exit
^b
H3064S J.00
12-54
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
Part 4: Configuring and Using MP User Accounts
The MP must be carefully secured to control access to your system console. In this part of
the lab, you will learn how to create and manage MP user accounts to prevent unauthorized
access to your system. This portion of the lab requires MP admin privileges.
1. Which MP command may be used to manage MP access accounts? Read the full
description of this command via the MP he (help) utility followed by the li (list)
command to list the available MP commands.
2. Using the command you discovered in the previous question, create a new MP user
account for yourself, then log out of the MP.
•
•
•
•
•
•
•
•
Use login name "student"
Also use "Student" as the user's real name
Use HPE as the user's workgroup name
Grant your new user "Operator" or “c,p” access to the MP
Configure the "Multiple Use" mode for the new account
Enable the account
Disable dialback access
Choose a password for the new user
3. In the previous question, you granted the “student” user “operator” level access to the
MP. Which of the following MP commands should the new MP user be able to access?
(Don’t try the commands yet. You will have a chance to try that in a moment.)
a.
b.
c.
d.
e.
f.
g.
co
vfp
rs
ps
ls
lc
uc/so
4. Test your answers to the previous question. Without closing your original “admin” MP
telnet session, open a second telnet window on your desktop, connect to the MP,
and login as MP user "student" to verify that the new MP user account works.
5. Can the original admin user tell that there is a second user logged into the MP? Run the
MP who command in the original telnet window to find out. (Hint: On some systems,
you may need to go to the cm command menu to access the who command.)
6. What command can you use to warn other MP users that you are using the system?
7. Access the console as the “student” user and the administrator at the same time. Type
the co command in both telnet windows. Explain the results.
8. Remove the “student” MP user account. If you made any other changes to the MP
configuration undo them as well before moving on.
http://education.hp.com
H3064S J.00
12-55
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
12–24. LAB SOLUTIONS: Accessing the System Console
via the MP
Directions
Many critical, low-level administration tasks may only be accomplished via the system
console. On all of HP’s current server models, a virtual system console is accessible via the
Management Processor. This lab provides an opportunity for you to explore the MP’s
features and commands.
Your instructor should have given you the connectivity information for your server’s
Management Processor. Record the username and network information below:
MP IP address:__________________
MP hostname:
__________________
MP admin username: __________________
MP admin password: __________________
Assigned partition:
__________________ (only needed on nPar systems)
Part 1: Accessing and Exploring the MP
This portion of the lab shows you how to connect to your system’s MP. Operator access is
sufficient to complete this portion of the lab.
1. Use "PuTTY to MP" button in HPVL window.
Alternatively, open a telnet session to your server’s MP.
If you are using Virtual Lab equipment, simply click the console link on the VL lab page.
Answer:
# telnet 192.168.1.1
Use your MP hostname or IP here.
2. Login using the username and password suggested by your instructor.
Answer:
MP login: Admin
MP Password: Admin
Use your MP login here.
Use your MP password here.
3. Some versions of the MP firmware immediately display the MP main menu. Others
immediately place MP users in the MP console interface. If your MP sent you directly to
the MP console interface, press ^b to return to the MP main menu.
H3064S J.00
12-56
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
4. You should see several commands on the MP main menu. However, there are many other
commands that don’t appear in the main menu. Use the MP’s help menu to generate a list
of supported MP commands and fill-in the blanks below. After you answer the questions,
return to the MP main menu.
MP> cm
MP:CM>
MP:HE>
MP:HE>
MP:CM>
MP>
he
li
q
ma
Answer:
a.
b.
c.
d.
e.
f.
g.
The co command may be used to access the system console.
The vfp command may be used to access the virtual front panel.
The rs command may be used to reset the system.
The uc or so commands may be used to configure MP user accounts.
The ls command may be used to view the MP LAN configuration status.
The ps command may be used to view the system’s power status.
The who command may be used to view a list of users currently using the MP.
http://education.hp.com
H3064S J.00
12-57
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
Part 2: Accessing the System Console via the MP
Perhaps the most common reasons for accessing the MP is to access the system console.
Operator access is sufficient to complete this part of the lab.
1. Use the MP to access your system console.
Answer:
MP> co
Please select partition number: 0
If prompted, enter your partition# here
2. Login as HP-UX user root, and run the hostname command to verify that you accessed
the right console.
Answer:
Console Login: root
Password: **
# hostname
Enter your root password here
3. From the console interface, you can return to the MP main menu at any time by pressing
^b. Without logging out from HP-UX, press ^b.
Answer:
This should take you back to the MP.
4. Access the console interface again. Are you prompted for a Unix username and password
this time?
Answer:
MP> co
Please select partition number: 0 If prompted, enter your partition# here
No login or password is required!
5. Logout from HP-UX, and press ^b to return to the MP.
Answer:
# exit
^b
MP>
H3064S J.00
12-58
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
6. Access the console interface again. What happens?
Answer:
MP> co
Please select partition number: 0 If prompted, enter your partition# here
Console Login: root
Password: **
This time, you should be prompted for a UNIX username and password.
7. Why is it important to logout of HP-UX before using ^b to return to the MP main menu?
Answer:
If an MP user doesn't logout of the console session, the next user to access the console
can gain root access to the partition without entering a password!
http://education.hp.com
H3064S J.00
12-59
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
Part 3: Rebooting the System via the MP Console
When you reboot the system, it is important to do so via the MP console interface to ensure
that you don’t miss any important messages. This portion of the lab only requires MP
operator privileges.
1. If you aren’t already logged in as root on the MP console, login now.
2. While logged in as root, type shutdown –hy 0 to halt your system or nPar. Watch the
resulting shutdown messages.
# shutdown –hy 0
3. When the shutdown appears to be complete, return to the MP main menu by pressing
^b.
4. What command can you use to reset your system and reboot? (Note: Some systems
automatically power-off when halted via shutdown –h. If your system is powered-off,
power it back on again with the pc command. This should automatically boot the
system, too).
Answer:
MP> cm
MP:CM> rs
on older systems, this command is available on the main menu
If your system powered off, do this instead:
MP> cm
MP:CM> pc
5. Now monitor the system’s self-tests via the VFP.
Answer:
MP> cm
MP:CM> pc
MP:CM> ma
MP> vfp
on older systems, this command is available on the main menu
6. Watch the VFP for a few minutes, then access the console log to see some of the console
messages generated by the HP-UX startup process.
Answer:
MP> cl
H3064S J.00
12-60
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
7. When your system finishes booting, access the console interface again and login as root
to verify the boot succeeded.
MP> co
Console Login: root
Password: **
Enter your root password here
8. Return to the MP main menu before proceeding.
# exit
^b
http://education.hp.com
H3064S J.00
12-61
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
Part 4: Configuring and Using MP User Accounts
The MP must be carefully secured to control access to your system console. In this part of
the lab, you will learn how to create and manage MP user accounts to prevent unauthorized
access to your system. This portion of the lab requires MP admin privileges.
1. Which MP command may be used to manage MP access accounts? Read the full
description of this command via the MP he (help) utility.
Answer:
MP> he
MP:HELP> li
MP:HELP> so or uc
MP:HELP> q
On older models, use the so (security options) command:
MP:CM> so
On newer models, use the uc (user configure) command.
MP:CM> uc
2. Using the command you discovered in the previous question, create a new MP user
account for yourself, then log out of the MP.
•
•
•
•
•
•
•
•
Use login name "student"
Also use "Student" as the user's real name
Use HPE as the user's workgroup name
Grant your new user "Operator" or “c,p” access to the MP
Configure the "Multiple Use" mode for the new account
Enable the account
Disable dialback access
Choose a password for the new user
Answer:
If available, run the uc command, then follow the prompts to create your new user
account. If your MP doesn’t provide a uc command, use the so command instead. On
some systems, you may need to navigate to the command (cm) menu to run these
commands.
MP> cm
MP:CM> so or uc
MP:CM> ma
on older systems, this command is available on the main menu
H3064S J.00
12-62
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 12
Accessing the System Console
3. In the previous question, you granted the “student” user “operator” level access to the
MP. Which of the following MP commands should the new MP user be able to access?
(Don’t try the commands yet. You will have a chance to try that in a moment.)
a.
b.
c.
d.
e.
f.
g.
co
vfp
rs
ps
ls
lc
uc/so
Answer:
MP users with operator privileges should have access to all of the commands necessary
to access and boot the system, and to view the MP configuration. Thus, the student user
should be able to run the co, vfp, rs, ps, and ls commands. However, operator level
users can’t run any commands that might be used to change the MP configuration. Thus,
the student user won’t be able to run the lc, uc, or so commands.
4. Test your answers to the previous question. Without closing your original “admin” MP
telnet session, open a second telnet window on your desktop, connect to the MP,
and login as MP user "student" to verify that the new MP user account works.
Answer:
use your MP IP address here
telnet 192.168.1.1
MP login: student
MP password: **
You should see the MP welcome screen, indicating that the login succeeded.
5. Can the original admin user tell that there is a second user logged into the MP? Run the
MP who command in the original telnet window to find out. (Hint: On some systems,
you may need to go to the cm command menu to access the who command.)
Answer:
MP> cm
MP:cm> who
MP:cm> ma
who should report two MP user logins.
http://education.hp.com
H3064S J.00
12-63
© 2010 Hewlett-Packard Development Company, L.P.
Module 12
Accessing the System Console
6. What command can you use to warn other MP users that you are using the system?
Answer:
MP> cm
MP:CM> te on older systems, this command is available on the main menu
Hello fellow MP users!
MP:CM> ma
7. What happens if the “student” user attempts to access the console interface at the same
time as the “admin” user? Type the co command in both telnet windows. Explain the
results.
Answer:
Both users should be able to access the console interface simultaneously, but only one
user at a time can control the console. The other user is given read-only access to the
console. Any console user can unilaterally demand write access at any time by pressing
^e cf.
8. Remove the “student” MP user account. If you made any other changes to the MP
configuration undo them as well before moving on.
Answer:
MP> cm
MP:CM> so or uc
MP:CM> ma
on older systems, the command is available on the main menu
H3064S J.00
12-64
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 13 ⎯ Booting PA-RISC Systems
Objectives
Upon completion of this module, you will be able to do the following:
•
Properly shut down an HP-UX system using shutdown and reboot.
•
Describe how the PDC/BCH, ISL/IPL, and HPUX utility load the kernel in memory.
•
Boot from the primary, alternate, or HA alternate boot device.
•
Boot from a system recovery tape.
•
Boot from an install DVD or Ignite-UX install server.
•
Boot from an alternate kernel.
•
Boot to single-user mode to perform system maintenance.
http://education.hp.com
H3064S J.00
13-1
© 2010 Hewlett-Packard Development Company, L.P.
Module 13
Booting PA-RISC Systems
13–1. SLIDE: HP-UX Shutdown and Reboot
HP-UX Shutdown and Reboot
-r
shutdown shutdown
-r
reboot -h
reboot
Single-User Mode
shutdown -h
shutdown
Multi-User Mode
Halt State
MP> pc
MP> rs
MP> pc
Power Off
Student Notes
An HP-UX system will always be in one of several operation states. The system state
determines which system services are available. Some of the system administrative tasks
described in this course require you to change your current operation state. This slide
presents an overview of the functionality available in each state.
Most of the time, your system will be in multi-user mode. In multi-user mode, users can log
in; file systems are mounted; and most system services and daemons are available.
There are occasions, however, when you may need to take your system down to single-user
mode to perform administrative tasks. In single-user mode, users cannot log in, non-critical
file systems are unmounted, and non-critical system daemons are shut down. Moving to
single-user mode brings your system to a quiet state, from which you can do system backups,
run fsck, or perform other system administrative tasks, without interference from user
processes.
Bringing your system to a halt state unmounts all file systems, and kills all processes.
Always halt HP-UX before powering-off your server or workstation.
H3064S J.00
13-2
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 13
Booting PA-RISC Systems
Taking your system to the power-off state terminates power to all system hardware
components, except the Management Processor card.
Several commands may be used to move between states on an HP-UX system:
•
From multi-user mode, use the shutdown command to reboot, halt, or shutdown to
single-user mode.
•
From single-user mode, use the reboot command to reboot or halt the system.
•
From the halt state, use the rs (reset) command from the Management Processor
Command Menu to reset and boot the system. On workstations, push the reset button on
the workstation chassis.
•
From a power-off state, use the pc (power control) command from the Management
Processor Command Menu to power on the system or simply press the power button.
•
On a hung system, it may be necessary to use the rs or tc commands from the
Management Processor Command Menu to reset and boot the system. On workstations,
push the reset button on the workstation chassis.
Changing State from Multi-user Mode with shutdown
Executing the shutdown command terminates system activities in an orderly and consistent
manner. The shutdown command performs the following tasks:
•
Prompts the administrator for a broadcast message to send to all users.
•
Broadcasts the warning message to all user terminal sessions.
•
Grants a 60 second (configurable) grace period for users to log out.
•
Kills all user logins.
•
Gracefully shuts down all non-critical processes using /sbin/rc*.d/K* kill scripts.
•
Unmounts all non-critical file systems.
Depending on the option specified, shutdown will either leaves the system in single-user
mode (no options) or the halt state (if -h was specified), or initiates a reboot (if -r was
specified).
Common shutdown options:
# shutdown -y 600
shutdown to single-user mode in 600 seconds."-y" (yes)
option prevents shutdown from requesting confirmation
before proceeding.
# shutdown -hy 600
shutdown to a halt state in 600 seconds."-y" (yes) prevents
shutdown from requesting confirmation before
proceeding.
http://education.hp.com
H3064S J.00
13-3
© 2010 Hewlett-Packard Development Company, L.P.
Module 13
Booting PA-RISC Systems
# shutdown -ry 600
# shutdown -ry 0
reboot in 600 seconds without requesting confirmation.
reboot immediately without requesting confirmation.
Changing State from Single-user Mode with reboot
The reboot command uses the SIG_KILL signal to kill running processes. This takes the
system down quickly, but can cause problems for applications and file systems. The
shutdown command shuts down applications and processes more gracefully, and thus is the
preferred method for halting or rebooting the system from multi-user mode. Reboot may be
used if:
•
The system is already in single-user mode.
•
You need to bring the system down very quickly.
# reboot –h
# reboot
shutdown to a halt state (only use this from single-user mode).
reboot
Changing State from the Halt State with the rs MP Command
After halting a system or partition with either reboot –h or shutdown –h command, you
can initiate the boot process via the rs command on the MP Command Menu. Although the
rs command may be executed on a running system, too, doing so may cause corruption.
MP> cm
MP:CM> rs
Execution of this command irrecoverably halts all system processing and
I/O activity and restarts the computer system.
Type Y to confirm your intention to restart the system: (Y/[N]) y
-> SPU hardware was successfully issued a reset.
Changing State via the pc or pe MP Commands
Once your system reaches the halt state, you can safely power-off the system hardware by
either pressing the power switch on the system cabinet, or, on servers, by executing the pc
command from the MP Command Menu (output on your system may be slightly different
from the output shown below). Midrange and Superdome server use the pe (power entity)
command instead.
MP> cm
MP:CM> pc
Current System Power State: On
ON - Turn the power On
OFF - Turn the power Off
Power Switch State: On
Enter your choice (ON/OFF) or [Q] to quit: off
Enter delay (in minutes 0-6000) to power Off (CR for no delay):
System will be powered Off in 0 minutes.
Confirm? (Y/[N]): y
-> System has been powered Off
H3064S J.00
13-4
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 13
Booting PA-RISC Systems
If your system has been powered off for some reason, you can power it back on again by
pressing the power button, or, on servers, by executing the pc command from the MP
Command Menu.
MP> cm
MP:CM> pc
Current System Power State: Off
ON - Turn the power On
OFF - Turn the power Off
Power Switch State: On
Enter your choice (ON/OFF) or [Q] to quit: on
Enter delay (in minutes 0-6000) to power On (CR for no delay):
System will be powered On in 0 minutes.
Confirm? (Y/[N]): y
-> System has been powered On
Changing State on a Hung System with the tc and rs MP Commands
On rare occasions, a bug in an application or the OS may leave your system in a “hung” state.
In these situations, it may be necessary to use the MP tc or rs commands to reboot. Use
these commands with care, as they may cause corruption.
shutdown and reboot on Node and Virtual Partitions
When you execute the shutdown or reboot command on a node or virtual partition, the
command only affects your current partition. Other partitions remain up and running.
Several additional shutdown and reboot options are required if you intend to shutdown a
partition to reallocate partition resources. HP’s Partition Management class (U5075S)
discusses these options in detail.
http://education.hp.com
H3064S J.00
13-5
© 2010 Hewlett-Packard Development Company, L.P.
Module 13
Booting PA-RISC Systems
13–2. SLIDE: PA-RISC Boot Process Major Players
PA-RISC Boot Process Major Players
Firmware
• PDC
• Boot Console Handler
NVRAM
• Default boot paths
• Console/keyboard path
Boot LIF Area
• ISL utility
• AUTO file
• HPUX utility
Boot Disk
LVM & File Systems
• Kernel
Student Notes
After shutting down your system, you will eventually need to boot it back up again. The goal
of the system boot process is to load the kernel executable from the boot disk into memory
and start all the daemons and services necessary to bring the system back up to a fully
functional state. There are several players involved in this process:
Firmware
Every PA-RISC SPU has a BootROM chip containing Power-on
Self Test (POST), Processor Dependent Code (PDC), I/O
Dependent Code (IODC), and Boot Console Handler"
(PDC/BCH) firmware executables. These firmware
components perform a variety of hardware self-tests, and
identify the system boot disk.
Non-Volatile RAM
The PDC/BCH consults Non-Volatile RAM (NVRAM) to
determine the hardware paths of the primary boot disk, an
alternate boot source, and the system console. The contents of
NVRAM may be modified by the administrator via the BCH
path command or the HP-UX setboot command..
H3064S J.00
13-6
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 13
Booting PA-RISC Systems
Boot Area
Every system requires at least one boot disk. Each boot disk
has a 2MB "Boot Area" containing the utilities needed to find
and load the kernel. Files in the boot area are stored in a
special "Logical Interchange Format" (LIF) that is not directly
viewable with ls, cat or other regular UNIX commands. The
primary files of interest in the LIF area are the Initial System
/Program Loader (ISL/IPL), the AUTO file, and the HPUX
utility. These will be discussed in more detail on the next slide.
LVM & File Systems:
The boot disk must also have a file system containing a kernel
to boot. The kernel is typically stored in the /stand file
system, with filename /stand/vmunix. Currently, the
utilities used to load the kernel in memory are unable to read
JFS file systems; thus the file system containing the kernel
must be HFS.
The boot disk also typically contains the "/" (root) file system.
The “/” file system contains the/etc, /sbin, and /dev
directories which are required in the early stages of the system
startup process. The “/” file system may be either HFS or JFS.
Finally, the boot disk contains a primary swap area that is
enabled and used early in the boot process.
These logical volumes will be discussed in more detail on the
next slide.
http://education.hp.com
H3064S J.00
13-7
© 2010 Hewlett-Packard Development Company, L.P.
Module 13
Booting PA-RISC Systems
13–3. SLIDE: PA-RISC Boot Disk Structures
PA-RISC Boot Disk Structures
In order to serve as an HP-UX boot disk, a disk must have several structures
in addition to the PVRA/VGRA structures normally found on non-boot physical volumes
LIF Hdr:
Contains pointers to the LIF area
PVRA
PVRA:
Records structural information about this PV
BDRA
BDRA:
Contains pointers to /stand, swap, and /
LIF:
Contains ISL, AUTO, and HPUX boot utilities & files
VGRA
VGRA:
Records structural information about this VG
lvol1
/stand:
HFS file system containing /stand/vmunix
lvol2
Swap:
Primary swap, used during the boot process
lvol3
/:
VxFS file system containing /, /sbin, /etc, /dev
Free Extents
Extents:
Free PEs available for allocation to other LVs
BBRA
BBRA:
Space reserved for bad block relocation
(obsolete in HP-UX 11i v3)
LIF header
LIF area
Student Notes
LVM uses a variety of reserved areas on each physical volume to record structural
information about the LVM environment. LVM boot disks require some additional special
structures that are described in detail below.
LIF Header:
At the top of every boot disk, there is a Logical Interchange Format (LIF)
header structure. This structure contains information necessary to access and
read the boot LIF area described below.
PVRA:
The Physical Volume Reserved Area (PVRA) records the disk’s PVID, and
pointers to other important structures on the disk.
BDRA:
The Boot Data Reserved Area (BDRA) contains pointers to the three key
logical volumes used in the early stages of the boot process: /stand, /, and
primary swap. The HPUX kernel loader is unable to read LVM extent maps;
instead it determines the locations of these logical volumes using the pointers
in the BDRA.
H3064S J.00
13-8
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 13
Booting PA-RISC Systems
LIF Area
The Logical Interchange Format (LIF) area on a boot disk contains several
boot utilities and files. The ISL executable is responsible for determining
which kernel to boot. It does this by reading the ASCII AUTO file, which is
also stored in the LIF area. The HPUX utility is responsible for actually loading
the kernel in memory. The LIF area files are stored in a special LIF file format
that isn’t readable using standard UNIX commands like cp, ls, and cat. The
utilities required to manage the LIF area will be described later in the chapter.
VGRA
The Volume Group Reserved Area (VGRA) records structural information
about the volume group that the disk belongs to. Recall that the volume group
extent map is stored in this structure.
lvol1
/dev/vg00/lvol1 contains the /stand HFS file system. This file system
contains the /stand/vmunix kernel executable and other associated files.
lvol2
/dev/vg00/lvol2 serves as primary swap, supplementing physical memory
during the system boot process.
lvol3
/dev/vg00/lvol3 contains the root VxFS file system. At a minimum, this
file system contains the /, /dev, /sbin, and /dev directories.
Free Extents Remaining space on the boot disk may be used to store other logical volumes,
too. Though not required, many administrators choose to put /usr, /var,
/tmp, and possibly even /home on the boot disk, too.
BBRA
The Bad Block Relocation Area (BBRA) is used to relocate data that would
otherwise have been written to failed blocks in the extent allocation area on
disk.
LVM Versus Non-LVM Boot Disks
HP-UX boot disks may be configured using either LVM or the whole disk layout approach.
The notes above describe the contents of an LVM boot disk.
Non-LVM boot disks have a 2MB boot LIF area; an HFS / file system that includes the /,
/stand, /sbin, /etc, and /dev directories; and a primary swap section.
The layout of the boot disk is usually defined when you install HP-UX.
http://education.hp.com
H3064S J.00
13-9
© 2010 Hewlett-Packard Development Company, L.P.
Module 13
Booting PA-RISC Systems
13–4. SLIDE: PA-RISC Boot Process Overview
PA-RISC Boot Process Overview
There are several steps in the PARISC boot process.
At each step, the administrator has an opportunity to interact with the boot process.
PARISC boot process
POST/PDC/IODC
perform hardware
self-tests and
system initialization
BCH Boot Manager
consults NVRAM
to identify the
default boot device
isl/hpux
use the auto file
to choose and
boot a kernel
vmunix
completes
the boot
process
Student Notes
Several steps are required to bring an HP-UX system to a fully functional state.
POST/PDC/IODC
Early in the boot process, the Power-On Self Test (POST), Processor Dependent Code (PDC),
and I/O Dependent Code (IODC) perform a variety of hardware self-test and system
initialization tasks.
BCH Chooses a Boot Disk
The Boot Console Handler (BCH) is responsible for determining the boot disk and system
console hardware paths. These paths are configurable, and are recorded in Non-Volatile
Random Access Memory (NVRAM). Next, the Initial System/Program Loader (ISL/IPL) is
loaded in memory from the boot disk LIF area.
ISL/IPL and HPUX Choose and Boot a Kernel
H3064S J.00
13-10
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 13
Booting PA-RISC Systems
The ISL/IPL consults the AUTO file in the boot disk LIF area to determine the default kernel
boot string. After determining the kernel boot string, the ISL/IPL uses the HPUX utility to
load the kernel in memory.
vmunix Brings the System to a Fully Functional State
The kernel then scans the hardware, mounts the root file system, and starts the init
daemon. The init daemon starts the daemons and services necessary to bring the system
up to multi-user mode.
http://education.hp.com
H3064S J.00
13-11
© 2010 Hewlett-Packard Development Company, L.P.
Module 13
Booting PA-RISC Systems
13–5. SLIDE: Autoboot versus Manual Boot
Autoboot versus Manual Boot
• Normally, we allow HPUX to “autoboot” without administrator interaction
• In some situations, though, it may be preferable to “manually” boot the system
I just want to boot
to multi-user mode
using the default
boot disk and kernel
My root disk crashed. I need to
boot from my recovery tape...
Allow the system
to autoboot!
My kernel is
corrupt. I need to
boot from my
backup kernel...
Boot the system
manually!
Student Notes
Usually, the boot procedure described on the previous slide occurs without intervention from
the System Administrator. The system boots from the primary boot disk to multi-user mode
using the default kernel. This is known as an autoboot.
However, in some cases you may wish to override the autoboot process:
•
To re-install the operating system from CD.
•
To boot from a system recovery tape if the primary boot disk is corrupt.
•
To boot from an alternate boot disk if the primary boot disk is corrupt.
•
To boot from an alternate kernel if /stand/vmunix is corrupt.
•
To boot to single-user mode to perform administrative tasks.
•
To boot to single-user mode if the root password is lost.
The remainder of this chapter discusses the procedure used to manually boot your HP-UX
system, and the functionality available at each step of the process.
H3064S J.00
13-12
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 13
Booting PA-RISC Systems
13–6. SLIDE: Interacting with the BCH
Interacting with the BCH
By default, the BCH boots the primary boot disk recorded in NVRAM.
To interrupt the autoboot so you can interact with the BCH, press the Escape key
POST/PDC/IODC
>
>
>
>
>
>
>
>
>
>
>
>
>
>
BCH
help
#
in all
#
search
#
search ipl
#
path
#
path pri x/x.x.x
#
path haa x/x.x.x
#
path alt x/x.x.x
#
boot pri
#
boot haa
#
boot alt
#
boot x/x.x.x
#
boot lan.x.x.x.x install #
reset
#
view help menu
view system information
list all possible boot devices
list all devices containing an IPL
display contents of stable storage
make x/x.x.x the primary boot path
make x/x.x.x the HA alternate path
make x/x.x.x the alternate path
boot from the primary boot path
boot from the HA alt boot path
boot from the alt boot path
boot from an arbitrary device
boot from Ignite server at IP x.x.x.x
reset the system
Student Notes
Why Interact with the BCH?
After the boot process is initiated, the BCH checks stable storage to determine which disk to
boot from, and continues the boot procedure without any further interaction with the
administrator. However, interaction with the BCH may be required:
•
To re-install the operating system from CD.
•
To boot from a system recovery tape if the primary boot disk is corrupt.
•
To boot from an alternate boot disk if the primary boot disk is corrupt.
•
To boot from an alternate kernel if /stand/vmunix is corrupt.
•
To boot to single-user mode to perform administrative tasks.
•
To boot to single-user mode if the root password is lost.
http://education.hp.com
H3064S J.00
13-13
© 2010 Hewlett-Packard Development Company, L.P.
Module 13
Booting PA-RISC Systems
Getting to the BCH
To interact with the BCH, press any key after initiating the boot process. The messages that
appear on the screens that follow will vary somewhat from model to model. Newer models
place you directly at a Main Menu> or > prompt, from which you can issue the BCH
commands shown on the slide. Older models place you at an initial menu similar to the one
shown below.
Device Selection
Device Path
Device Type
---------------------------------------------------------------P0
P1
P2
P3
b)
s)
a)
x)
?)
scsi.6.0
scsi.5.0
scsi.3.0
scsi.2.0
HP
HP
HP
HP
2213A
2213A
HP35480A
S6300.650A
Boot from specified device
Search for bootable devices
Enter Boot Administration mode
Exit and continue boot sequence
Help
Select from menu:b p0
At the Select from menu: prompt, you can boot from one of the devices listed by typing
b p0 as shown in the sample screen capture. Alternately, you can go to a Main Menu>
prompt and issue any of the commands shown on the slide by typing a at the Select from
menu: prompt.
Executing Commands at the BCH
The slide lists the commands most commonly used at the BCH. If you need more information
about any of the BCH commands, you can always view a help screen:
Main Menu: Enter command or menu > help
The BCH in all (info all) command displays a detailed catalog of the system configuration.
The sample output
Main Menu: Enter command or menu > in all
Recall that the primary purpose of the BCH is to choose a boot disk. You can search for
potential boot devices on the system via the BCH search command.
Main Menu: Enter command or menu > search
The search command generates a list of all the disk and tape drives on your system. Most
of the devices listed probably aren’t really bootable. To list only devices that have boot areas
containing an ISL/IPL, add an additional argument on the search command:
Main Menu: Enter command or menu > search ipl
H3064S J.00
13-14
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 13
Booting PA-RISC Systems
Usually, the BCH chooses a boot disk by consulting NVRAM. Every system has both a
primary (PRI) boot path, which the BCH boots from by default. Some (but not all) systems
support a high availability alternate (HAA) disk, too, which may be configured to boot if the
primary boot disk fails. All systems support an alternate (ALT) boot path, too. If your system
supports an HAA boot path, then the alternate boot path will likely reference the CDROM or
tape drive. If your system doesn’t support an HAA boot path, the alternate path may identify
a backup boot disk. Use the BCH path command to see what primary and alternate boot
paths are currently defined.
Main Menu: Enter command or menu > path
You may wish to change the default boot paths if you configure a mirrored boot disk, or if
you change the hardware configuration of your system. The primary boot path can be
changed with the path command. Remember that you can view a list of available hardware
paths via the search command.
Main Menu: Enter command or menu > path pri 0/0/1/1.6.0
The HAA and alternate boot paths may be changed, too:
Main Menu: Enter command or menu > path haa 0/0/1/2.4.0
Main Menu: Enter command or menu > path alt 0/0/1/2.3.0
To actually boot the system, use the boot command. You may boot using the primary
(default), HAA, or alternate boot paths, or choose an entirely different path if, for instance,
you wish to boot from the recovery tape.
Main Menu: Enter command or menu > boot pri
Main Menu: Enter command or menu > boot haa
Main Menu: Enter command or menu > boot alt
Main Menu: Enter command or menu > boot 0/0/1/2.0.0
To boot from an Ignite-UX network install server, use the boot lan install command. If
you wish to boot from a specific server, specify the server’s IP address following the lan
keyword.
Main Menu: Enter command or menu > boot lan.10.1.1.1 install
At any time, you can restart the system by executing the BCH reset command.
Main Menu: Enter command or menu > reset
The slide only shows the most commonly used BCH commands. Others are shown in the
table below. Note however, that not all commands are available on all models. See the BCH
help screens for more information about any of these.
http://education.hp.com
H3064S J.00
13-15
© 2010 Hewlett-Packard Development Company, L.P.
Module 13
Booting PA-RISC Systems
Command
auto
autosearch
autoboot
boot
date
diagnostic
exit
help item
info
information
lan_addr
lanaddress
monitor
path
reset
search
secure
show
Action
Display state of autoboot/autosearch flags.
Set state of autosearch flag.
Set state of autoboot flag.
Boot from primary/alternate path or specified device.
Read/Set the Real-Time Clock.
Show (on)/Conceal (off) diagnostic messages during boot.
Return to previous menu.
Display Help information for item.
Display boot/revision information.
Display boot/revision information.
Display LAN station address.
Display LAN station address.
Display/Set monitor type.
Display/Modify path information.
Reset the system.
Search for boot device.
Display/set secure boot mode.
Display the results of the previous search.
Viewing and Modifying NVRAM from Multi-User Mode
The slide above notes that you can view and change the contents of stable storage via the
path command at the BCH prompt. However, you can also view or modify the contents of
stable storage from multi-user mode using the setboot command:
#
#
#
#
setboot
setboot –a x/x.x.x
setboot –h x/x.x.x
setboot –p x/x.x.x
Display contents of stable storage.
Make x/x.x.x the alternate boot device.
Make x/x.x.x the high availability.
Make x/x.x.x the primary boot device.
H3064S J.00
13-16
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 13
Booting PA-RISC Systems
13–7. SLIDE: Interacting with the ISL/IPL
Interacting with the ISL/IPL
If you want to boot from a non-default kernel, or to a non-default mode,
use the BCH bo command to choose a boot device,
then enter “yes” when asked if you wish to interact with the ISL/IPL.
POST/PDC/IODC
ISL>
ISL>
ISL>
ISL>
ISL>
ISL>
ISL>
ISL>
hpux
hpux
hpux
hpux
hpux
hpux
hpux
hpux
BCH
show autofile
ls
interact w/ IPL? yes
#
#
#
-is
#
-lq
#
-lm
#
/stand/backup/vmunix
#
/stand/vmunix nproc=6000 #
display the AUTO file
list contents of /stand
boot from default kernel
boot to single-user mode
boot without LVM quorum
boot to LVM maintenance mode
boot an alternate kernel
boot with a modified kernel
Student Notes
Why Interact with the ISL/IPL?
After the BCH identifies a boot disk, the Initial System/Program Loader (ISL or IPL) is
responsible for identifying a kernel to load, and for calling the HPUX kernel loader. Usually,
the ISL reads the AUTO file and proceeds without any interaction with the administrator.
Interaction may be required, however,
•
If the default kernel (/stand/vmunix) is unbootable.
•
If you wish to boot to single-user mode rather than multi-user mode to perform
maintenance tasks.
•
If you forget the root password. (Booting to single-user mode logs you in as root at the
console without prompting for a password.)
http://education.hp.com
H3064S J.00
13-17
© 2010 Hewlett-Packard Development Company, L.P.
Module 13
Booting PA-RISC Systems
Getting to the ISL/IPL
In order to get to the isl, you will first need to initiate a manual boot as described on the
previous slide. Be sure to include the isl argument on the end of the boot command:
Main Menu: Enter command or menu > boot pri isl
Main Menu: Enter command or menu > boot alt isl
or
Some models then ask if you wish to interact with the ISL/IPL. If asked, answer yes.
Momentarily, this should place you at an ISL> prompt.
Interact with IPL (Y, N, or Cancel)?> y
Executing Commands with ISL
Although there are a number of diagnostic utilities available at the ISL, the most common
command used at the ISL prompt is hpux. The slide shows some of the most commonly used
options on hpux.
Left to its own devices, the ISL reads the AUTO file in your boot disk’s boot LIF area to
determine which kernel to boot. To view the default boot string in your AUTO file, use the
hpux show command. If the AUTO file doesn’t specify which kernel to boot, hpux boots
using the default kernel, /stand/vmunix.
ISL> hpux show autofile
After determining which kernel you wish to boot from, you can load the chosen kernel into
memory and continue the boot process by executing the hpux command. When executed
without options or arguments, hpux simply loads the default /stand/vmunix in memory
and boots the system to multi-user mode.
ISL> hpux
If your last system boot failed or hung, you may wish to boot the system to single-user mode
to troubleshoot the problem. This proves especially useful when an autoboot fails because of
errors in /etc/passwd, /etc/fstab, or other critical configuration files. This may also be
useful if you have forgotten the root password; booting to single-user mode automatically
logs root in on the system console without prompting for a password! Use the –is option to
boot the system to single-user mode:
ISL> hpux –is
By default, an HP-UX system won’t boot unless 51% of the disks in vg00 are available. This is
known as the LVM quorum restriction. You can, however, override this restriction via the
hpux –lq command. This proves useful if you have a mirrored boot disk, and the primary
boot disk is corrupted. You can still boot from the remaining mirror, but only if you execute
hpux –lq. Be sure, however, to repair or replace the corrupted mirror as soon as possible!
ISL> hpux –lq
H3064S J.00
13-18
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 13
Booting PA-RISC Systems
You can also boot into “LVM maintenance mode” by typing hpux –lm. You may need to
boot to maintenance mode at some point to modify vg00’s configuration, extend the root file
system, or modify primary swap. It is very easy to corrupt your LVM configuration in
maintenance mode; use it with care!
ISL> hpux -lm
If you reconfigure your default kernel with an incompatible set of kernel parameters that
leave your system unbootable, you may choose to boot from a backup kernel:
ISL> hpux /stand/vmunix.prev
ISL> hpux /stand/backup/vmunix
11i v1
11i v2 and v3
If it’s clear which modified kernel parameter caused a kernel to fail, override the default
kernel parameter’s value via a parameter=value argument at the end of the kernel loader
boot string. To make the change permanent, rebuild the kernel as described elsewhere in the
course. This feature is only available in 11i v3.
ISL> hpux /stand/vmunix nproc=6000
The slide only discussed the most common commands executed at the ISL prompt. The
tables below list some of the other commands and utilities available at the ISL. Additional
information is available in the isl(1M), hpux(1M), and boot(1M)man pages.
Viewing the AUTO File and Boot Area from Multi-User Mode
The slide above explains how to view the contents of the boot area and AUTO file from the
ISL prompt. However, the boot area may also be viewed using the lifls and lifcp
commands as shown below:
# lifls /dev/rdisk/diska
# lifcp /dev/rdisk/diska:AUTO -
List the contents of a disk’s boot area.
View the contents of a disk’s AUTO file.
The lifcp command’s primary purpose is to copy files to and from the boot LIF area.
However, putting a “– “ in the destination field causes lifcp to copy the contents of a LIF
area file to standard output.
http://education.hp.com
H3064S J.00
13-19
© 2010 Hewlett-Packard Development Company, L.P.
Module 13
Booting PA-RISC Systems
13–8. LAB: Booting PA-RISC Systems
Directions
Carefully follow the instructions below.
Part 1: Preliminary Steps
A portion of this lab requires you to interact with the ISL and boot menus, which can only be
accomplished via a console login. If you are using remote lab equipment, access your
system’s console interface via the GSP/MP.
Part 2: System Shutdown
1. Currently, your system should be in multi-user mode. Note which file systems are
mounted, and how many processes are running.
2. Shut down to single-user mode. Then check to see what processes and mounted file
systems remain. What differences do you see between single- and multi-user modes?
3. From single-user mode, take your machine down to the halt state. What can you do in the
halt state? Why might it be necessary to take your system down to the halt state?
4. Access the MP menu. Use the MP ps command to verify that the server is still powered
on. On some server models, reboot –h powers-off the server. If the server is off,
power it back on again with the pc command.
If your server model didn’t automatically power-off, use the MP rs command to reset the
server before proceeding to the next part of the lab.
On some models, the ps/pc/rs commands are available directly at the MP> main menu.
On other models, the commands are only available from the MP:CM> submenu.
5. Immediately after initiating the boot process, use the MP co command to access the
console interface and begin pressing the [Escape] key to interrupt the boot process.
H3064S J.00
13-20
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 13
Booting PA-RISC Systems
Part 3: Booting the System
1. If you didn’t already do so in the previous part of the lab, reboot your system and
interrupt the autoboot process. Proceed to the PDC/BCH main menu.
2. Search for possible boot devices on your system. How many SCSI devices does your
system have? If a system isn't booting properly, this is one way of determining if all your
SCSI devices are properly connected and powered on.
3. Now search for disks that contain an IPL that you can boot from. How many of your
disks appear to be bootable?
4. Display your primary and alternate boot paths. Which disk is defined as your primary
boot device?
5. Boot to the ISL/IPL from your primary boot disk. When asked if you want to interact with
the ISL/IPL, answer "yes".
6. At the ISL prompt, get a list of valid ISL commands.
Interacting with the ISL may be useful if your primary kernel is corrupted and you have to
boot from a backup kernel. Do you currently have a backup kernel in your /stand
directory? (Kernel file names usually begin with vmunix.)
7. By default, the system boots to multi-user mode using /stand/vmunix. Boot to singleuser mode from the default kernel.
8. Did the system prompt you for a password when you were brought to single-user mode?
When might this be helpful?
9. Reboot your system again, but this time let it boot unattended using the default boot disk
and kernel.
http://education.hp.com
H3064S J.00
13-21
© 2010 Hewlett-Packard Development Company, L.P.
Module 13
Booting PA-RISC Systems
Part 4: (Optional) Cookbook: Mirroring the PARISC Boot Disk
In order to improve system stability, many administrators choose to mirror the system boot
disk. Doing so guarantees that your system continues running, even if one of the boot disks
or interface cards on your system is damaged. In the cookbook that follows, diska
represents the primary boot disk and diskb represents the boot disk mirror. Your instructor
will tell you which disk is currently configured as your boot disk, and which should be added
as a mirror. Record the disk device file names below.
diska =
____________________
(primary boot disk)
diskb =
____________________
(boot disk mirror)
1. First, verify that the disk you intend to use as a mirror isn’t already listed as a member of
a of another volume group in /etc/lvmtab.
# strings /etc/lvmtab
a. If the disk isn’t listed in the /etc/lvmtab file, assume that the disk is currently
unassigned, and proceed to the next step in the lab.
b. If the disk is listed under volume group /dev/vg00, return to question (1) and use
ioscan to choose a different disk.
c. If the disk is listed under any volume group other than /dev/vg00, remove the
volume group using the following sequence of commands:
Determine if there are any mounted file systems in the volume group.
# mount –v
If the volume group contains any mounted file systems, unmount them.
# umount /data
Deactivate and export the volume group
# vgchange –a n vgnn
# vgexport vgnn
# replace vgnn with your volume group name
Run strings /etc/lvmtab again to verify that the disk is no longer a member of
an active volume group.
# strings /etc/lvmtab
H3064S J.00
13-22
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 13
Booting PA-RISC Systems
2. pvcreate the new disk and add it to the root volume group. The –B option on
pvcreate reserves space for a “boot area” on the new boot disk. Files in the boot area
are stored in a special format and may not be viewed or modified using the standard
UNIX file system commands. Execute vgdisplay to verify your work.
# pvcreate -fB /dev/rdisk/diskb
# vgextend vg00 /dev/disk/diskb
# vgdisplay –v vg00
3. The new boot disk’s boot area must have copies of the ISL and HP-UX utilities. These
utilities may be created in the boot area using the mkboot command. Verify your work
with lifls.
# mkboot /dev/rdisk/diskb
# lifls /dev/rdisk/diskb
4. Recall that the AUTO file is a special structure in the boot area at the top of each boot
disk that determines how the kernel is loaded during the boot process. By default, an HPUX system won’t boot unless LVM “quorum” is met. Quorum is met when 51% of the
disks in a volume group are present. If the boot disk is mirrored, we want the system to
boot even if one of the mirrors in vg00 is unavailable. The two commands below modify
the AUTO file on both boot disks to allow the system to boot even if vg00 doesn’t meet
the quorum restrictions during the boot process. Verify your work with lifls.
#
#
#
#
mkboot –a “hpux –lq” /dev/rdisk/diska
mkboot –a “hpux –lq” /dev/rdisk/diskb
lifcp /dev/rdisk/diska:AUTO lifcp /dev/rdisk/diskb:AUTO –
5. Mirror all of the boot disk logical volumes to the new boot disk. Note that the names of
the logical volumes on your boot disk may be different. Make sure you mirror all of the
boot disk logical volumes! It may take several minutes to synchronize each mirror. Then
execute lvdisplay to verify your work.
# for lv in /dev/vg00/lvol*
do
lvextend –m 1 $lv
done
# lvdisplay -v /dev/vg00/lvol1
# lvdisplay -v /dev/vg00/lvol2
# lvdisplay -v /dev/vg00/lvol3
6. Execute lvlnboot –R to update the LVM Boot Disk Reserved Area.
Then execute lvlnboot –v to verify your work.
# lvlnboot –R /dev/vg00
# lvlnboot -v
http://education.hp.com
H3064S J.00
13-23
© 2010 Hewlett-Packard Development Company, L.P.
Module 13
Booting PA-RISC Systems
7. Add a line to /stand/bootconf so SDUX knows which disks are boot disks. When
patches are swinstall’ed for LIF area utilities, SDUX consults /stand/bootconf to
determine which disks have LIF areas that might need to be patched.
# vi /stand/bootconf
l /dev/disk/diska
l /dev/disk/diskb
8. Determine hardware path of the new mirror.
11i v1 and v2
11i v3
# ioscan –fun /dev/dsk/cxtxdx
# ioscan –m lun /dev/disk/diskb
9. Update stable storage so your new mirror is listed as the high availability alternate boot
disk. If setboot –h fails, your system may not support high availability alternate boot
disks. Use setboot –a to configure the mirror as an alternate boot disk instead. In 11i
v3, setboot accepts either a legacy hardware path, or a lunpath hardware path. Then
execute setboot without any options to verify the contents of stable storage.
use your mirrored disk’s hw path here
# setboot -h 0/0/10/0/0.0xa.0x0
# setboot
10. Now for the real test: try to boot from your mirrored root disk! Shutdown, then interrupt
the boot sequence and boot from the high availability alternate (if available) or alternate
(if there isn’t a high availability alternate).
# shutdown -ry 0
[esc]
Boot using the Device Path found as a result of the search ipl command.
Main Menu: Enter command or menu > search ipl
Searching for device(s) with bootable media
This may take several minutes.
To discontinue search, press any key (termination may not be
immediate).
Path#
----P0
P1
Device Path (dec)
----------------0/1/1/0.1
0/1/1/0.0
IODC
Device Path (mnem)
-----------------intscsia.1
intscsia.0
Device Type and Utilities
------------------------Random access media
IPL
Random access media
Rev
--0
0
IPL
Main Menu: Enter command or menu >
Main Menu: Enter command or menu > boot haa?
Main Menu: Enter command or menu > boot haa
H3064S J.00
13-24
© 2010 Hewlett-Packard Development Company, L.P.
(or boot intscsia.0)
(or boot alt)
http://education.hp.com
Module 13
Booting PA-RISC Systems
11. After rebooting, use the command below to verify that you booted from the new boot
mirror.
# echo “boot_string/S” | adb /stand/vmunix /dev/kmem
http://education.hp.com
H3064S J.00
13-25
© 2010 Hewlett-Packard Development Company, L.P.
Module 13
Booting PA-RISC Systems
Part 5: (Optional) Remove the Boot Mirror
Your instructor may tell you to remove your boot disk. If so, do this portion of the lab.
1. Unmirror the boot disk, then verify your work.
# for lv in /dev/vg00/lvol*
do
lvreduce –m 0 $lv
done
# lvdisplay -v /dev/vg00/lvol1
# lvdisplay -v /dev/vg00/lvol2
# lvdisplay -v /dev/vg00/lvol3
2. Remove the boot disk mirror from the volume group, then verify that the disk was
successfully removed. pvdisplay should report that it “Couldn't find the
volume group to which the physical volume belongs”.
# vgreduce vg00 /dev/disk/diskb
# pvdisplay /dev/disk/diskb
use your disk device file name
use your disk device file name
3. Update the BDRA.
# lvlnboot –R /dev/vg00
4. Return the AUTO file contents on the remaining boot disk to hpux.
# mkboot –a “hpux” /dev/rdisk/diska
5. Remove the mirror from /stand/bootconf .
# vi /stand/bootconf
l /dev/disk/diska
l /dev/disk/diskb
6. Reboot using the primary boot disk.
# cd /
# shutdown –ry 0
H3064S J.00
13-26
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 13
Booting PA-RISC Systems
13–9. LAB SOLUTIONS: Booting PA-RISC Systems
Directions
Carefully follow the instructions below.
Part 1: Preliminary Steps
A portion of this lab requires you to interact with the ISL and boot menus, which can only be
accomplished via a console login. If you are using remote lab equipment, access your
system’s console interface via the GSP/MP.
Part 2: System Shutdown
1. Currently, your system should be in multi-user mode. Note which file systems are
mounted, and how many processes are running.
Answer:
# mount –v
# ps -ef | wc –l
2. Shut down to single-user mode. Then check to see what processes and mounted file
systems remain. What differences do you see between single- and multi-user modes?
Answer:
#
#
#
#
cd /
shutdown -y 0
mount –v
ps -ef | more
There are few file systems mounted in single-user mode, and few processes running.
Single-user mode is a good place to do kernel configuration, file system maintenance with
fsck, and other maintenance activities that require a quiet system.
3. From single-user mode, take your machine down to the halt state. What can you do in the
halt state? Why might it be necessary to take your system down to the halt state?
Answer:
# reboot –h
Nothing is running in the halt state, and no logins are possible. It is necessary to bring the
system to a halt state before powering off the system to install new peripherals and
interface cards.
http://education.hp.com
H3064S J.00
13-27
© 2010 Hewlett-Packard Development Company, L.P.
Module 13
Booting PA-RISC Systems
4. Access the MP menu. Use the MP ps command to verify that the server is still powered
on. On some server models, reboot –h powers-off the server. If the server is off,
power it back on again with the pc command.
If your server model didn’t automatically power-off, use the MP rs command to reset the
server before proceeding to the next part of the lab.
On some models, the ps/pc/rs commands are available directly at the MP> main menu.
On other models, the commands are only available from the MP:CM> submenu.
5. Immediately after initiating the boot process, use the MP co command to access the
console interface and begin pressing the [Escape] key to interrupt the boot process.
H3064S J.00
13-28
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 13
Booting PA-RISC Systems
Part 3: Booting the System
1. If you didn’t already do so in the previous part of the lab, reboot your system and
interrupt the autoboot process. Proceed to the PDC/BCH main menu.
2. Search for possible boot devices on your system. How many SCSI devices does your
system have? If a system isn't booting properly, this is one way of determining if all your
SCSI devices are properly connected and powered on.
Answer:
Main Menu: Enter command or menu > search
The number of devices on the system will vary.
3. Now search for disks that contain an IPL that you can boot from. How many of your
disks appear to be bootable?
Answer:
Main Menu: Enter command or menu > search ipl
Most likely, there will be only one bootable disk.
4. Display your primary and alternate boot paths. Which disk is defined as your primary
boot device?
Answer:
Main Menu: Enter command or menu > path
The primary and alternate boot paths will vary.
5. Boot to the ISL/IPL from your primary boot disk. When asked if you want to interact with
the ISL/IPL, answer "yes".
Answer:
Main Menu: Enter command or menu > boot pri
Interact with IPL (Y, N, or Cancel)?>
http://education.hp.com
H3064S J.00
13-29
© 2010 Hewlett-Packard Development Company, L.P.
Module 13
Booting PA-RISC Systems
6. At the ISL prompt, get a list of valid ISL commands.
Answer:
ISL> help
Interacting with the ISL may be useful if your primary kernel is corrupted and you have to
boot from a backup kernel. Do you currently have a backup kernel in your /stand
directory? (Kernel file names usually begin with vmunix.)
Answer:
ISL> hpux ls
There should be just one kernel at this point: /stand/vmunix.
7. By default, the system boots to multi-user mode using /stand/vmunix. Boot to singleuser mode from the default kernel.
Answer:
ISL> hpux –is
OR
ISL> hpux -is /stand/vmunix
8. Did the system prompt you for a password when you were brought to single-user mode?
When might this be helpful?
Answer:
No, single-user mode does not prompt for a password. The administrator is automatically
logged in as root. This may be useful if the administrator forgets the root password.
9. Reboot your system again, but this time let it boot unattended using the default boot disk
and kernel.
Answer:
# reboot
H3064S J.00
13-30
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 13
Booting PA-RISC Systems
Part 4: (Optional) Cookbook: Mirroring the PARISC Boot Disk
In order to improve system stability, many administrators choose to mirror the system boot
disk. Doing so guarantees that your system continues running, even if one of the boot disks
or interface cards on your system is damaged. In the cookbook that follows, diska
represents the primary boot disk and diskb represents the boot disk mirror. Your instructor
will tell you which disk is currently configured as your boot disk, and which should be added
as a mirror. Record the disk device file names below.
diska =
____________________
(primary boot disk)
diskb =
____________________
(boot disk mirror)
1. First, verify that the disk you intend to use as a mirror isn’t already listed as a member of
a of another volume group in /etc/lvmtab.
# strings /etc/lvmtab
a. If the disk isn’t listed in the /etc/lvmtab file, assume that the disk is currently
unassigned, and proceed to the next step in the lab.
b. If the disk is listed under volume group /dev/vg00, return to question (1) and use
ioscan to choose a different disk.
c. If the disk is listed under any volume group other than /dev/vg00, remove the
volume group using the following sequence of commands:
Determine if there are any mounted file systems in the volume group.
# mount –v
If the volume group contains any mounted file systems, unmount them.
# umount /data
Deactivate and export the volume group
# vgchange –a n vgnn
# vgexport vgnn
# replace vgnn with your volume group name
Run strings /etc/lvmtab again to verify that the disk is no longer a member of
an active volume group.
# strings /etc/lvmtab
http://education.hp.com
H3064S J.00
13-31
© 2010 Hewlett-Packard Development Company, L.P.
Module 13
Booting PA-RISC Systems
2. pvcreate the new disk and add it to the root volume group. The –B option on pvcreate
reserves space for a “boot area” on the new boot disk. Files in the boot area are stored in
a special format and may not be viewed or modified using the standard UNIX file system
commands. Execute vgdisplay to verify your work.
# pvcreate -fB /dev/rdisk/diskb
# vgextend vg00 /dev/disk/diskb
# vgdisplay –v vg00
3. The new boot disk’s boot area must have copies of the ISL and HP-UX utilities. These
utilities may be created in the boot area using the mkboot command. Verify your work
with lifls.
# mkboot /dev/rdisk/diskb
# lifls /dev/rdisk/diskb
4. Recall that the AUTO file is a special structure in the boot area at the top of each boot
disk that determines how the kernel is loaded during the boot process. By default, an HPUX system won’t boot unless LVM “quorum” is met. Quorum is met when 51% of the
disks in a volume group are present. If the boot disk is mirrored, we want the system to
boot even if one of the mirrors in vg00 is unavailable. The two commands below modify
the AUTO file on both boot disks to allow the system to boot even if vg00 doesn’t meet
the quorum restrictions during the boot process. Verify your work with lifls.
#
#
#
#
mkboot –a “hpux –lq” /dev/rdisk/diska
mkboot –a “hpux –lq” /dev/rdisk/diskb
lifcp /dev/rdisk/diska:AUTO lifcp /dev/rdisk/diskb:AUTO –
5. Mirror all of the boot disk logical volumes to the new boot disk. Note that the names of
the logical volumes on your boot disk may be different. Make sure you mirror all of the
boot disk logical volumes! It may take several minutes to synchronize each mirror. Then
execute lvdisplay to verify your work.
# for lv in /dev/vg00/lvol*
do
lvextend –m 1 $lv
done
# lvdisplay -v /dev/vg00/lvol1
# lvdisplay -v /dev/vg00/lvol2
# lvdisplay -v /dev/vg00/lvol3
6. Execute lvlnboot –R to update the LVM Boot Disk Reserved Area.
Then execute lvlnboot –v to verify your work.
# lvlnboot –R /dev/vg00
# lvlnboot -v
H3064S J.00
13-32
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 13
Booting PA-RISC Systems
7. Add a line to /stand/bootconf so SDUX knows which disks are boot disks. When
patches are swinstall’ed for LIF area utilities, SDUX consults /stand/bootconf to
determine which disks have LIF areas that might need to be patched.
# vi /stand/bootconf
l /dev/disk/diska
l /dev/disk/diskb
8. Determine hardware path of the new mirror.
# ioscan –fun /dev/dsk/cxtxdx
# ioscan –m lun /dev/disk/diskb
11i v1 and v2
11i v3
9. Update stable storage so your new mirror is listed as the high availability alternate boot
disk. If setboot –h fails, your system may not support high availability alternate boot
disks. Use setboot –a to configure the mirror as an alternate boot disk instead. In 11i
v3, setboot accepts either a legacy hardware path, or a lunpath hardware path. Then
execute setboot without any options to verify the contents of stable storage.
# setboot -h 0/0/10/0/0.0xa.0x0
# setboot
use your mirrored disk’s hw path here
10. Now for the real test: try to boot from your mirrored root disk! Shutdown, then interrupt
the boot sequence and boot from the high availability alternate (if available) or alternate
(if there isn’t a high availability alternate).
# shutdown -ry 0
[esc]
Main Menu: Enter command or menu > search ipl
Main Menu: Enter command or menu > boot haa
(or boot alt)
11. After rebooting, use the command below to verify that you booted from the new boot
mirror.
# echo boot_string/S | adb /stand/vmunix /dev/kmem
http://education.hp.com
H3064S J.00
13-33
© 2010 Hewlett-Packard Development Company, L.P.
Module 13
Booting PA-RISC Systems
Part 5: (Optional) Remove the Boot Mirror
Your instructor may tell you to remove your boot disk. If so, do this portion of the lab.
1. Unmirror the boot disk, then verify your work.
# for lv in /dev/vg00/lvol*
do
lvreduce –m 0 $lv
done
# lvdisplay -v /dev/vg00/lvol1
# lvdisplay -v /dev/vg00/lvol2
# lvdisplay -v /dev/vg00/lvol3
2. Remove the boot disk mirror from the volume group, then verify that the disk was
successfully removed. pvdisplay should report that it “Couldn't find the
volume group to which the physical volume belongs”.
# vgreduce vg00 /dev/disk/diskb
# pvdisplay /dev/disk/diskb
use your disk device file name
use your disk device file name
3. Update the BDRA.
# lvlnboot –R /dev/vg00
4. Return the AUTO file contents on the remaining boot disk to hpux.
# mkboot –a “hpux” /dev/rdisk/diska
5. Remove the mirror from /stand/bootconf .
# vi /stand/bootconf
l /dev/disk/diska
l /dev/disk/diskb
6. Reboot using the primary boot disk.
# cd /
# shutdown –ry 0
H3064S J.00
13-34
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14 ⎯ Booting Integrity Systems
Objectives
Upon completion of this module, you will be able to do the following:
•
Properly shut down an HP-UX system using shutdown and reboot.
•
Describe the steps in the Integrity boot process.
•
Access the EFI shell.
•
Boot from the primary or alternate boot device.
•
Boot from a system recovery tape.
•
Boot from an install DVD or Ignite-UX install server.
•
Boot from an alternate kernel.
•
Boot to single-user mode, LVM maintenance mode, or tunable maintenance mode.
http://education.hp.com
H3064S J.00
14-1
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
14–1. SLIDE: HP-UX Shutdown and Reboot
HP-UX Shutdown and Reboot
-r
shutdown shutdown
-r
reboot -h
reboot
Single-User Mode
shutdown -h
shutdown
Multi-User Mode
Halt State
MP> pc
MP> rs
MP> pc
Power Off
Student Notes
This chapter explores the commands required to shutdown and boot Integrity systems.
An HP-UX system will always be in one of several operation states. The system state
determines which system services are available. Some of the system administrative tasks
described in this course require you to change your current operation state.
Most of the time, your system will be in multi-user mode. In multi-user mode, users can log
in; file systems are mounted; and most system services and daemons are available.
There are occasions, however, when you may need to take your system down to single-user
mode to perform administrative tasks. In single-user mode, users cannot login, non-critical
file systems are unmounted, and non-critical system daemons are shut down. Moving to
single-user mode brings your system to a quiet state, from which you can do system backups,
run fsck, or perform other system administrative tasks, without interference from user
processes.
Bringing your system to a halt state unmounts all file systems, and kills all processes.
Always halt HP-UX before powering-off your server or workstation.
H3064S J.00
14-2
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
Taking your system to the power-off state terminates power to all system hardware
components, except the Management Processor card.
Several commands may be used to move between states on an HP-UX system:
•
From multi-user mode, use the shutdown command to reboot, halt, or shutdown to
single-user mode.
•
From single-user mode, use the reboot command to reboot or halt the system.
•
From the halt state, use the rs (reset) command from the Management Processor
Command Menu to reset and boot the system. On workstations, push the reset button on
the workstation chassis. On cell-based systems, you can also use the bo (boot) command
from the Management Processor to boot the system.
•
From a power-off state, use the pc (power control) command from the Management
Processor Command Menu to power on the system or simply press the power button.
•
On a hung system, it may be necessary to use the rs or tc commands from the
Management Processor Command Menu to reset and boot the system. On workstations,
push the reset button on the workstation chassis.
Changing State from Multi-user Mode with shutdown
Executing the shutdown command terminates system activities in an orderly and consistent
manner. The shutdown command performs the following tasks:
•
Prompts the administrator for a broadcast message to send to all users.
•
Broadcasts the warning message to all user terminal sessions.
•
Grants a 60 second (configurable) grace period for users to log out.
•
Kills all user logins.
•
Gracefully shuts down all non-critical processes using /sbin/rc*.d/K* kill scripts.
•
Unmounts all non-critical file systems.
Depending on the option specified, shutdown will either leave the system in single-user
mode (no options), the halt state (if -h was specified), or initiate a reboot (if -r was
specified).
Common shutdown options:
# shutdown -y 600
http://education.hp.com
shutdown to single-user mode in 600 seconds."-y" (yes)
option prevents shutdown from requesting confirmation
before proceeding.
H3064S J.00
14-3
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
# shutdown -hy 600
shutdown to a halt state in 600 seconds."-y" (yes) option
prevents shutdown from requesting confirmation before
proceeding.
# shutdown -ry 600
reboot in 600 seconds without requesting confirmation.
# shutdown -ry 0
reboot immediately without requesting confirmation.
Changing State from Single-user Mode with reboot
The reboot command uses the SIG_KILL signal to kill running processes. This takes the
system down quickly, but can cause problems for applications and file systems. The
shutdown command shuts down applications and processes more gracefully, and thus is the
preferred method for halting or rebooting the system from multi-user mode. Reboot may be
used if:
•
The system is already in single-user mode.
•
You need to bring the system down very quickly.
# reboot –h
# reboot
shutdown to a halt state (only use this from single-user mode).
reboot
Changing State from the Halt State with the rs MP Command
After halting a system or partition with either the reboot –h or shutdown –h command,
you can initiate the boot process via the rs command on the MP Command Menu. Although
the rs command may be executed on a running system, too, doing so may cause corruption.
MP> cm
MP:CM> rs
Execution of this command irrecoverably halts all system processing
and I/O activity and restarts the computer system.
Type Y to confirm your intention to restart the system: (Y/[N]) y
-> SPU hardware was successfully issued a reset.
On cell-based systems, you can also use the bo (boot) command from the Management
Processor to boot the system.
Changing State via the pc or pe MP Commands
Once your system reaches the halt state, you can safely power-off the system hardware by
either pressing the power switch on the system cabinet, or, on servers, by executing the pc
command from the MP Command Menu. The output below was taken from an rx2600 server.
The output on other models may be slightly different. Midrange and Superdome server use
the pe (power entity) command instead.
H3064S J.00
14-4
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
MP> cm
MP:CM> pc
Current System Power State: On
ON - Turn the power On
OFF - Turn the power Off
Power Switch State: On
Enter your choice (ON/OFF) or [Q] to quit: off
Enter delay (in minutes 0-6000) to power Off (CR for no delay):
System will be powered Off in 0 minutes.
Confirm? (Y/[N]): y
-> System has been powered Off
If your system has been powered off for some reason, you can power it back on again by
pressing the power button, or, on servers, by executing the pc command from the MP
Command Menu (output on your system may be slightly different from the output shown
below).
MP> cm
MP:CM> pc
Current System Power State: Off
ON - Turn the power On
OFF - Turn the power Off
Power Switch State: On
Enter your choice (ON/OFF) or [Q] to quit: on
Enter delay (in minutes 0-6000) to power On (CR for no delay):
System will be powered On in 0 minutes.
Confirm? (Y/[N]): y
-> System has been powered On
Changing State on a Hung System with the tc and rs MP Commands
On rare occasions, a bug in an application or the OS may leave your system in a “hung” state.
In these situations, it may be necessary to use the MP tc or rs commands to reboot. Use
these commands with care, as they may cause corruption.
shutdown and reboot on Node and Virtual Partitions
When you execute the shutdown or reboot command on a node or virtual partition, the
command only affects your current partition. Other partitions remain up and running.
Several additional shutdown and reboot options are required if you intend to shutdown a
partition to reallocate partition resources. HP’s Partition Management class (U5075S)
discusses these options in detail.
http://education.hp.com
H3064S J.00
14-5
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
14–2. SLIDE: Part 1: Integrity Boot Process Concepts
Booting Integrity
Systems:
Part 1: Integrity Boot Process Concepts
Student Notes
After shutting down your system, you will eventually need to boot it back up again. The next
few slides explore the Integrity boot process in detail.
H3064S J.00
14-6
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
14–3. SLIDE: Integrity Boot Process Major Players
Integrity Boot Process Major Players
Firmware
• POST/PAL/SAL
• EFI boot manager
• EFI shell
NVRAM
• Default boot paths
• Console/keyboard path
EFI system partition
• AUTO file
• HPUX kernel loader
Boot Disk
OS partition
• Kernel
HP Service Partition
• Diagnostic utilities
Student Notes
The goal of the system boot process is to load the kernel executable from the boot disk into
memory and start all the daemons and services necessary to bring the system back up to a
fully functional state. Several major players are involved in this process:
Firmware:
The Power-On Self Test (POST), Processor Abstraction Layer (PAL),
and System Abstraction Layer (SAL) Firmware components are
responsible for performing system and platform initialization and selftests in the earliest stages of the boot process.
The EFI boot manager is the utility responsible for choosing a boot
device. The boot manager includes a menu-based interface that allows
the administrator to interact with the boot process. The EFI shell
provides a more flexible command-line interface to the EFI firmware.
http://education.hp.com
H3064S J.00
14-7
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
NVRAM:
The EFI boot manager consults Non-Volatile RAM (NVRAM) to
determine the hardware paths of the primary boot disk, alternate boot
sources, and the system console. The contents of NVRAM may be
modified by the administrator via the EFI shell bcfg command or the
HP-UX setboot command.
Boot Disk:
The boot disk itself is subdivided into three EFI disk partitions.
The EFI system partition contains several utilities and files that are
used to find and load an appropriate kernel in memory, including the
hpux.efi utility and the auto configuration file.
The OS partition on the boot disk contains LVM structures, the kernel
and several file systems that play a critical role in the boot process.
The HP Service Partition (HPSP) contains diagnostic tools that may be
used to diagnose hardware problems on an unbootable system.
Each of these partitions will be discussed in greater detail later over
the next few pages.
H3064S J.00
14-8
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
14–4. SLIDE: Integrity Boot Disk Structures
Integrity Boot Disk Structures
• Integrity boot disks may be subdivided into one or more EFI disk partitions
• These partitions may be configured via Ignite-UX or the HP-UX idisk utility
• HP-UX boot disks typically have three EFI partitions, and several supporting structures
Master Boot Record
Legacy Intel Master Boot Record structure, ignored by IPF
GPT Partition Table
Table containing pointers to the other EFI partitions
diska_p1
(System Partition)
diska_p2
(OS Partition)
diska_p3
(Service Partition)
GPT Partition Table
The kernel loader and other files are stored here
LVM headers and OS logical volumes are stored here
Diagnostic files & utilities are stored here
Backup copy of the GPT partition table
Student Notes
POST, PAL, SAL, and EFI firmware all reside in memory. However, other important players
in the boot process such as the hpux.efi OS loader and the /stand/vmunix kernel
executable, reside on the boot disk. The next few slides discuss the layout and structure of
the boot disk in detail.
Integrity boot disks are typically subdivided into one or more EFI disk partitions. The EFI
partitions on an HP-UX boot disk are initially created by Ignite-UX, but can also be manually
viewed and managed via the new idisk utility.
NOTE:
EFI disk partitions are not related to HP-UX nPars, vPars, and Integrity VMs.
nPars, vPars, and VMs distribute a system’s processor, memory, and I/O
resources among independent OS instances. An EFI partition is simply a
portion of disk space.
http://education.hp.com
H3064S J.00
14-9
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
HP-UX boot disks typically have three EFI partitions, and several supporting structures:
MBR:
The Master Boot Record (MBR) is located at the top of the disk. This
is a legacy Intel structure that is ignored by the EFI firmware.
Including an MBR at the top of the disk, however, makes it possible to
configure media that is readable on both Itanium and legacy Intel 32bit systems.
GPT:
Every EFI partition is assigned a Globally Unique IDentifier (GUID).
The partition GUID’s and locations are recorded in the EFI GUID
Partition Table (GPT). This is a critical structure that is replicated at
both the top and bottom of the disk.
EFI System Partition: At a minimum, the EFI system partition contains the OS loader that is
responsible for loading the OS in memory during the boot process.
On HP-UX boot disks, this OS loader is called
\efi\hpux\hpux.efi. The \efi\hpux\auto file, which stores
the system boot string, and several troubleshooting utilities are also
stored in the system partition on HP-UX systems. Other OSes require
different files in the system partition.
HP-UX represents the system partition via device file
/dev/[r]dsk/cxtxdxs1 (11i v1 and v2) or
/dev/[r]disk/diska_p1 (11i v3).
The EFI partition uses a file system structure which is similar to the
FAT32 file system structure traditionally used in the Microsoft
Windows Operating System. HP-UX includes several special
commands such as efi_ls, efi_cp, and efi_rm that allow
administrators to view and manage files in these EFI file systems.
See the man pages for details.
OS Partition:
The OS partition contains an encapsulated LVM boot physical
volume, including all of the structures one would expect to see on an
LVM boot disk: a PVRA, VGRA, BDRA, BBRA, and physical extents
allocated to the logical volumes in vg00.
HP-UX represents the OS partition via device file
/dev/[r]dsk/cxtxdxs2 (11i v1 and v2) or
/dev/[r]disk/diska_p2 (11i v3).
The contents of this partition may be accessed using traditional LVM
commands such as pvcreate and pvdisplay.
Theoretically, a single disk may have multiple OS partitions, each
containing a different operating system, but HP currently only
supports one OS partition per disk.
H3064S J.00
14-10
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
HPSP:
The HP Service Partition (HPSP) is FAT32 file system that may be
used to store offline diagnostic utilities.
HP-UX represents the HPSP partition via device file
/dev/[r]dsk/cxtxdxs3 (11i v1 and v2) or
/dev/[r]disk/diska_p3 (11i v3).
Viewing and Managing the Partition Table
Use the idisk command to view the EFI partition table and determine the size of the boot
disk’s EFI partitions.
# idisk /dev/rdisk/diska
The same command can be used to create a new partition table on a new boot disk, too.
First, create a /tmp/idf file that describes the desired disk layout. Based on the sample file
below, the EFI system partition will be 500MB. The HP Service Partition will be 400MB. All
remaining space will be allocated to the HP-UX OS partition.
# vi /tmp/idf
3
EFI 500MB
HPUX 100%
HPSP 400MB
Then run the idisk command to create partitions based on the parameters in the file. BE
careful! This command overwrites the disk, potentially destroying any existing data on the
disk. The –w option is required if you wish to write changes to the disk. –f identifies the
pathname of the partition description file. idisk also automatically creates EFI file systems
in the system and HPSP partitions, so there is no need to explicitly run the efi_fsinit
command.
# idisk –wf /tmp/idf /dev/rdsk/c0t1d0
Finally, the mkboot -e command copies hpux.efi and other EFI executables from
/usr/lib/efi to the new system partition. The –l option is required if the disk will be
configured using a volume manager such as LVM or VxVM. Use the –h option instead if you
plan to use the “whole disk” approach.
# mkboot –e –l /dev/rdsk/c0t1d0
http://education.hp.com
H3064S J.00
14-11
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
14–5. SLIDE: Integrity Boot Disk System Partition Structure
Integrity Boot Disk System Partition Structure
• Every IPF boot disk has an EFI system partition
• The system partition typically contains a FAT32 file system
• This file system contains two key files (and several other supporting files):
• \efi\hpux\auto, a text file which determines the kernel boot string
• \efi\hpux\hpux.efi, an executable which loads the kernel in memory
Master Boot Record
GPT Partition Table
\
diska_p1
(System Partition)
diska_p2
(OS Partition)
diska_p3
(Service Partition)
GPT Partition Table
efi
hpux
hpux.efi
auto
Student Notes
Every Integrity boot disk contains an EFI system partition. The system partition contains a
variety of EFI executable files and utilities which are used to load the kernel, and facilitate
troubleshooting and maintenance activities.
The EFI system partition uses a FAT32 file system structure which is identical to the file
system structure traditionally used in the Microsoft Windows Operating System. Several new
utilities have been added to HP-UX to allow administrators to view and manage files in these
EFI file systems.
HP-UX represents the system partition via device file /dev/[r]dsk/cxtxdxs1 (11i v1 and
v2) or /dev/[r]disk/diska_p1 (11i v3).
H3064S J.00
14-12
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
Files and Tools in the HP-UX EFI System Partition
On an HP-UX boot disk, the most important files in the system partition are:
•
\efi\hpux\hpux.efi, which is responsible for loading and running the kernel, and
•
\efi\hpux\auto, which contains the kernel boot string that hpux.efi uses to
determine which mode and kernel to boot.
The EFI is intended to be “extensible”, so you may find other executables in the EFI system
partition, too. Currently, HP includes a small suite of network troubleshooting tools in the
\efi\hp\tools\network directory:
•
ftp.efi, an FTP client
•
ifconfig.efi, for enabling a LAN interface before booting HP-UX
•
ping.efi, which is similar to the standard UNIX ping command
•
route.efi, which is similar to the standard UNIX route command
For instructions on using these tools, run the \efi\hp\tools\network\inet.nsh EFI
script from the EFI shell prompt.
You can write and compile your own EFI executable tools and scripts, too, using an EFI
compiler from Intel. See the tools link on http://www.intel.com/technology/efi/
for more information.
Files and Tools in Other EFI System Partitions
The EFI is also intended to be OS-neutral. Thus, whether you are running HP-UX, Windows,
or Linux on your Integrity server, your boot disk should contain an EFI system partition. Of
course the EFI executables and files within the partition vary from OS to OS. For instance,
the system partition on a Linux boot disk contains the elilo.efi (LInux LOader) kernel
loader rather than hpux.efi.
Viewing and Managing the Contents of the EFI System Partition
EFI file systems aren’t accessible via traditional UNIX file system commands. However,
several EFI-specific utilities are now available to manage EFI partitions on a booted HP-UX
system:
Use the efi_ls command to list the contents of an EFI file system. The –d option specifies
the device filename of the partition you wish to access. The example below displays the
contents of the /efi/hpux/ directory on the /dev/rdisk/diska_p1 EFI system
partition. Note that the HP-UX efi* commands require forward slashes in EFI pathnames,
while the EFI shell utilities require backslashes.
# efi_ls –d /dev/rdisk/diska_p1 /efi/hpux
http://education.hp.com
H3064S J.00
14-13
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
To edit files stored in an EFI file system, use the efi_cp command to copy the desired file to
a file in /tmp, edit the temporary file with vi, and return it back to the EFI system partition
with efi_cp. Be sure to include the –u option when copying from the EFI system partition.
Do not include the –u option when copying a file to the EFI system partition.
# efi_cp –d /dev/rdisk/diska_p1 -u /efi/hpux/auto /tmp/auto
# vi /tmp/auto
# efi_cp –d /dev/rdisk/diska_p1 /tmp/auto /efi/hpux/auto
If you simply want to view the contents of a file in the system partition, use efi_cp to copy
the file to the /dev/tty terminal device file.
# efi_cp –d /dev/rdisk/diska_p1 -u /efi/hpux/auto /dev/tty
If you’re trying to modify the auto file on the system partition, you can save a couple steps
by simply running mkboot -a, just as you would on PARISC. Do not include the s1 suffix
on the device file name when running mkboot.
# mkboot –a “boot vmunix –lq” /dev/rdisk/diska_p1
For more detailed information, see the general efi(4) man page, or the man pages for any
of these commands.
H3064S J.00
14-14
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
14–6. SLIDE: Integrity Boot Disk OS Partition Structure
Integrity Boot Disk OS Partition Structure
• Every IPF boot disk has an operating system partition
• The HP-UX OS partition contains the LVM headers and OS logical volumes
Master Boot Record
GPT Partition Table
diska_p1
(System Partition)
diska_p2
(OS Partition)
LIF area
LVM Headers
lvol1
/stand file system
lvol2
primary swap
lvol3
/ file system
diska_p3
(Service Partition)
Free Extents
GPT Partition Table
BBRA
Student Notes
The OS partition contains an encapsulated LVM boot disk, including all of the structures one
would expect to see on a traditional Whole Disk, LVM, or VxVM boot disk. The system
partition may be accessed using the /dev/rdisk/diska_p2 device file.
If you choose to configure your system using the Whole Disk option for the boot disk, the OS
partition will contain a LIF area, a VxFS root file system, and primary swap.
If you choose to configure your system using LVM on the boot disk, the OS partition will
contain a LIF area, PVRA, VGRA, BDRA, BBRA, and physical extents allocated to the / file
system and primary swap logical volumes in vg00. If you choose to configure your system
using VxVM on the boot disk, the OS partition will contain a VxVM root disk group.
http://education.hp.com
H3064S J.00
14-15
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
Viewing the Contents of the OS Partition
Use the pvdisplay command to view the contents of the OS partition on an LVM boot disk.
# pvdisplay /dev/disk/diska_p2
Use the vxprint command to view the contents of the OS partition on an LVM boot disk.
# vxprint –g rootdg
H3064S J.00
14-16
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
14–7. SLIDE: Integrity Boot Disk HPSP Structure
Integrity Boot Disk HPSP Structure
• An HP-UX boot disk may optionally contain a HP Service Partition (HPSP)
• The HPSP typically contains a 400MB FAT32 file system
• Diagnostic utilities may be stored in this partition
Master Boot Record
GPT Partition Table
\efi\hp\tools\LaunchMenu\
launchmenu.efi
diska_p1
(System Partition)
diska_p2
(OS Partition)
diska_p3
(Service Partition)
GPT Partition Table
\efi\hp\diag\ode\
cpudiag
mapper
memdiag
Student Notes
Integrity servers include a tool called e-Diagnostics ("e-Diag" for short. The program allows
you to troubleshoot hardware problems on a computer that cannot boot an operating system.
e-Diagnostics may be launched directly from the Offline Diagnostics and Utilities CDROM,
which is included with every HP Integrity server, or from a 400MB, FAT32 Service Partition
on the system boot disk. Running e-Diagnostics from the disk-based service partition
provides much better performance than the CDROM-based solution.
The slide shows just a few of the many files that are typically found in the HPSP or on the
Diagnostics and Utilities CDROM. The intuitive, menu-based interface for e-Diag may be
executed by running \efi\hp\tools\LaunchMenu\launchmenu.efi from either the
Diagnostics and Utilities CD, or the HPSP.
http://education.hp.com
H3064S J.00
14-17
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
Viewing the Contents of the EFI HP Service Partition
Use the efi_ls command to list the contents of an EFI HPSP partition. The –d option
specifies the device filename of the partition you wish to access. The example below
displays the contents of the /efi/hpux/ directory on the /dev/rdisk/diska_p3 EFI
partition. Note that the HP-UX efi* commands require forward slashes in EFI pathnames,
while the EFI shell utilities require backslashes.
# efi_ls –d /dev/rdisk/diska_p3 /efi/hp/tools/LaunchMenu
H3064S J.00
14-18
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
14–8. SLIDE: PARISC/Integrity Boot Process Comparison
PARISC/Integrity Boot Process Comparison
At a high level, the Integrity boot process is similar to the PARISC boot process
PARISC boot process
POST/PDC/IODC
perform hardware
self-tests and
system initialization
BCH Boot Manager
consults NVRAM
to identify the
default boot device
isl/hpux
use the auto file
to choose and
boot a kernel
vmunix/init
complete
the boot
process
EFI Boot Manager
consults NVRAM
to identify the
default boot device
hpux.efi
uses the auto file
to choose and
boot a kernel
vmunix/init
complete
the boot
process
Integrity boot process
POST/PAL/SAL
perform hardware
self-tests and
system initialization
Student Notes
So far in this chapter we’ve discussed several firmware and disk-based components that play
a part in the Integrity boot process. This slide shows how these players work together to
boot an Integrity system to a fully functional state. For the sake of comparison, the slide also
shows the corresponding steps in the PA-RISC boot process.
POST/PAL/SAL Firmware Perform Hardware Self-Tests and System
Initialization
First, the POST/PAL/SAL firmware performs a variety of processor and hardware self-test
and initialization tasks.
On the PA-RISC platform, the Power On Self Test (POST), Processor Dependent Code (PDC),
and I/O Dependent Code (IODC) perform these tasks.
http://education.hp.com
H3064S J.00
14-19
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
EFI Boot Manager Consults NVRAM to Identify the Default Boot Device
Next, the EFI boot manager consults NVRAM, displays a menu of potential boot devices, and
proceeds to load a boot loader from the default boot device if autoboot is enabled.
Alternatively, the administrator can use the EFI boot menu to select an alternate boot source
or use the EFI shell to interact with the system before the autoboot proceeds.
On the PA-RISC platform, the Boot Console Handler (BCH) serves a similar role.
hpux.efi Uses the auto File to Choose and Load a Kernel
On HP-UX Integrity servers, the hpux.efi kernel loader consults the \efi\hpux\auto file
on the EFI system partition to determine which kernel and mode to boot. Typically, the
auto file suggests booting /stand/vmunix to multi-user mode.
On PA-RISC systems, the Initial System Loader (ISL) uses the HPUX kernel loader and AUTO
file to load the kernel in memory. The ISL and HPUX executables and the AUTO file are all
stored in the boot area on the PA-RISC boot disk.
vmunix Brings the System to a Fully Functional State
The kernel (typically /stand/vmunix) then scans the hardware, mounts the root file
system, and starts the init daemon. The init daemon starts the daemons and services
necessary to bring the system up to multi-user mode.
This portion of the process is identical on PA-RISC and Integrity systems.
H3064S J.00
14-20
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
14–9. SLIDE: Part 2: EFI Addressing Concepts
Booting Integrity
Systems:
Part 2: EFI Addressing Concepts
Student Notes
During the EFI system boot process, you may wish to specify a non-default boot device. The
EFI identifies boot devices via EFI hardware paths rather than HP-UX hardware paths. The
next few slides explore these EFI hardware paths in detail.
http://education.hp.com
H3064S J.00
14-21
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
14–10. SLIDE: EFI Address Overview
EFI Address Overview
• By default, during the boot process, system firmware boots the “primary” boot disk
• If the primary disk is corrupt, it may be necessary to specify an alternate device
− The PARISC boot manager identifies devices via HP-UX hardware addresses
− The Integrity EFI boot manager identifies devices EFI hardware addresses
• Integrity administrators must be able to correlate HP-UX and EFI addresses
My primary boot disk is corrupt, so I need to
boot from an alternate device. How do I ensure
that the EFI Boot Manager boots the right disk?
Student Notes
By default, during the boot process, system firmware automatically boots the kernel from the
“primary” boot disk designated by the administrator.
If the primary disk becomes corrupt, it may be necessary to manually boot from a boot disk
mirror, recovery tape, or DVD instead.
When interacting with the PA-RISC Boot Console Handler (BCH) boot manager, PA-RISC
administrators can specify an alternate device via the device’s HP-UX hardware addresses.
When interacting with the Integrity Extensible Firmware Interface (EFI) boot manager,
Integrity administrators must identify the target boot device via the device’s EFI hardware
address rather than the device’s HP-UX hardware address. The screenshot below shows an
example of the EFI boot manager maintenance menu used to select a boot disk on an
Integrity server:
EFI Boot Maintenance Manager ver 1.10 [14.61]
Boot From a File. Select a Volume
H3064S J.00
14-22
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
IA64_EFI [Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun1,Lun0)/HD(Part1,Si
IA64_EFI [Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun1,Lun0)/HD(Part3,Si
Removable Media Boot [Acpi(HWP0002,0)/Pci(2|0)/Ata(Primary,Maste
Load File [EFI Shell [Built-in]]
Load File [Acpi(HWP0002,100)/Pci(1|1)/Scsi(Pun2,Lun0)]
Load File [Acpi(HWP0002,0)/Pci(3|0)/Mac(00306EF38DBF)]
In order to change the default boot disk, boot from a recovery tape, or install the OS from the
install DVD on an Integrity server, administrators must understand EFI addressing.
The EFI boot process and commands will be discussed in detail later in the course; for now
we will focus on EFI device addressing.
http://education.hp.com
H3064S J.00
14-23
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
14–11. SLIDE: SCSI EFI Hardware Addresses
SCSI EFI Hardware Addresses
On Integrity systems, the firmware responsible for early stages of the boot process uses
EFI hardware addresses, which are easily mapped to HP-UX legacy hardware paths
EFI SCSI hardware address format:
HP-UX lunpath Address:
Cell/SBA/LBA/device/function.target.LUN
(EFI part.#)
EFI Hardware Address: ACPI(vendor,cxx) / PCI(d|f) / SCSI (PUNt,LUNl) / HD(Partp,id)
EFI SCSI hardware address example (extra line breaks added to EFI path for clarity):
1/0/0/3/0.0x6.0x0
Acpi(HWP0002,PNP0A03,100)/
Pci(3|0)/
Scsi(Pun6,Lun0)/
HD(Part1,Sig39CCE18C-214B-11DC-8000-D6217B60E588)/
Student Notes
EFI hardware addresses for SCSI devices are structured differently than the HP-UX hardware
addresses discussed previously, though both address types share some common address
elements.
SCSI EFI addresses consist of four major address components. The addresses look like this:
ACPI(vendor,cxx)/PCI(d|f)/SCSI(PUNt,LUNl)/HD(Partp,hex)
The notes below describe each EFI address component.
ACPI(vendor,cxx) The vendor field, which precedes the comma in the first set of
parentheses, contains a string that identifies the device manufacturer.
The meaning of the two- or three- digit number at the end of the ACPI
portion of the address varies somewhat from model to model.
On non-cell-based Integrity systems, the last number in the ACPI
portion of the address identifies the LBA/rope number associated with
H3064S J.00
14-24
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
the device’s SCSI interface. Unfortunately, the EFI addresses identify
LBA/ropes using a different numbering scheme than HP-UX hardware
addresses. Consult your server’s service manual to determine which
EFI LBA number correlates with each slot on your server.
The LBA/rope/physical slot correlations may vary from model to
model. The following table shows the mapping for an rx5670 server:
EFI #
rope
slot
0
0
1
0
0
2
100
1
3
400
4
4
400
4
5
700
7
6
700
7
7
600
6
8
600
6
9
500
5
10
200
2
11
300
3
12
On cell-based Integrity systems, the LBA/rope number is preceded by a
single hexadecimal digit identifying the cell board to which the
device’s SCSI interface is attached. Recall that the cell number also
appears in the first component of the HP-UX legacy hardware address
and Agile View lunpath hardware address.
http://education.hp.com
H3064S J.00
14-25
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
The following table shows the relationship of the EFI rope numbers to
physical slot numbers in a Superdome I/O chassis.
EFI#
slot#
0
0
0x15
1
0x2A
2
0x3F
3
0x54
4
0x69
5
0xEA
6
0xDF
7
0xBE
8
0xA8
9
0x93
10
0x7F
11
Based on the table above, a Superdome EFI hardware
address that includes LBA number 37F would
represent a device attached to cell 3, in I/O
chassis slot 11 (look for the 0x7F in the table).
PCI(d|f)
This component of the EFI path represents the device and function
numbers. The “|” is literal. Both numbers come directly from the HPUX hardware path as shown on the slide.
SCSI(PUNt,LUNl) This component of the EFI path identifies the SCSI target (t) and Lun
(l), both given in hex. Both numbers come directly from the HP-UX
hardware path as shown on the slide.
HD(Partp,hex)
The Partp portion of the EFI path identifies the
EFI partition on the disk (if any) that contains
the utilities required to load and boot the kernel.
Usually, the kernel loader is found in EFI
partition 1. EFI partitions and the structure of
an Integrity/EFI boot disk will be discussed in the
EFI boot chapter. EFI partition numbers aren’t
referenced in HP-UX hardware paths.
H3064S J.00
14-26
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
Example
The sample rx7640 HP-UX hardware address and EFI hardware address below are both
associated with the SCSI device attached to cell 1, LBA/rope 0, device 3, function 0, target 6,
LUN 0. In this example, line breaks were added between the EFI address components to
enhance readability.
1/0/0/3/0.0x6.0x0
Acpi(HWP0002,PNP0A03,100)/
Pci(3|0)/
Scsi(Pun6,Lun0)/
HD(Part1,Sig39CCE18C-214B-11DC-8000-D6217B60E588)/
http://education.hp.com
H3064S J.00
14-27
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
14–12. SLIDE: FC EFI Hardware Addresses
FC EFI Hardware Addresses
On Integrity systems, the firmware responsible for early stages of the boot process uses
EFI hardware addresses, which are easily mapped to HP-UX legacy hardware paths
EFI FC hardware address format:
HP-UX Lunpath Address: Cell/SBA/LBA/device/function.WWPN.LUNID
(EFI part.#)
EFI Hardware Address: ACPI(vendor,cxx) / PCI(d|f) / Fibre(WWNw,LUNl) / HD(Partp,id)
EFI SCSI hardware address example (extra line breaks added to EFI path for clarity):
1/0/2/1/0.0x50001fe15003112c.0x4001000000000000
Acpi(HWP0002,PNP0A03,102)/
Pci(1|0)/
Fibre(WWN0x50001fe15003112c,Lun4001000000000000)/
HD(Part1,Sig542A2F5A-2B3A-11DC-8000-D6217B60E588)
Student Notes
EFI hardware addresses for fibre channel devices are similar to Agile View lunpath
addresses. The addresses look like this:
ACPI(vendor,cxx)/PCI(d|f)/Fibre(WWNw,LUNl)/HD(Partp,id)
The notes below describe each EFI address component.
ACPI(vendor,cxx)
The vendor field, which precedes the comma in the first set of
parentheses, contains a string that identifies the device
manufacturer.
The meaning of the two- or three- digit number at the end of the
ACPI portion of the address varies somewhat from model to
model.
On non-cell-based Integrity systems, the last number in the ACPI
portion of the address identifies the LBA/rope number associated
H3064S J.00
14-28
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
with the device’s SCSI interface. Unfortunately, the EFI addresses
identify LBA/ropes using a different numbering scheme than HPUX hardware addresses. Consult your server’s service manual to
determine which EFI LBA number correlates with each slot on
your server.
The LBA/rope/physical slot correlations may vary from model to
model. The following table shows the mapping for an rx5670
server:
EFI #
rope
slot
0
0
1
0
0
2
100
1
3
400
4
4
400
4
5
700
7
6
700
7
7
600
6
8
600
6
9
500
5
10
200
2
11
300
3
12
On cell-based Integrity systems, the LBA/rope number is preceded
by a single hexadecimal digit identifying the cell board to which
the device’s SCSI interface is attached. Recall that the cell number
also appears in the first component of the HP-UX legacy hardware
address and Agile View lunpath hardware address.
http://education.hp.com
H3064S J.00
14-29
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
The following table shows the relationship of the EFI rope
numbers to physical slot numbers in a Superdome I/O chassis.
EFI#
slot#
0
0
0x15
1
0x2A
2
0x3F
3
0x54
4
0x69
5
0xEA
6
0xDF
7
0xBE
8
0xA8
9
0x93
10
0x7F
11
Based on the table above, a Superdome EFI
hardware address that includes LBA number 37F
would represent a device attached to cell 3, in
I/O chassis slot 11 (look for the 0x7F in the
table).
PCI(d|f)
This component of the EFI path represents the device and function
numbers. The “|” is literal. Both numbers can be extrapolated
directly from the HP-UX hardware path as shown on the slide.
Fibre(WWNw,LUNl)/
This component of the EFI path identifies the WWPN of the array
controller port through which the LUN is accessed, and the LUN ID
of the LUN. Both numbers come directly from the Agile View
lunpath hardware address as shown on the slide.
HD(Partp,hex)
The Partp portion of the EFI path identifies the
EFI partition on the disk (if any) that contains
the utilities required to load and boot the
kernel. Usually, the kernel loader is found in
EFI partition 1. EFI partitions and the
structure of an Integrity/EFI boot disk will be
discussed in the EFI boot chapter. EFI partition
numbers aren’t referenced in HP-UX hardware
paths.
H3064S J.00
14-30
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
Example
The sample rx7640 HP-UX hardware address and EFI hardware address below are both
associated with the SAN LUN attached to the FC HBA at cell 1, LBA/rope 0, device 3, function
0. The address represents a path through the SAN to the disk array target port with WWPN
0x50001fe150031128. The target LUN’s LUN ID is represented as 0x4001000000000000. The
address below includes extra line breaks to enhance readability.
1/0/2/1/0.0x0x50001fe15003112c.0x4001000000000000
Acpi(HWP0002,PNP0A03,102)/
Pci(1|0)/
Fibre(WWN0x50001fe15003112c,Lun4001000000000000)/
HD(Part1,Sig542A2F5A-2B3A-11DC-8000-D6217B60E588)
The scsimgr command tells us that 0x4001000000000000 represents LUN #1.
# scsimgr get_attr \
-a lunid \
-H 1/0/2/1/0.0x50001fe15003112c.0x4001000000000000
name = lunid
current =0x4001000000000000 (LUN # 1, Flat Space Addressing)
default =
saved =
http://education.hp.com
H3064S J.00
14-31
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
14–13. SLIDE: Viewing EFI Hardware Addresses
Viewing EFI Hardware Addresses
From HP-UX, use ioscan –eN to view HP-UX and EFI hardware paths.
The -e option is only applicable on Integrity servers.
# ioscan -eN
H/W Path
Class
Description
===================================================================
1/0/0/3/0.0x6.0x0
lunpath disk27
Acpi(HWP0002,PNP0A03,100)/
Pci(3|0)/
Scsi(Pun6,Lun0)/
HD(Part1,Sig39CCE18C-214B-11DC-8000-D6217B60E588)/
\EFI\HPUX\HPUX.EFI
1/0/2/1/0.0x50001fe150031128.0x4001000000000000 lunpath disk30
Acpi(HWP0002,PNP0A03,102)/
Pci(1|0)/
Fibre(WWN50001FE150031128,Lun4001000000000000)/
HD(Part1,Sig542A2F5A-2B3A-11DC-8000-D6217B60E588)/
\EFI\HPUX\HPUX.EFI
Student Notes
You can use the ioscan –e option to correlate disk devices’ EFI addresses to HP-UX
hardware addresses. The -e option is only applicable on Integrity servers. In 11i v3, add the
–N option, too, to view Agile View rather than legacy hardware paths.
The EFI hardware paths appear immediately below the corresponding HP-UX hardware
paths. The output below includes extra line breaks to enhance readability.
# ioscan -eN
H/W Path
Class
Description
===================================================================
1/0/0/3/0.0x6.0x0
lunpath disk27
Acpi(HWP0002,PNP0A03,100)/
Pci(3|0)/
Scsi(Pun6,Lun0)/
HD(Part1,Sig39CCE18C-214B-11DC-8000-D6217B60E588)/
\EFI\HPUX\HPUX.EFI
1/0/2/1/0.0x50001fe150031128.0x4001000000000000 lunpath disk30
H3064S J.00
14-32
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
Acpi(HWP0002,PNP0A03,102)/
Pci(1|0)/
Fibre(WWN50001FE150031128,Lun4001000000000000)/
HD(Part1,Sig542A2F5A-2B3A-11DC-8000-D6217B60E588)/
\EFI\HPUX\HPUX.EFI
http://education.hp.com
H3064S J.00
14-33
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
14–14. SLIDE: Part 3: Interacting with the EFI Boot Manager
Booting Integrity
Systems:
Part 3: Interacting with the EFI Boot
Manager
Student Notes
Usually, when you boot an Integrity server, the server boots automatically from the default
boot disk and default kernel. However, in some cases you may wish to override the autoboot
process to boot from a backup mirror, a DRD clone, an Ignite recovery tape, or a backup
kernel. The remaining slides describe how you can interact with the EFI boot manager to
select an alternate boot device.
H3064S J.00
14-34
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
14–15. SLIDE: Autoboot versus Manual Boot
Autoboot versus Manual Boot
• By default, the EFI “autoboots” without administrator interaction
• In some situations, it may be preferable to “manually” boot the system
My root disk crashed. I need to
boot from my recovery tape...
I just want to boot
to multi-user mode
using the default
boot disk and kernel
My kernel is
corrupt. I need to
boot from my
backup kernel...
Allow the system
to autoboot!
Boot the system
manually!
Student Notes
Usually, when you boot an Integrity server, the server boots automatically from the default
boot disk and default kernel. This is known as an autoboot.
However, in some cases you may wish to override the autoboot process:
•
To re-install the operating system from CD.
•
To boot from a system recovery tape if the primary boot disk is corrupt.
•
To boot from an alternate boot disk if the primary boot disk is corrupt.
•
To boot from an alternate kernel if /stand/vmunix is corrupt.
•
To boot to single-user mode to perform administrative tasks.
•
To boot to single-user mode if the root password is lost.
The remainder of this chapter discusses the procedure used to manually boot your HP-UX
system, and the functionality available at each step of the process.
http://education.hp.com
H3064S J.00
14-35
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
14–16. SLIDE: Booting from Primary and Alternate Boot Devices
Booting from Primary and Alternate Boot Devices
• By default, the EFI boots the first device in the NVRAM-based boot menu
• Alternatively, use the arrow keys to select the HAA or alternate boot device
POST/PAL/SAL
EFI Boot Manager
EFI Boot Manager ver 1.10 [14.60]
Please select a boot option
Firmware ver 1.61 [4241]
HP-UX Primary Boot
HP-UX HA Alternate Boot
HP-UX Alternate Boot
EFI Shell [Built-in]
Boot Option Maintenance Menu
Use ^ and v to change option(s). Use Enter to select an option
Default boot selection will be booted in 10 seconds
Student Notes
The EFI Boot Manager is responsible for selecting and booting a boot disk. After the
preliminary POST/PAL/SAL firmware initialization completes, the EFI Boot Manager menu
appears on the console. The “EFI Boot Manager” menu format varies somewhat from model
to model, but the core menu options are generally similar to the menu options shown on the
slide above.
Left to its own devices, the boot manager automatically boots the first device on the menu. If
the first boot device fails, the EFI proceeds to the next device on the list. If the second boot
device fails, the EFI proceeds to the third. The boot manager proceeds through the list of
devices and boot options until it finds a boot device that successfully boots.
To skip the primary boot disk and boot the alternate device directly, use the up/down arrow
keys to select the desired device and press Return before the ten second autoboot timeout
expires.
Note that the boot manager is OS-neutral. If the system contains an HP-UX boot disk, a Linux
boot disk, and a Windows boot disk, the boot manager can be configured to display all three
(or even more!) boot sources in the boot menu.
H3064S J.00
14-36
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
Common Boot Manager Menu Selections
The boot menu is customizable, so boot menus vary. The list below explains some of the
common boot menu selections.
•
Every HP-UX system should have a menu item labeled “HP-UX Primary Boot” at the top
of the menu, which boots the primary boot disk.
•
The optional “HP-UX High Availability Alternate” menu item typically boots a boot disk
mirror.
•
The optional “HP-UX Alternate” menu item typically boots a DVD or another alternate
boot device.
•
The “EFI Shell” provides a command-line shell interface for selecting boot devices and
managing the boot menu and other boot options. A slide later in the chapter provides a
brief overview of the EFI Shell.
•
The “Boot Option Maintenance Menu” (alternately known as the “Boot Configuration
Menu” on some systems) provides an intuitive menu interface for booting arbitrary boot
devices and managing boot menu and console options. The next few slides discuss the
“Boot Option Maintenance Menu” in detail.
http://education.hp.com
H3064S J.00
14-37
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
14–17. SLIDE: Booting from an Arbitrary Boot Device
Booting From an Arbitrary Boot Device
• Use this procedure to boot a device not included on the EFI boot manager menu
POST/PAL/SAL
EFI Boot Manager
From the EFI Boot Manager screen, select:
Boot Option Maintenance Menu
From the EFI Boot Maintenance Manager screen, select:
Boot from a File
From the Boot from a File screen, look for desired disk’s partition 1 hardware path
IA64_EFI [Acpi(x,x)/Pci(x|x)/Scsi(Punx,Lunx)/HD(Part1,x)
Navigate the partition’s FAT32 file system and select the hpux.efi kernel loader
EFI --> HPUX --> HPUX.EFI
Watch the system boot back up to multi-user mode!
hardware paths on the slide have been abbreviated slightly for clarity
Student Notes
If the desired boot device isn’t listed in the “EFI Boot Manager” menu, use the “Boot Option
Maintenance Menu” to select an arbitrary boot device. Some systems label this menu option
“Boot Configuration” instead.
EFI Boot Manager ver 1.10 [14.60]
Please select a boot option
Firmware ver 1.61 [4241]
HP-UX Primary Boot
HP-UX HA Alternate Boot
HP-UX Alternate Boot
EFI Shell [Built-in]
Boot Option Maintenance Menu
Use ^ and v to change option(s). Use Enter to select an option
Default boot selection will be booted in 10 seconds
H3064S J.00
14-38
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
The “EFI Boot Maintenance Manager” provides menu options to select an arbitrary boot
device, to customize the list of devices on the “EFI Boot Manager” menu, and to select
console devices. To boot from an arbitrary device, select “Boot from a File”.
EFI Boot Maintenance Manager ver 1.10 [14.61]
Main Menu. Select an Operation
Boot from a File
Add a Boot Option
Delete Boot Option(s)
Change Boot Order
Manage BootNext Setting
Set Auto Boot TimeOut
Select Active Console Output Devices
Select Active Console Input Devices
Select Active Standard Error Devices
Cold Reset
Exit
Next, use the arrow keys and the Return key to select the EFI hardware path of the system
partition (partition 1) on the desired boot device.
EFI Boot Maintenance Manager ver 1.10 [14.61]
Boot From a File. Select a Volume
IA64_EFI [Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun1,Lun0)/HD(Part1,Si
IA64_EFI [Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun1,Lun0)/HD(Part3,Si
Removable Media Boot [Acpi(HWP0002,0)/Pci(2|0)/Ata(Primary,Maste
Load File [EFI Shell [Built-in]]
Load File [Acpi(HWP0002,100)/Pci(1|1)/Scsi(Pun2,Lun0)]
Load File [Acpi(HWP0002,0)/Pci(3|0)/Mac(00306EF38DBF)]
Load File [Acpi(HWP0002,100)/Pci(2|0)/Mac(00306EF35CDD)]
Exit
After selecting the desired device, select the path name of the device’s kernel loader. On HPUX boot disks, select \efi\hpux\hpux.efi.
EFI Boot Maintenance Manager ver 1.10 [14.61]
Select file or change to new directory:
06/18/07 12:13p <DIR>
4,096 EFI
[Treat like Removable Media Boot]
Exit
EFI Boot Maintenance Manager ver 1.10 [14.61]
Select file or change to new directory:
06/18/07 12:13p <DIR>
4,096 .
06/18/07 12:13p <DIR>
0 ..
06/18/07 12:13p <DIR>
4,096 HPUX
06/18/07 12:13p <DIR>
4,096 Intel_Firmware
06/18/07 12:13p <DIR>
4,096 DIAG
06/18/07 12:13p <DIR>
4,096 HP
http://education.hp.com
H3064S J.00
14-39
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
06/18/07
Exit
12:13p <DIR>
EFI Boot Maintenance Manager
Select file or change to new
06/18/07 12:13p <DIR>
06/18/07 12:13p <DIR>
06/18/07 12:13p
06/18/07 12:13p
06/18/07 12:36p
06/18/07 12:36p
Exit
4,096 TOOLS
ver 1.10 [14.61]
directory:
4,096 .
4,096 ..
644,703 HPUX.EFI
24,576 NBP.EFI
107,990 crashdump.efi
101,897 vparconfig.efi
Now watch the system boot up to multi-user mode!
H3064S J.00
14-40
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
14–18. SLIDE: Booting from an Install DVD
Booting from an Install DVD
• Use this procedure to boot the install interface from an install DVD
POST/PAL/SAL
EFI Boot Manager
From the “EFI Boot Manager” menu, select:
Boot Option Maintenance Menu
From the “EFI Boot Maintenance Manager” menu, select:
Boot from a File
From the “Boot from a File” menu, select the Removable Media Boot DVD device:
Removable Media Boot [Acpi(x,x)/Pci(x|x)/Ata(Primary,Master)
Wait for the DVD’s \install.efi install utility to launch automatically
hardware paths on the slide have been abbreviated slightly for clarity
Student Notes
In order to install or reinstall the operating system from an install DVD, insert the install DVD
in the DVD drive, then access the “Boot Option Maintenance Menu”.
EFI Boot Manager ver 1.10 [14.60]
Please select a boot option
Firmware ver 1.61 [4241]
HP-UX Primary Boot
HP-UX HA Alternate Boot
HP-UX Alternate Boot
EFI Shell [Built-in]
Boot Option Maintenance Menu
Use ^ and v to change option(s). Use Enter to select an option
Default boot selection will be booted in 10 seconds
http://education.hp.com
H3064S J.00
14-41
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
Select “Boot from a File” from the “EFI Boot Maintenance Manager”.
EFI Boot Maintenance Manager ver 1.10 [14.61]
Main Menu. Select an Operation
Boot from a File
Add a Boot Option
Delete Boot Option(s)
Change Boot Order
Manage BootNext Setting
Set Auto Boot TimeOut
Select Active Console Output Devices
Select Active Console Input Devices
Select Active Standard Error Devices
Cold Reset
Exit
Next, use the arrow keys and Return key to select the DVD drive’s EFI hardware path.
Look for the hardware path identified as the “Removable Media Boot” device.
EFI Boot Maintenance Manager ver 1.10 [14.61]
Boot From a File. Select a Volume
IA64_EFI [Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun1,Lun0)/HD(Part1,Si
IA64_EFI [Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun1,Lun0)/HD(Part3,Si
Removable Media Boot [Acpi(HWP0002,0)/Pci(2|0)/Ata(Primary,Maste
Load File [EFI Shell [Built-in]]
Load File [Acpi(HWP0002,100)/Pci(1|1)/Scsi(Pun2,Lun0)]
Load File [Acpi(HWP0002,0)/Pci(3|0)/Mac(00306EF38DBF)]
Load File [Acpi(HWP0002,100)/Pci(2|0)/Mac(00306EF35CDD)]
Exit
The install DVD should include an autostart script that automatically launches the
\install.efi install interface. See the installation discussion elsewhere in this course to
learn how to navigate the Ignite-UX installation menus.
H3064S J.00
14-42
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
14–19. SLIDE: Booting from an Ignite-UX Install Server
Booting from an Ignite-UX Install Server
• Use this procedure to download the install interface from an Ignite-UX install server
• Also use this procedure to restore a make_net_recovery image
POST/PAL/SAL
EFI Boot Manager
From the “EFI Boot Manager” menu, select:
Boot Option Maintenance Menu
From the “EFI Boot Maintenance Manager” menu, select:
Boot from a File
From the “Boot from a File” menu, select the local LAN interface’s “Load File” entry:
Load File [Acpi(x,x)/Pci(x|x)/Mac(00306EF38DBF)]
Load File [Acpi(x,x)/Pci(x|x)/Mac(00306EF35CDD)]
Wait for the Ignite-UX installation interface to appear
hardware paths on the slide have been abbreviated slightly for clarity
Student Notes
Many systems today don’t have a local DVD drive. In order to install these systems, launch
the install interface from a network Ignite-UX server rather than local media. This procedure
may also be used to restore a make_net_recovery network archive to a failed boot disk.
To learn more about configuring an Ignite-UX server, attend HP Customer Education’s
H1978S Ignite-UX course.
To launch the install interface from an Ignite-UX server, access the “Boot Option
Maintenance Menu” from the “EFI Boot Manager” menu.
EFI Boot Manager ver 1.10 [14.60]
Please select a boot option
HP-UX Primary Boot
HP-UX HA Alternate Boot
HP-UX Alternate Boot
EFI Shell [Built-in]
Boot Option Maintenance Menu
Firmware ver 1.61 [4241]
Use ^ and v to change option(s). Use Enter to select an option
http://education.hp.com
H3064S J.00
14-43
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
Default boot selection will be booted in 10 seconds
Select “Boot from a File” from the “EFI Boot Maintenance Manager”.
EFI Boot Maintenance Manager ver 1.10 [14.61]
Main Menu. Select an Operation
Boot from a File
Add a Boot Option
Delete Boot Option(s)
Change Boot Order
Manage BootNext Setting
Set Auto Boot TimeOut
Select Active Console Output Devices
Select Active Console Input Devices
Select Active Standard Error Devices
Cold Reset
Exit
Next, use the arrow keys and Return key to select the network interface card to be used to
contact the Ignite-UX server. Look for “Load File” menu items that also include a Media
Access Control (MAC) address. Ideally, the selected network interface card should be on the
same subnet as the server.
EFI Boot Maintenance Manager ver 1.10 [14.61]
Boot From a File. Select a Volume
IA64_EFI [Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun1,Lun0)/HD(Part1,Si
IA64_EFI [Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun1,Lun0)/HD(Part3,Si
Removable Media Boot [Acpi(HWP0002,0)/Pci(2|0)/Ata(Primary,Maste
Load File [EFI Shell [Built-in]]
Load File [Acpi(HWP0002,100)/Pci(1|1)/Scsi(Pun2,Lun0)]
Load File [Acpi(HWP0002,0)/Pci(3|0)/Mac(00306EF38DBF)]
Load File [Acpi(HWP0002,100)/Pci(2|0)/Mac(00306EF35CDD)]
Exit
The EFI boot manager sends a BOOTP broadcast through the selected interface and awaits a
reply from the Ignite-UX server. See the installation discussion elsewhere in this course to
learn how to navigate the Ignite-UX installation menus.
H3064S J.00
14-44
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
14–20. SLIDE: Booting from an Ignite-UX Recovery Tape
Booting from an Ignite-UX Recovery Tape
• Use this procedure to restore from a make_tape_recovery tape
• Older models don’t support booting directly from tape
(instead, initiate the boot process from an install DVD, then restore from tape)
POST/PAL/SAL
EFI Boot Manager
From the “EFI Boot Manager” menu, select:
Boot Option Maintenance Menu
From the “EFI Boot Maintenance Manager” menu, select:
Boot from a File
From the “Boot from a File” menu, select the tape drive’s “Load File” entry :
Load File [Acpi(x,x)/Pci(x|x)/Scsi(Punx,Lunx)]
Wait for the Ignite-UX recovery interface to appear
hardware paths on the slide have been abbreviated slightly for clarity
Student Notes
If a non-mirrored boot disk fails, it may be necessary to restore the boot disk from a
make_tape_recovery backup tape using one of the procedures below.
Integrity servers with newer firmware revisions include native tape boot support from the
EFI boot manager menus. Some older Integrity firmware revisions don’t support booting
directly from a tape drive. On these systems, boot from the install DVD first, then use the
Ignite interface to select your tape drive as your install source. The Ignite-UX Installation
Booting white paper on http://docs.hp.com documents which models and firmware
revisions support each approach.
Booting Directly from a Recovery Tape
On newer systems that support booting directly from a make_tape_recovery tape, follow
the instructions below.
Load the recovery tape in the tape drive, initiate the boot sequence, interrupt the autoboot
process, and access the “Boot Option Maintenance Menu” from the “EFI Boot Manager”
menu.
http://education.hp.com
H3064S J.00
14-45
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
EFI Boot Manager ver 1.10 [14.60]
Please select a boot option
Firmware ver 1.61 [4241]
HP-UX Primary Boot
HP-UX HA Alternate Boot
HP-UX Alternate Boot
EFI Shell [Built-in]
Boot Option Maintenance Menu
Use ^ and v to change option(s). Use Enter to select an option
Default boot selection will be booted in 10 seconds
Select “Boot from a File” from the “EFI Boot Maintenance Manager”.
EFI Boot Maintenance Manager ver 1.10 [14.61]
Main Menu. Select an Operation
Boot from a File
Add a Boot Option
Delete Boot Option(s)
Change Boot Order
Manage BootNext Setting
Set Auto Boot TimeOut
Select Active Console Output Devices
Select Active Console Input Devices
Select Active Standard Error Devices
Cold Reset
Exit
Next, use the arrow keys and Return key to select the tape drive’s EFI hardware path from
the list of potential boot sources. Look for the “Load File” entry that includes a SCSI
hardware path. “Load File” entries that include the string “Mac” represent LAN interface
cards. The “Load File” entry for the “EFI Shell” launches an interactive shell interface that
will be described later in the chapter.
EFI Boot Maintenance Manager ver 1.10 [14.61]
Boot From a File. Select a Volume
IA64_EFI [Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun1,Lun0)/HD(Part1,Si
IA64_EFI [Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun1,Lun0)/HD(Part3,Si
Removable Media Boot [Acpi(HWP0002,0)/Pci(2|0)/Ata(Primary,Maste
Load File [EFI Shell [Built-in]]
Load File [Acpi(HWP0002,100)/Pci(1|1)/Scsi(Pun2,Lun0)]
Load File [Acpi(HWP0002,0)/Pci(3|0)/Mac(00306EF38DBF)]
Load File [Acpi(HWP0002,100)/Pci(2|0)/Mac(00306EF35CDD)]
Exit
H3064S J.00
14-46
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
Watch several screens worth of messages scroll by while the system boots the install kernel
from the tape.
==========================================================================
(C) Copyright 1999-2006 Hewlett-Packard Development Company, L.P.
All rights reserved
HP-UX Boot Loader for IPF -- Revision 2.028
Booting from Tape
Press Any Key to interrupt Autoboot
AUTO ==> boot IINSTALL
Seconds left till autoboot - 10
System Memory = 32738 MB
AUTOBOOTING...
loading section 0
.................................................................... (complete)
loading section 1
.............. (complete)
loading symbol table
loading ram disk file (IINSTALLFS).
................................................................................
......
(complete)
Launching IINSTALL
SIZE: Text:34425K + Data:7099K + BSS:8501K = Total:50026K
Console is on a Serial Device
Booting kernel...
Memory Class Setup
------------------------------------------------------------------------Class
Physmem
Lockmem
Swapmem
------------------------------------------------------------------------System : 32738 MB
32738 MB
32738 MB
Kernel : 32738 MB
32738 MB
32738 MB
User
: 30949 MB
26972 MB
27078 MB
------------------------------------------------------------------------Loaded ACPI revision 2.0 tables.
krs_read_mfs: Error 5 opening MFS.
WARNING: GIO: read_ioconfig_file(): /stand/ioconfig read error.
ioconfig = NULL
NOTICE: cachefs_link(): File system was registered at index 5.
NOTICE: nfs3_link(): File system was registered at index 8.
td: claimed Tachyon XL2 Fibre Channel Mass Storage card at 0/5/1/0
System Console is on the Built-In Serial Interface
iether0: INITIALIZING HP AB352-60003 PCI/PCI-X 1000Base-T Dual-port Core at
hardware path 0/1/2/0
iether1: INITIALIZING HP AB352-60003 PCI/PCI-X 1000Base-T Dual-port Core at
hardware path 0/1/2/1
Swap device table: (start & size given in 512-byte blocks)
entry 0 - auto-configured on root device; ignored - no room
WARNING: no swap device configured, so dump cannot be defaulted to primary swap.
WARNING: No dump devices are configured. Dump is disabled.
Starting the STREAMS daemons-phase 1
execve("/sbin/sh") failed, errno 0xffffffff
execve("/bin/sh") failed, errno 0xffffffff
Create STCP device files
Starting the STREAMS daemons-phase 2
$Revision: vmunix:
B11.23_LR FLAVOR=perf Fri Aug 29 22:35:38 PDT 2003 $
Memory Information:
http://education.hp.com
H3064S J.00
14-47
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
physical page size = 4096 bytes, logical page size = 4096 bytes
Physical: 33524272 Kbytes, lockable: 25499500 Kbytes, available: 29617436
Kbytes
======= 04/09/07 13:02:38 EDT HP-UX Installation Initialization. (Mon Apr 09
13:02:38 EDT 2007)
@(#)Ignite-UX Revision C.6.10.97
@(#)ignite/init (opt) $Revision: 10.526 $ $Date: 2006/06/20 22:26:23 $
version 5 layout
32768 sectors, 32768 blocks of size 1024, log size 1024 blocks
unlimited inodes, largefiles not supported
32768 data blocks, 31672 free data blocks
1 allocation units of 32768 blocks, 32768 data blocks
* Scanning system for IO devices...
* Querying disk device: 0/1/1/0.0.0 ...
* Querying disk device: 0/1/1/0.1.0 ...
* Querying graphics device: 0/0/4/0 ...
Recovery tape created from system: dg46401 on Mon Apr 9 10:32:00 2007
WARNING: The configuration information calls for a non-interactive
installation.
Press <Return/Enter> within 10 seconds to cancel batch-mode
installation:
* Using client directory: /var/opt/ignite/clients/0x0017A451C7D6
* Checking configuration for consistency...
==========================================================================
Note the message above, “Press <Return/Enter> within 10 seconds to cancel
batch-mode installation”. Pressing the [Enter] key during this 10 second interval
provides an opportunity to interact with the familiar Ignite interface shown below. Select
[Install HP-UX]. Otherwise, Ignite proceeds to restore the system to its original
configuration without further interaction with the administrator.
==========================================================================
Welcome to the HP-UX installation/recovery process!
Use the <tab> key to navigate between fields, and the arrow keys
within fields. Use the <return/enter> key to select an item.
Use the <return/enter> or <space-bar> to pop-up a choices list. If the
menus are not clear, select the "Help" item for more information.
Hardware Summary:
System Model: ia64 hp server rx4640
+---------------------+----------------+-------------------+ [ Scan Again ]
| Disks: 2 ( 67.8GB) | Floppies: 0
| LAN cards:
2
|
| CD/DVDs:
1
| Tapes:
1
| Memory:
32738Mb |
| Graphics Ports: 0
| IO Buses: 4
| CPUs:
4
| [ H/W Details ]
+---------------------+----------------+-------------------+
[
[
[
[
Install HP-UX
Run a Recovery Shell
Advanced Options
Read Sys-Admin Message
]
]
]
]
[ Reboot ]
[ Help ]
==========================================================================
On the Media Options screen, select Media only installation.
==========================================================================
H3064S J.00
14-48
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
User Interface and Media Options
This screen lets you pick from options that will determine if an
Ignite-UX server is used, and your user interface preference.
Source Location Options:
[ * ] Media only installation
[
] Media with Network enabled (allows use of SD depots)
[
] Ignite-UX server based installation
User Interface Options:
[
] Guided Installation
(recommended for basic installs)
[ * ] Advanced Installation (recommended for disk and filesystem management)
[
] No user interface - use all the defaults and go
Hint: If you need to make LVM size changes, or want to set the
final networking parameters during the install, you will
need to use the Advanced mode (or remote graphical interface).
==========================================================================
Finally, you should see the Ignite tabbed menu interface. Note, however, that the only
Configuration available is [Recovery Archive]. If you wish you can use the System tab
to change your network parameters, or the File System tab to change your LVM/file
system layout. When you are ready to begin the recovery, press [Go!].
+-------++----------++--------++-------------++----------+
| Basic || Software || System || File System || Advanced |
|
\-------------------------------------------------------+
|
|
| Configurations: [ Recovery Archive ->] [ Description... ]
|
|
|
| Environments:
[ Recovery Archive ->] (HP-UX B.11.31)
|
|
|
| [ Root Disk... ] HP_73.4GST373405LC, 0/1/1/0.1.0, 70007 M
|
|
|
| File System:
[ HP-UX save_config layout ->]
|
|
|
| [ Root Swap (MB)... ] 4096
Physical Memory (RAM) = 4088 MB |
|
|
| [ Languages... ] English [ Keyboards... ] [ Additional... ] |
|
|
+---------------------------------------------------------------+
| [ Show Summary... ]
[ Reset Configuration ]
|
+---------------------------------------------------------------+
| [ Go!
]
[ Cancel ]
[ Help ] |
+---------------------------------------------------------------+
http://education.hp.com
H3064S J.00
14-49
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
Booting a Recovery Tape via the Install DVD
If your server model/firmware combination requires DVD-assisted tape boots, boot from he
install DVD, navigate the initial Ignite menus, and proceed to restore from tape. The
cookbook below describes the process in detail.
After initiating the boot sequence, access the “Boot Option Maintenance Menu”.
EFI Boot Manager ver 1.10 [14.60]
Please select a boot option
Firmware ver 1.61 [4241]
HP-UX Primary Boot
HP-UX HA Alternate Boot
HP-UX Alternate Boot
EFI Shell [Built-in]
Boot Option Maintenance Menu
Use ^ and v to change option(s). Use Enter to select an option
Default boot selection will be booted in 10 seconds
Select “Boot from a File” from the “EFI Boot Maintenance Manager”.
EFI Boot Maintenance Manager ver 1.10 [14.61]
Main Menu. Select an Operation
Boot from a File
Add a Boot Option
Delete Boot Option(s)
Change Boot Order
Manage BootNext Setting
Set Auto Boot TimeOut
Select Active Console Output Devices
Select Active Console Input Devices
Select Active Standard Error Devices
Cold Reset
Exit
Next, use the arrow keys and Return key to select the DVD drive’s EFI hardware path.
Look for the hardware path identified as the “Removable Media Boot” device.
EFI Boot Maintenance Manager ver 1.10 [14.61]
Boot From a File. Select a Volume
IA64_EFI [Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun1,Lun0)/HD(Part1,Si
IA64_EFI [Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun1,Lun0)/HD(Part3,Si
Removable Media Boot [Acpi(HWP0002,0)/Pci(2|0)/Ata(Primary,Maste
Load File [EFI Shell [Built-in]]
Load File [Acpi(HWP0002,100)/Pci(1|1)/Scsi(Pun2,Lun0)]
Load File [Acpi(HWP0002,0)/Pci(3|0)/Mac(00306EF38DBF)]
Load File [Acpi(HWP0002,100)/Pci(2|0)/Mac(00306EF35CDD)]
Exit
H3064S J.00
14-50
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
The install DVD should include an autostart script that automatically launches the
\install.efi install interface. Select a keyboard language when prompted.
====================================================================
In order to use a keyboard on this interface, you must specify
a language mapping which will be used by X windows and
the Internal Terminal Emulator (ITE).
The characters "1234567890" will appear as "!@#$^&*()"
on keyboards that use the shift key to type a number.
Your choice will be stored in the file /etc/kbdlang
1)
3)
5)
7)
9)
11)
13)
15)
17)
19)
21)
23)
25)
27)
USB_PS2_DIN_Belgian
USB_PS2_DIN_Danish
USB_PS2_DIN_Euro_Spanish
USB_PS2_DIN_French
USB_PS2_DIN_German
USB_PS2_DIN_Italian
USB_PS2_DIN_JIS_109
USB_PS2_DIN_Norwegian
USB_PS2_DIN_S_Chinese
USB_PS2_DIN_Swedish_Euro
USB_PS2_DIN_Swiss_German2
USB_PS2_DIN_T_Chinese
USB_PS2_DIN_UK_English_Euro
USB_PS2_DIN_US_English_Euro
2)
4)
6)
8)
10)
12)
14)
16)
18)
20)
22)
24)
26)
USB_PS2_DIN_Belgian_Euro
USB_PS2_DIN_Danish_Euro
USB_PS2_DIN_Euro_Spanish_Euro
USB_PS2_DIN_French_Euro
USB_PS2_DIN_German_Euro
USB_PS2_DIN_Italian_Euro
USB_PS2_DIN_Korean
USB_PS2_DIN_Norwegian_Euro
USB_PS2_DIN_Swedish
USB_PS2_DIN_Swiss_French2_Euro
USB_PS2_DIN_Swiss_German2_Euro
USB_PS2_DIN_UK_English
USB_PS2_DIN_US_English
Enter the number of the language you want: 26
Please confirm your choice by pressing RETURN or enter a new number:
====================================================================
When the Ignite “Welcome” screen appears, click the [Install HP-UX] menu option.
====================================================================
Welcome to Ignite-UX!
Use the <tab> key to navigate between fields, and the arrow keys
within fields. Use the <return/enter> key to select an item.
Use the <return> or <space-bar> to pop-up a choices list. If the
menus are not clear, select the "Help" item for more information.
Hardware Summary:
System Model: ia64 hp server rx4640
+-----------------------------------------------+ [ Scan Again ]
| Disks: 4 (5.8GB)| Floppies: 1 | LAN cards: 2 |
| CDs:
1
| Tapes:
0 | Memory: 2Mb |
| Graphics Ports: 1| IO Buses: 2 |
| [ H/W Details
+-----------------------------------------------+
[
Install HP-UX
]
[
Run a Recovery Shell
]
[
Advanced Options
]
[ Reboot ]
[ Help ]
====================================================================
http://education.hp.com
H3064S J.00
14-51
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
On the Media Options screen, select Media only installation.
====================================================================
User Interface and Media Options
This screen lets you pick from options that will determine if an
Ignite-UX server is used, and your user interface preference.
Source Location Options:
[ * ] Media only installation
[
] Media with Network enabled (allows use of SD depots)
[
] Ignite-UX server based installation
User Interface Options:
[
] Guided Installation
(recommended for basic installs)
[ * ] Advanced Installation (recommended for file system mgmt)
[
] Remote graphical interface running on the Ignite-UX server
Hint: If you need to make LVM size changes, or want to set the
final networking parameters during the install, you will
need to use the Advanced mode (or remote graphical interface).
[
OK
]
[ Cancel ]
[
Help
]
====================================================================
The next screen allows you to specify which media you wish to install from. Select the Boot
from CD/DVD, Recover from Tape option.
====================================================================
Media Installation Selection
This screen provides an option to switch the install source
from the default CD/DVD to a recovery tape. This is helpful
for those systems and for tape devices which do not support
booting from a tape.
[
] CD/DVD Installation
[ * ] Boot from CD/DVD, Recover from Tape
[ OK ]
[ Cancel ]
[ Help ]
====================================================================
If you have multiple tape drives, you’ll have to specify which tape you want to boot from on
the Tape Drive Selection screen. Note that Ignite reports the tape drive paths using the
traditional HP-UX hardware addressing scheme.
====================================================================
Tape Drive Selection
There are one or more tape drives detected on the system. Insert
your recovery tape into one of the drives then select that drive
from the list below.
H3064S J.00
14-52
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
Use the <tab> and/or arrow keys to move to the desired TAPE device,
then press <Return/Enter> to select.
HW Path
Device File
Description
----------------------------------------------------------------[0/1/1/1.4.0
/dev/rmt/0m
COMPAQ_SDLT320
]
====================================================================
Finally, you should see the Ignite tabbed menu interface. Note, however, that the only
Configuration available is [Recovery Archive]. If you wish you can use the System tab
to change your network parameters, or the File System tab to change your LVM/file
system layout. When you are ready to begin the recovery, press [Go!].
+-------++----------++--------++-------------++----------+
| Basic || Software || System || File System || Advanced |
|
\-------------------------------------------------------+
|
|
| Configurations: [ Recovery Archive ->] [ Description... ]
|
|
|
| Environments:
[ Recovery Archive ->] (HP-UX B.11.31)
|
|
|
| [ Root Disk... ] HP_73.4GST373405LC, 0/1/1/0.1.0, 70007 M
|
|
|
| File System:
[ HP-UX save_config layout ->]
|
|
|
| [ Root Swap (MB)... ] 4096
Physical Memory (RAM) = 4088 MB |
|
|
| [ Languages... ] English [ Keyboards... ] [ Additional... ] |
|
|
+---------------------------------------------------------------+
| [ Show Summary... ]
[ Reset Configuration ]
|
+---------------------------------------------------------------+
| [ Go!
]
[ Cancel ]
[ Help ] |
+---------------------------------------------------------------+
http://education.hp.com
H3064S J.00
14-53
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
14–21. SLIDE: Managing the Boot Menu and Boot Settings
Managing the Boot Menu and Boot Settings
• Use this procedure to add/remove devices on the EFI Boot Manager menu
POST/PAL/SAL
EFI Boot Manager
From the “EFI Boot Manager” menu, select:
Boot Option Maintenance Menu
From the “EFI Boot Maintenance Manager” menu, select one of the following:
Add a Boot Option
Delete Boot Option(s)
Change Boot Order
Manage BootNext Setting
Set Auto Boot TimeOut
Answer the questions that follow and be sure to save changes to NVRAM!
Student Notes
The administrator can always boot an arbitrary boot device via the boot manager’s “Boot
from a File” option, but doing so requires multiple steps. Adding a device to the main “EFI
Boot Manager” menu allows the administrator to boot the device directly from the main
menu. The cookbook below describes the process required to add and remove boot menu
items. These procedures vary somewhat from firmware revision to firmware revision.
Adding a Device to the EFI Boot Manager Menu
To add a new device to the boot menu, access the “Boot Option Maintenance Menu” from the
“EFI Boot Manager” menu.
EFI Boot Manager ver 1.10 [14.60]
Please select a boot option
Firmware ver 1.61 [4241]
HP-UX Primary Boot
HP-UX HA Alternate Boot
HP-UX Alternate Boot
EFI Shell [Built-in]
H3064S J.00
14-54
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
Boot Option Maintenance Menu
Use ^ and v to change option(s). Use Enter to select an option
Default boot selection will be booted in 10 seconds
Select “Add a Boot Option” from the “EFI Boot Maintenance Manager”.
EFI Boot Maintenance Manager ver 1.10 [14.61]
Main Menu. Select an Operation
Boot from a File
Add a Boot Option
Delete Boot Option(s)
Change Boot Order
Manage BootNext Setting
Set Auto Boot TimeOut
Select Active Console Output Devices
Select Active Console Input Devices
Select Active Standard Error Devices
Cold Reset
Exit
Select the device or partition to be added to the boot menu.
EFI Boot Maintenance Manager ver 1.10 [14.61]
Add a Boot Option. Select a Volume
IA64_EFI [Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun1,Lun0)/HD(Part1,Si
IA64_EFI [Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun1,Lun0)/HD(Part3,Si
Removable Media Boot [Acpi(HWP0002,0)/Pci(2|0)/Ata(Primary,Maste
Load File [EFI Shell [Built-in]]
Load File [Acpi(HWP0002,100)/Pci(1|1)/Scsi(Pun2,Lun0)]
Load File [Acpi(HWP0002,0)/Pci(3|0)/Mac(00306EF38DBF)]
Load File [Acpi(HWP0002,100)/Pci(2|0)/Mac(00306EF35CDD)]
Exit
After selecting the desired device, select the path name of the device’s kernel loader. On HPUX boot disks, select \efi\hpux\hpux.efi.
EFI Boot Maintenance Manager ver 1.10 [14.61]
Select file or change to new directory:
06/18/07 12:13p <DIR>
4,096 EFI
[Treat like Removable Media Boot]
Exit
EFI Boot Maintenance Manager ver 1.10 [14.61]
Select file or change to new directory:
06/18/07 12:13p <DIR>
4,096 .
06/18/07 12:13p <DIR>
0 ..
06/18/07 12:13p <DIR>
4,096 HPUX
06/18/07 12:13p <DIR>
4,096 Intel_Firmware
http://education.hp.com
H3064S J.00
14-55
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
06/18/07
06/18/07
06/18/07
Exit
12:13p <DIR>
12:13p <DIR>
12:13p <DIR>
4,096 DIAG
4,096 HP
4,096 TOOLS
EFI Boot Maintenance Manager ver 1.10 [14.61]
Select file or change to new directory:
06/18/07 12:13p <DIR>
4,096 .
06/18/07 12:13p <DIR>
4,096 ..
06/18/07 12:13p
644,703 HPUX.EFI
06/18/07 12:13p
24,576 NBP.EFI
Exit
Specify whether you wish to add a new menu item, or edit an existing menu item.
Enter a menu item description to display in the main menu.
Enter “n” when asked if you wish to configure a boot option.
Confirm that the data should be saved to NVRAM.
Edit Existing Boot Option or make a new entry [E-Edit N-New]: n
Enter New Description: My Custom Boot Option
Enter BootOption Data Type [A-Ascii U-Unicode N-No BootOption]: n
Save changes to NVRAM [Y-Yes N-No]: y
Exit back to the main menu.
Removing a Device from the EFI Boot Manager Menu
To remove a device from the boot menu, access the “Boot Option Maintenance Menu” from
the “EFI Boot Manager” menu.
EFI Boot Manager ver 1.10 [14.60]
Please select a boot option
Firmware ver 1.61 [4241]
HP-UX Primary Boot
HP-UX HA Alternate Boot
HP-UX Alternate Boot
EFI Shell [Built-in]
Boot Option Maintenance Menu
Use ^ and v to change option(s). Use Enter to select an option
Default boot selection will be booted in 10 seconds
Select “Delete Boot Option(s)” from the “EFI Boot Maintenance Manager”.
EFI Boot Maintenance Manager ver 1.10 [14.61]
Main Menu. Select an Operation
Boot from a File
Add a Boot Option
Delete Boot Option(s)
Change Boot Order
Manage BootNext Setting
H3064S J.00
14-56
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
Set Auto Boot
Select Active
Select Active
Select Active
Cold Reset
Exit
TimeOut
Console Output Devices
Console Input Devices
Standard Error Devices
Use the arrow keys and [d] key to select the boot options to be removed. Confirm the
selection.
EFI Boot Maintenance Manager ver 1.10 [14.61]
Delete Boot Option(s). Hot Keys:
- 'ENTER', 'D', or 'd' to delete highlighted option
- 'A' or 'a' to delete all options
HP-UX Primary Boot
HP-UX HA Alternate Boot
HP-UX Alternate Boot
EFI Shell [Built-in]
My Custom Boot Option
Delete All Boot Options
Save Settings to NVRAM
Help
Exit
Delete selected Boot Option [Y-Yes N-No]: y
Repeat if desired. Be sure to select “Save Settings to NVRAM” before exiting the menu.
EFI Boot Maintenance Manager ver 1.10 [14.61]
Delete Boot Option(s). Hot Keys:
- 'ENTER', 'D', or 'd' to delete highlighted option
- 'A' or 'a' to delete all options
HP-UX Primary Boot: 1/0/0/3/0.6.0
EFI Shell [Built-in]
Delete All Boot Options
Save Settings to NVRAM
Help
Exit
NVRAM Not updated. Save NVRAM? [Y to save, N to ignore] y
http://education.hp.com
H3064S J.00
14-57
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
Other Options on the EFI Boot Maintenance Manager Menu
Other options on the “EFI Boot Maintenance Manager” menu may be used to change the
sequence of the boot menu items, select a device to be used during the next system reboot,
change the autoboot time out period, and configure boot console devices.
EFI Boot Maintenance Manager ver 1.10 [14.61]
Main Menu. Select an Operation
Boot from a File
Add a Boot Option
Delete Boot Option(s)
Change Boot Order
Manage BootNext Setting
Set Auto Boot TimeOut
Select Active Console Output Devices
Select Active Console Input Devices
Select Active Standard Error Devices
Cold Reset
Exit
H3064S J.00
14-58
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
14–22. SLIDE: Managing Console Settings
Managing Console Settings
• Use this procedure to select the EFI console device when first installing a system
POST/PAL/SAL
EFI Boot Manager
From the “EFI Boot Manager” menu, select:
Boot Option Maintenance Menu
From the
Select
Select
Select
“EFI Boot
Active
Active
Active
Maintenance Manager” menu, select one of the following:
Console Output Devices
Console Input Devices
Standard Error Devices
Answer the questions that follow and be sure to save changes to NVRAM!
Student Notes
Because Integrity server system consoles can be configured a number of different ways,
choosing the right configuration can be complicated.
To specify your system’s console path, interrupt the EFI autoboot process, and access the
“Boot Option Maintenance Menu”.
EFI Boot Manager ver 1.10 [14.60]
Please select a boot option
Firmware ver 1.61 [4241]
HP-UX Primary Boot
HP-UX HA Alternate Boot
HP-UX Alternate Boot
EFI Shell [Built-in]
Boot Option Maintenance Menu
Use ^ and v to change option(s). Use Enter to select an option
Default boot selection will be booted in 10 seconds
http://education.hp.com
H3064S J.00
14-59
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
Select “Select Active Console Output Devices” from the “EFI Boot Maintenance Manager”.
EFI Boot Maintenance Manager ver 1.10 [14.61]
Main Menu. Select an Operation
Boot from a File
Add a Boot Option
Delete Boot Option(s)
Change Boot Order
Manage BootNext Setting
Set Auto Boot TimeOut
Select Active Console Output Devices
Select Active Console Input Devices
Select Active Standard Error Devices
Cold Reset
Exit
A sample console output selection screen is shown below. Be sure to select exactly one
device and save your selection before exiting the menu. After specifying the input, output,
and error devices, use the MP:CM> rs command to reset the system or partition to make the
changes take effect.
EFI Boot Maintenance Manager ver 1.10 [14.61]
Select the Console Output Device(s)
Acpi(PNP0501,0)/Uart(9600 N81)/VenMsg(PcAnsi)
Acpi(PNP0501,0)/Uart(9600 N81)/VenMsg(Vt100)
Acpi(PNP0501,0)/Uart(9600 N81)/VenMsg(Vt100+)
Acpi(PNP0501,0)/Uart(9600 N81)/VenMsg(VtUtf8)
Acpi(HWP0002,700)/Pci(1|1)/Uart(9600 N81)/VenMsg(PcAnsi)
Acpi(HWP0002,700)/Pci(1|1)/Uart(9600 N81)/VenMsg(Vt100)
* Acpi(HWP0002,700)/Pci(1|1)/Uart(9600 N81)/VenMsg(Vt100+)
Acpi(HWP0002,700)/Pci(1|1)/Uart(9600 N81)/VenMsg(VtUtf8)
Acpi(HWP0002,700)/Pci(2|0)
Save Settings to NVRAM
Exit
The next section explains how to interpret the options presented on the console selection
screen.
Console Options on Cell-Based Servers
On cell-based systems, the decision is fairly straight-forward. Since cell-based systems
typically don’t have VGA graphic console ports, and mirror the Core I/O console output to the
Management Processor, you will typically see a single console hardware path representing
the MP, which is accessible via several different terminal emulation modes. Terminal
emulation modes will be described later in the notes for this slide.
The sample menu below shows an Integrity Superdome server that is configured for console
connectivity via a VT102 or greater terminal emulator connected to the Management
Processor serial or LAN console ports. All four menu options would allow access via the MP
serial or LAN console ports; only the terminal emulation mode varies.
H3064S J.00
14-60
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
EFI Boot Maintenance Manager ver 1.10 [14.61]
Select the Console Output Device(s)
Acpi(000222F0,200)/Pci(0|0)/Uart(9600 N81)/VenMsg(PcAnsi)
Acpi(000222F0,200)/Pci(0|0)/Uart(9600 N81)/VenMsg(Vt100)
* Acpi(000222F0,200)/Pci(0|0)/Uart(9600 N81)/VenMsg(Vt100+)
Acpi(000222F0,200)/Pci(0|0)/Uart(9600 N81)/VenMsg(VtUtf8)
Save Settings to NVRAM
Exit
Console Options on Non-Cell-Based Servers
On non-cell-based systems, console selection is a bit more complicated. The rx2600, for
instance, has several independent console ports.
•
A VGA console port;
•
An MP LAN console port;
•
A 25-pin MP port, which may be simultaneously connected to a serial console, remote
support modem, and UPS unit via a three-way “W” cable; and
•
A 9-pin console output port, which may be used in conjunction with a USB keyboard and
mouse.
Most HP-UX administrators access the console interface via the MP serial or LAN console
ports. In order to enable these ports, select the console selection menu item whose hardware
path references both “PCI” and the “Universal Asynchronous Receiver-Transmitter (UART)”.
Console Device
MP LAN and 25-pin serial port
9-pin console output port
VGA console port
Includes “PCI” in path?
Yes
No
Yes
Includes “UART” in path?
Yes
Yes
No
The sample menu below shows an rx2600 server that is configured for console connectivity
via a VT102 or greater terminal emulator connected to the Management Processor serial or
LAN console ports.
EFI Boot Maintenance Manager ver 1.10 [14.61]
Select the Console Output Device(s)
Acpi(PNP0501,0)/Uart(9600 N81)/VenMsg(PcAnsi)
Acpi(PNP0501,0)/Uart(9600 N81)/VenMsg(Vt100)
Acpi(PNP0501,0)/Uart(9600 N81)/VenMsg(Vt100+)
Acpi(PNP0501,0)/Uart(9600 N81)/VenMsg(VtUtf8)
Acpi(HWP0002,700)/Pci(1|1)/Uart(9600 N81)/VenMsg(PcAnsi)
Acpi(HWP0002,700)/Pci(1|1)/Uart(9600 N81)/VenMsg(Vt100)
* Acpi(HWP0002,700)/Pci(1|1)/Uart(9600 N81)/VenMsg(Vt100+)
Acpi(HWP0002,700)/Pci(1|1)/Uart(9600 N81)/VenMsg(VtUtf8)
Acpi(HWP0002,700)/Pci(2|0)
http://education.hp.com
H3064S J.00
14-61
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
Terminal Emulators
If you connect to the MP LAN or serial console, you must also choose a terminal emulation
mode to match the terminal emulator you use to access the console interface. Many
terminal/telnet client emulators support a vt102 or similar emulation mode; in this case,
choose the VenMsg(Vt100+) emulation mode on the EFI console configuration screen.
H3064S J.00
14-62
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
14–23. SLIDE: Interacting with the EFI Shell
Interacting with the EFI Shell
The EFI shell provides a shell-like interface from which the administrator can:
• Boot from arbitrary boot devices
• Configure EFI boot settings
• Execute arbitrary EFI utilities and executables
• Create and execute EFI shell scripts
• Navigate, manipulate, and edit FAT32 directories and files
POST/PAL/SAL
EFI Boot Manager
From the EFI Boot Manager screen, select:
EFI Shell (Built-in)
Interact with the EFI shell
Shell> help –b
Shell> help –a –b
Shell> exit
Shell> reset
Get general EFI shell help
Get a list of all EFI shell commands
Return to the EFI boot mgr or
Reset the system
Student Notes
The EFI boot manager menus provide an intuitive menu interface for selecting boot devices.
The EFI firmware also provides a command line shell interface that offers much greater
flexibility.
The EFI shell provides a rich command set for managing files and directories in EFI
partitions, managing EFI and boot manager settings, storing and accessing variables. It even
provides looping and branching functionality! For a complete list of EFI shell commands, see
the EFI shell command reference guide at http://www.intel.com/software/
products/college/efishell/images/efi_shell_cmnd_1_1.pdf.
The built-in shell commands may be supplemented by custom EFI shell scripts, and binary
executables built using Intel’s EFI byte code compiler.
http://education.hp.com
H3064S J.00
14-63
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
Accessing and Leaving the EFI Shell
To access the EFI shell, interrupt the EFI autoboot process, and select the EFI shell option
from the boot manager menu. The shell will automatically display a list of potential boot
devices, run the startup.nsh shell startup script from the default boot disk, and display a
Shell> prompt.
EFI Boot Manager ver 1.10 [14.60] Firmware ver 1.61 [4241]
Please select a boot option
HP-UX Primary Boot
HP-UX Alternate Boot
EFI Shell [Built-in]
Boot option maintenance menu
Security/Password Menu
Loading.: Built-in EFI Shell
EFI Shell version 1.10 [14.60]
Device mapping table
fs0 : Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun1,Lun0)/HD(Part1,SigB)
fs1 : Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun1,Lun0)/HD(Part3,SigB)
blk0 : Acpi(HWP0002,0)/Pci(2|0)/Ata(Primary,Master)
blk1 : Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun0,Lun0)
blk2 : Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun1,Lun0)
blk3 : Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun1,Lun0)/HD(Part1,SigB)
blk4 : Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun1,Lun0)/HD(Part2,SigB)
blk5 : Acpi(HWP0002,100)/Pci(1|0)/Scsi(Pun1,Lun0)/HD(Part3,SigB8)
startup.nsh> echo -off
setting hpux path(\EFI\HPUX)...
type 'fs[x]:' where x is your bootdisk (0, 1, 2...)
type 'hpux' to start hpux bootloader
Shell>
Use the help command to list and learn more about commands available from the shell.
1. Use help -b to view general EFI shell information
2. Use help –a -b to view a list of all commands
3. Use help command to learn more about a specific command
To return to the boot manager menu, simply type exit at the EFI shell prompt.
Shell> exit
To reboot the system from the EFI shell, type reset.
Shell> reset
H3064S J.00
14-64
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
EFI Shell Built-Ins
Intel specifies a core set of built-in EFI shell commands, which should be available on all
vendors’ Itanium 2-based systems. These commands are designed primarily to view, access,
and manage EFI partitions, and load and run other EFI programs. The following list of built-in
EFI shell is excerpted from Intel’s EFI Shell Command Reference, which is available online at
http://www.intel.com/software/products/college/efishell/images/efi_sh
ell_cmnd_1_1.pdf. You can also type help command at the EFI shell prompt to view
more detailed syntax descriptions.
alias
attrib
bcfg
break
cd
child
cls
comp
connect
cp
date
dblk
dh
disconnect
dmem
dmpstore
echo
edit
EfiCompress
EfiDecompress
err
exit
for/endfor
getmtc
goto
guid
help
hexedit
if/endif
load
LoadPciRom
ls
map
memmap
mkdir
mm
mode
mount
Displays, creates, or deletes aliases in the EFI shell
Displays or changes the attributes of files or directories
Displays/modifies the driver/boot configuration
Executes a debugger break point
Displays or changes the current directory
Displays the device tree starting at a handle
Clears the standard output with an optional background color
Compares the contents of two files
Binds an EFI driver to a device and starts the driver
Copies one or more files/directories to another location
Displays the current date or sets the date in the system
Displays the contents of blocks from a block device
Displays the handles in the EFI environment
Disconnects one or more drivers from a device
Displays the contents of memory
Displays all NVRAM variables
Displays messages or turns command echoing on or off
Edits an ASCII or UNICODE file in full screen.
Compress a file
Decompress a file
Displays or changes the error level
Exits the EFI Shell
Executes commands for each item in a set of items
Displays the current monotonic counter value
Makes batch file execution jump to another location
Displays all the GUIDs in the EFI environment
Displays commands list or verbose help of a command
Edits with hex mode in full screen
Executes commands in specified conditions
Loads EFI drivers
Loads a PCI Option ROM image from a file
Displays a list of files and subdirectories in a directory
Displays or defines mappings
Displays the memory map
Creates one or more directories
Displays or modifies MEM/IO/PCI
Displays or changes the mode of the console output device
Mounts a file system on a block device
http://education.hp.com
H3064S J.00
14-65
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
mv
OpenInfo
pause
pci
reset
rm
set
setsize
stall
time
touch
type
unload
ver
Moves one or more files/directories to destination
Displays the protocols on a handle and the agents
Prints a message and suspends for keyboard input
Displays PCI devices or PCI function configuration space
Resets the system
Deletes one or more files or directories
Displays, creates, changes or deletes EFI environment variables
Sets the size of a file
Stalls the processor for some microseconds
Displays the current time or sets the time of the system
Sets the time and date of a file to the current time and date
Displays the contents of a file
Unloads a protocol image
Displays the version information
Pre-OS System Startup Environment (POSSE) Commands
HP Integrity servers include a number of additional firmware-based EFI commands that
approximate the functionality provided by the PARISC BCH menus and assist in
troubleshooting situations. These commands are only available on HP’s Integrity servers.
The list below provides a brief description of the POSSE commands that are included in the
initial EFI release; for a full description of each command, type help command at the EFI
shell prompt.
autoboot
baud
boottest
cpuconfig
devices
devtree
drivers
drvcfg
drvdiag
errdump
esiproc
hexedit
info
lanaddress
lanboot
monarch
optload
PalProc
pdt
SalProc
tftp
Verbose
vol
xchar
View or set autoboot timeout variable
Set serial port com settings
Set/View BootTest bits
Deconfigure or reconfigure cpus
Displays the list of devices being managed by EFI drivers
Displays the tree of devices that follow the EFI Driver Model
Displays the list of drivers that follow the EFI Driver Model
Invokes the Driver Configuration Protocol
Invokes the Driver Diagnostics Protocol
View/Clear logs
Make an ESI call
Edits with hex mode in full screen mode
Display hardware information
Display core I/O MAC address
Performs boot over lan from EFI Shell
View or set the monarch processor
Lists all optional ROM-based efi drivers and applications
Make a PAL call.
View or set pdt
Make a SAL call
TFTP to a bootp/dhcp enabled unix boot server
Controls progress output on console
Displays volume information of the file system
Turn on/off extended character features
H3064S J.00
14-66
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
EFI Binaries
Intel also sells a C compiler and library product that allows vendors and developers to write
and compile their own EFI binaries. These binaries are typically stored in the EFI partition
on disk and are identified by .efi file extensions. Several EFI binaries are included on HP’s
Integrity systems. Here are a few of the EFI programs you might encounter while using HPUX:
\efi\hpux\hpux.efi
\install.efi
\efi\boot\launchmenu.efi
\efi\hp\tools\network\ifconfig.efi
\efi\hp\tools\network\ping.efi
\efi\hp\tools\network\route.efi
\efi\hp\tools\network\tcpipv4.efi
\efi\hp\tools\network\ftp.efi
The HP-UX kernel loader
The install menu utility on DVDs
e-Diagnostics menu utility
Similar to standard UNIX ifconfig
Similar to standard UNIX ping
Similar to standard UNIX route
TCP/IP drivers
Similar to standard UNIX ftp
EFI Shell Scripts
The EFI also supports a scripting language for batch mode processing. The EFI scripting
language supports, loops, branches, variables, I/O redirection, and many other features found
in other scripting languages. The Intel EFI reference guide at
http://www.intel.com/software/products/college/efishell/images/efi_s
hell_cmnd_1_1.pdf. describes the script syntax and commands in detail.
EFI scripts always include a .nsh extension, and are usually stored in the EFI system
partition on disk. There are two EFI scripts that are included on HP’s Integrity servers.
\efi\hp\tools\network\inet.nsh
Script that may be modified to configure a LAN interface card’s IP address and routing
table without booting HP-UX
\startup.nsh
Script that executes automatically when the EFI shell is launched.
Executing EFI Shell Commands and Getting Help
The EFI shell provides a simple, yet powerful interface for executing commands.
•
In order to execute an EFI command, just type the command name
o
o
o
o
•
File extensions may be omitted
Full pathnames aren’t required if the EFI path variable is set properly
Commands are not case-sensitive
Most internal commands support a –b option to view one screen at a time
The EFI supports several UNIX-like shell features
o
o
o
Use the arrow keys for editing and command line recall
Use *, ?, and [] for filename generation
Use >, >>, 2>, and 2>> for output and error redirection
http://education.hp.com
H3064S J.00
14-67
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
•
Use the help command to learn more about EFI commands
o
o
o
Use help –a to view a list of all commands
Use help command to learn more about a specific command
Use help bch to view EFI equivalents for familiar BCH commands
About the EFI Shell PATH Variable
Much like the UNIX shell, the EFI shell searches directories in a path variable to find
executables. You can view or modify the contents of EFI shell variables (including path) via
the EFI shell set command.
Shell> set path \efi\hpux
Shell> set
path : .;\efi\hpux
H3064S J.00
14-68
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
14–24. SLIDE: Interacting with the hpux.efi OS Loader
Interacting with the hpux.efi OS Loader
From the hpux OS loader, you can select an alternate kernel or mode
POST/PAL/SAL
EFI Boot Manager
hpux.efi
HP-UX Boot Loader for IA64 Revision 1.71
Press Any Key to interrupt Autoboot
\EFI\HPUX\AUTO ==> boot vmunix
Seconds left till autoboot – 10
HPUX> help –d
Get help
HPUX> ll
List the contents of the /stand directory
HPUX> showauto
Show the contents of the \efi\hpux\auto file
HPUX> setauto “boot vmunix”
Change the contents of the \efi\hpux\auto file
HPUX> boot vmunix
Boot vmunix to multi-user mode
HPUX> boot vmunix –is
Boot to single-user mode
HPUX> boot vmunix –lq
Boot without checking quorum
HPUX> boot vmunix –lm
Boot to LVM maintenance mode
HPUX> boot vmunix –tm
Boot to tunable maintenance mode
HPUX> boot vmunix nproc=4000 Boot using a kernel parameter override
HPUX> exit or reset
Exit boot loader or reset
Student Notes
After you select an HP-UX boot device to boot, the EFI loads and runs the
\efi\hpux\hpux.efi OS loader. If the selected boot device contains an
\efi\hpux\auto file, hpux.efi reads this file to determine which kernel to load, and
which mode to boot. You should see a message similar to the following:
HP-UX Boot Loader for IPF -- Revision 1.73
Press Any Key to interrupt Autoboot
\EFI\HPUX\AUTO ==> boot vmunix
Seconds left till autoboot - 10
Type 'help' for help
After 10 seconds, hpux.efi automatically boots the system based on the contents of the
auto file.
http://education.hp.com
H3064S J.00
14-69
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
If there is no auto file, or if you interrupt the autoboot sequence by pressing Escape, you
will find yourself at an HPUX> prompt. At this point, you can manually interact with the
kernel loader. The commands available at the HP-UX OS loader prompt are similar to the
options on the PARISC hpux command. The most common commands are listed below. For
more information, type help at the HPUX> prompt.
HPUX>
HPUX>
HPUX>
HPUX>
HPUX>
HPUX>
HPUX>
HPUX>
HPUX>
HPUX>
NOTE:
ll
showauto
boot backup
boot vmunix
boot vmunix
boot vmunix
boot vmunix
boot vmunix
boot vmunix
exit
–is
–lq
–lm
–tm
nproc=4000
List contents of /stand
View contents of the \efi\hpux\auto file
Boot the backup kernel
Boot vmunix to multi-user mode
Boot to single-user mode
Boot without checking LVM quorum
Boot to LVM maintenance mode
Boot to tunable maintenance mode
Boot using a kernel override (11i v3 only)
Return to the EFI boot manager
Backup kernels, tunable maintenance mode, and kernel overrides will be
described in detail in the kernel tuning module later in the course.
H3064S J.00
14-70
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
14–25. SLIDE: For Further Study
For Further Study
• Intel offers a number of free and for-fee EFI related courses.
Look for the Extensible Firmware Interface course section on
https://shale.intel.com/SoftwareCollege/CourseCatalog.asp
• Read the EFI shell documentation at
http://www.intel.com/software/products/college/efishell/images/efi
_shell_cmnd_1_1.pdf
• HP’s HP System Partitions Guide on http://docs.hp.com includes a chapter on booting
and resetting partitions on both HP-UX 11iv1 and HP-UX 11iv2
• For HP-UX command syntax descriptions and options, see the HP-UX online man pages.
• For EFI command syntax descriptions and options, access the EFI help screens by typing
help at the Shell> prompt
• To learn more about the HP Service Partition visit:
http://docs.hp.com/hpux/onlinedocs/diag/ode/ode_ediag.htm
Student Notes
Several resources are available if you wish to learn more about the EFI.
Intel offers a number of free and for-fee EFI related courses and documentation resources on
their website. Look for the Extensible Firmware Interface section on
https://shale.intel.com/SoftwareCollege/CourseCatalog.asp.
To learn more about the EFI shell, read the EFI shell documentation at
http://www.intel.com/software/products/college/efishell/images/efi_s
hell_cmnd_1_1.pdf.
HP’s HP System Partitions Guide Administration for nPartitions on
http://docs.hp.com includes a chapter on booting and resetting node partitions.
http://education.hp.com
H3064S J.00
14-71
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
For HP-UX command syntax descriptions and options, see the HP-UX online man pages. The
following man pages are particularly relevant:
boot(1m)
efi(4)
efi_cp(1m)
efi_fsinit(1m)
efi_ls(1m)
efi_mkdir(1m)
efi_rm(1m)
efi_rmdir(1m)
hpux.efi(1m)
idisk(1m)
ioscan(1m)
insf(1m)
lvm(7)
mkboot(1m)
setboot(1m)
For EFI and POSSE command syntax descriptions and options, access the EFI help screens
by typing help at the Shell> prompt.
To learn more about the HP Service Partition visit:
http://docs.hp.com/en/diag/ode/ipf_ode_over.htm
H3064S J.00
14-72
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
14–26. LAB: Booting Integrity Servers
Directions
Carefully follow the instructions below.
Part 1: Preliminary Steps
A portion of this lab requires you to interact with the EFI and HPUX interfaces, which can
only be accomplished via a console login. If you are using remote lab equipment, access your
system’s console interface via the MP.
Part 2: Shutting Down the System
1. Currently, your system should be in multi-user mode. Note which file systems are
mounted, and how many processes are running.
2. Shut down to single-user mode. Then check to see what processes and mounted file
systems remain. What differences do you see between single- and multi-user modes?
3. From single-user mode, take your machine down to the halt state. What can you do in the
halt state? Why might it be necessary to take your system down to the halt state?
# reboot –h
4. Reset your server. On some models, you can use the MP rs command to reset the system
from the halt state. On other models, it may be necessary to power on the system via the
MP pc command. Return to the console interface and get ready to press any key to
interrupt the autoboot sequence.
http://education.hp.com
H3064S J.00
14-73
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
Part 3: Interacting with the EFI Boot Manager
1. If you didn’t already do so in the previous part of the lab, reboot your system and
interrupt the EFI autoboot process.
2. Boot from the primary boot disk. However, as soon as the HPUX kernel loader count
down begins, press any key to drop out to the HPUX> kernel loader prompt.
3. At the HPUX> prompt, type exit to return to the “EFI Boot Manager” menu.
4. You should be back at the “EFI Boot Manager” menu now.
Select the “Boot Option Maintenance Menu” option.
5. Select the “Boot from a File” option on the “Boot Option Maintenance Menu”.
Review the list of devices available in the menu.
a. How many EFI partitioned disks are available on the “Boot from a File” menu?
b. Is there a DVD drive?
c. Is there a tape drive that supports tape boot?
d. Are there any LAN interfaces?
H3064S J.00
14-74
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
6. Use the “Boot from a File” menu to manually boot the \efi\hpux\hpux.efi kernel
loader from partition 1 on the default boot disk. However, as soon as the HPUX kernel
loader count down begins, press any key to drop out to the HPUX> kernel loader prompt.
7. At the HPUX> prompt, type exit to return to the “Boot from a File” menu.
Exit out of this menu to return to the “EFI Boot Maintenance Manager”.
8. Select the “Add a Boot Option” menu item.
9. Add a custom entry to the “EFI Boot Manager Menu” that boots the
\efi\hpux\hpux.efi kernel loader from partition 1 on the existing boot disk. Label
the menu option “My Boot Disk”, in ASCII format. Save the change to NVRAM and exit
back to the main menu.
10. Return to the “EFI Boot Manager Menu” and verify that your custom menu item appears
in the boot menu list.
11. Select the new menu item to see if it boots. When you see the HPUX kernel loader
autoboot timer appear, press any key to interrupt the kernel loader autoboot.
http://education.hp.com
H3064S J.00
14-75
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
12. At the HPUX> prompt, type exit to return to the “EFI Boot Manager Menu”.
13. Use the “Boot Option Maintenance Menu” to remove the custom boot menu item that you
just added.
14. Return to the “EFI Boot Manager” main menu and launch the “EFI Shell”.
15. Execute help –a -b to view a list of available EFI Shell commands.
16. Execute help –b info to learn about the info command.
17. Execute the info –b all command to view your system’s configuration.
18. Exit the EFI shell.
H3064S J.00
14-76
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
Part 4: Interacting with the HPUX kernel loader
In this part of the lab, you will have a chance to explore the HPUX kernel loader.
1. From the “EFI Boot Manager”, boot the primary boot disk.
Interrupt the HPUX autoboot sequence to access the HPUX> prompt.
2. Type help command to view a list of commands available at the HPUX> prompt.
3. Which command can you use to list the kernels available in /stand? Try it!
4. Which command can you use to view the contents of the auto file? What is the purpose
of the auto file?
5. Do whatever is necessary to boot vmunix to single-user mode.
http://education.hp.com
H3064S J.00
14-77
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
6. Did the system prompt you for a password when you were brought to single-user mode?
When might this be helpful?
7. Reboot your system again, but this time let it boot unattended using the default boot disk
and kernel.
H3064S J.00
14-78
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
Part 5: (Optional) Cookbook: Mirroring the Integrity Boot Disk
Many administrators choose to mirror the boot disk to ensure that the failure of a single
interface or controller card doesn’t jeopardize a system’s availability. The last few parts of
the lab walk you through the process required to mirror an Integrity boot disk. In the
cookbook that follows, diska represents the primary boot disk and diskb represents the
boot disk mirror. Your instructor will tell you which disk is currently configured as your boot
disk, and which should be added as a mirror. Record the disk device file names below.
diska =
____________________
(primary boot disk)
diskb =
____________________
(boot disk mirror)
1. First, verify that the disk you intend to use as a mirror isn’t already listed as a member of
a of another volume group in /etc/lvmtab.
# strings /etc/lvmtab
a. If the disk isn’t listed in the /etc/lvmtab file, assume that the disk is currently
unassigned, and proceed to the next step in the lab.
b. If the disk is listed under volume group /dev/vg00, return to question (1) and use
ioscan to choose a different disk.
c. If the disk is listed under any volume group other than /dev/vg00, remove the
volume group use the following shortcut:
Determine if there are any mounted file systems in the volume group.
# mount –v
If the volume group contains any mounted file systems, unmount them.
# umount /data
Deactivate and export the volume group
# vgchange –a n vgnn # replace vgnn with your volume group name
# vgexport vgnn
Run strings /etc/lvmtab again to verify that the disk is no longer a member of
an active volume group.
# strings /etc/lvmtab
http://education.hp.com
H3064S J.00
14-79
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
2. Create the system, OS, and service partitions with the HP-UX idisk command. Allocate
500MB for the EFI system partition, 400MB for the HPSP partition, and all the remaining
space for the OS partition. Replace diskb in the command below with your new mirror’s
block device file name. Then execute idisk without the –i option to view the new
partition table.
# vi /tmp/pdf
3
EFI 500MB
HPUX 100%
HPSP 400MB
# idisk –wf /tmp/pdf /dev/rdisk/diskb
# idisk /dev/rdisk/diskb
3. Create device files for the new partitions. ioscan should report block and raw
diskb_p1, diskb_p2, and diskb_p3 device files for the new boot mirror.
# insf –eC disk
# ioscan –fun /dev/dsk/cxtxdx
# ioscan –m lun /dev/disk/diskb
H3064S J.00
14-80
© 2010 Hewlett-Packard Development Company, L.P.
11i v1 and v2
11i v3
http://education.hp.com
Module 14
Booting Integrity Systems
Part 6: (Optional) Configuring the Mirror’s System Partition
After you create the partition table, you can initialize and populate the EFI system partition.
1. Populate the /efi/hpux/ directory in the new EFI system partition with the mkboot
command. This command copies the hpux.efi boot loader and other files to the system
partition. Then verify your work. Standard UNIX commands such as ls can’t read the
FAT32 file system in the system partition. Use the efi_ls command instead.
# mkboot –e –l /dev/rdisk/diskb
# efi_ls –d /dev/rdisk/diskb_p1 /efi/hpux/
2. By default, the LVM “quorum” rules require at least 51% of the disks in vg00 to be
available at boot time. However, we want our system when just 50% of the mirrors in
vg00 are available. Thus, we must disable the default quorum check by changing the
auto file boot string to boot vmunix –lq on both disks. Use the mkboot command to
modify the file on both disks.
# mkboot –a “boot vmunix –lq” /dev/rdisk/diska
# mkboot –a “boot vmunix –lq” /dev/rdisk/diskb
Verify your work. Standard UNIX commands such as cat and more can’t access files in
FAT32 file systems. Instead, use the efi_cp command to copy the auto file from the
system partition to your terminal device, /dev/tty. Repeat for both mirrors.
# efi_cp –d /dev/rdisk/diska_p1 –u /efi/hpux/auto /dev/tty
# efi_cp –d /dev/rdisk/diskb_p1 –u /efi/hpux/auto /dev/tty
http://education.hp.com
H3064S J.00
14-81
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
Part 7: (Optional) Configuring the Mirror’s OS Partition
Next, configure the OS partition. Recall that the OS partition is essentially an encapsulated
LVM boot disk.
1. Initialize and add the new OS partition to vg00. Be sure to specify p2, the OS partition!
Verify your work with vgdisplay –v.
# pvcreate –fB /dev/rdisk/diskb_p2
# vgextend vg00 /dev/disk/diskb_p2
# vgdisplay –v vg00
2. Mirror all vg00 logical volumes. If your vg00 has non-default logical volume names, you
may need to manually lvextend each logical volume. Verify that the disk was added to
vg00, and that the logical volumes are synchronized. The LV Status field for each
logical volume should report syncd.
# for lv in /dev/vg00/lvol*
do
lvextend –m 1 $lv
done
# vgdisplay –v vg00
3. Use lvlnboot –R to update and verify the BDRA pointers to the new volume mirrors.
Then execute lvlnboot –v to verify your work. You should see references to both
disks in the boot, root, and swap portions of the output.
# lvlnboot –R
# lvlnboot -v
4. Add a line to /stand/bootconf so SDUX knows which disks are boot disks. When
patches are swinstall’ed for LIF area utilities, SDUX consults /stand/bootconf to
determine which disks have LIF areas that might need to be patched. Be sure to specify
p2, the OS partition!
# vi /stand/bootconf
l /dev/disk/diska_p2
l /dev/disk/diskb_p2
H3064S J.00
14-82
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
Part 8: (Optional) Add the Mirrored Boot Disk to the EFI Boot
Manager Menu
Finally, add the new mirrored disk to the EFI boot manager menu. This ensures that the EFI
will automatically attempt to boot the mirrored boot disk if the primary boot disk fails.
1. Determine hardware path of the new mirror.
# ioscan –fun /dev/dsk/c2t2d2
# ioscan –m lun /dev/disk/diskb
11i v1 and v2
11i v3
2. Update stable storage so your new mirror is listed as the high availability alternate boot
disk. You can do this via the EFI, but we’ll use the HP-UX setboot command instead to
avoid rebooting. setboot –p defines the primary boot path. setboot –h defines the
high availability alternate boot path. setboot –a defines the alternate boot path. In 11i
v3, setboot accepts either a legacy hardware path, or a lunpath hardware path. Define
the hardware path obtained in the previous step as the high availability alternate boot
path. Then execute setboot without any options to verify the contents of stable
storage.
# setboot -h 0/0/10/0/0.0xa.0x0
# setboot
http://education.hp.com
use your mirrored disk’s hw path here
H3064S J.00
14-83
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
Part 9: (Optional) Booting from the Mirrored Boot Disk
After you complete the mirroring process, it is a good idea to verify your work by booting
from the new mirror.
1. Initiate the boot sequence.
# shutdown –ry 0
2. When the EFI boot manager screen appears, use the arrow keys to select and boot your
alternate boot disk.
EFI Boot Manager ver 1.10 [14.60] Firmware ver 1.61 [4241]
Please select a boot option
HP-UX Primary Boot
HP-UX Alternate Boot
EFI Shell [Built-in]
3. Verify which disk you booted from when the boot process completes.
# grep “Boot device’s HP-UX HW path” /var/adm/syslog/syslog.log
vmunix: Boot device's HP-UX HW path is: 0.0.0.0.1.0
H3064S J.00
14-84
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
Part 10: (Optional) Remove the Boot Mirror
Your instructor may tell you to remove your boot disk. If so, do this portion of the lab.
1. Unmirror the boot disk.
# for lv in /dev/vg00/lvol*
do
lvreduce –m 0 $lv
done
2. Remove the boot disk mirror from the volume group.
# vgreduce vg00 /dev/disk/diskb_p2 # use your disk device file name
3. Remove the LVM headers from the OS Partition.
# pvremove /dev/rdisk/diskb_p2
4. Remove the EFI partition device files.
# rmsf /dev/*disk/diskb_p*
5. Update the BDRA.
# lvlnboot –R
6. Return the AUTO file contents on the remaining boot disk to boot vmunix. Verify your
work.
# mkboot –a “boot vmunix” /dev/rdisk/diska
7. Remove the mirror from /stand/bootconf .
# vi /stand/bootconf
l /dev/disk/diska
l /dev/disk/diskb
8. Reboot using the primary boot disk.
# cd /
# shutdown –ry 0
http://education.hp.com
H3064S J.00
14-85
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
14–27. LAB SOLUTIONS: Booting Integrity Servers
Directions
Carefully follow the instructions below.
Part 1: Preliminary Steps
A portion of this lab requires you to interact with the EFI and HPUX interfaces, which can
only be accomplished via a console login. If you are using remote lab equipment, access your
system’s console interface via the MP.
Part 2: Shutting Down the System
1. Currently, your system should be in multi-user mode. Note which file systems are
mounted, and how many processes are running.
Answer:
# mount –v
# ps -ef | wc –l
2. Shut down to single-user mode. Then check to see what processes and mounted file
systems remain. What differences do you see between single- and multi-user modes?
Answer:
#
#
#
#
cd /
shutdown -y 0
mount –v
ps -ef | more
There are few file systems mounted in single-user mode, and few processes running.
Single-user mode is a good place to do kernel configuration, file system maintenance with
fsck, and other maintenance activities that require a quiet system.
3. From single-user mode, take your machine down to the halt state. What can you do in the
halt state? Why might it be necessary to take your system down to the halt state?
# reboot –h
Answer:
Nothing is running in the halt state, and no logins are possible. It is necessary to bring the
system to a halt state before powering off the system to install new peripherals and
interface cards.
H3064S J.00
14-86
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
4. Reset your server. On some models, you can use the MP rs command to reset the system
from the halt state. On other models, it may be necessary to power on the system via the
MP pc command. Return to the console interface and get ready to press any key to
interrupt the autoboot sequence.
Answer:
# ^b
MP> cm
MP:CM> rs or pc
MP:CM> ma
MP> co
http://education.hp.com
H3064S J.00
14-87
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
Part 3: Interacting with the EFI Boot Manager
1. If you didn’t already do so in the previous part of the lab, reboot your system and
interrupt the EFI autoboot process.
Answer:
At this point, you should see the EFI boot manager menu:
EFI Boot Manager ver 1.10 [14.60] Firmware ver 1.61 [4241]
Please select a boot option
HP-UX Primary Boot
EFI Shell [Built-in]
Boot Option Maintenance Menu
Security/Password Menu
2. Boot from the primary boot disk. However, as soon as the HPUX kernel loader count
down begins, press any key to drop out to the HPUX> kernel loader prompt.
Answer:
EFI Boot Manager ver 1.10 [14.60] Firmware ver 1.61 [4241]
Please select a boot option
HP-UX Primary Boot
EFI Shell [Built-in]
Boot Option Maintenance Menu
Security/Password Menu
3. At the HPUX> prompt, type exit to return to the “EFI Boot Manager” menu.
Answer:
HPUX> exit
4. You should be back at the “EFI Boot Manager” menu now.
Select the “Boot Option Maintenance Menu” option.
Answer:
EFI Boot Manager ver 1.10 [14.60] Firmware ver 1.61 [4241]
Please select a boot option
HP-UX Primary Boot
EFI Shell [Built-in]
Boot Option Maintenance Menu
Security/Password Menu
H3064S J.00
14-88
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
5. Select the “Boot from a File” option on the “Boot Option Maintenance Menu”.
Review the list of devices available in the menu.
a. How many EFI partitioned disks are available on the “Boot from a File” menu?
b. Is there a DVD drive?
c. Is there a tape drive that supports tape boot?
d. Are there any LAN interfaces?
Answer:
EFI Boot Maintenance Manager ver 1.10 [14.61]
Main Menu. Select an Operation
Boot from a File
Add a Boot Option
Delete Boot Option(s)
Change Boot Order
Manage BootNext Setting
Set Auto Boot TimeOut
Select Active Console Output Devices
Select Active Console Input Devices
Select Active Standard Error Devices
Cold Reset
Exit
Available hardware will vary from system to system.
There should be at least one disk with a system partition. Look for a device whose
hardware path includes “Part1” (partition 1).
If there is a DVD drive, it should be prefixed with the string “Removable Media”.
If there is a tape drive, it should be prefixed with the string “Load File” and should
include a SCSI component in the hardware path.
If there is a LAN interface on the same subnet as an Ignite-UX install server, there should
be “Load File” entry that includes the string “Mac” in the hardware path.
http://education.hp.com
H3064S J.00
14-89
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
6. Use the “Boot from a File” menu to manually boot the \efi\hpux\hpux.efi kernel
loader from partition 1 on the default boot disk. However, as soon as the HPUX kernel
loader count down begins, press any key to drop out to the HPUX> kernel loader prompt.
Answer:
EFI Boot Maintenance Manager ver 1.10 [14.61
Main Menu. Select an Operation
Boot from a File
Add a Boot Option
Delete Boot Option(s)
Change Boot Order
Manage BootNext Setting
Set Auto Boot TimeOut
Select Active Console Output Devices
Select Active Console Input Devices
Select Active Standard Error Devices
Cold Reset
Exit
Select the boot disk hardware path that contains “Part1”.
Use the prompts that follow to select \efi\hpux\hpux.efi.
Press any key to interrupt the HPUX autoboot sequence.
HP-UX Boot Loader for IA64 Revision 1.71
Press Any Key to interrupt Autoboot
\EFI\HPUX\AUTO ==> boot vmunix
Seconds left till autoboot – 10 Escape
Type 'help' for help
7. At the HPUX> prompt, type exit to return to the “Boot from a File” menu.
Exit out of this menu to return to the “EFI Boot Maintenance Manager”.
Answer:
HPUX> exit
EFI Boot Maintenance Manager ver 1.10 [14.61
Main Menu. Select an Operation
Boot from a File
Add a Boot Option
Delete Boot Option(s)
Change Boot Order
Manage BootNext Setting
Set Auto Boot TimeOut
Select Active Console Output Devices
Select Active Console Input Devices
Select Active Standard Error Devices
Cold Reset
Exit
H3064S J.00
14-90
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
8. Select the “Add a Boot Option” menu item.
Answer:
EFI Boot Maintenance Manager ver 1.10 [14.61]
Main Menu. Select an Operation
Boot from a File
Add a Boot Option
Delete Boot Option(s)
Change Boot Order
Manage BootNext Setting
Set Auto Boot TimeOut
Select Active Console Output Devices
Select Active Console Input Devices
Select Active Standard Error Devices
Cold Reset
Exit
9. Add a custom entry to the “EFI Boot Manager Menu” that boots the
\efi\hpux\hpux.efi kernel loader from partition 1 on the existing boot disk. Label
the menu option “My Boot Disk”, in ASCII format. Save the change to NVRAM and exit
back to the main menu.
Answer:
Select the device that includes the string “Part1“in the hardware path.
Select \efi\hpux\hpux.efi.
Add the selected device as a “New” boot menu item.
Enter “My Boot Disk” as the Description.
Select “No Boot Option”.
Exit back to the main menu.
10. Return to the “EFI Boot Manager Menu” and verify that your custom menu item appears
in the boot menu list.
Answer:
The main menu should look like this:
EFI Boot Manager ver 1.10 [14.60] Firmware ver 1.61 [4241]
Please select a boot option
HP-UX Primary Boot
EFI Shell [Built-in]
My Boot Disk
Boot option maintenance menu
Security/Password Menu
http://education.hp.com
H3064S J.00
14-91
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
11. Select the new menu item to see if it boots. When you see the HPUX kernel loader
autoboot timer appear, press any key to interrupt the kernel loader autoboot.
Answer:
The main menu should look like this:
EFI Boot Manager ver 1.10 [14.60] Firmware ver 1.61 [4241]
Please select a boot option
HP-UX Primary Boot
EFI Shell [Built-in]
My Boot Disk
Boot option maintenance menu
Security/Password Menu
12. At the HPUX> prompt, type exit to return to the “EFI Boot Manager Menu”.
Answer:
HPUX> exit
13. Use the “Boot Option Maintenance Menu” to remove the custom boot menu item that you
just added.
Answer:
EFI Boot Maintenance Manager ver 1.10 [14.61]
Main Menu. Select an Operation
Boot from a File
Add a Boot Option
Delete Boot Option(s)
Change Boot Order
Manage BootNext Setting
Set Auto Boot TimeOut
Select Active Console Output Devices
Select Active Console Input Devices
Select Active Standard Error Devices
Cold Reset
Exit
Follow the prompts to remove the new custom menu item.
Save your change to NVRAM.
H3064S J.00
14-92
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
14. Return to the “EFI Boot Manager” main menu and launch the “EFI Shell”.
Answer:
EFI Boot Manager ver 1.10 [14.60] Firmware ver 1.61 [4241]
Please select a boot option
HP-UX Primary Boot
EFI Shell [Built-in]
Boot Option Maintenance Menu
Security/Password Menu
15. Execute help –a -b to view a list of available EFI Shell commands.
Answer:
Shell> help –a –b
16. Execute help –b info to learn about the info command.
Answer:
Shell> help –b info
17. Execute the info –b all command to view your system’s configuration.
Answer:
Shell> info –b all
18. Exit the EFI shell.
Answer:
Shell> exit
http://education.hp.com
H3064S J.00
14-93
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
Part 4: Interacting with the HPUX kernel loader
In this part of the lab, you will have a chance to explore the HPUX kernel loader.
1. From the “EFI Boot Manager”, boot the primary boot disk.
Interrupt the HPUX autoboot sequence to access the HPUX> prompt.
Answer:
EFI Boot Manager ver 1.10 [14.60] Firmware ver 1.61 [4241]
Please select a boot option
HP-UX Primary Boot
EFI Shell [Built-in]
Boot Option Maintenance Menu
Security/Password Menu
HP-UX Boot Loader for IA64 Revision 1.71
Press Any Key to interrupt Autoboot
\EFI\HPUX\AUTO ==> boot vmunix
Seconds left till autoboot – 10 Escape
Type 'help' for help
2. Type help command to view a list of commands available at the HPUX> prompt.
Answer:
HPUX> help
3. Which command can you use to list the kernels available in /stand? Try it!
Answer:
HPUX> ll
4. Which command can you use to view the contents of the auto file? What is the purpose
of the auto file?
Answer:
HPUX> showauto
The auto file determines the default boot string.
5. Do whatever is necessary to boot vmunix to single-user mode.
Answer:
HPUX> boot vmunix –is
H3064S J.00
14-94
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
6. Did the system prompt you for a password when you were brought to single-user mode?
When might this be helpful?
Answer:
By default, single-user mode does not prompt for a password. The administrator is
automatically logged in as root. This may be useful if the administrator forgets the root
password.
7. Reboot your system again, but this time let it boot unattended using the default boot disk
and kernel.
Answer:
# reboot
http://education.hp.com
H3064S J.00
14-95
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
Part 5: (Optional) Cookbook: Mirroring the Integrity Boot Disk
Many administrators choose to mirror the boot disk to ensure that the failure of a single
interface or controller card doesn’t jeopardize a system’s availability. The last few parts of
the lab walk you through the process required to mirror an Integrity boot disk. In the
cookbook that follows, diska represents the primary boot disk and diskb represents the
boot disk mirror. Your instructor will tell you which disk is currently configured as your boot
disk, and which should be added as a mirror. Record the disk device file names below.
diska =
____________________
(primary boot disk)
diskb =
____________________
(boot disk mirror)
1. First, verify that the disk you intend to use as a mirror isn’t already listed as a member of
a of another volume group in /etc/lvmtab.
# strings /etc/lvmtab
a. If the disk isn’t listed in the /etc/lvmtab file, assume that the disk is currently
unassigned, and proceed to the next step in the lab.
b. If the disk is listed under volume group /dev/vg00, return to question (1) and use
ioscan to choose a different disk.
c. If the disk is listed under any volume group other than /dev/vg00, remove the
volume group use the following shortcut:
Determine if there are any mounted file systems in the volume group.
# mount –v
If the volume group contains any mounted file systems, unmount them.
# umount /data
Deactivate and export the volume group
# vgchange –a n vgnn # replace vgnn with your volume group name
# vgexport vgnn
Run strings /etc/lvmtab again to verify that the disk is no longer a member of
an active volume group.
# strings /etc/lvmtab
H3064S J.00
14-96
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
2. Create the system, OS, and service partitions with the HP-UX idisk command. Allocate
500MB for the EFI system partition, 400MB for the HPSP partition, and all the remaining
space for the OS partition. Replace diskb in the command below with your new mirror’s
block device file name. Then execute idisk without the –i option to view the new
partition table.
# vi /tmp/pdf
3
EFI 500MB
HPUX 100%
HPSP 400MB
# idisk –wf /tmp/pdf /dev/rdisk/diskb
# idisk /dev/rdisk/diskb
3. Create device files for the new partitions. ioscan should report block and raw
diskb_p1, diskb_p2, and diskb_p3 device files for the new boot mirror.
# insf –eC disk
# ioscan –fun /dev/dsk/cxtxdx
# ioscan –m lun /dev/disk/diskb
http://education.hp.com
11i v1 and v2
11i v3
H3064S J.00
14-97
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
Part 6: (Optional) Configuring the Mirror’s System Partition
After you create the partition table, you can initialize and populate the EFI system partition.
1. Populate the /efi/hpux/ directory in the new EFI system partition with the mkboot
command. This command copies the hpux.efi boot loader and other files to the system
partition. Then verify your work. Standard UNIX commands such as ls can’t read the
FAT32 file system in the system partition. Use the efi_ls command instead.
# mkboot –e –l /dev/rdisk/diskb
# efi_ls –d /dev/rdisk/diskb_p1 /efi/hpux/
2. By default, the LVM “quorum” rules require at least 51% of the disks in vg00 to be
available at boot time. However, we want our system when just 50% of the mirrors in
vg00 are available. Thus, we must disable the default quorum check by changing the
auto file boot string to boot vmunix –lq on both disks. Use the mkboot command to
modify the file on both disks.
# mkboot –a “boot vmunix –lq” /dev/rdisk/diska
# mkboot –a “boot vmunix –lq” /dev/rdisk/diskb
Verify your work. Standard UNIX commands such as cat and more can’t access files in
FAT32 file systems. Instead, use the efi_cp command to copy the auto file from the
system partition to your terminal device, /dev/tty. Repeat for both mirrors.
# efi_cp –d /dev/rdisk/diska_p1 –u /efi/hpux/auto /dev/tty
# efi_cp –d /dev/rdisk/diskb_p1 –u /efi/hpux/auto /dev/tty
H3064S J.00
14-98
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 14
Booting Integrity Systems
Part 7: (Optional) Configuring the Mirror’s OS Partition
Next, configure the OS partition. Recall that the OS partition is essentially an encapsulated
LVM boot disk.
1. Initialize and add the new OS partition to vg00. Be sure to specify p2, the OS partition!
Verify your work with vgdisplay –v.
# pvcreate –fB /dev/rdisk/diskb_p2
# vgextend vg00 /dev/disk/diskb_p2
# vgdisplay –v vg00
2. Mirror all vg00 logical volumes. If your vg00 has non-default logical volume names, you
may need to manually lvextend each logical volume. Verify that the disk was added to
vg00, and that the logical volumes are synchronized. The LV Status field for each
logical volume should report syncd.
# for lv in /dev/vg00/lvol*
do
lvextend –m 1 $lv
done
# vgdisplay –v vg00
3. Use lvlnboot –R to update and verify the BDRA pointers to the new volume mirrors.
Then execute lvlnboot –v to verify your work. You should see references to both
disks in the boot, root, and swap portions of the output.
# lvlnboot –R
# lvlnboot -v
4. Add a line to /stand/bootconf so SDUX knows which disks are boot disks. When
patches are swinstall’ed for LIF area utilities, SDUX consults /stand/bootconf to
determine which disks have LIF areas that might need to be patched. Be sure to specify
p2, the OS partition!
# vi /stand/bootconf
l /dev/disk/diska_p2
l /dev/disk/diskb_p2
http://education.hp.com
H3064S J.00
14-99
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
Part 8: (Optional) Add the Mirrored Boot Disk to the EFI Boot
Manager Menu
Finally, add the new mirrored disk to the EFI boot manager menu. This ensures that the EFI
will automatically attempt to boot the mirrored boot disk if the primary boot disk fails.
1. Determine hardware path of the new mirror.
# ioscan –fun /dev/dsk/c2t2d2
# ioscan –m lun /dev/disk/diskb
11i v1 and v2
11i v3
2. Update stable storage so your new mirror is listed as the high availability alternate boot
disk. You can do this via the EFI, but we’ll use the HP-UX setboot command instead to
avoid rebooting. setboot –p defines the primary boot path. setboot –h defines the
high availability alternate boot path. setboot –a defines the alternate boot path. In 11i
v3, setboot accepts either a legacy hardware path, or a lunpath hardware path. Define
the hardware path obtained in the previous step as the high availability alternate boot
path. Then execute setboot without any options to verify the contents of stable
storage.
# setboot -h 0/0/10/0/0.0xa.0x0
# setboot
H3064S J.00
14-100
© 2010 Hewlett-Packard Development Company, L.P.
use your mirrored disk’s hw path here
http://education.hp.com
Module 14
Booting Integrity Systems
Part 9: (Optional) Booting from the Mirrored Boot Disk
After you complete the mirroring process, it is a good idea to verify your work by booting
from the new mirror.
1. Initiate the boot sequence.
# shutdown –ry 0
2. When the EFI boot manager screen appears, use the arrow keys to select and boot your
alternate boot disk.
EFI Boot Manager ver 1.10 [14.60] Firmware ver 1.61 [4241]
Please select a boot option
HP-UX Primary Boot
HP-UX Alternate Boot
EFI Shell [Built-in]
3. Verify which disk you booted from when the boot process completes.
# grep “Boot device’s HP-UX HW path” /var/adm/syslog/syslog.log
vmunix: Boot device's HP-UX HW path is: 0.0.0.0.1.0
http://education.hp.com
H3064S J.00
14-101
© 2010 Hewlett-Packard Development Company, L.P.
Module 14
Booting Integrity Systems
Part 10: (Optional) Remove the Boot Mirror
Your instructor may tell you to remove your boot disk. If so, do this portion of the lab.
1. Unmirror the boot disk.
# for lv in /dev/vg00/lvol*
do
lvreduce –m 0 $lv
done
2. Remove the boot disk mirror from the volume group.
# vgreduce vg00 /dev/disk/diskb_p2 # use your disk device file name
3. Remove the LVM headers from the OS Partition.
# pvremove /dev/rdisk/diskb_p2
4. Remove the EFI partition device files.
# rmsf /dev/*disk/diskb_p*
5. Update the BDRA.
# lvlnboot –R
6. Return the AUTO file contents on the remaining boot disk to boot vmunix. Verify your
work.
# mkboot –a “boot vmunix” /dev/rdisk/diska
7. Remove the mirror from /stand/bootconf .
# vi /stand/bootconf
l /dev/disk/diska
l /dev/disk/diskb
8. Reboot using the primary boot disk.
# cd /
# shutdown –ry 0
H3064S J.00
14-102
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15 — Configuring the HP-UX Kernel
Objectives
Upon completion of this module, you will be able to do the following:
•
Describe the purpose of named kernel configurations.
•
Describe the purpose of kernel modules.
•
Configure the 11i v2 and v3 kernel via the CLI.
•
View, import, export, load, and save kernel configurations with kconfig.
•
Manage kernel modules with kcmodule.
•
Manage kernel module tunables with kctune.
•
Manage kernel module tunables with tuneserver.
•
Monitor kernel resource usage with kcusage.
•
Configure kernel resource alarms with kcalarm.
•
View the kernel change log with kclog.
•
Boot from an alternate kernel.
•
Boot to tunable maintenance mode.
•
Boot using override tunable parameters.
http://education.hp.com
H3064S J.00
15-1
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
15–1. SLIDE: Why Reconfigure the Kernel?
Why Reconfigure the Kernel?
Tuning the HP-UX kernel allows you to customize your kernel configuration
to meet the needs of the devices, applications, and users on your system.
Q: ioscan says that
my new Fibre Channel
interface card is UNCLAIMED.
What should I do?
Q: My database needs
access to more shared
memory segments.
What should I do?
A: Add a fibre channel
driver module!
A: Tune a kernel
parameter!
Student Notes
HP-UX systems are used for many purposes. Low-end desktop workstations are often used
to run single-user desktop applications, while high-end servers may be used to run enterprise
database applications with thousands of concurrent user connections. In order to ensure
that your system provides maximum performance, it may be necessary to “tune” the kernel to
match your users’ and applications needs.
H3064S J.00
15-2
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
Driver
Modules
Kernel drivers contain the code that the kernel requires to communicate
with interface cards, devices, and other hardware components. When
you add a new device or interface card to your system, you may need to
add a driver to the kernel. Conversely, if you remove a device or
interface card, it may be beneficial to remove the associated driver from
the kernel to save space in RAM.
Subsystem
Modules
HP-UX includes several subsystems that may be managed by the system
administrator to add or remove system functionality. The lvm module
allows the kernel to configure and use logical volumes. The cdfs
module allows the kernel to access CDFS file systems. These are a
couple of the most commonly used kernel subsystems that you may
choose to configure.
Tunable
Kernel
Parameters
Tunable kernel parameters affect the behavior of the system as well as
the size of the kernel. Many kernel table sizes are determined by system
parameters. For example, the maximum number of concurrent processes
is determined by the size of the process table. The system parameter
nproc determines the size of the process table. Extreme care should be
taken when modifying system parameters. Oftentimes, when installing
software, such as databases, the software vendor will advise you to
modify system parameters in order for their product to function properly.
http://education.hp.com
H3064S J.00
15-3
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
15–2. SLIDE: Part 1: Managing Kernel Configurations
Configuring the
HP-UX Kernel
Part 1: Managing Kernel Configurations
Student Notes
The next part of the chapter discusses HP-UX 11i v2 and v3 kernel configurations. After a
brief review of some key concepts, we will consider the commands required to view, modify,
apply, and copy kernel configurations.
H3064S J.00
15-4
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
15–3. SLIDE: Kernel Configuration Concept
Kernel Configuration Concept
• In 11i v1, the kernel consisted of several independently managed files
• Now, administrators manage “kernel configurations” rather than independent files
• Each configuration contains a collection of modules, tunables, and other settings
• Each configuration is assigned a name and is stored in a subdirectory under /stand
• Configurations can be applied, tuned, exported, and imported as a unit
Sample Kernel Configurations
/stand/current
• modules
• tunables
/stand/webserver
• modules
• tunables
/stand/database
• modules
• tunables
Student Notes
In earlier versions of HP-UX, the kernel consisted of several independently managed files and
directories:
/stand/vmunix
/stand/system
/stand/dlkm/
Contained the static kernel executable
Contained as ASCII description of the kernel contents
Contained dynamically loadable kernel module files
Now, administrators manage “kernel configurations” rather than independent files. This
approach simplifies administration, and minimizes the potential for error.
•
Each configuration contains a collection of modules, parameters, and other settings
•
Each configuration is assigned a name and is stored in a subdirectory under /stand.
The subdirectory name serves as the kernel configuration’s name. The system depicted
on the slide above has three kernel configurations.
•
Configurations can be applied, tuned, exported, and imported as a unit.
http://education.hp.com
H3064S J.00
15-5
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
15–4. SLIDE: Special Kernel Configurations
Special Kernel Configurations
HP-UX automatically maintains several special kernel configurations
Configuration
Description
/stand/current/
The configuration for the currently running kernel
/stand/backup/
Copy of the current configuration prior to changes
/stand/nextboot/
Link to the configuration to be used at the next boot
/stand/last_install/
Kernel configuration originally installed with OS
/stand/crashconfig/
Automatically created after any crash dump
There are also two special files in /stand:
• /stand/vmunix is a link to /stand/current/vmunix
• /stand/system is a link to /stand/nextboot/system
Student Notes
Several kernel configurations are automatically created and maintained by the system.
Kernel Configuration
/stand/current/
Purpose
This directory defines the configuration of the currently
running kernel. By default, all kernel changes that can be
made dynamically are applied to this configuration.
/stand/backup/
Before the administrator makes any changes to the current
kernel configuration, HP-UX copies the existing kernel
configuration to this directory. If you modify the kernel
and discover that the new configuration doesn’t work, you
can boot using this backup configuration.
H3064S J.00
15-6
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
Kernel Configuration
/stand/nextboot/
Purpose
If the administrator makes changes to static kernel
modules or parameters, or if the administrator specifically
requests that changes be held until next boot, those
changes are recorded in the nextboot configuration.
During the next system reboot, the nextboot
configuration becomes the current configuration.
/stand/last_install/
This is a backup of the kernel configuration that was
created during the last OS install.
/stand/crashconfig/
On rare occasions, serious defects in the operating system
or system hardware may cause the system to “panic”.
When a panic occurs, the kernel copies the contents of
physical memory to the system dump devices specified by
the administrator, then reboots. The kernel configuration,
as it existed at the time of the crash, is also copied to
/stand/crashconfig/.
There are also two special files in the /stand directory.
•
/stand/vmunix is a link to /stand/current/vmunix, the static executable image
for the current kernel. This file should never be manually renamed or moved. Always
use the kc* commands to modify the running kernel!
•
/stand/system is a link to /stand/nextboot/system, which contains an ASCII list
of the modules and kernel parameters included in the kernel configuration.
Kernel Configuration Directory Contents
Each kernel configuration has a dedicated directory under /stand. The files in the kernel
configuration directory determine the kernel configuration’s features and functionality.
Configuration
/stand/configname/README
Description
A README file reminding system administrators
that they shouldn’t modify any file in this
directory.
/stand/configname/.config
A flag file, marking this as a directory containing a
kernel configuration. Also used as a lock file for
the configuration.
/stand/configname/bootfs/
Contains a /stand/current/ directory, under
which are symbolic links to the .config file, krs
files, and those module object files that
correspond to modules capable of loading during
kernel boot. The OS loader uses this directory to
populate the RAM file system used during the boot
process.
http://education.hp.com
H3064S J.00
15-7
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
Configuration
/stand/configname/mod/
Description
Contains the module object files and preparation
scripts for each kernel module used by the
configuration (i.e., in a state other than unused).
The module object files are named with the
module name (no extension). The kc* commands
invoke the preparation scripts before and after
loading and unloading a module. The scripts are
named modulename.prep.
/stand/configname/krs/
Contains the kernel registry files for the kernel
configuration.
/stand/configname/config.kr
s.lkg/
Contains a “last known good “ backup copy of the
kernel registry files as they existed following the
last successful boot.
/stand/configname/system
Contains an ASCII list of the modules and tunable
parameters included in the kernel. As in earlier
releases of HP-UX, system files may be manually
edited. However, it is much safer to modify the
kernel via the kc* commands.
/stand/configname/vmunix
The kernel executable used with this kernel
configuration.
vmunix, module object files, and preparation scripts are often shared between configuration
directories using hard links.
WARNING
The files in these directories should only be modified by the kc*
kernel configuration commands never manipulate or edit these files
directly.
H3064S J.00
15-8
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
15–5. SLIDE: Kernel Configuration Command Overview
Kernel Configuration Command Overview
Kernel configurations may be managed via the kconfig command
Command/Option
Description
kconfig
Display a list of available configurations
kconfig –v
Display a verbose list of available configurations
kconfig –a conf
Display the contents of a configuration
kconfig –r conf newconf
Rename a configuration
kconfig –c conf newconf
Copy a configuration
kconfig –d conf
Delete a configuration
kconfig –s conf
Save a copy of the running configuration
kconfig –l conf
Load a configuration into the running kernel
kconfig –n conf
Select a configuration for use after next boot
kconfig –e conf /tmp/system
Create a system file from a configuration
kconfig –i conf /tmp/system
Create a configuration from a system file
kconfig –t conf “for oracle”
Assign a title to a configuration
kconfig –D
View a list of pending changes
Student Notes
kconfig is the preferred command for configuring and managing HP-UX kernel
configurations. The command supports a host of options for copying, deleting, saving, and
loading kernel configurations. The table below describes the most common options.
Command
kconfig –v
kconfig –a conf
http://education.hp.com
Description
List available configurations.
Display the contents of a configuration. Lists
all of the modules and tunables1 in the named
configuration. If no configuration is
specified, the command displays the
contents of the running kernel.
H3064S J.00
15-9
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
Command
kconfig –r conf newconf
kconfig –c conf newconf
kconfig –d conf
kconfig –s conf
kconfig –l conf
kconfig –n conf
kconfig –e conf /tmp/system
kconfig –i conf /tmp/system
Description
Rename a configuration.
Copy a configuration. Particularly useful to
make a backup copy of a configuration
before making changes.
Delete a configuration.
Save a copy of the running configuration.
Load a configuration into the running kernel,
overwriting any changes that were being held
for next boot. If all of the changes required
by the new configuration may be applied
immediately, the configuration is applied
immediately. However, if the new
configuration impacts any static tunables or
modules, the configuration won't be applied
until the next reboot.
Select a configuration for use after next boot.
The configuration specified here will be used
as the current kernel the next time the
system reboots.
Create (export) a system file from a
configuration. The resulting system file
contains an ASCII list of the modules and
tunables in the named configuration. This
file can be copied, imported, and loaded on
another host to propagate a kernel
configuration to multiple machines.
If no configuration is specified, the currently
running kernel configuration will be
exported, including any changes to it that are
being held for next boot.
Create (import) a configuration from a
system file. To apply/load the newly
imported configuration, run kconfig –l.
kconfig –t conf “for new myapp”
Assign a title to a configuration. The title
appears in the kconfig –v output.
kconfig –D
Display any changes that are pending the
next system reboot.
You can also include the –C “comment” option on any kconfig command if you want to
document your actions in the /var/adm/kc.log file.
H3064S J.00
15-10
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
15–6. SLIDE: Example: Modifying the Current Configuration
Example: Modifying the Current Configuration
• By default, kcmodule and kctune immediately attempt to modify the running kernel
• Changes to static modules and tunables will be saved until the next reboot
• Changes to non-static modules and tunables may be “held” until nextboot, too, via -h
Save a copy of the current configuration before making changes (Optional)
# kconfig –s BeforeChanges
Modify modules and tunables immediately, or include –h to “hold” changes until next boot
# kcmodule [-h] …
# kctune [-h] …
Review the new configuration
# kconfig –a
Check for pending changes
# kconfig -D
Student Notes
The next few slides walk through some common kernel configuration scenarios. This slide
explains how to modify the configuration of the currently running kernel.
1. Save a copy of the current configuration before making changes. The kc* commands
automatically create a /stand/backup/ every time you modify the kernel. However,
booting this backup configuration only allows you to reverse the most recent change. If
you make several successive changes, only the most recent change will be reversed if you
boot the backup kernel. If you plan to make multiple changes, it’s a good idea to save a
copy of the kernel before proceeding.
# kconfig –s OldConfig
http://education.hp.com
H3064S J.00
15-11
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
2. Modify modules and tunables. Changes to static tunables and modules will take effect
after the next reboot. By default, changes to dynamically loadable kernel modules and
dynamically tunable kernel parameters take effect immediately. To “hold” changes until
the next boot, include the –h option on kcmodule and kctune. The syntax for these
commands will be discussed in detail later in the chapter.
# kcmodule [-h] …
# kctune [-h] …
3. Review the new configuration. –a shows the current configuration, including any
modules and tunables that were changed immediately.
# kconfig –a
4. Check for pending changes with kconfig -D. Many kernel modules and tunables are
dynamic. However, if you used –h to “hold” changes, or if you modified static tunables or
modules, those changes won’t take effect until your next reboot.
# kconfig -D
H3064S J.00
15-12
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
15–7. SLIDE: Example: Creating a Named Configuration
Example: Creating a Named Configuration
• Rather than modify the current kernel, you may wish to create a named configuration
• Multiple named configurations may be stored in /stand
Create a new named configuration based on the currently running configuration
# kconfig –s MyConfiguration
Modify modules and tunables in the new configuration
# kcmodule –c MyConfiguration …
# kctune –c MyConfiguration …
Review the new named configuration
# kconfig –v
# kconfig –av MyConfiguration
Load the new named configuration
# kconfig –l MyConfiguration
Check for pending changes
# kconfig -D
Student Notes
Rather than modify the current kernel, you may choose to create a new named configuration.
Multiple kernel configurations may be stored in /stand, each with a distinct name and
configuration. When benchmarking a new application, you can test several different
combinations of tunable parameters by storing each test kernel as a separate kernel
configuration, then loading and testing each in turn and comparing performance. The
procedure below explains how to do this.
1. Create a new named configuration based on the currently running configuration.
# kconfig –s MyConfiguration
2. Modify modules and tunables in the new configuration. Use the –c option to ensure the
changes are applied to the named configuration rather than the current configuration.
The syntax of the kcmodule and kctune commands will be described in detail later in
the module.
# kcmodule –c MyConfiguration …
# kctune –c MyConfiguration …
http://education.hp.com
H3064S J.00
15-13
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
3. Review the new named configuration. The –v option lists the available kernel
configurations. The –av options display the contents of a specific configuration.
# kconfig –v
# kconfig –av MyConfiguration
4. Load the new named configuration. Dynamically loadable kernel modules and
dynamically tunable kernel parameters will be updated immediately. Other changes will
be saved until the next reboot.
# kconfig –l MyConfiguration
5. Check for pending changes with kconfig -D. Many kernel modules and tunables are
dynamic. However, if you used –h to “hold” changes, or if you modified static tunables or
modules, those changes won’t take effect until your next reboot.
# kconfig -D
H3064S J.00
15-14
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
15–8. SLIDE: Example: Copying a Config to another Host
Example: Copying a Config to another Host
If you have identical systems running the same application under
similar loads, you can create a named configuration on one system,
then copy and load the configuration on the other systems, too
On the source system, export the named configuration to a system file
# kconfig –e MyConfiguration /tmp/MyConfiguration.system
FTP the system file to the target system
# ftp target
ftp> put /tmp/MyConfiguration.system
On the target system, import the system file to create the named configuration
# kconfig –i MyConfiguration /tmp/MyConfiguration.system
Load the new named configuration and reboot if necessary
# kconfig –l MyConfiguration
Check for pending changes
# kconfig -D
Student Notes
If you have identical systems running the same application under similar loads, you can
create a named configuration on one system, then copy and load the configuration on the
other systems, too.
1. On the source system, export the named configuration to a system file.
# kconfig –e MyConfiguration /tmp/MyConfiguration.system
2. FTP the system file to the target system.
# ftp target
ftp> put /tmp/MyConfiguration.system
http://education.hp.com
H3064S J.00
15-15
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
3. On the target system, import the system file to create the named configuration. The
configuration name on the new system need not match the configuration name on the
original system.
# kconfig –i MyConfiguration /tmp/MyConfiguration.system
4. Load the new named configuration. Dynamically loadable kernel modules and
dynamically tunable kernel parameters will be updated immediately. Other changes will
be saved until the next reboot.
# kconfig –l MyConfiguration
5. Check for pending changes with kconfig -D. Many kernel modules and tunables are
dynamic. However, if you modified static tunables or modules, those changes won’t take
effect until your next reboot.
# kconfig -D
H3064S J.00
15-16
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
15–9. SLIDE: Example: Loading a Named Configuration
Example: Loading a Named Configuration
• Use kconfig –l to load a configuration immediately
• Many module and tunable changes apply immediately
• Changes to static modules and tunables won’t apply until the next boot
List available configurations
# kconfig
Load a named configuration
# kconfig –l MyConfiguration
Check for pending changes
# kconfig -D
• You can also specify a named configuration at boot time
After interrupting the HPUX autoboot process, list and load the desired configuration
HPUX> ll
Main Menu: boot pri isl
HPUX> boot MyConfiguration Interact w/ IPL? y
ISL> hpux ls
ISL> hpux /stand/MyConfiguration/vmunix
Student Notes
Any named configuration can be loaded on the system at any time. Many module and tunable
changes can be applied immediately. Changes to static modules and tunables won’t be
applied until the next boot
1. List available configurations and their contents.
# kconfig –v
# kconfig –av MyConfiguration
2. Load a named configuration.
# kconfig –l MyConfiguration
3. Check for pending changes with kconfig -D. Many kernel modules and tunables are
dynamic. However, if you modified static tunables or modules, those changes won’t take
effect until your next reboot.
# kconfig -D
http://education.hp.com
H3064S J.00
15-17
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
A named configuration can be given at boot time. On PA-RISC systems, interrupt the BCH
autoboot sequence, manually boot from the primary boot device, and choose to interact with
the IPL/ISL. At the ISL, list and boot the desired kernel configuration. Note that you must
specify the full pathname to the static kernel in the kernel configuration directory.
Main Menu: boot pri isl
Interact w/ IPL? y
ISL> hpux ls
ISL> hpux /stand/MyConfiguration/vmunix
Integrity systems allow the EFI boot manager to auto-select a boot disk, and gives you a
second chance to interrupt the boot sequence after booting the hpux.efi kernel loader.
Use the ll command to view the contents of /stand, then boot the desired configuration.
On Integrity, you only need to specify the kernel configuration name rather than the full path
to the vmunix executable.
HP-UX Boot Loader for IA64 Revision 1.71
Press Any Key to interrupt Autoboot
\EFI\HPUX\AUTO ==> boot vmunix
Seconds left till autoboot – 10 Escape
Type 'help' for help
HPUX> ll
HPUX> boot MyConfiguration
H3064S J.00
15-18
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
15–10. SLIDE: Part 2: Managing Kernel Modules
Configuring the
HP-UX Kernel
Part 2: Managing Kernel Modules
Student Notes
The next part f the chapter discusses kernel modules. After a brief discussion of some key
concepts, we will consider the commands required to view, load, and unload kernel modules
in our kernel configurations.
http://education.hp.com
H3064S J.00
15-19
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
15–11. SLIDE: Kernel Module Concept Review
Kernel Module Concept Review
• Each kernel configuration includes multiple kernel modules
• A kernel module is a device driver, kernel subsystem, or another body of kernel code
• Kernel modules must be linked or loaded into the HP-UX kernel
• An increasing number of kernel modules are “dynamically loadable” DLKMs
• Some kernel modules still must be “statically” linked into the kernel
btlan static module
lvm static module
Kernel
Configuration
cdfs DLKM module
Student Notes
Each HP-UX kernel configuration contains an administrator-defined list of kernel modules,
each of which may contain a driver, a subsystem, or some other body of kernel code. In
order to access a peripheral device, the kernel must include the kernel driver module
associated with that device. There are also kernel modules that provide major features of the
operating system such as CDFS file systems, VxFS file systems, LVM, and NFS, too.
Using Kernel Modules
There are two basic ways to use a kernel module. Traditionally, kernel modules have been
statically bound into the main kernel executable, /stand/vmunix. This method is simple,
but it has some significant disadvantages. In particular, it requires system administrators to
re-link the kernel executable and reboot the system in order to add, remove, or patch a kernel
module.
H3064S J.00
15-20
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
Since HP-UX 11.00, HP-UX has supported Dynamically Loadable Kernel Modules (DLKMs). A
DLKM can be loaded into the running kernel without rebuilding /stand/vmunix or
rebooting. Most dynamically loadable modules are also dynamically unloadable, so they can
be removed from the running kernel without rebooting. System administrators prefer kernel
modules that support dynamic loading because they can reconfigure their kernel more
quickly, and without requiring costly downtime. Module developers prefer dynamically
loadable modules because they can test changes without having to wait for systems to
reboot.
There is a slight performance penalty when a module is dynamically loaded. It usually isn’t
noticeable, but may be an issue in some performance-critical environments. For this reason,
some system administrators prefer to dynamically load and unload modules while
determining the desired system configuration, and then configure a static kernel containing
those modules for production use.
http://education.hp.com
H3064S J.00
15-21
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
15–12. SLIDE: Kernel Module States
Kernel Module States
• A module’s state determines if/when the module will be accessible on the system
• HP-UX recognizes five different module states
State
Description
unused
The module isn’t included in the kernel configuration
static
The module is statically bound into the vmunix kernel executable
auto
The module will be dynamically loaded into the kernel when needed
loaded
The module has been dynamically loaded into the kernel
best
The module is in the “best” state, as defined by the developer
Student Notes
A kernel module’s “state” determines if/when the module is accessible on the system. HP-UX
recognizes five different kernel module states.
State
unused
static
auto
loaded
best
Description
The module is not included in the kernel configuration.
The module is statically bound into the vmunix executable.
The module will be dynamically loaded into the kernel when needed.
The module is dynamically loaded into the kernel.
The module will be put into the state identified by the kernel module
developer as its "best" state. Typically this will be auto (if supported by
the module). If auto isn’t supported, it will likely be loaded (if the module
is dynamically loadable). If the module supports neither the auto nor the
loaded states, the best available state will likely be static.
H3064S J.00
15-22
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
Some modules do not support all states. To see which states a module supports, run
kcmodule -v modulename. You can change a module’s state via the kcmodule command
or kcweb.
Changing a module’s state may or may not require a kernel relink and reboot. The table
below describes exactly what happens when changing between various module states.
From state…
unused
To state…
static
loaded
kernel
module loaded
relinked with dynamically;
the module;
no reboot
will be used
needed**
at next boot
unused
N/A
auto
module
marked for
load at next
use; no
reboot
needed**
static
static kernel
relinked
without the
module; will
be unused at
next boot
N/A
kernel
relinked
without the
module; will
be loaded
dynamically
during next
boot
kernel
relinked
without the
module; will
be marked
for load at
first use
after next
boot
loaded
loaded module
unloaded
dynamically;
no reboot*,**
kernel
relinked with
module; will
be used at
next boot
N/A
module
remains
loaded; will
be marked
for load at
first use
after next
boot
auto
module will
not be loaded
at next use, or
at first use
after next boot
kernel
relinked with
the module;
will be used
at next boot
module loaded
dynamically;
no reboot**
N/A
* If the module is busy, the change will be held for next boot.
** To force the change to be held for next boot, add the kcmodule –h option.
http://education.hp.com
H3064S J.00
15-23
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
15–13. SLIDE: Kernel Module State Changes
Kernel Module State Changes
• The system administrator can force a module state change via kcmodule
• Sometimes, HP-UX may change a module’s state automatically
• The kcmodule reports what caused each module to enter its current state
Cause
Description
explicit
The system administrator explicitly chose the current state
best
The system administrator chose to use the module, but didn’t choose a
specific state, so the module is placed in its “best” state, as determined
by the module developer
auto
The module was in the auto state, and was automatically loaded when
something tried to use it (DLKMs only)
required
The module is required by the kernel
depend
The module is in use because some other module in the configuration
depends on it
Student Notes
Occasionally when a new interface card or peripheral device is added or discovered, it may
be necessary to add a new kernel module to the kernel configuration. The system
administrator can force a module state change via the kcmodule or kcweb command. HPUX may change a module’s state automatically, too. The kcmodule command reports what
caused each module to enter its current state. The table below lists the reasons a module
might change state.
Cause
explicit
best
auto
required
depend
Description
The system administrator explicitly chose the current state.
The system administrator chose to use the module, but didn’t choose a
specific state, so the module is placed in its “best” state, as determined by
the module developer.
The module was in the auto state, and was automatically loaded needed
(DLKMs only).
The module is required by the kernel.
The module is in use because some other module in the configuration
depends on it.
H3064S J.00
15-24
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
15–14. SLIDE: Viewing Module States with kcmodule
Viewing Module States with kcmodule
Use kcmodule to view kernel module states
List one line module summaries
# kcmodule [cdfs ...]
Module State
Cause
cdfs
auto
best
sdisk
static best
Notes
auto-loadable, unloadable
List module details
# kcmodule -v [cdfs ...]
Module
cdfs (0.1.0)
Description
CD File System
State
auto (best state)
State at Next Boot auto (best state)
Capable
auto static loaded unused
Depends On
interface HPUX_11_23:1.0
List pending module changes in the nextboot kernel
# kcmodule -D
Student Notes
To review the current status of the kernel modules on the system, use the kcmodule
command.
When executed without any options, kcmodule displays a one-line summary of each
module’s name, current state, state cause, and description. To view selected modules rather
than all modules, provide a space-separated list of modules to view.
# kcmodule [cdfs ...]
Module State
Cause
cdfs
auto
best
sdisk
static best
http://education.hp.com
Notes
auto-loadable, unloadable
H3064S J.00
15-25
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
For more detailed information in a multi-line format, add the –v (verbose) option.
# kcmodule -v [cdfs ...]
Module
cdfs (0.1.0)
Description
CD File System
State
auto (best state)
State at Next Boot auto (best state)
Capable
auto static loaded unused
Depends On
interface HPUX_11_23:1.0
To view a list of modules with pending changes in the nextboot kernel, add the –D option.
# kcmodule -D
NOTE: There are no module state changes being
held until next boot.
H3064S J.00
15-26
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
15–15. SLIDE: Managing Module States with kcmodule
Managing Module States with kcmodule
kcmodule may also be used to change module states
Change the module state
# kcmodule \
[-h] \
optionally, hold changes for nextboot kernel
[-B|-K] \
ensure or skip the automatic kernel backup
[-c config] \
optionally, apply change to a named configuration
[-C comment] \ optionally, provide an explanation of the change
module=state
desired module and state
Mark a DLKM module to be dynamically loadable in the current kernel
# kcmodule cdfs=auto
Explicitly load a DLKM module into the current kernel
# kcmodule cdfs=loaded
Add a module to the static nextboot kernel
# kcmodule cdfs=static
Mark a module unusable in the static nextboot kernel
# kcmodule cdfs=unused
Place a module in the “best” state, as defined by the module developer
# kcmodule cdfs=best
Student Notes
kcmodule may also be used to change module states.
# kcmodule \
[-h] \
[-B|-K] \
[-c config] \
[-C comment] \
cdfs=auto
optionally, hold changes for the nextboot kernel
ensure or skip the automatic kernel backup
optionally, apply change to a named configuration
optionally, provide an explanation of the change
desired module and state
The slide shows several examples. The options are described in detail below.
-h
Holds the state change until next boot, instead of applying it immediately. HP
recommends that this flag be used only when the next boot is expected to be soon. If
the next boot does not happen for months after making such a change, the system
administrator could be unpleasantly surprised by a pending change that had been
http://education.hp.com
H3064S J.00
15-27
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
forgotten. Before rebooting a system, the administrator should execute kcmodule D to review changes being held for next boot.
-B|-K
The –B option ensure writes a backup copy of the kernel to the /stand/backup/
configuration. The -K option skips the automatic backup.
–c config
By default, kcmodule applies changes to the current kernel. Use –c to apply the
change to a different named configuration.
-C comment
Document the reason for the change. kcmodule records the comment in
/var/adm/kc.log.
module=state
Specifies the module and desired state. Recognized states include auto, loaded,
static, unused, and best, though not all modules support all states. Multiple
module/state pairs may be specified in a space-separated list.
When modules are moved in or out of static state, it may take a few minutes to re-link the
nextboot kernel. When making multiple module state changes, it is best to list them all on
the same kcmodule command line or make the changes in a system file and import it (using
kconfig -i). Both techniques ensure that the kernel executable is only re-linked once.
Using kcweb
kcweb can be used to manage kernel modules, too, though it can only modify the current
configuration, not alternate, unloaded configurations.
H3064S J.00
15-28
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
15–16. SLIDE: Part 3: Managing Kernel Tunables
Configuring the
HP-UX Kernel
Part 3: Managing Kernel Tunables
Student Notes
So far the discussion has focused on managing kernel configurations and kernel modules.
The next portion of the chapter examines kernel tunable parameters.
http://education.hp.com
H3064S J.00
15-29
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
15–17. SLIDE: Kernel Module Tunable Parameters
Kernel Module Tunable Parameters
• Each kernel module may contain one or more tunable parameters
• Tunable parameters may be modified on a per-kernel-configuration basis
• Many parameters can be modified dynamically
• Some parameters can only be modified by rebooting
vxfs kernel module
module metadata
Name
Version
Type
Description
Dependencies
Tunables
module code
Initialization routines
Tunable handlers
Module functions
vx_maxlink
vx_ninode
vxfs_bc_bufhwm
vxfs_ifree_timelag
vxtask_max_monitors
Student Notes
Each kernel module may contain tunable parameters. You can modify these tunable
parameters based on the needs of the applications and users on the system. For instance, if
you install a new application on the system, it may be necessary to increase the nproc kernel
parameter, which determines the maximum number of processes in the process table, or
nfile, which determines the maximum number of files that may be open at any given time.
Parameters may be tuned on a per-kernel-configuration basis. Thus, you might create one
named kernel configuration called “100users” with parameters tuned specifically to support
one hundred application users, and another called “1000users” with parameters tuned
specifically to support one thousand application users. It is very easy to apply or change
kernel configurations – sometimes without even rebooting!
Some kernel parameters are dynamically tunable, while others are static. Changes made to
dynamically tunable kernel parameters immediately impact the running kernel. Changes
made to static kernel parameters don’t take effect until the system reboots.
H3064S J.00
15-30
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
15–18. SLIDE: Types of Tunables
Types of Tunables
HP-UX 11i v2 and v3 now support four different types of tunable parameters
Type
Description
Static
Changes require re-linking, and rebooting
Dynamic
Changes may be applied immediately
Automatic
Values are set automatically, but can be overridden
User-Defined
May be used like variables in other tunables’ formulas
Student Notes
HP-UX now supports several different types of tunable parameters
Type
static
Description
Static tunable changes require re-linking the kernel, and rebooting.
dynamic
Dynamic tunable changes may be applied immediately to the running
kernel, without rebooting.
automatic
Every tunable has a default value that is used if the administrator
doesn’t specify otherwise. Many kernel parameters have fixed default
values that remain the same across systems and across reboots.
Automatic tunables, however, don’t have a fixed default value; rather,
a default value is calculated automatically. For example, the default
value of nflocks is computed as either 1200 or 4096, depending on
the amount of system memory.
http://education.hp.com
H3064S J.00
15-31
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
Type
user-defined
Description
System administrators can now create their own user-defined
tunables if they choose. These tunables don’t affect the operation of
the system directly, but can be used to compute
the values of other tunables.
For example, an administrator might choose to create a
num_databases tunable, and then set several kernel tunables based
on the num_databases value. A subsequent change to the value of
num_databases would cause all of the related kernel tunable values
to be changed as well.
While kcweb supports the use of user-defined tunables, you can only
create new parameters via kctune.
11i v1 included a pseudo-parameter called maxusers that worked
much like the new user-defined kernel parameter functionality.
H3064S J.00
15-32
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
15–19. SLIDE: Viewing Tunables with kctune
Viewing Tunables with kctune
Use kctune to view kernel parameter values
List one line tunable summaries
# kctune [nproc ...]
Tunable Value Expression
nproc
4200 Default
List tunable details
# kctune -v nproc
Tunable
Description
Module
Current Value
Value at Next Boot
Value at Last Boot
Default Value
Constraints
Can Change
Changes
Immed
nproc
Maximum number of processes on the system
pm
4200 [Default]
4200 [Default]
4200
4200
nproc >= 100
Immediately or at Next Boot
List pending tunable changes in the nextboot kernel
# kctune -D
Student Notes
To review the current kernel tunable values on your system, execute the kctune command.
When executed without any options, kctune displays a one-line summary of each tunable’s
name and value, the tunable’s expression if it’s a calculated value, and an Immed flag if the
tunable can be changed immediately without rebooting. If you specify a space-separated list
of tunables, kctune only displays those parameters.
# kctune [nproc ...]
Tunable Value Expression
nproc
4200 Default
http://education.hp.com
Changes
Immed
H3064S J.00
15-33
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
For more detailed information, add the –v (verbose) option.
# kctune -v nproc
Tunable
Description
Module
Current Value
Value at Next Boot
Value at Last Boot
Default Value
Constraints
Can Change
nproc
Maximum number of processes on the system
pm
4200 [Default]
4200 [Default]
4200
4200
nproc >= 100
Immediately or at Next Boot
To view a list of modules with pending changes in the nextboot kernel, add the –D option.
# kctune –D
NOTE:
There are no tunable changes being held until next boot.
H3064S J.00
15-34
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
15–20. SLIDE: Managing Tunables via kctune
Managing Tunables with kctune
• kctune may also be used to change tunable parameters
• kctune automatically verifies that all parameters are within allowed boundaries
Define one or more tunable parameters
# kctune [-h] \
optionally, hold changes for nextboot kernel
[-B|-K] \
ensure or skip the automatic backup
[-c config] \ apply to named configuration rather than running kernel
[-C comment] \ optionally, provide an explanation of the change
tunable=value ...
Increment a tunable
# kctune nproc+=32
Set tunable to n, if not already greater than n
# kctune nproc>=1024
Create a user-defined parameter
# kctune –u numdbs=4
Define a tunable as an expression based on another system or user-defined parameter
# kctune nproc=1024+256*numdbs
Return a parameter to its default value
# kctune nproc=default
Student Notes
kctune may also be used to change tunable parameters. kctune automatically verifies that
all parameters are within allowed boundaries
# kctune [-h] \
[-B|-K] \
[-c config] \
[-C comment] \
nproc=4096 ...
optionally, hold changes for nextboot kernel
ensure or skip the automatic backup
apply to named configuration rather than running kernel
optionally, provide an explanation of the change
The slide shows several examples. The options are described in detail below. Changes to
static tunables and tunables modified via kctune –h will be held until next boot. Other
changes take effect immediately.
http://education.hp.com
H3064S J.00
15-35
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
-h
Holds the state change until next boot, instead of applying it immediately. HP
recommends that this flag be used only when the next boot is expected to be soon. If
the next boot does not happen for months after making such a change, the system
administrator could be unpleasantly surprised by a pending change that had been
forgotten. Before rebooting a system, the administrator should execute kctune -D to
review changes being held for next boot.
-B|-K
The –B option ensure writes a backup copy of the kernel to the /stand/backup/
configuration. The -K option skips the automatic backup.
–c config
By default, kctune applies changes to the current kernel. Use –c to apply the
change to a different named configuration.
-C comment
Document the reason for the change. kctune records the comment in
/var/adm/kc.log.
tunable=value
Specifies the tunable and desired value or expression. If the expression contains
special characters, enclose the argument in quotes. Multiple space separated
tunable/value pairs may be changed in a single kctune execution instance.
More About User-Defined Parameters
User-defined parameters can only be configured via the command-line, and follow C-style
identifier syntax. Here are some of the guidelines for choosing the tunable name:
•
A name may not exceed 32 characters. Most names are 8-16 characters. Names must start
with a letter, and may contain only letters, digits, and underscores.
•
Tunable names typically begin with a module name, module vendor name, or some other
mnemonic that ensures the tunable name will be unique. Consider using a similar
mnemonic scheme for user-defined tunables.
•
Subsequent words in a tunable name should be separated by underscores.
•
Use all lowercase unless the meaning cannot be understood without capitalization.
•
Do not start or end a name with an underscore.
•
Omit “num” and “max” from a tunable name unless they are needed to contrast with
another tunable name. If an abbreviation is necessary, only use common abbreviations
such as “min” and “max”.
H3064S J.00
15-36
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
Tunable Range Checking
Some tunables have constraints on their values, which are shown in the verbose output.
Sometimes these are minimum and/or maximum values. Other times there are fixed
relationships between tunables (for example, acctresume must be greater than
acctsuspend) or restrictions on the allowed values (for example, dnlc_hash_locks
must be a power of two). kcweb and kctune enforce these constraints automatically.
There are other constraints based on the current state of the system, not shown by kcweb or
kctune, which can change over time (for example, nproc cannot be set to less than the
number of processes currently running). These constraints are enforced only when changing
the currently running system, and not when making changes held for use at next boot or
changes to a saved configuration.
A common kind of validation check enforces a required relationship between/among two or
more tunables. For example, the tunable nkthread (number of kernel threads) must
be set to a greater value than the tunable nproc (number of processes).
Every non-private tunable has a man page which documents allowed ranges and
dependencies.
kcweb Possibilities
kcweb can be used to manage tunable parameters, too, with a few caveats:
•
kcweb cannot define user-defined parameters.
•
kcweb can only modify the current configuration, not alternate, unloaded configurations.
•
kcweb cannot modify private tunables.
http://education.hp.com
H3064S J.00
15-37
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
15–21. SLIDE: Managing Tunables with tuneserver
Managing Tunables with tuneserver
•
•
•
•
•
Many customers use their HP-UX servers to run Oracle or other commercial databases
Default HP-UX kernel parameters are not ideal for database workloads
HP’s Tune-N-Tools product modifies the kernel to meet most database requirements
Additional tuning may yield even better performance
Tune-N-Tools is only available for 11i v3
Verify that the Tune-N-Tools product is installed
# swlist Tune-N-Tools
List the recommended tunable parameter values recommended
# /opt/tuneserver/bin/tuneserver –l
Apply the recommended parameter values to optimize the kernel for database workloads
# /opt/tuneserver/bin/tuneserver –o
# view /var/opt/tuneserver/logs/update.log
# shutdown –ry 0
Revert to the parameter values as they existed prior to optimization
# /opt/tuneserver/bin/tuneserver –o
# view /var/opt/tuneserver/logs/restore.log
# shutdown –ry 0
Student Notes
The default HP-UX parameter settings provide reasonable performance but the optimal
values may depend on a system’s hardware configuration and the mix of applications that the
system runs.
Many HP-UX customers now run major business application workloads such as Oracle and
SAP R/3. Optimizing kernel parameters to support these types of applications is a time
consuming process. HP’s Tune-N-Tools product saves the customer the effort of doing the
first level of performance tuning. In one simple operation the most important kernel
parameters are set to an appropriate level for major applications on server-class systems.
Some application products have specific requirements for parameter settings and the Tune-NTools product will meet those minimum requirements. In some cases additional, incremental,
performance improvements may be made by additional changes to kernel tunables, but the
performance improvements achieved by Tune-N-Tools will usually be significant.
The Tune-N-Tools product is designed to permit the installation and operation of major ISVs
such as Oracle and SAP and to improve the system performance of servers running such
workloads. The change to the tunable values is primarily to increase system limits consistent
with larger systems. The product contains scripts that interrogate the system configuration
H3064S J.00
15-38
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
and set the tunable variables in a manner consistent with the system size. Therefore, it is safe
to install the Tune-N-Tools product on any size system.
Tune-N-Tools will not override a kernel parameter that has been modified from its default
value to a value larger than would be set by Tune-N-Tools. In other words, Tune-N-Tools will
not reduce the capacity of the system if the administrator has already set a particular tunable
parameter.
Performance improvements from the installation and running of the Tune-N-Tools product
will be most significant on server-class systems running workloads such as database servers
and application servers. Smaller systems and systems running different workloads may
experience less performance improvement.
The product is only available for 11i v3.
Installing and Using the Tune-N-Tools Product
The Tune-N-Tools product is included in all recent 11i v3 media kits, and should already be
installed on your system.
#
#
#
#
#
#
swlist Tune-N-Tools
Initializing...
Contacting target "myhost"...
Target:
myhost:/
# Tune-N-Tools
B.11.31.02
Optimized Kernel
Tunables and Tools for Database and Application Servers
Tune-N-Tools.Server-Tunables B.11.31.02
Optimized Kernel
Tunables for Database and Application Servers
To view a list of tunable values recommended to support database workloads, execute
tuneserver –l.
#
/opt/tuneserver/bin/tuneserver -l
The optimal tunable settings for server applications are:
max_async_ports
should be at least 27000
max_thread_proc
should be at least 3000
maxdsiz
should be at least 3221225472
maxdsiz_64bit
should be at least 274877906944
maxfiles
should be at least 8192
maxfiles_lim
should be at least 8192
maxssiz_64bit
should be at least 1073741824
maxtsiz
should be at least 1073741824
maxtsiz_64bit
should be at least 8589934592
maxuprc
should be at least 27000
msgmnb
should be at least 65536
msgmni
should be at least 4096
http://education.hp.com
H3064S J.00
15-39
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
msgtql
nkthread
nproc
npty
nstrpty
o_sync_is_o_dsync
semmni
semmns
semmsl
semume
shmmax
shmmni
swchunk
vps_ceiling
vps_chatr_ceiling
semmnu
should
should
should
should
should
should
should
should
should
should
should
should
should
should
should
should
be
be
be
be
be
be
be
be
be
be
be
be
be
be
be
be
at least
at least
at least
at least
at least
exactly
at least
at least
exactly
at least
at least
at least
at least
at least
at least
at least
4096
250000
30000
200
200
0
8192
60000
128
512
4398046511104
4096
65536
64
4194304
4096
To apply these recommended changes, execute tuneserver –o (optimize), then reboot to
make the changes take effect.
# /opt/tuneserver/bin/tuneserver -o
Updating the values of kernel parameters .... (This will take few
minutes)
Optimization of kernel parameters value is completed.
Please see /var/opt/tuneserver/logs/update.log for more details.
NOTE: Your system must be rebooted for the optimal tunable
settings to take effect.
Please reboot your system as soon as possible.
# view /var/opt/tuneserver/logs/update.log
# shutdown –ry 0
If necessary, you can revert to the original kernel configuration via tuneserver –r.
# /opt/tuneserver/bin/tuneserver -r
Restoring the values of modified kernel parameters ....(This will
take few minutes)
Restoration of kernel parameters value is completed.
Please see /var/opt/tuneserver/logs/restore.log for more details.
NOTE: Your system must be rebooted for the optimal tunable
settings to take effect.
Please reboot your system as soon as possible.
# view /var/opt/tuneserver/logs/restore.log
# shutdown –ry 0
To learn more about Tune-N-Tools, see the Server Tuning on HP-UX white paper on
http://docs.hp.com.
H3064S J.00
15-40
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
15–22. SLIDE: Learning More about Tunable Parameters
Learning More about Tunable Parameters
• HP-UX now includes a man page for every tunable parameter
• Man pages describe what each parameter does, and how it should be tuned
NAME
VALUES
Failsafe
Default
Allowed values
Recommended values
DESCRIPTION
Who Is Expected to Change This Tunable?
Restrictions on Changing
When Should the Value of This Tunable Be Raised?
What Are the Side Effects of Raising the Value of This Tunable?
When Should the Value of This Tunable Be Lowered?
What Are the Side Effects of Lowering the Value of This Tunable?
WARNINGS
AUTHOR
SEE ALSO
Student Notes
HP-UX 11i v2 and v3 includes an online man page in manual section 5 for every tunable
parameter. You can view these man pages as you would any other man page.
# man 5 maxuprc
The kernel tunable man pages are also available on http://docs.hp.com, and via the
[help] button in kcweb.
Sample Tunable Parameter man Page
maxuprc(5)
Tunable Kernel Parameters
NAME
maxuprc - limits the maximum number of concurrent user processes
per user
http://education.hp.com
H3064S J.00
15-41
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
VALUES
Failsafe
256
Default
256
Allowed values
Between 3 and (nproc -5).
Recommended value
256
DESCRIPTION
maxuprc is a dynamic tunable that limits the maximum number of
processes per user. Only root can have more than the number of
processes limited by maxuprc.
Who is Expected to Change This Tunable?
System administrators can change the value of maxuprc depending on
the usage of the system.
Restrictions on Changing
None. This tunable is dynamic.
When Should the Value of This Tunable Be Raised?
The value of maxuprc should be changed if users require more
processes than what they are currently allowed by maxuprc. If
fork() fails with an error value of [EAGAIN], it could be an
indication that maxuprc was reached by that particular user.
However, that is not the only reason that could cause fork() to
fail with an errno value of [EAGAIN]. [EAGAIN] may be returned if
nproc system tunable has been reached or memory on the system has
been exhausted.
What Are the Side Effects of Raising the Value?
Raising the value of maxuprc allows a single user to consume a
greater percentage of the system resources.
When Should the Value of This Tunable Be Lowered?
The value of maxuprc should be lowered when individual users are
monopolizing system resources by running too many concurrent
processes.
What Are the Side Effects of Lowering the Value?
Applications that depend on a large number of processes may behave
differently or fail. Existing processes will continue to run but
new process creations which would result in the user exceeding
maxuprc will fail.
H3064S J.00
15-42
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
What Other Tunable Values Should Be Changed at the Same Time?
When tuning maxuprc you should keep in mind the value of nproc.
WARNINGS
All HP-UX kernel tunable parameters are release specific. This
parameter may be removed or have its meaning changed in future
releases of HP-UX.
AUTHOR
maxuprc was developed by HP.
SEE ALSO
nproc(5)
http://education.hp.com
H3064S J.00
15-43
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
15–23. SLIDE: Part 4: Monitoring Kernel Resources
Configuring the
HP-UX Kernel
Part 4: Monitoring Kernel Resources
Student Notes
Now that the basic tasks involved in managing kernel configurations, modules, and tunable
parameters have been covered, we will turn our attention to kernel resource monitoring and
kernel resource alarms.
H3064S J.00
15-44
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
15–24. SLIDE: Kernel Resource Monitoring
Kernel Resource Monitoring
How do I know
which kernel
tunables need
to be increased?
HP-UX has the answer!
Using HP-UX resource
monitoring can monitor usage of
certain tunable kernel resources.
Student Notes
In the past, it was often difficult for administrators to determine if tunable parameters were
appropriately tuned.
HP-UX now makes it possible to monitor usage of kernel resources that are controlled by
various kernel parameters. Based on these usage reports, the administrator can decide if a
parameter needs to be increased or decreased. In the sample kcusage output below, notice
that the current number of processes and open files on the system are well below the limits
imposed by the nproc and nfile kernel parameters.
# kcusage nproc nfile
Tunable
Usage / Setting
=============================================
nproc
130 / 4200
nfile
512 / 65536
http://education.hp.com
H3064S J.00
15-45
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
The administrator can also define tunable alarms, which are monitored by the kcmond
daemon. If a kernel resource exceeds an administrator-defined threshold, kcmond can
automatically notify the administrator via an email message, a message on the console, or any
other notification method supported by Event Monitoring Services (EMS).
H3064S J.00
15-46
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
15–25. SLIDE: Monitoring Resource Usage via kcusage
Monitoring Resource Usage via kcusage
• The Kernel Resource Monitor monitors kernel resource usage for selected tunables
• Use kcusage to monitor tunable usage patterns
View current usage for all supported kernel parameters
# kcusage [nproc ...]
Tunable
Usage / Setting
==========================
nproc
137 / 4200
View top consumers and usage over the last hour/day/month/year, for tunable parameters
# kcusage [-t] [–h|-d|-m|-y] [nproc ...]
Parameter:
maxfiles_lim
Setting:
4096
Time
Usage %
Usage
ID Name
=========================================================
Mon 12/29/06 08:00 CST
35 0.9
35
740 inetd
22 1241 pwgrd
20 1369 scopeux
19
544 netfmt
17 1109 dced
Student Notes
The Kernel Resource Monitor (krm) daemon monitors kernel resource usage for selected
tunables. Use kcusage to monitor kernel resource usage patterns.
Execute kcusage without options or arguments to display current resource usage
information for all tunables that support resource monitoring.
# kcusage
Tunable
Usage / Setting
=============================================
dbc_max_pct
50 / 50
maxdsiz
19038208 / 1073741824
maxdsiz_64bit
51888128 / 4294967296
maxfiles_lim
34 / 4096
maxssiz
212992 / 8388608
maxssiz_64bit
81920 / 268435456
maxtsiz
8056832 / 100663296
maxtsiz_64bit
770048 / 1073741824
maxuprc
6 / 256
http://education.hp.com
H3064S J.00
15-47
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
max_thread_proc
(more data)
23 / 1200
To display current resource usage for specific tunables, provide a space-separated list of
tunable names.
# kcusage maxfiles_lim
Tunable
Usage / Setting
=============================================
maxfiles_lim
34 / 4096
Add a -h|-d|-m|-y option to view historic usage patterns over the last
hour/day/month/year (-h|-d|-m|-y). For some tunables, the –t option can be added to
list the top five users or processes consuming the tunable’s associated resource during each
reporting interval.
# kcusage -t -h maxfiles_lim
Tunable:
maxfiles_lim
Setting:
4096
Time
Usage
%
Usage
Id
Name
==================================================================
Mon 04/23/07 15:15 EDT
34
0.8
34
2009 coda
32
1230 inetd
26
2896 vxsvc
23
911 netfmt
22
1974 ovcd
Mon 04/23/07 15:20 EDT
34
0.8
34
2009 coda
32
1230 inetd
26
2896 vxsvc
23
911 netfmt
22
1974 ovcd
(displays additional data for every five minute interval during the past hour)
kcweb Possibilities
kcweb can be used to monitor kernel resources, too. Simply access the Usage/Alarms
screen.
H3064S J.00
15-48
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
15–26. SLIDE: Kernel Resource Alarms
Kernel Resource Alarms
• Alarms can be set to monitor certain kernel resources
• Alarms use EMS to notify the administrator when resources exceed defined thresholds
• HP-UX supports three different alarm types
• An “initial” alarm is triggered when a tunable first exceeds the defined threshold
• A “repeat” alarm is triggered every interval that the tunable exceeds the threshold
• A “return” alarm is triggered when a tunable drops back below the threshold
Type: Initial
Type: Repeat
Type: Return
% Usage
100
40
Alarm set
at 40%
threshold
0
Polling Interval
Student Notes
kcusage allows the administrator to view kernel resource usage levels. The kcmond
daemon enables the administrator to configure “alarms” for certain kernel resources. Alarms
use Event Monitoring Services (EMS) to notify the administrator when specified thresholds
are reached. For instance the administrator may configure an alarm to send a pager message
to the system administrator when the process table exceeds 90% of capacity. Multiple
alarms, at different thresholds, may be configured for a single tunable.
HP-UX supports three different types of resource alarms. The resource alarm type must be
specified at the time a resource alarm is configured. A single alarm may have one, two or all
three alarm notification settings.
•
An “initial” alarm is triggered when a tunable first exceeds the defined threshold.
•
A “repeat” alarm is triggered every interval that the tunable exceeds the threshold. This
can lead to a large number of messages if the polling interval is small).
•
A “return” alarm is triggered when a tunable drops back below the threshold.
http://education.hp.com
H3064S J.00
15-49
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
15–27. SLIDE: Viewing Resource Alarms with kcalarm
Viewing Resource Alarms with kcalarm
• Alarms can be set for certain tunable parameters
• Alarms use EMS to notify the administrator when specified thresholds are reached
• If desired, multiple alarms, at different thresholds, may be configured for a single tunable
• Use the kcalarm to view, create, modify, remove, or deactivate alarms
# kcalarm [maxuprc ...]
Tunable Status Thres Int Event Type(s) Notification
--------------------------------------------------------------any
on
90%
5 ini
console::
any
on
90%
5 ini
syslog::
any
on
90%
5 ini
email:admin@corp.com:
maxuprc on
70%
5 ini
syslog::
maxuprc on
80%
5 ini,rep,ret
email:admin@corp.com:
Student Notes
To view and modify resource alarms from the command line, use the kcalarm command.
By default, the command reports all configured alarms. Specifying a particular tunable as an
argument only displays alarms associated with that tunable.
The sample alarms below send console, email, and syslogd messages when any resource
initially exceeds 90% of capacity. When any user initially exceeds 70% of the maxuprc kernel
parameter, the system will send a syslogd message. When any user exceeds 80% of the
maxuprc kernel parameter, the system will initially and repeatedly send email messages to
the administrator until the user returns to the 80% threshold.
# kcalarm [tunable]
Tunable Status Thres Int Event Type(s) Notification
--------------------------------------------------------------any
on
90%
5 ini
console::
any
on
90%
5 ini
syslog::
any
on
90%
5 ini
email:admin@corp.com:
maxuprc on
70%
5 ini
syslog::
maxuprc on
80%
5 ini,rep,ret
email:admin@corp.com:
H3064S J.00
15-50
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
15–28. SLIDE: Setting Resource Alarms with kcalarm
Setting Resource Alarms with kcalarm
Use kcalarm to view, create, and manage kernel resource alarms
Add an alarm
# kcalarm –a \
-t 90 \
-i 5 \
-e initial \
-n syslog:: \
maxuprc
add an alarm
using threshold level 90%
checked at 5 minute intervals
define the event type (initial, repeat, return)
write a syslog message when the threshold is exceeded
specify the resource to monitor, or specify “any”
Temporarily disable/enable the maxuprc alarm
# kcalarm –s on|off maxuprc
Delete all maxuprc alarms permanently. -F bypasses the normal confirmation message.
# kcalarm –F –d maxuprc
Turn kernel resource monitoring on or off, or check the current status
# kcalarm –m on|off|status
Student Notes
kcalarm can be used to set alarms, too. See the examples below.
# kcalarm –a \
-t 90 \
-i 5 \
-e initial \
-n syslog:: \
maxuprc
# add an alarm
# using threshold level 90%,
# checked at 5 minute intervals.
# define the event type (initial, repeat, return).
# write a syslog message when the threshold is exceeded.
# specify the resource(s) to monitor, or specify “any”
To configure a similar alarm for multiple tunables, include multiple parameter names at the
end of the command-line. Multiple –e event type options can be included on the command
line, too. Some –n notification types require arguments. For instance, to send an email to
root, one would specify –n email:root:. See the man page for other possibilities.
Note that it is possible to configure multiple alarms based on a single tunable parameter. For
instance, you may need to write a message to syslog.log if a resource’s usage level
http://education.hp.com
H3064S J.00
15-51
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
exceeds 70%, but send an urgent email message if that same resource’s usage level exceeds
90%. Configure this as two separate alarms on the same tunable parameter.
Temporarily disable/enable the maxuprc alarm.
# kcalarm –s on|off maxuprc
Delete all maxuprc alarms permanently. -F bypasses the normal confirmation message.
# kcalarm –F –d maxuprc
Turn kernel resource monitoring on or off, or check the current status.
# kcalarm –m on|off|status
kcweb Possibilities
kcweb can be used to configure and manage kernel resource alarms, too. Simply access the
Usage/Alarms screen.
H3064S J.00
15-52
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
15–29. SLIDE: Part 5: Kernel Troubleshooting
Configuring the
HP-UX Kernel
Part 5: Kernel Troubleshooting
Student Notes
The last part of the chapter discusses some tools and techniques that can be used to
troubleshoot kernel tuning problems.
http://education.hp.com
H3064S J.00
15-53
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
15–30. SLIDE: Kernel Troubleshooting Overview
Kernel Troubleshooting Overview
HELP! My kernel
won’t boot!
HP-UX now includes several solutions for solving
kernel configuration problems:
• Review the kernel change log
• Boot/load an alternate kernel configuration
• Boot using override parameters
• Boot to single-user tunable failsafe mode
Student Notes
Although the HP-UX kc* tools automatically verify that tunable parameters fall within
allowed boundaries and attempt to verify dependencies, inappropriately chosen kernel
parameters may still cause an application – or the entire system – to crash or be unbootable.
Fortunately, HP-UX also provides a number of tools to help troubleshoot these situations.
•
The new kernel change log records all kernel configuration changes.
•
Other log files record actions and errors logged by kcweb.
•
11i v2 and v3 make it very easy to boot or load a backup or alternate kernel if the current
kernel configuration becomes unstable.
•
In 11i v3, the administrator can specify an “override” kernel parameters early in the boot
process. The override values override the nextboot kernel parameter values.
•
If all else fails, every 11i v2 and v3 tunable parameter has a hard-coded “failsafe” value.
Booting to tunable maintenance mode boots the system to single-user mode using these
“failsafe” parameters.
The next few slides discuss each of these tools in detail.
H3064S J.00
15-54
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
15–31. SLIDE: Viewing the Kernel Change Log with kclog
Viewing the Kernel Change Log with kclog
• HP-UX records all kernel changes are recorded in /var/adm/kc.log
• Use more to view the log, or...
• Use kclog to filter log entries by search key, module, or tunable
View the last five log entries for the current kernel
# kclog 5
View the last 5 entries for a specific named kernel configuration
# kclog –c weekendConfig 5
View the last 5 entries that contain a specified string
# kclog –f “Oracle” 5
View the last 5 entries associated with a specific tunable or module
# kclog –n “maxdsiz” 5
View the last 5 entries for all tunable changes (but not kernel module changes)
# kclog –t tunable 5
Add a general comment in the kernel log
# kclog –C “Add this comment to kernel config log”
Student Notes
It is often useful to know what changes have been made on your system. All kernel
configuration changes made via kcweb and the kc* commands are automatically recorded in
/var/adm/kc.log. The commands automatically log what is changed, by whom, and
when. Administrators can optionally add additional comments to the log file via the –C
option on kcmodule, kconfig, and kctune. HP recommends including the pre-change
value in the comments.
When a problem is encountered with a kernel configuration, review the kernel change log for
recent changes, and consider using the kcmodule and kctune commands to reverse the
changes until you find a stable configuration.
kc.log is an ASCII text file that can be viewed via the more command or a dedicated
command line interface log viewer called kclog.
http://education.hp.com
H3064S J.00
15-55
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
# kclog
==================================================================
Change to configuration 'current'
at 16:51:34 EDT on 23 April 2007 by root:
Tunable 'maxuprc' changed from 'default' to '512'.
Options on the kclog command allow the administrator to easily search and filter the log file
contents as shown on the slide.
H3064S J.00
15-56
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
15–32. SLIDE: Booting from an Alternate Kernel
Booting from an Alternate Kernel
If the default kernel configuration won’t boot,
boot from the backup kernel configuration, or any other kernel configuration
Booting from a backup configuration on PA-RISC:
Processor is booting from first available device.
To discontinue, press any key within 10 seconds. Escape
Main Menu: boot pri isl
Interact with IPL? y
ISL> hpux ls
ISL> hpux /stand/backup/vmunix
Booting from a backup configuration on Integrity:
HP-UX Boot Loader for IA64 Revision 1.71
Press Any Key to interrupt Autoboot
Escape
\EFI\HPUX\AUTO ==> boot vmunix
HPUX> ll
HPUX> boot backup
Student Notes
If the default vmunix kernel configuration won’t boot, boot from the /stand/backup/
kernel configuration, or any other named kernel configuration.
On PA-RISC servers, interrupt the BCH autoboot sequence, boot from the primary boot disk
to the ISL, list the contents of /stand, then boot the desired kernel. Note that on PA-RISC
you must specify the full path to the static kernel executable.
Processor is booting from first available device.
To discontinue, press any key within 10 seconds.
Main Menu: boot pri isl
Interact with IPL? y
ISL> hpux ls
ISL> hpux /stand/backup/vmunix
On Integrity servers, interrupt the hpux.efi autoboot sequence, list the contents of
/stand, and boot the desired kernel. On Integrity, you only need to specify the kernel
configuration name rather than the static kernel executable path.
http://education.hp.com
H3064S J.00
15-57
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
HP-UX Boot Loader for IA64 Revision 1.71
Press Any Key to interrupt Autoboot
\EFI\HPUX\AUTO ==> boot vmunix
HPUX> ll
HPUX> boot backup
H3064S J.00
15-58
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
15–33. SLIDE: Booting with Override Parameters
Booting with Override Parameters
• If the default kernel configuration won’t boot, specify an override kernel parameter
• Override parameters override parameter values in /stand/vmunix
Booting with an override parameter on PA-RISC:
Processor is booting from first available device.
To discontinue, press any key within 10 seconds. Escape
Main Menu: boot pri isl
Interact with IPL? y
ISL> hpux /stand/vmunix nproc=6000
Booting with an override parameter on Integrity:
HP-UX Boot Loader for IA64 Revision 1.71
Press Any Key to interrupt Autoboot
\EFI\HPUX\AUTO ==> boot vmunix
HPUX> boot vmunix nproc=6000
Escape
Student Notes
If the default kernel configuration won’t boot, specify an override kernel parameter.
Override parameters override parameter values in /stand/vmunix.
On PA-RISC servers, interrupt the BCH autoboot sequence, boot from the primary boot disk
to the ISL, and specify the override parameter on the end of the hpux boot command.
Processor is booting from first available device.
To discontinue, press any key within 10 seconds.
Main Menu: boot pri isl
Interact with IPL? y
ISL> hpux /stand/vmunix nproc=6000
On Integrity servers, interrupt the hpux.efi autoboot sequence, and specify the override
parameter on the end of the boot command.
HP-UX Boot Loader for IA64 Revision 1.71
Press Any Key to interrupt Autoboot
\EFI\HPUX\AUTO ==> boot vmunix
HPUX> boot vmunix nproc=6000
http://education.hp.com
H3064S J.00
15-59
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
15–34. SLIDE: Booting to Tunable Maintenance Mode
Booting to Tunable Maintenance Mode
Booting to tunable maintenance mode boots to single-user mode using
failsafe tunable parameters hard-coded in the kernel modules. After booting to
tunable maintenance mode, review the kernel log, modify the kernel as necessary,
and reboot.
Booting to tunable maintenance mode on PA-RISC:
Processor is booting from first available device.
To discontinue, press any key within 10 seconds. Escape
Main Menu: boot pri isl
Interact with IPL? y
ISL> hpux -tm
Booting to tunable maintenance mode on Integrity:
HP-UX Boot Loader for IA64 Revision 1.71
Press Any Key to interrupt Autoboot
\EFI\HPUX\AUTO ==> boot vmunix
Escape
HPUX> boot vmunix –tm
Student Notes
Booting to tunable maintenance mode boots to single-user mode using failsafe tunable
parameters hard-coded in the kernel modules. After booting to tunable maintenance mode,
review the kernel configuration log, modify the kernel as necessary, and reboot.
On PA-RISC servers, interrupt the BCH autoboot sequence, boot from the primary boot disk
to the ISL, and use hpux –tm to boot to tunable maintenance mode.
Processor is booting from first available device.
To discontinue, press any key within 10 seconds.
Main Menu: boot pri isl
Interact with IPL? y
ISL> hpux -tm
H3064S J.00
15-60
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
On Integrity servers, interrupt the hpux.efi autoboot sequence, and boot to tunable
maintenance mode.
HP-UX Boot Loader for IA64 Revision 1.71
Press Any Key to interrupt Autoboot
\EFI\HPUX\AUTO ==> boot vmunix
HPUX> ll
HPUX> boot vmunix -tm
http://education.hp.com
H3064S J.00
15-61
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
15–35. SLIDE: Kernel Recovery Roadmap
Kernel Recovery Roadmap
System State
Configuration State
Action
backup is good
Load the backup kernel configuration, or
another good kernel configuration using
kconfig -l
backup is questionable
Find previous changes in the kernel
change log and reverse them using
kctune and kcmodule
backup is good
Boot a known good configuration
System is up
Boot using an override parameter.
System is down
backup is questionable
Boot to failsafe mode, find previous
changes in the kernel change log, and
reverse them using kctune and
kcmodule
Boot from a system recovery tape
or a DRD clone
Student Notes
The diagram on the slide describes how the tools we’ve discussed might be used if your
kernel configuration becomes unstable.
System Up, Backup Good
If your system is up, and your /stand/backup/ configuration is good, simply load the
backup configuration or another named configuration. If loading the backup configuration
requires changes to static modules or kernel parameters, it may be necessary to reboot.
# kconfig –l backup
# shutdown –ry 0
System is Up, Backup is Questionable
If the system is up, but both /stand/current/ and /stand/backup/ are questionable,
review recent changes in the kernel log and reverse them using kctune and kcmodule.
H3064S J.00
15-62
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
System is Down, Backup is Good
If the system is down, but /stand/backup/ or another configuration is good, use the kernel
loader to boot the alternate configuration.
System is Down, Backup is Questionable
If the system is down and /stand/backup/ configuration is questionable, specify an
override parameter or boot to failsafe / tunable maintenance mode, find previous changes in
the kernel change log, and reverse them using kctune and kcmodule.
If you have an Ignite make_tape_recovery tape, it might be easier to reinstall the system
from the recovery tape. Better yet, boot from your DRD boot disk clone!
http://education.hp.com
H3064S J.00
15-63
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
15–36. LAB: Configuring HP-UX 11i v2 and v3 Kernels
Directions
Carefully follow the instructions below.
Preliminary Steps
1. Portions of this lab require console access. Login as root via your server’s MP console
interface.
2. Portions of this lab might require access to a web browser, too. If you are accessing your
server via HP’s remote lab infrastructure, launch Internet Explorer from your portal
server. If you are accessing your server directly via a PC desktop, simply launch Internet
Explorer from your Start menu.
3. If your instructor tells you to disable your browser’s proxy settings, do so now. Ask your
instructor for details.
H3064S J.00
15-64
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
Part 1: Managing Kernel Configurations
Oftentimes, administrators test new kernel configurations on a development server before
moving them into production. The HP-UX 11i v2 and v3 kernel configuration commands
simplify this process considerably. This lab shows you how!
1. Before you make any changes to the kernel configuration, save a copy of your current
configuration. Call the configuration copy “OldConfig”.
2. Add a title to your saved configuration, too. Call it “stable kernel
configuration”
3. Make sure your new kernel configuration was successfully saved. Does it appear in the
list of configurations reported by kconfig –v? Which kconfig option allows you to
view the list of modules and tunables in the saved configuration?
4. Make a change to the current kernel configuration. Note the current value of the
maxuprc tunable, increase it by 32, and verify your work.
# kctune maxuprc
# kctune maxuprc+=32
# kctune maxuprc
5. Did the changes that you made to the kernel configuration take effect immediately?
6. Save a copy of the updated configuration. Call it NewConfig. Assign a title to the new
configuration, too: “Approved new kernel configuration”.
http://education.hp.com
H3064S J.00
15-65
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
7. After testing the configuration thoroughly on a development server, you may choose to
apply the configuration to your production server. Export the current configuration to a
file called /tmp/system.Newconfig.
8. View the resulting system file with the more command.
9. Use kconfig –d NewConfig to delete the NewConfig configuration.
Leave the /tmp/system.NewConfig file untouched.
10. Oops... We didn’t really want to delete NewConfig. Re-import it.
11. Use the find command below to review the directory structure created by the import
operation.
# find /stand/NewConfig
12. Load the NewConfig configuration.
13. Because management decided not to install the new application after all, load the
OldConfig configuration.
14. Determine if there are any changes pending a reboot. If there are, reboot. If not, proceed
to the next part of the lab.
H3064S J.00
15-66
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
Part 2: Managing Kernel Modules
When a new interface card is added or a previously unused HP-UX feature is needed, it
sometimes becomes necessary to add a kernel module to your kernel configuration. This
portion of the lab provides an opportunity to experiment with this task. You may complete
this portion of the lab using either the kcmodule command-line utility, kcweb, or some
combination of the two.
1. View the list of kernel modules that are on your system.
a. Does your kernel contain the sdisk module required to support SCSI disks?
b. Does your kernel contain the stape module required to support SCSI tapes?
2. The cdfs module, which supports the CDFS file system, is the first major module to fully
implement HP-UX DLKM functionality. View the detailed description of the cdfs module
by selecting it from the module list in kcweb, or by running kcmodule –v.
a. What is the current state of the module?
b. What other states are supported?
3. If the module isn’t already loaded, force it to be loaded immediately.
4. Check the state again. What is the current state now? Did you have to reboot? What is
the current state cause?
5. Change the cdfs module’s state to unused. Then review the verbose kcmodule output
again. Can you think of a situation that might prevent the administrator from marking the
cdfs module unused?
6. In the last two questions, you should have discovered that the cdfs module can be
dynamically loaded and unloaded from the running kernel, without rebooting the system.
Thus if a CDFS module needed to be patched, it could be temporarily unloaded from the
running kernel, patched, and reloaded – no reboot required!
Return the cdfs module to the best state.
7. Verify that there are no pending kernel module changes. If there are, reboot before
proceeding.
http://education.hp.com
H3064S J.00
15-67
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
Part 3: Managing Tunable Parameters
This part of the lab gives you an opportunity to experiment with 11i v3 tunable parameters.
You may complete this portion of the lab using either the kctune command-line utility,
kcweb, or some combination of the two.
1. Review the man page for maxuprc. What does this parameter do? When might it be
necessary to change it?
2. Increase the maxuprc parameter by 50. Does the change take effect immediately?
3. Add a few extra zeros on the end of the kctune command you used in the previous
question.
# kctune maxuprc+=50000
4. Review the man page for nproc. What does this parameter do?
5. When you add additional application instances on a system, it may be necessary to
increase nproc. Create a user-defined parameter called numapps with initial value 2.
H3064S J.00
15-68
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
6. Define nproc using a formula based on numapps: nproc=numapps*2000.
7. What happens if you increase numapps from 2 to 4?
8. Return nproc and maxuprc to their default values.
9. Reset numapps to value default. What happens?
10. Verify that there are no pending tunable parameter changes. If there are, reboot before
proceeding.
http://education.hp.com
H3064S J.00
15-69
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
Part 4: Logging and Troubleshooting
1. Reboot your system. When you get to the HPUX OS loader stage, terminate the autoboot
sequence.
2. Boot to tunable maintenance mode. What distinguishes tunable maintenance mode from
a normal boot?
3. Reboot your system again. This time, interrupt the autoboot process, list the contents of
/stand, and boot from the OldConfig configuration that you created back in Part 2.
H3064S J.00
15-70
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
15–37. LAB SOLUTIONS: Configuring HP-UX 11i v2 and v3
Kernels
Directions
Carefully follow the instructions below.
Preliminary Steps
1. Portions of this lab require console access. Login as root via your server’s MP console
interface.
2. Portions of this lab require access to a web browser, too. If you are accessing your server
via HP’s remote lab infrastructure, launch Internet Explorer from your portal server. If
you are accessing your server directly via a PC desktop, simply launch Internet Explorer
from your Start menu.
3. If your instructor tells you to disable your browser’s proxy settings, do so now. Ask your
instructor for details.
http://education.hp.com
H3064S J.00
15-71
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
Part 1: Managing Kernel Configurations
Oftentimes, administrators test new kernel configurations on a development server before
moving them into production. The new HP-UX 11i v2 and v3 kernel configuration commands
simplify this process considerably. This lab shows you how!
1. Before you make any changes to the kernel configuration, save a copy of your current
configuration. Call the configuration copy “OldConfig”.
Answer:
# kconfig –s OldConfig
2. Add a title to your saved configuration, too. Call it “stable kernel
configuration”
Answer:
# kconfig –t OldConfig “stable kernel configuration”
3. Make sure your new kernel configuration was successfully saved. Does it appear in the
list of configurations reported by kconfig –v? Which kconfig option allows you to
view the list of modules and tunables in the saved configuration?
Answer:
# kconfig –v
# kconfig –a OldConfig | more
View the list of configurations
View the contents of OldConfig
4. Make a change to the current kernel configuration. Note the current value of the
maxuprc tunable, increase it by 32, and verify your work.
# kctune maxuprc
# kctune maxuprc+=32
# kctune maxuprc
5. Did the changes that you made to the kernel configuration take effect immediately?
Answer:
maxuprc is a dynamically tunable parameter, which should have changed immediately.
6. Save a copy of the updated configuration. Call it NewConfig. Assign a title to the new
configuration, too: “Approved new kernel configuration”.
Answer:
# kconfig –s NewConfig
# kconfig –t NewConfig “Approved new kernel configuration”
H3064S J.00
15-72
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
7. After testing the configuration thoroughly on a development server, you may choose to
apply the configuration to your production server. Export the current configuration to a
file called /tmp/system.Newconfig.
Answer:
# kconfig –e /tmp/system.NewConfig
8. View the resulting system file with the more command.
Answer:
# more /tmp/system.NewConfig
9. Use kconfig –d NewConfig to delete the NewConfig configuration.
Leave the /tmp/system.NewConfig file untouched.
Answer:
# kconfig –d NewConfig
10. Oops... We didn’t really want to delete NewConfig. Re-import it.
Answer:
# kconfig –i NewConfig /tmp/system.NewConfig
11. Use the find command below to review the directory structure created by the import
operation.
# find /stand/NewConfig
12. Load the NewConfig configuration.
Answer:
# kconfig –l NewConfig
13. Because management decided not to install the new application after all, load the
OldConfig configuration.
Answer:
# kconfig –l OldConfig
14. Determine if there are any changes pending a reboot. If there are, reboot. If not, proceed
to the next part of the lab.
Answer:
# kconfig –D
http://education.hp.com
H3064S J.00
15-73
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
Part 2: Managing Kernel Modules
When a new interface card is added or a previously unused HP-UX feature is needed, it
sometimes becomes necessary to add a kernel module to your kernel configuration. This
portion of the lab provides an opportunity to experiment with this task. You may complete
this portion of the lab using either the kcmodule command-line utility, kcweb, or some
combination of the two.
1. View the list of kernel modules that are on your system.
a. Does your kernel contain the sdisk module required to support SCSI disks?
b. Does your kernel contain the stape module required to support SCSI tapes?
Answer:
Most likely, your kernel will include all of these modules. To find out, run:
# kcmodule sdisk stape
2. The cdfs module, which supports the CDFS file system, is the first major module to fully
implement HP-UX DLKM functionality. View the detailed description of the cdfs module
by selecting it from the module list in kcweb, or by running kcmodule –v.
a. What is the current state of the module?
b. What other states are supported?
Answer:
# kcmodule –v cdfs
a. Looking at the current state field, you should see that the current state is probably
auto (the default/best state) or loaded (if some activity on the system caused the
module to auto-load).
b. The module also supports the static, loaded, and unused states.
3. If the module isn’t already loaded, force it to be loaded immediately.
Answer:
# kcmodule cdfs=loaded
4. Check the state again. What is the current state now? Did you have to reboot? What is
the current state cause?
Answer:
# kcmodule –v cdfs
Hopefully, the module state changed to loaded, as requested. Since cdfs is a DLKM
module, it was not necessary to reboot.
H3064S J.00
15-74
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
5. Change the cdfs module’s state to unused. Then review the verbose kcmodule output
again. Can you think of a situation that might prevent the administrator from marking the
cdfs module unused?
Answer:
# kcmodule cdfs=unused
# kcmodule –v cdfs
This should work! If, however, a CDROM or DVD had been mounted, the kcmodule
command would have failed.
6. In the last two questions, you should have discovered that the cdfs module can be
dynamically loaded and unloaded from the running kernel, without rebooting the system.
Thus if a CDFS module needed to be patched, it could be temporarily unloaded from the
running kernel, patched, and reloaded – no reboot required!
Return the cdfs module to the best state.
Answer:
# kcmodule cdfs=best
7. Verify that there are no pending kernel module changes. If there are, reboot before
proceeding.
Answer:
# kcmodule –D
There shouldn’t be any pending changes.
http://education.hp.com
H3064S J.00
15-75
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
Part 3: Managing Tunable Parameters
This part of the lab gives you an opportunity to experiment with tunable parameters. You
may complete this portion of the lab using either the kctune command-line utility, kcweb,
or some combination of the two.
1. Review the man page for maxuprc. What does this parameter do? When might it be
necessary to change it?
Answer:
# man maxuprc
This parameter determines the maximum number of processes a non-root user can run at
any given time.
2. Increase the maxuprc parameter by 50. Does the change take effect immediately?
Answer:
# kctune maxuprc+=50
# kctune –v maxuprc
The change takes effect immediately.
3. Add a few extra zeros on the end of the kctune command you used in the previous
question.
# kctune maxuprc+=50000
Answer:
HP-UX automatically does range checking to ensure that the new parameter value is
within acceptable boundaries. maxuprc must be less than nproc-5, so this command
should fail.
4. Review the man page for nproc. What does this parameter do?
Answer:
# man nproc
maxuprc determines the maximum number of processes that individual users can run
concurrently. nproc determines the maximum number of processes that can run
concurrently system-wide.
H3064S J.00
15-76
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
5. When you add additional application instances on a system, it may be necessary to
increase nproc. Create a user-defined parameter called numapps with initial value 2.
Answer:
# kctune –u numapps=2
6. Define nproc using a formula based on numapps: nproc=numapps*2000.
Answer:
# kctune nproc=numapps*2000
7. What happens if you increase numapps from 2 to 4?
Answer:
# kctune numapps=4
numapps increases to 4 and nproc increases to 8000.
8. Return nproc and maxuprc to their default values.
Answer:
# kctune nproc=default maxuprc=default
9. Reset numapps to value default. What happens?
Answer:
# kctune numapps=default
Setting a user defined parameter to default removes the user defined parameter, unless
the parameter is referenced in another parameter’s formula.
10. Verify that there are no pending tunable parameter changes. If there are, reboot before
proceeding.
Answer:
# kctune –D
There shouldn’t be any pending changes.
http://education.hp.com
H3064S J.00
15-77
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
Part 4: Logging and Troubleshooting
1. Reboot your system. When you get to the HPUX OS loader stage, terminate the autoboot
sequence.
Answer:
Integrity:
# cd /
# shutdown –ry 0
HP-UX Boot Loader for IA64 Revision 1.71
Press Any Key to interrupt Autoboot
\EFI\HPUX\AUTO ==> boot vmunix
Seconds left till autoboot – 10 Escape
Type 'help' for help
HPUX>
PARISC:
# cd /
# shutdown –ry 0
Processor is booting from first available device.
To discontinue, press any key within 10 seconds.
Main Menu: boot pri isl
Interact with IPL? y
ISL>
2. Boot to tunable maintenance mode. What distinguishes tunable maintenance mode from
a normal boot?
Answer:
Integrity:
HPUX> boot vmunix –tm
PARISC:
ISL> hpux –tm /stand/vmunix
When booting to tunable maintenance mode, all tunable parameters are set to the failsafe
values defined by the module developers. These failsafe parameters are designed to
ensure a successful boot to single-user mode so the administrator can troubleshoot
kernel problems.
H3064S J.00
15-78
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
3. Reboot your system again. This time, interrupt the autoboot process, list the contents of
/stand, and boot from the OldConfig configuration that you created back in Part 2.
Answer:
Integrity:
# reboot
HP-UX Boot Loader for IA64 Revision 1.71
Press Any Key to interrupt Autoboot
\EFI\HPUX\AUTO ==> boot vmunix
Seconds left till autoboot – 10 Escape
Type 'help' for help
HPUX> ll
HPUX> boot OldConfig
PARISC:
# cd /
# reboot
Processor is booting from first available device.
To discontinue, press any key within 10 seconds.
Main Menu: boot pri isl
Interact with IPL? y
ISL> hpux ls /stand
ISL> hpux /stand/OldConfig/vmunix
http://education.hp.com
H3064S J.00
15-79
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
Part 5: (OPTIONAL) Monitoring Usage and Configuring Alarms
Kernel resource usage monitoring and kernel resource alarms provide a useful mechanism
for monitoring activity on your system. This part of the lab shows you how! You may
complete this portion of the lab using either the kctune command-line utility, kcweb, or
some combination of the two.
1. If an application requires a large number of processes, it’s conceivable that the
application might attempt to fork more processes than maxuprc allows. This might
ultimately cause the application to fail. Configure two alarms to monitor maxuprc and
notify root when the thresholds below are initially exceeded. Use a 1 minute monitoring
interval.
a. If any user reaches 70% of maxuprc, write a message to syslog.log.
b. If any user reaches 80% of maxuprc, send an email to root.
Answer:
# kcalarm –a –t 70 –i 1 –e initial –n syslog:: maxuprc
# kcalarm –a –t 80 –i 1 –e initial –n email:root: maxuprc
2. Verify that your alarms were set properly.
Answer:
# kcalarm
You should see the two alarms you just defined.
3. su to user1. While logged in as user1, enter, compile, chmod, and run the simple C
program below. This program attempts to fork an infinite number of copies of itself. Log
out (nohup should ensure that the program continues running, even after you logout).
# su - user1
$ vi lotsproc.c
main()
{
while (1) {
fork();
sleep(2);
}
}
$ cc lotsproc.c –o lotsproc
$ chmod 555 lotsproc
$ nohup ./lotsproc &
Be sure to execute this program as user1, not root!
$ exit
$ exit
H3064S J.00
15-80
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 15
Configuring the HP-UX Kernel
4. After returning to your root login, run the kcusage -t maxuprc command to watch
the number of user processes approach the threshold.
Answer:
# kcusage -t maxuprc
5. Use the grep command to look for EMS messages in /var/adm/syslog/syslog.log.
Also check for email in root’s inbox. Do you see any indication that there is a problem?
Answer:
# grep EMS /var/adm/syslog/syslog.log
# tail /var/mail/root
kmond should have logged a syslog message when user1 exceeded 70% of maxuprc. Our
alarm at the 80% threshold level sent a message via email rather than via syslogd.
6. Use the commands below to stop and kill the lotsproc processes.
# kill –STOP $(UNIX95=true ps –o pid= –C lotsproc)
# kill –KILL $(UNIX95=true ps –o pid= –C lotsproc)
7. Delete all of the maxuprc alarms.
Answer:
# kcalarm –d maxuprc
http://education.hp.com
H3064S J.00
15-81
© 2010 Hewlett-Packard Development Company, L.P.
Module 15
Configuring the HP-UX Kernel
H3064S J.00
15-82
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 16 — Managing Software with SD-UX
Objectives
Upon completion of this module, you will be able to do the following:
•
Describe the significance of SD-UX bundles, products, filesets, and depots.
•
Describe the role of swagentd and swagent.
•
Install software using SD-UX via swinstall.
•
List software using SD-UX via swlist.
•
Remove software using SD-UX via swremove.
http://education.hp.com
H3064S J.00
16-1
© 2010 Hewlett-Packard Development Company, L.P.
Module 16
Managing Software with SD-UX
16–1. SLIDE: Introducing SD-UX
Introducing SD-UX
SD-UX is a comprehensive suite of utilities designed to simplify
OS software, application, and patch management in HP-UX.
SD-UX includes utilities for:
Installing Software
Copying Software
Removing Unwanted Software
Listing Software
Verifying Installations
Packaging Software
Student Notes
What Is SD-UX?
SD-UX is a comprehensive suite of utilities designed to simplify OS software, application, and
patch management in HP-UX. These commands are provided as part of the HP-UX operating
system and offer many options for flexible software management tasks, such as:
•
Installing or updating software on local systems (swinstall).
•
Building and configuring a network software server, or copying software from a
distribution source or media onto a system (swcopy).
•
Removing software from your system (swremove).
•
Listing available software (swlist).
•
Verifying that software is properly installed (swverify).
H3064S J.00
16-2
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 16
Managing Software with SD-UX
•
Creating software "packages" that make later software installations quicker and easier
(swpackage and Software Package Builder).
•
Configuring, unconfiguring, or reconfiguring installed software (swconfig).
SD-UX Provides GUI, TUI and Command Line Interfaces
All SD-UX commands can be executed from either shell scripts or the command line with a
series of options and arguments. The swinstall, swcopy, swremove, and swlist utilities
also provide intuitive menu-based graphical and terminal interfaces.
http://education.hp.com
H3064S J.00
16-3
© 2010 Hewlett-Packard Development Company, L.P.
Module 16
Managing Software with SD-UX
16–2. SLIDE: SD-UX Software Structure
SD-UX Software Structure
SD-UX manages software in units known as bundles, products, and filesets
bundle: BaseLVM
other filesets:
product: LVM
subproduct: LVM.Runtime
fileset: LVM-KRN
fileset: LVM-RUN
subproduct: LVM.Manuals
fileset: LVM-ENG-A-MAN
Student Notes
Software in SD-UX manages software via a hierarchy of bundle, product, subproduct and
fileset objects. All HP-UX OS, application, and patch software from HP is packaged in the
SD-UX format. Customers and other software vendors can use HP’s intuitive Software
Package Builder utility to package software in the SD-UX format, too, but many application
vendors prefer to use their own proprietary installation tools.
Filesets
A fileset is a group of related files and control scripts that can be installed
and managed together as a unit. Filesets are the smallest manageable SDUX software objects.
Subproducts
A subproduct is a group of related filesets within a product. The same
fileset can be part of more than one subproduct.
Products
A product is a collections of subproducts and filesets. The SD-UX
commands maintain a product focus but still allow you to specify
subproducts and filesets.
H3064S J.00
16-4
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 16
Managing Software with SD-UX
Bundles
A bundle is a collection of filesets, possibly from several different
products, that can be copied, installed, removed, listed, configured and
verified as a single entity. Most administrators install and manage
software at the bundle level.
SD-UX commands refer to this product structure in the format: bundle[.] or
product[.[subproduct.]fileset] with periods separating each level.
Examples
An example of a bundle is:
BaseLVM
B.11.31.0903
Logical Volume Manager
B.11.31.0903
LVM
An example of a product is:
LVM
Examples of subproducts are:
LVM.Manuals
LVM.MinimumRuntime
LVM.Runtime
B.11.31.0903
B.11.31.0903
B.11.31.0903
LVM Manuals
LVM MinimumRuntime
LVM Runtime
The Runtime subproduct contains all the filesets in the Minimum Runtime, as well as some
additional filesets. Examples of filesets are:
LVM.LVM-ENG-A-MAN
LVM.LVM-JPN-E-MAN
LVM.LVM-JPN-S-MAN
LVM.LVM-KRN
LVM.LVM-RUN
http://education.hp.com
B.11.31.0903
B.11.31.0903
B.11.31.0903
B.11.31.0903
B.11.31.0903
LVM
LVM
LVM
LVM
LVM
Manuals
Manuals
Manuals
Kernel components
Runtime commands
H3064S J.00
16-5
© 2010 Hewlett-Packard Development Company, L.P.
Module 16
Managing Software with SD-UX
16–3. SLIDE: SD-UX Software Depots
SD-UX Software Depots
An SD-UX “Depot” is a repository for SD-UX packaged software
• Depots may be stored in a directory, on CD or tape, or in a .depot format file
• Software from a depot may be swinstall‘ed to the OS or…
• swcopy’ed to another depot
Directory
Depot
CDROM
Depot
Tape
Depot
Depot
Files
*.depot
nst
swi
all
System
Files
sw
co
py
Depot
Directory
Student Notes
An SD-UX depot is a repository for software packaged using the SD-UX utilities. Software
can be copied from depot to depot using the swcopy command, or it can be installed to the
local files and directories using the swinstall command. There are several types of
software depots:
Directory Depot
Software in a directory depot is stored under a normal directory on
your file system (by default /var/spool/sw). The files and
directories in a depot directory must adhere to the SD-UX naming
convention and standard. When using the SD-UX commands, you
refer to a directory depot via its top-most directory. A host can
contain several depots. For example, a designated software
distribution server on your network might contain a depot of word
processing software, a depot of CAD software and a spreadsheet
software depot, all on the same server.
H3064S J.00
16-6
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 16
Managing Software with SD-UX
CDROM Depot
When a directory depot is burned to a CDROM, the depot directory
on the CDROM may be treated as an SD-UX depot source. Most
software from HP is distributed on CDROMs containing SD-UX
depots.
Tape Depot
Occasionally, a colleague or HP support person may send you an SDUX format tape depot.
*.depot files
Patches and software that you download from the
http://itrc.hp.com and
http://www.hp.com/go/softwaredepot websites can be
swinstall’ed from a .depot file.
Network Source Depots
If a depot resides on a system that is connected to a network, then that system can be
configured as a network depot server. Other systems on the network can install software
products from the network depot server rather than a tape or DVD.
Depot servers offer several advantages over installing directly from tape or CD-ROM:
•
Several users can "pull" software down to their systems (over the network) without
having to transport the tapes or disks to each user.
•
Installation from a network server is faster than from tape or CD-ROM.
•
Many different software products from multiple tapes, CD-ROMs and network servers
can be combined into a single depot serving all others on the network.
http://education.hp.com
H3064S J.00
16-7
© 2010 Hewlett-Packard Development Company, L.P.
Module 16
Managing Software with SD-UX
16–4. SLIDE: SD-UX IPD
SD-UX IPD
The Installed Product Database records all software installed on a system via SD-UX
• Installing a product via swinstall adds a record to the IPD
• Removing a product via swremove removes a record from the IPD
• The swlist command displays the contents of the IPD
SD-UX Installed Product Database
swinstall OnlineJFS
Accounting
OnlineJFS
AudioSubsystem
CDE
DiskQuota
InternetSrvcs
B.11.31
B.11.31
B.11.31
B.11.31
B.11.31
B.11.31
LVM
B.11.31
swremove SecPatchCk
Student Notes
In order to manage software intelligently on a host, SD-UX must know what software is
currently installed. SD-UX records this information in the Installed Product Database.
•
When installing a new software bundle, product, or fileset, the new software must be
added to the host's IPD.
•
When removing software, the software must be removed from the host's IPD.
•
Listing software is simply a matter of querying the IPD.
The IPD is stored in a directory structure under /var/adm/sw/products and is managed
by the SD-UX utilities.
NOTE:
Never manually edit the IPD, or manually remove, rename, or modify binaries
and libraries that have been installed via swinstall; doing so may leave the
IPD in an inconsistent state. If you install/remove software with the
swinstall and swremove commands, SD-UX automatically updates the IPD
for you.
H3064S J.00
16-8
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 16
Managing Software with SD-UX
16–5. SLIDE: SD-UX Daemons and Agents
SD-UX Daemons and Agents
The SD-UX swagentd daemon starts automatically at run level 2,
and must be running in order to install or remove SD-UX software
swagentd
•
Starts at run level 2, and runs continuously thereafter.
Listens for SD-UX requests.
Schedules swagent agents for each SD-UX request.
swagent
•
•
Performs software management tasks.
• Started as needed by swagentd.
•
depot
server
swagent
software
target
host
swagent
Student Notes
SD-UX uses software agent (swagent) processes to perform software management tasks.
When installing software, two swagents are required. One swagent must run on the host
containing the depot from which the software is being pulled, and one swagent process
must run on the host on which the software is to be installed. Other SD-UX utilities require
swagent processes as well.
swagent processes are started on an as-needed basis by the swagentd daemon. The
swagentd daemon must be running in order to perform any SD-UX software management
tasks. The swagentd daemon starts automatically during system startup, and should run
continuously on the system until shutdown. swagentd isn’t available in single-user mode;
thus software management tasks must be performed in multi-user mode.
If swagentd dies, you can restart it with the commands below.
# /sbin/init.d/swagentd start
# ps -ef | grep swagentd
http://education.hp.com
start it
check it
H3064S J.00
16-9
© 2010 Hewlett-Packard Development Company, L.P.
Module 16
Managing Software with SD-UX
16–6. SLIDE: Listing Software
Listing Software
Use the swlist command to view SD-UX software bundles, products, and filesets.
Determine if a specific installed bundle, product, or fileset has been installed:
# swlist bundle
List all bundles, products, or filesets on the localhost:
# swlist –l bundle|product|fileset
List all bundles, products, or filesets on another host:
# swlist –l bundle|product|fileset @ otherhost
List depots available on a depot server:
# swlist –l depot @ server
List bundles, products, or filesets available in a depot:
# swlist –l bundle|product|fileset –d @ server:/depot
Interactively list installed software:
# swlist -i
Student Notes
The remaining slides in the chapter discuss some of the basic SD-UX commands required to
manage software on your system. You can use the swlist command to list software in a
depot, or on your system. Have a look at the following examples:
Determine if a specific installed bundle, product, or fileset has been installed:
# swlist bundle
List all bundles, products, or filesets on the localhost. If you leave off the –l
bundle|product|fileset option, swlist lists bundles and products not included in
other bundles.
# swlist –l bundle|product|fileset
List all bundles, products, or filesets on another host by querying the target system’s
swagentd daemon.
# swlist –l bundle|product|fileset @ otherhost
H3064S J.00
16-10
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 16
Managing Software with SD-UX
List depots available on a depot server. Recall that a server may have multiple depots if it
serves clients running different versions of the OS, or if the administrator chooses to keep OS
and application software in different depots.
# swlist –l depot @ server
List bundles, products, or filesets available in a depot. After determining which depots are
available from a depot server, you will probably want to view the software in those depots.
# swlist –l bundle|product|fileset –d @ server:/depot
Interactively list installed software. If you prefer to use a GUI/TUI interface, add the –i
option.
# swlist -i
swlist supports several other less common options. See the man page for details.
http://education.hp.com
H3064S J.00
16-11
© 2010 Hewlett-Packard Development Company, L.P.
Module 16
Managing Software with SD-UX
16–7. SLIDE: Installing and Updating Software
Installing and Updating Software
Use any of the following three commands to install/update software:
# swinstall –s svr:/depot –x autoreboot=true mybundle
# swinstall –s svr:/depot –x autoreboot=true -x match_target=true
# swinstall
Student Notes
Software may be installed from an SD-UX depot using the swinstall command.
Running swinstall From the Command Line
Several options are required if you want to non-interactively install software.
The –s option identifies the session’s source depot. If the source is a directory or CDROM
depot, specify the depot directory’s pathname. If the source is a tape, use the tape drive
device file. If the source is a .depot file, specify the file’s full pathname.
#
#
#
#
#
swinstall
swinstall
swinstall
swinstall
swinstall
-s
-s
-s
-s
-s
/dev/rmt/0m
/var/spool/sw
/cdrom
depothost:/depotpath
/tmp/myapp.depot
from a local tape depot
from a local directory depot
from a CD mounted on /cdrom
from a network depot
from a depot file
H3064S J.00
16-12
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 16
Managing Software with SD-UX
The –x autoreboot=true option indicates that swinstall can reboot the system if
necessary. This option is generally required when installing products or patches containing
kernel filesets.
Normally when executing the swinstall command line, you must specify which product or
bundle you wish to install or update. The match_target option, if set to true, selects
software by locating filesets on the source that match the target system's installed filesets.
If executed without any options, swinstall launches a menu-based TUI or GUI interface,
depending on the value of the DISPLAY variable.
# swinstall –s svr:/depot –x autoreboot=true mybundle
# swinstall –s svr:/depot –x autoreboot=true -x match_target=true
# swinstall
The remaining notes below discuss the swinstall GUI interface in detail.
Choosing Source Depot
When you invoke the swinstall GUI/TUI, you will initially be prompted for your desired
depot type, and the hostname and path of the depot you wish to install software from. You
can skip the source depot selection dialog box by providing the source depot path on the
command line:
#
#
#
#
swinstall
swinstall
swinstall
swinstall
-s
-s
-s
-s
/dev/rmt/0m
/var/spool/sw
/cdrom
depothost:/depotpath
#
#
#
#
from
from
from
from
a
a
a
a
local tape depot
local directory depot
CD mounted on /cdrom
network depot
Choosing the Software View
Once you have specified a software source, swinstall presents a list of software available
from the selected depot. By default, swinstall lists all bundles on the depot, as well as
products that aren't included in the listed bundles. If you prefer to simply view the products
on the depot select:
View -> Change Software View -> Start with Products
You can return to the mixed bundle/product view by selecting:
View -> Change Software View -> Start with Top
Selecting Software to Install
Once the list of available software appears, you may select which software you wish to
install. You may select:
•
Entire bundles
•
Selected products
•
Selected filesets
http://education.hp.com
H3064S J.00
16-13
© 2010 Hewlett-Packard Development Company, L.P.
Module 16
Managing Software with SD-UX
To drill down to subproducts or individual filesets, double-click on any of the listed bundles
or products. Once you find the software you wish to install:
Select a product/bundle/fileset with the space bar (TUI) or mouse (GUI).
Select Actions --> Show Description of Software to view a software description.
Select Actions --> Mark for Install.
To meet dependencies, swinstall may automatically select additional filesets.
Repeat steps 1-4 to select additional software.
Select Actions --> Install (Analysis) to install the selected software.
Selecting Software to Update
The procedure described above can also be used to update already installed software to a
newer version. Simply select the products to update using Actions --> Mark for
Install, then choose Actions --> Install Analysis.
If you wish to update all of the software on your machine, you can use Actions -->
Match what Target Has to automatically select all of the depot software that matches
products and bundles already installed on your machine. Then choose Actions -->
Install Analysis to start the update. By default, swinstall does not reinstall filesets
if the same version already exists on your machine. If you want to reinstall the same version,
you can change the install options by selecting Options --> Change Options.
Starting the Install or Update
After marking software to install or update and selecting Actions --> Install
(analysis), swinstall checks available disk space and software dependencies to ensure
that the install will be successful. A dialog box appears so you can monitor the analysis
process.
After the analysis completes, click on the Logfile and Disk Space buttons to see the
results of the analysis. Assuming the analysis is successful, click the [ OK ] button to begin
the install or update.
Viewing the Install or Update Log
swinstall writes all of its actions to the file /var/adm/sw/swinstall.log.
You should check this file for possible errors, and follow any instructions that are given.
The /var/adm/sw/swinstall.log file contains a description of the events and any
errors that occurred during the update process. The following items are message labels and
their meanings. Search the file for ERROR, WARNING or NOTE. These labels record
anything important to know about the update process.
H3064S J.00
16-14
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 16
Managing Software with SD-UX
=======
Indicates that a task within swinstall is beginning or has completed.
ERROR
Indicates that the program cannot proceed, or that it needs corrective
action. In some cases this impacts swinstall so much that it cannot
continue.
WARNING
Usually indicates that the program can continue. However, it does say
something went wrong or requires attention (now or later). Read the
information attached to the WARNING and perform the tasks noted.
NOTE
Indicates that something out of the ordinary or worth special attention
has happened. The message may require no action on your part. In
other cases, the NOTE: message will require action. In some cases you
must infer the action that is necessary after the update.
A Note about Protected Software
Most HP software products are shipped to you on CD-ROM as "protected" products. That is,
they cannot be installed or copied unless you provide a "codeword" and customer ID.
Software that is unlocked by a codeword can only be used on computers for which you have
a valid license to use that software. It is your responsibility to ensure that the codeword
and software are used in this manner. The codeword for a particular software product is
found on the CD-ROM certificate, which you receive from HP. It shows the codeword and
the customer ID for which the codeword is valid. One codeword usually unlocks all the
products on the CD-ROM 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. A codeword
for a particular customer ID and CD-ROM only needs to be entered once per target system.
The codeword and customer ID are stored for future reference in
/var/adm/sw/.codewords. SD-UX will prompt you for these codewords or numbers
prior to the installation of protected software. You can enter or change the numbers via the
Graphical User Interface (using Add New Codeword from the Actions menu) or by using
the appropriate default (-x codeword= xxxx and -x customer_id= xxx) on the
command line. A sample codeword certificate is shown below:
HP Sales Order Number:12345678-90123C
Date:14Feb96
DISC PART#:B3108-31083______
CUSTOMER ID: 12345678-90123C
CODEWORD: 1234 5678 9012 3456 7890 1234 5678
PRODUCT NUMBER
--------------B2491A
B3701AA
http://education.hp.com
PRODUCT DESCRIPTION
------------------MirrorDisk/UX
GlancePlus Pak
H3064S J.00
16-15
© 2010 Hewlett-Packard Development Company, L.P.
Module 16
Managing Software with SD-UX
16–8. SLIDE: Removing Software
Removing Software
Use either of these commands to remove software:
# swremove –x autoreboot=true mybundle
# swremove
Student Notes
SD-UX also provides a mechanism for safely removing software from your system. This may
be useful if:
•
The software is no longer needed on the system.
•
The disk space occupied by the software is needed for some other purpose.
The /usr/sbin/swremove command can be used to remove software. Like swinstall,
swremove supports both a command-line and a GUI/TUI interface.
From the command line, simply run the following. If the software you wish to remove
doesn’t contain any kernel filesets, swremove won’t actually reboot the system.
# swremove –x autoreboot=true mybundle
H3064S J.00
16-16
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 16
Managing Software with SD-UX
When executed without any options or arguments, swremove launches a swinstall-like
GUI/TUI interface. The steps below explain how to remove software via the GUI/TUI
interface:
1. Run /usr/sbin/swremove.
2. Select the product/bundle/fileset to remove with the mouse or space bar.
3. Select Actions --> Mark for Remove.
4. Select Actions --> Remove (analysis).
After checking dependencies, swremove removes the appropriate files and directories, and
removes the product's entry from the IPD. After the remove is complete, you should check
the log to ensure that the remove was successful.
http://education.hp.com
H3064S J.00
16-17
© 2010 Hewlett-Packard Development Company, L.P.
Module 16
Managing Software with SD-UX
16–9. LAB: Managing Software with SD-UX
Directions
In this lab exercise, you will have an opportunity to install and remove an application using
HP’s SD-UX suite of software management utilities. Follow the directions carefully and
record the commands you use to complete each task.
Part 1: Preparing to use SDUX
1. Before running any of the SDUX utilities, all of your file systems must be mounted.
Check to ensure that your file systems are mounted.
2. The swagentd daemon must be running before you can install or remove software on
your host. Check to ensure that swagentd is running on your host.
H3064S J.00
16-18
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 16
Managing Software with SD-UX
Part 2: Listing Installed Software
1. Before installing any new software, you may want to see what software is already
installed on your system. The swlist command allows you to list the bundles, products,
and filesets available on your machine. Try the following commands:
# swlist -l bundle
# swlist -l product
# swlist -l fileset
2. What fields of information are provided in the swlist output?
3. Do you have the JFS product installed on your system?
So you have OnlineJFS?
How can you use the swlist command to find out?
4. HP-UX also offers an interactive version of swlist with a graphical interface. Run the
interactive version by typing:
# swlist –i
a.
b.
c.
d.
View a list of the products that are included in the BaseLVM bundle
View a list of the sub-products included in the LVM product
View a list of the filesets included in the MinimumRuntime sub-product
View a list of the files included in the LVM-RUN fileset
5. Exit out of swlist.
http://education.hp.com
H3064S J.00
16-19
© 2010 Hewlett-Packard Development Company, L.P.
Module 16
Managing Software with SD-UX
Part 3: Installing and Removing Software
1. Do you have any depots available on your system? Use swlist to find out!
2. What product(s) are available in the /labs/depots/echoapp.depot depot?
3. Install the EchoApp product from the depot.
4. View the /var/adm/sw/swinstall.log file. Did the installation succeed? Any
ERRORs or WARNINGs?
5. What happens if you swinstall the EchoApp product again? Try it! Watch the
resulting messages carefully. Is there any indication that the product has already been
installed?
6. Use the swremove command to remove EchoApp.
H3064S J.00
16-20
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 16
Managing Software with SD-UX
16–10. LAB SOLUTIONS: Managing Software with SD-UX
Directions
In this lab exercise, you will have an opportunity to install and remove an application using
HP’s SD-UX suite of software management utilities. Follow the directions carefully and
record the commands you use to complete each task.
Part 1: Preparing to use SDUX
1. Before running any of the SDUX utilities, all of your file systems must be mounted.
Check to ensure that your file systems are mounted.
Answer:
# mount –v
2. The swagentd daemon must be running before you can install or remove software on
your host. Check to ensure that swagentd is running on your host.
Answer:
# ps -ef | grep swagentd
http://education.hp.com
H3064S J.00
16-21
© 2010 Hewlett-Packard Development Company, L.P.
Module 16
Managing Software with SD-UX
Part 2: Listing Installed Software
1. Before installing any new software, you may want to see what software is already
installed on your system. The swlist command allows you to list the bundles, products,
and filesets available on your machine. Try the following commands:
Answer:
# swlist -l bundle
# swlist -l product
# swlist -l fileset
2. What fields of information are provided in the swlist output?
Answer:
By default, swlist shows three fields:
•
•
•
Product/bundle name
Version number
Description of the product/bundle
3. Do you have the JFS product installed on your system?
So you have OnlineJFS?
How can you use the swlist command to find out?
Answer:
# swlist JFS OnlineJFS
Both products should be installed.
4. HP-UX also offers an interactive version of swlist with a graphical interface. Run the
interactive version by typing:
# swlist –i
a.
b.
c.
d.
View a list of the products that are included in the BaseLVM bundle
View a list of the sub-products included in the LVM product
View a list of the filesets included in the MinimumRuntime sub-product
View a list of the files included in the LVM-RUN fileset
5. Exit out of swlist.
Answer:
Select File --> Exit
H3064S J.00
16-22
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Module 16
Managing Software with SD-UX
Part 3: Installing and Removing Software
1. Do you have any depots available on your system? Use swlist to find out!
Answer:
# swlist –l depot
2. What product(s) are available in the /labs/depots/echoapp.depot depot?
Answer:
# swlist –l product –d @ /labs/depots/echoapp.depot
3.
Install the EchoApp product from the depot.
Answer:
# swinstall –s /labs/depots/echoapp.depot –x autoreboot=true EchoApp
4. View the /var/adm/sw/swinstall.log file. Did the installation succeed? Any
ERRORs or WARNINGs?
Answer:
# more /var/adm/sw/swinstall.log
5. What happens if you swinstall the EchoApp product again? Try it! Watch the
resulting logfile messages carefully. Is there any indication that the product has already
been installed?
Answer:
# swinstall –s /labs/depots/echoapp.depot –x autoreboot=true EchoApp
You should see a message reporting:
3 filesets have the selected revision already installed.
6. Use the swremove command to remove EchoApp.
Answer:
# swremove EchoApp
http://education.hp.com
H3064S J.00
16-23
© 2010 Hewlett-Packard Development Company, L.P.
Module 16
Managing Software with SD-UX
H3064S J.00
16-24
© 2010 Hewlett-Packard Development Company, L.P.
http://education.hp.com
Download PDF
Similar pages