Académique Documents
Professionnel Documents
Culture Documents
Lab guide
Rev. 14.21
HP Confidential For training purposes only
Use of this material to deliver training without prior written permission from HP is prohibited.
Copyright 2014 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.
Microsoft and Windows are U.S. registered trademarks of Microsoft Corporation. Oracle and
Java are registered trademarks of Oracle and/or its affiliates. UNIX is a registered trademark
of The Open Group.
Printed in the USA
HP-UX Boot Camp
Lab guide
May 2014
HP Confidential For training purposes only
Contact HP Education for customer training materials.
Contents
Module 6 labBooting Integrity systems and using iLO and EFI file system
Objectives ...................................................................................................... 1
Requirements .................................................................................................. 1
Introduction ..................................................................................................... 1
Exercise 1Shutting down the system ................................................................ 2
Exercise 2Interacting with the EFI Boot Manager .............................................. 4
Exercise 3Interacting with the HPUX kernel loader ...........................................17
Objectives
After completing this lab, you should be able to:
Access the HP Virtual Lab (HPVL) environment
Identify the components in HPVL for course exercises
Exit the HPVL environment
Enter your assigned breakout room
Requirements
To complete this lab, you will need:
Internet access to the HPVL equipment at: http://www.hp.com/go/hpvl
Login credentials provided by your instructor
Note
Installing the web browser plug-ins might require administrative credentials on
your local system.
2. In the HPVL Access Portals field, type the HPVL username received from your
instructor and click Logon to access the appropriate virtual lab for your class.
Note
You might have to click Continue to accept a security alert.
3. The HPVL Access screen displays, with your HPVL username. Add the password
supplied by your instructor and click the Logon button.
4. Connecting to the HPVL requires you to install one or two plug-ins (depending
on your browser and if you have previously accessed the HPVL).
When prompted, click Install.
Note
Depending on your browser, the plug-ins might require that you close and restart
your web browser.
5. The HP Virtual Lab Welcome page displays. Click the Terminal Servers icon on
the left.
7. From the drop-down list, select your preferred screen resolution, color depth, or
optional Disable local drive access.
8. Click the Home link (the name might vary) to return to the welcome screen.
9. From the HP Virtual Lab Welcome page, in the Terminal Servers section, click the
HPVL Access Windows RDP web client (Full Functionality) link (the name might
vary).
10. From the Choose a Lab Group page, click the link for your instructor-assigned
lab group in the list.
11. Read the information provided on the lab group page and note the username
and password for each access method.
Important
! Two levels of access permissions will be required through the training. Root
access permissions are displayed on the HPVL page. User level access requires
the username assigned to you by your instructor (such as user1 or user2). The
password for the user level access is blank at the password prompt, press Enter
to log in.
12. To log into the System Console of your landing server through the Management
Processor, use the Connect to MP button on the HPVL Lab Group page.
13. At the terminal window, enter credentials found on the HPVL Lab Group page.
To finish MP session, type exit at UNIX prompt and use MP menu to exit the
session.
14. To connect to the landing server using the SSH protocol, use the Connect to Host
button. At the terminal window, use login credentials required by the Lab Guide.
Type exit to close the session.
L0 8 HP Confidential For training purposes only Rev. 14.21
Using the HP Virtual Lab
15. To connect to the iLO or SMH web-based management pages, use the Connect
to iLO or Connect to SMH buttons.
16. Internet Explorer window will open. To proceed, select Continue to this website
(not recommended).
17. At the next screen, enter the credentials provided at the HPVL Lab Group page
and click Sign In to log into the iLO interface. To finish the iLO session, close the
browser window.
Each lab group has one rx2660 Integrity server. Management connectivity is
provided by the management network. Student LAN provides with IP connectivity and
System Management Homepage. The build network will be used during the HP-UX
installation lab.
3. If you want to give control of the screen to your lab partner, from the Sharing in
Progress tool bar, click Transfer, select the name of your partner, and click
Assign.
You should also use your assigned sub-conference phone line, which usually has the
same number as your lab group number, to speak with your partner. In your lab
group sub-conference, you have private communication with your lab partner.
Note
Your instructor might ask you to return to the main conference room for an
important discussion. The instructor can also join your breakout room and
sub-conference line for support or review purposes.
5. Use your active phone communication to enter the sub-conference line. Press *9
and then press the number of your assigned sub-conference line followed by the
# key.
Example
To use the sub-conference line for breakout room 5, you would press *95# on
your phone.
6. To return to the main conference line, also called breakout room 0, press *9.
Objectives
After completing this lab, you should be able to navigate through the HP-UX file
system, create, remove, and list the content of directories.
Requirements
To complete this lab, you will need:
Credentials to access HPVL
Credentials for user level SSH access to one Integrity server (assigned by your
instructor).
7. What is the full path name of the file labrador in the tree drawing from the
previous exercise? What is its relative path name from your HOME directory?
Answer
Full path name:
/home/YOUR_USER_NAME/tree/dog.breeds/retriever/labrador
Relative path name: tree/dog.breeds/retriever/Labrador
8. From your HOME directory, change into the retriever directory. Using a
relative path name, change into the shepherd directory. Again, using a
relative path name, change into the car.models directory. Finally, return to
your HOME directory. What commands did you use? How did you know if you
arrived at each of your destinations?
Answer
$ cd
$ cd tree/dog.breeds/retriever
$ cd ../shepherd
$ cd ../../car.models
$ cd
9. Create a directory in your HOME directory called junk. Make that directory
your current working directory. What commands did you use? What is the full
path name of this new directory?
Answer
$ cd
$ mkdir junk
$ cd junk
$ pwd
/home/YOUR_USER_NAME /junk
10. From your HOME directory, make these directories with a single command line:
junk/dirA/dir1
junk/dirA
junk/dirA/dir2
junk/dirA/dir1/dirc
Did you have any problems? If you encounter any problems, before trying
again, remove any directories created as a result of your effort. What single
command did you use?
Answer
$ mkdir junk/dirA junk/dirA/dir1 junk/dirA/dir2
junk/dirA/dir1/dirc
or
$ mkdir -p junk/dirA/dir1/dirc junk/dirA/dir2
If you entered the directory names in the order in which they are presented in
the exercise, it will fail, because the command executes the arguments from left
to right.
11. From your HOME directory, obtain a directory listing of the directory dirA under
the junk directory. Use both relative and absolute path names. What
commands did you use?
Answer
$ ls junk/dirA
$ ls /home/YOUR_USER_NAME/junk/dirA
12. From your HOME directory, using only the rmdir command, remove all
subdirectories under the directory junk. How is this accomplished using a
single rmdir command?
Answer
$ rmdir junk/dirA/dir1/dirc
$ rmdir junk/dirA/dir1
$ rmdir junk/dirA/dir2
$ rmdir junk/dirA
$ rmdir junk/dirA/dir1/dirc junk/dirA/dir1 junk/dirA/dir2
junk/dirA
$ rmdir R junk (if you want to use single command)
13. Return to your HOME directory. With one command, display a long listing of the
files cp and vi (from the /usr/bin directory). Try to use both absolute and
relative path names.
Answer
$ cd
$ pwd
/home/YOUR_USER_NAME
Objectives
After completing this lab, you should be able to:
Display content of the file, copy, rename and delete files, and directories
Change permissions, group and owner of files and directories
Add and delete text and navigate through open files using the vi editor
Modify text using the vi editor
Note
There are sections of exercises to complete. You will find all necessary files in
HOME folder of the user assigned to you for this lab. Run the commands
necessary to solve the exercises and answer the associated questions. Time may
not allow you to complete all exercises.
Requirements
To complete this lab, you will need:
Credentials to access HPVL
One properly configured HP Integrity server (assigned by your instructor)
Username and password for HP-UX access for regular user access to the system
for each student (assigned by your instructor)
File named tst found in your HOME directory to start using the vi editor
The file is too long for one screen. The more command provides screen scrolling
control. For example:
$ more funfile
2. Use the more command to display the contents of the directory called tree.
What do you notice? What command do you use to see the contents of a
directory?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
$ more tree
****** tree is a directory ******
more knows that tree is a special directory file, not a normal text file, so its
contents cannot be displayed to the screen in a readable format. You use the ls
command to display the contents of a directory.
Example:
$ ls tree
3. Use the more command to display the file /usr/bin/ls. What do you notice?
Display the contents of /usr/bin/ls with the cat command. What happens?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
In an HP-UX environment:
$ more /usr/bin/ls
****** /usr/bin/ls: Not a text file ******
more recognizes that /usr/bin/ls is a binary file, not an ASCII text file, so
its contents cannot be displayed to the screen in a readable format.
$ cat /usr/bin/ls
Viewing a binary file with the cat command may change your terminal settings.
If using a putty terminal emulator:
Press Return to restore the terminal session.
If using an HP terminal or terminal window:
Hit the Break key.
Simultaneously press Shift + Ctrl + Reset.
Press Return to get the shell prompt.
At the prompt, type the commands:
$ tset -e k -e: sets erase to ^H, -k: sets kill to ^X
$ tabs
4. Go to your HOME directory. Copy the file called names to a file called names.cp.
List the contents of both files to verify that their contents are the same.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
$ ll names*
$ cp names names.cp
$ cat names names.cp
5. If the file names is modified, will it affect the file names.cp? Modify the file
names by copying the file funfile to the file names. What happened to the
file names and the file names.cp?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
The files names and names.cp are individual entities. The content of names
was overwritten with the content of the file funfile. The file names.cp is not
affected.
$ cp funfile names
$ more names names.cp
names now contains the same contents as funfile, while names.cp still
contains the content that was in names.
6. How do you restore the file names? Issue the command to restore names.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
To restore the contents of the file names, copy or move from the file names.cp.
$ cp names.cp names
or
$ mv names.cp names
7. Make another copy of the file names called names.new. Change the name of
names.new to names.orig.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
$ cp names names.new
$ mv names.new names.orig
8. How do you create two files (called names.2nd and names.3rd) that reference
the contents of the file names?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
$ ln names names.2nd
$ ln names names.3rd or $ln names.2nd names.3rd
Note the inode numbers are the same for the linked files.
rx26-413[/home/user1]#ll -i names*
87 -rw-rw---- 3 user1 class 61 Nov 12 1993 names
87 -rw-rw---- 3 user1 class 61 Nov 12 1993 names.2nd
87 -rw-rw---- 3 user1 class 61 Nov 12 1993 names.3rd
1977 -rw-r----- 1 user1 sshd 61 Apr 1 12:32 names.cp
1978 -rw-r----- 1 user1 sshd 61 Apr 1 12:40 names.orig
9. If you modify the contents of names, will the contents of names.2nd and
names.3rd be affected? Copy the file funfile to the file names, and do a
long listing of all your names files. Is names.orig affected? names.2nd?
names.3rd?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
The files names, names.2nd, and names.3rd are all referencing the same
data on the disk. If one is modified, all three will be modified. From the long
listing, you see that their link count has gone up to three, since there are now
three names referencing the same data. names.orig is still an individual entity,
as seen by its link count still being one.
$ cp funfile names
$ ls -l names.orig names names.2nd names.3rd
-rw-r--r-- 1 user3 class 37 Jul 24 11:06 names.orig
-rw-r--r-- 3 user3 class 125 Jul 24 11:08 names
-rw-r--r-- 3 user3 class 125 Jul 24 11:10 names.2nd
-rw-r--r-- 3 user3 class 125 Jul 24 11:12 names.3rd
Rev. 14.21 HP Confidential For training purposes only L2 5
HP-UX Boot Camp
10. Remove the file names. What happens to names.2nd and names.3rd?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
$ rm names
The files names.2nd and names.3rd are unaffected except that their link
count will be reduced by one, which can be seen with the ls -l command:
$ ls -l names.orig names names.2nd names.3rd
names not found
-rw-r--r-- 1 user3 class 37 Jul 24 11:06 names.orig
-rw-r--r-- 2 user3 class 125 Jul 24 11:10 names.2nd
-rw-r--r-- 2 user3 class 125 Jul 24 11:12 names.3rd
11. Use the interactive option for rm to remove names.2nd and names.3rd.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
$ rm -i names.2nd names.3rd
names.2nd? y
names.3rd? y
$
2. Move the following files, also found under your HOME directory, to the fruit
directory. Their destination names will be as specified below:
Source Destination
apple APPLE
peach Peach
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
$ cd
$ mv apple fruit/APPLE
$ mv peach fruit/Peach
$
3. Look at the tree directory structure in your HOME directory. It requires a little
organization.
a. Move the files collie and poodle, so that they are under the dog.breeds
directory.
b. Move the file probe under the sports directory.
c. Move the file taurus under the directory sedan.
d. Create a new directory under tree, called horses.
e. Copy the mustang file to the horses directory you just created.
f. Move the file cherry to the fruit directory you created in the previous
exercise.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
$ cd
$ cd tree
$ pwd
/home/YOUR_USER_NAME/tree
$ mv collie poodle dog.breeds
$ mv probe car.models/ford/sports
$ mv taurus car.models/ford/sedan
$ mkdir horses
$ cp car.models/ford/sports/mustang horses
$ mv cherry ../fruit
Hint:
You can make these changes from any directory, but what directory do you think
you should be in?
4. Move the fruit directory from your HOME directory to the tree directory.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
$ cd
$ mv fruit tree
5. Make the fruit directory your current working directory. Move the files banana
and lemon to the fruit directory.
Hint:
Remember dot dot (..) represents the parent directory and dot (.) represents
your current directory.
Answer
$ cd
$ cd tree/fruit
$ mv ../../banana ../../lemon .
Answer:
$ cd
$ more scaveng.README
north, 1 mile
$ cd scavenger
$ cd north/1_mile
$ more README
east, 2 miles
$ cd ../../east/2_mile
$ more README
You are on the right track!
south, 3 miles
$ cd ../../south/3_mile
$ more README
You have to keep going south, 2 miles
$ cd ../2_mile
$ more README
You are almost there west 1 mile
$ cd ../../west/1_mile
$ more README
CONGRATS You have found the end of the trail.
The code word is ________
Hint:
ls -ld mod5.dir
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
$ cd
$ mkdir mod5.dir
$ cp mod5.1 mod5.dir
$ ls mod5.dir
mod5.1
$ ls -ld mod5.dir
drwxrwxrwx 3 YOUR_LOGNAME class 1024 Jul 24 13:13 mod5.dir
$
Answer:
$ chmod a-rwx,u+rw mod5.dir
$ cd mod5.dir
sh: mod5.dir: Permission denied
$ ls mod5.dir
mod5.1
$ ls -l mod5.dir/
mod5.dir/mod5.1 not found
total 0
$ cat mod5.dir/mod5.1
cat: cannot open mod5.dir/mod5.1: Permission denied
$
4. Can other users copy files into your HOME directory? How do you display the
permissions for your HOME directory?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
$ cd
$ ls ld .
drwxr-xr-x 3 YOUR_USER_NAME class 1024 Jul 24 13:13 .
Other users can display the contents of your HOME directory, and change to your
HOME directory, but they cannot modify the contents of your HOME directory.
Therefore, other users cannot copy files to your HOME directory.
5. From your HOME directory, copy the file mod5.1 to the directory /usr/bin.
Did you have any problems? What are the permissions of /usr/bin?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
$ ls -ld /usr/bin
dr-xr-xr-x 3 bin other 1024 Jul 24 13:13 /usr/bin
Write access for others is not set on /usr/bin, so your copy should fail.
Since /usr/bin/date has read permission for others, you are able to make a
copy of the file.
You have read and write access. Your partner is also in the group class but has
no access to this file.
2. Still working with the file YOUR_LOGNAME, change the ownership of this file to
your partner. Can you access the file now? Try to make a copy of the file. Can
you get ownership back?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
$ ls -l YOUR_LOGNAME
-rw------- 1 YOUR_LOGNAME class 3967 Jan 24 13:13
YOUR_LOGNAME
You initially have read and write access.
$ chown partner_login_name YOUR_LOGNAME
$ ls -l YOUR_LOGNAME
-rw------- 1 partner class 3967 Jan 24 13:13 YOUR_LOGNAME
3. Make a copy of mod5.1 and call it mod5.3. Remove all permissions from the
file mod5.3. Can you change the ownership of this file to your partner?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
$ cp mod5.1 mod5.3
$ chmod a-rwx mod5.3
$ chown partner mod5.3
You can change the ownership because the permissions are associated with
your access to the contents of the file, not the ownership and group identifiers
assigned to the file.
3. Add the words many, many on the end of the line It will be used for.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
Go back to command mode, type Esc.
Move the cursor to the end of the line, type $.
Add (append) the text, a; enter text many, many.
4. Add a new blank line at the end of the file, and enter your name. DON'T PRESS
THE Esc!
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
Go back to command mode, type Esc.
Move cursor to the last line: G.
Open a new line below, o.
Type your name.
5. Using the Backspace, remove your name, and enter your partner's name.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
Backspace over the first name.
Type in your partner's name.
7. Enter 12345.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
12345
8. Backspace two times. Do any of the numbers disappear from your display?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
Backspace Backspace
The cursor will be under the 4. No characters disappear.
9. Enter 1234. What happens to the numbers that you backspaced over?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
The 4 and 5 will be typed over.
11. Press Esc. What happens to the characters you backspaced over? Where does
the cursor end up?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
The second 234 will disappear, and the cursor will back up so it is under the 1.
15. Quit your vi session saving the changes you made to the file tst.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
Enter :wq or ZZ
line1
line2
line3
line4
line5
line6
line7
line8
4. Write the first forty lines of the funfile out to another file called new.40.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
:1,40w new.40
6. Find and execute the command to place your cursor midway down the window.
Insert the following line:
This file is silly.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
This file is silly.
Esc
7. Without quitting vi, write your new version of the file out to a file called
funfile.123.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
:w funfile.123
8. Without leaving vi, load the file new.40 into the buffer, overwriting the
previous contents.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
:e new.40
11. Change this occurrence of FEATURE to BUG. Then quit out of vi without saving.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
cwBUG
Esc q! Return
12. Copy funfile to funfile.new. In funfile.new, search for all occurrences of the
string System or system and use /, cw, n, and . to change all but one of them to
XXXXX.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
1G
/[Ss]ystem
cwXXXXX Esc
n
.
n
n
.
n
.
n
.
13. Write your current edit session and quit the editor.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
:wq
or
ZZ
Objectives
After completing this lab, you should be able to:
Use the ioscan command to explore your system's hardware configuration
Explore the peripheral devices via the SMH interface
View and explore system device files.
Note
This lab was designed to be performed in teams using the shared MP system
console session.
Requirements
To complete this lab, you will need:
Credentials to access HPVL
One properly configured HP Integrity server (assigned by your instructor)
Credentials for MP access to one Integrity server (available at the HPVL login
page)
Root credentials to access the system through the shared MP console session
(available at the HPVL login page)
Introduction
All of the labs that follow the Lab 3 will be performed through the Management
Processor (MP) interface. To reach the Integrity Server system console perform
following tree steps.
1. At the HPVL landing page for your Lab Group, click Connect to MP button.
Terminal window will open.
2. At the terminal window, login as Admin / Admin.
3. Navigate to the console by typing co and pressing Enter.
At this time, you are connected to the MP shared console. At the time both students
will be able to see the console, but only one connection will have write permissions.
In order to gain controll, you will need to press the following key sequence: Ctrl+e
and then c and f in rapid succession.
Answer:
# model
3. Execute machinfo to determine your systems processor type and speed. Some
older PA-RISC systems do not support machinfo. If your system generates an
error message, skip this step.
Answer:
# machinfo
Answer:
# machinfo
5. Execute ioscan C cell to determine how many (if any) cell boards you
have on your system.
Answer:
# ioscan C cell
Answer:
# ioscan C processor
7. Execute ioscan C lan to determine how many LAN interfaces you have on
your system.
Answer:
# ioscan C lan
8. Execute ioscan C disk to determine how many disk class devices you have
on your system.
Answer:
# ioscan C disk
9. DVDs and CDROMs are disk class devices, too. Execute ioscan C disk
and look in the Description column for the string DVD or DV to determine if you
have a DVD drive.
Answer:
# ioscan C disk
10. Are there any parallel SCSI buses on your system? Execute ioscan C
ext_bus to view external bus type components. Look in the Description column
for the string SCSI.
Answer:
# ioscan C ext_bus
2. Does your system have any SCSI ext_buses? If so, can you determine their
hardware paths?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# ioscan kfNC ext_bus
3. Skip this step if your system does not have SCSI buses. If your system does have
one or more SCSI buses, how many devices are on the first bus? Execute the
command below to find out. Replace the hardware path below with the first
SCSI bus hardware path you discovered in the previous step.
# ioscan -kfNH n/n/n/n
Answer:
Answers will vary.
4. Skip this step if your system does not have any SCSI buses. If you add a new
device to the SCSI bus you explored in the previous step, which SCSI target
addresses have already been claimed by existing devices on the bus?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
Look at the second to last component in each SCSI device address to determine
which target addresses are already taken. There must not be duplicate SCSI
target addresses on a SCSI bus.
5. 11i v3s new mass storage stack introduced some helpful new tools for
managing disks and LUNs, particularly on systems with multi-pathed devices.
Execute ioscan m lun to determine which disks (if any) on your system are
multi-pathed. If so, how many paths lead to each disk/LUN?
# ioscan m lun
Answer:
If ioscan lists multiple lunpaths below an Agile View LUN hardware path, the
LUN is multi-pathed.
6. Choose a disk or LUN from the ioscan m lun output above and record its
LUN hardware path and one of its lunpath hardware addresses below. If your
system has multi-pathed LUNs, use one of the multi-pathed LUNs.
LUN hardware path: ....................................................................................
lunpath hardware path: ...............................................................................
Conceptually, what is the difference between a LUN hardware address and a
lunpath hardware address?
Answer:
A LUN hardware path represents a disk or LUN. A lunpath hardware address
represents a single path to a disk or LUN. Each LUN has one LUN hardware
path, but may have multiple lunpath hardware addresses.
7. Recall that ioscan m lun also reports each LUNs health status. Are any of
your LUNs currently disabled?
# ioscan m lun
Answer:
All LUNs should be online.
8. When troubleshooting SAN problems, your storage administrators may ask you
to determine a LUNs WWID. Execute the command below to determine the
WWID of the disk or LUN you selected in the previous question.
# scsimgr get_attr -a wwid -H 64000/0xfa00/0x___
Answer:
Answers may vary.
9. You may also be asked to determine a LUNs LUN ID. Use the lunpath hardware
address that you selected previously to determine the LUNs LUN ID.
# scsimgr get_attr -a lunid H
Answer:
Answers may vary.
In the lab solutions for the questions that follow, this disk will be identified as diska.
Record it here:
1. Some commands require block DSFs; some commands require character DSFs.
Is the boot disk DSF above a block or character DSF?
Answer:
# ll /dev/disk/diska
The b at the beginning of the ll output, as well as the fact that the DSF is in the
/dev/disk/ directory rather than /dev/rdisk/, indicate that this is a block
DSF.
The driver name will be the first field in the output, and can also be seen as a
result of the lsdev(1m) command.
3. How can you view a list of the other DSFs associated with the disk? On Integrity
systems, which DSF represents the EFI boot disk partition containing the
operating system?
Answer:
# ioscan -kfnN /dev/disk/diska or
# ioscan m lun /dev/disk/diska
Integrity boot disks should have eight DSFs: a block and raw DSF for the entire
disk, plus block and raw DSFs for each of the EFI partitions. The
/dev/[r]disk/diska_p2 DSFs represent the OS partition in 11i v3. In 11i v1
and v2, the OS partition DSF ends in s2.
4. What is the agile view LUN hardware path associated with this DSF?
Answer:
# ioscan -kfnN /dev/disk/diska or
# ioscan m lun /dev/disk/diska or
# lssf /dev/disk/diska
7. How can you correlate the boot disks persistent DSF with its legacy DSFs?
Answer:
# ioscan m dsf /dev/disk/diska
8. Are there any other disks available on the system? View a list of all of the disk
class devices and their persistent DSFs. Record the persistent block DSF for one
of the other disks on the system below:
Non Boot Disk Persistent DSF: /dev/disk/disk___
In the lab solutions for the questions that follow, this disk will be identified as
diskb.
Answer:
# ioscan kfnNC disk or
# ioscan m lun
There should be at least one disk on the system besides the boot disk.
Rev. 14.21 HP Confidential For training purposes only L3 11
HP-UX Boot Camp
Objectives
After completing this lab, you should be able to configure and manage disks using
LVM, including creation and extension of:
Physical volumes
Volume groups
Logical volumes
Optionally, you will learn how to access HP SMH to explore disk configuration
through the web interface.
Note
This lab was designed to be performed in teams.
Requirements
To complete this lab, you will need:
Credentials to access HPVL
One properly configured HP Integrity server (assigned by your instructor)
Credentials for MP access to one Integrity server (available on the HPVL login
page)
Root credentials to access the system through the shared MP console session
(available on the HPVL login page)
Four disks available for this exercise
Introduction
For the rest of the labs, you will need to know the DSF name of your system boot
disk, in order to NOT destroy it. Execute lvlnboot v command to determine your
boot disk device file:
# lvlnboot v
For the lab exercises that follow, this disk will be identified as diska. Record it here:
Boot Disk Persistent DSF: /dev/disk/disk____
You will neeed four disks to complete these folowing exerices: Execute ioscan
command to list all disks contained in your server:
# ioscan kfnNC disk
Select four available disk drives from the output of the ioscan command, by
eliminating the boot disk and the DVD drive first. For the lab exercises identify these
disks as diskw, diskx, disky, and diskz. Record your disk names below.
diskw = ....................................................................................................
diskx = ......................................................................................................
disky = ......................................................................................................
diskz = ......................................................................................................
Answer:
Combine information gathered from execution of these two commands:
# for d in /dev/rdisk/disk*
do
diskowner $d
done
# strings /etc/lvmtab
Answer:
# pvcreate /dev/rdisk/diskw
# pvcreate /dev/rdisk/diskx
# pvdisplay /dev/rdisk/diskw
# pvdisplay /dev/rdisk/diskx
3. Create a new LVMv2.2 vg02 volume group using your newly created physical
volumes. Use an 8MB extent size and a 1TB maximum volume group size.
Answer:
# vgcreate V 2.2 S 1t s 8 vg02 /dev/disk/diskw
/dev/disk/diskx
4. Use vgdisplay and pvdisplay to check the status of your new volume
group. How many physical volumes are in the volume group at this point? How
many logical volumes are in the volume group at this point? What is the extent
size? How many physical volumes could potentially be added to the volume
group? How many logical volumes could potentially be added to the volume
group?
Answer:
# vgdisplay -v vg02 | more
# pvdisplay /dev/disk/diskw /dev/disk/diskx
Currently there should be just two PVs in the volume group, and no LVs. The PE
size should be 8 MB. Max LVs should be 2047. Max PVs should be 2048.
5. Create a 32MB datavol logical volume in your new volume group. Verify that
your volume was created successfully. Which disk did LVM use for the new
logical volume?
Answer:
# lvcreate -n datavol L 32 vg02
# lvdisplay -v /dev/vg02/datavol
The logical volume was placed on the first disk in the volume group in
accordance with the LVM default allocation policy.
6. Create a second logical volume in vg02. Attempt to make this logical volume
33MB, and allow LVM to choose a logical volume name for you. What name
did LVM choose for the new logical volume? Why? How large is the logical
volume? Why? Which disk is the new logical volume on? Why?
Answer:
# lvcreate L 33 vg02
# lvdisplay v /dev/vg02/lvol2
LVM assigns default logical volume names based on the logical volumes minor
number. Since this is the second logical volume in the volume group, its minor
number ended in 02, and the logical volume name was set to lvol2.
Even though we requested a 33MB logical volume, LVM rounded up to the next
highest extent boundary, yielding a 40MB logical volume.
The logical volume was placed on the first disk in the volume group in
accordance with the LVM default allocation policy.
7. The first physical volume is gradually filling up. Lets create a third logical
volume, but this time, to provide some load balancing, do whatever is necessary
to ensure that the logical volume is stored on the second disk. The logical
volume should be named appvol, and should be 32MB in size. Before
extending the logical volume, check the size of the disk using the diskinfo
command.
Answer:
# diskinfo b /dev/rdisk/diskx
# lvcreate n appvol vg02
# lvextend L 32 /dev/vg02/appvol /dev/disk/diskx
Answer:
# lvchange C y /dev/vg02/datavol
# lvchange C y /dev/vg02/appvol
Answer:
# newfs /dev/vg02/rappvol
# mkdir /app
# mount /dev/vg02/appvol /app
2. At this point, we should have plenty of free space in the volume group. Just to be
sure, though, add one more disk to vg02. Use vgdisplay to verify that this
worked.
Answer:
# pvcreate /dev/rdisk/disky
# vgextend vg02 /dev/disk/disky
# vgdisplay v vg02
4. Did extending the logical volume also extend the file system in the logical
volume? If not, did extending the appvol logical volume also extend the /app
file system in the logical volume? If not, do whatever is necessary to extend the
/app file system now.
Answer:
No. The file system must be separately extended.
# bdf
# fsadm F vxfs b 64m /app
# bdf
5. It turns out that you do not need that extra space after all. Do whatever is
necessary to reduce appvol back down to 32MB.
Answer:
/app contains a file system that must be reduced before the logical volume can
be reduced.
# fsadm -F vxfs b 32m /app
Then, you should be able to reduce the appvol logical volume.
# lvreduce L 32 /dev/vg02/appvol
When a logical volume is reduced useful data might get
lost; do you really want the command to proceed (y/n): y
6. At this point, you are wasting a great deal of space in the volume group; you
have three disks, but are only using about 104MB of space! Perhaps it would
make sense to take one of the disks out of the volume group for use elsewhere
on the system. Lets remove the second disk from the disk group. Which
command can you use to determine which logical volumes have extents on the
second disk currently?
Answer:
# pvdisplay v /dev/disk/diskx | more
7. Move the extents that are currently on the second disk to the third disk, then
remove the second disk from the volume group. After removing the disk from the
volume group, remove the LVM headers from the disk as well. Do not execute
mediainit!
Answer:
# pvmove /dev/disk/diskx /dev/disk/disky
# vgreduce vg02 /dev/disk/diskx
# pvremove /dev/rdisk/diskx
8. Now that you have removed one disk from the volume group, lets go a step
further and remove the volume group itself. What happens if you simply attempt
to vgremove the volume group at this point? Try it!
# vgremove -X vg02
Answer:
Fails! You cant remove a volume group until all of the logical volumes in the
volume group, and all but the last disk in the volume group, have first been
removed. At this time you still have two physical volumes present in the VG.2
9. Do whatever is necessary to remove the volume groups logical volumes, then try
to remove the volume group again.
Answer:
# umount /app
# lvremove f /dev/vg02/datavol
# lvremove f /dev/vg02/appvol
# lvremove f /dev/vg02/lvol2
# vgremove X vg02
10. Remove one of the remaining physical volumes from the volume group, then try
to remove the volume group again. Dont forget to remove volume groups
directory in /dev manually, or via the vgremove X option.
Answer:
# vgreduce vg02 /dev/disk/disky
# vgremove X vg02
3. Login as root. From the SMH Home Page, under the System Configuration area,
click Disks and File Systems, and click the Volume Group tab. If you wish, you
may create some test volume groups from this tab, and some logical volumes
from the Logical Volumes tab. However be sure to remove them before
proceeding to next Lab..
Note
A similar Disks and File Systems functional area exists in sam in earlier versions
of HP-UX.
Note
If AutoComplete Passwords window appears, check Dont offer to remember any
more passwords, and click No to proceed.
Note
After you are done with exploring the SMH interface for Disks and File System,
make sure that you remove all additional volume groups and release all disks
you used during this lab.
Objectives
After completing this lab, you should be able to make a mirror of an Integrity LVM
boot disk for HP-UX 11iv2 and 11iv3.
Note
Carefully follow the instructions below. This lab should be completed in teams,
using shared MP console interface.
Requirements
To complete this lab, you will need:
Credentials to access HPVL
One properly configured HP Integrity server (assigned by your instructor)
Credentials for MP access to one Integrity server (available on the HPVL login
page)
Root credentials to access the system through the shared MP console session
(available on the HPVL login page)
Select one available disk drive from the previous output, eliminating the boot disk
and the DVD drive.
diska = .................... (existing boot disk, which will be corrupted and replaced)
diskb = ................................. (new mirror created and reinitialized as a clone)
2. Create an idisk description file (/tmp/idf) that defines the desired sizes of
the EFI partitions. The EFI system partition should be at least 500MB. The HPSP
partition should be at least 400MB. Allow the HP-UX OS partition to use all of
the remaining space. Execute idisk with the w (write) option to create the
partitions described in /tmp/idf. The f option identifies the idisk
description file that contains the desired partition sizes.
# vi /tmp/idf
3
EFI 500MB
HPUX 100%
HPSP 400MB
# idisk wf /tmp/idf /dev/rdisk/diskb
3. Execute idisk again without the wf options to view the partition table and
verify that the partitions were successfully created:
# idisk /dev/rdisk/diskb
Partition 1 (EFI):
Partition Type GUID = c12a7328-f81f-11d2-ba4b-
00a0c93ec93b
Unique Partition GUID = ee47f8f6-71f8-11dc-8000-
d6217b60e588
Starting Lba Lo = 0x40
Starting Lba Hi = 0x0
Ending Lba Lo = 0xf9fff
Ending Lba Hi = 0x0
Partition 2 (HP-UX): Partition Type GUID = 75894c1e-
3aeb-11d3-b7c1-7b03a0000000
Unique Partition GUID = ee47f914-71f8-11dc-8000-
d6217b60e588
Starting Lba Lo = 0xfa000
Starting Lba Hi = 0x0
Ending Lba Lo = 0x430e7ff
Ending Lba Hi = 0x0
Partition 3 (HPSP):
Partition Type GUID = e2a1e728-32e3-11d6-a682-
7b03a0000000
Unique Partition GUID = ee47f932-71f8-11dc-8000-
d6217b60e588
Starting Lba Lo = 0x430e800
Starting Lba Hi = 0x0
Ending Lba Lo = 0x43d66bf
Ending Lba Hi = 0x0
...
5. Use ioscan to verify that the DSFs were created successfully. There should be
block and raw DSFs for each EFI partition on the new mirror.
# ioscan kfNn /dev/disk/diskb
Class I H/W Path Driver S/W State H/W Type
Description
==============================================================
disk 2 64000/0xfa00/0x2 esdisk CLAIMED DEVICE HP Disk
/dev/disk/diskb /dev/rdisk/diskb
/dev/disk/diskb_p1
/dev/rdisk/diskb_p1
/dev/disk/diskb_p2
/dev/rdisk/diskb_p2
/dev/disk/diskb_p3
/dev/rdisk/diskb_p3
3. By default, the LVM quorum rules require at least 51% of the disks in vg00 to be
available at boot time. However, you want to be able to boot the system when
just 50% of the mirrors in vg00 are available. Thus, you 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
4. Verify your work. Standard UNIX commands such as cat and more cant
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 each mirror.
# efi_cp d /dev/rdisk/diska_p1 u /efi/hpux/auto /dev/tty
boot vmunix -lq
# efi_cp d /dev/rdisk/diskb_p1 u /efi/hpux/auto /dev/tty
boot vmunix lq
2. Use vgdisplay to verify your work. vgdisplay should list both disks as
members of the vg00 volume group:
# vgdisplay v vg00 | grep -e "PV Name" e "PV Status"
PV Name /dev/disk/diska_p2
PV Status available
PV Name /dev/disk/diskb_p2
PV Status available
3. Mirror all of the vg00 logical volumes with lvextend. The logical volumes
must be extended in the same order that they are configured on the original
boot disk. Use pvdisplay -v to determine the list of logical volumes and their
order.
# pvdisplay -v /dev/disk/diska_p2 | grep 'current.*0000 $'
00000 current /dev/vg00/lvol1 00000
00038 current /dev/vg00/lvol2 00000
00550 current /dev/vg00/lvol3 00000
00583 current /dev/vg00/lvol4 00000
00608 current /dev/vg00/lvol5 00000
00611 current /dev/vg00/lvol6 00000
00923 current /dev/vg00/lvol7 00000
01252 current /dev/vg00/lvol8 00000
4. If the logical volumes are arranged in sequence lvol1-8, simply use the for
loop shown below. If not, you may have to lvextend the logical volumes one
by one. Use the 11i v3 parallel synchronization feature.
# for lv in /dev/vg00/lvol*
do
lvextend s m 1 $lv
done
# lvsync T /dev/vg00/lvol*
5. Use vgdisplay -v to verify your work. The LV Status field for each logical
volume should report syncd.
# vgdisplay -v vg00 | grep -e "LV Name" -e "LV Status"
LV Name /dev/vg00/lvol1
LV Status available/syncd
LV Name /dev/vg00/lvol2
LV Status available/syncd
LV Name /dev/vg00/lvol3
LV Status available/syncd
LV Name /dev/vg00/lvol4
LV Status available/syncd
LV Name /dev/vg00/lvol5
LV Status available/syncd
LV Name /dev/vg00/lvol6
LV Status available/syncd
LV Name /dev/vg00/lvol7
LV Status available/syncd
LV Name /dev/vg00/lvol8
LV Status available/syncd
7. Use lvlnboot v to verify your work. You should see references to both disks
in the boot, root, and swap portions of the output. Dump data isnt mirrored, so
the dump entry will only reference the first disk in the volume group.
# lvlnboot v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/disk/diska_p2 -- Boot Disk
/dev/disk/diskb_p2 -- Boot Disk
Boot: lvol1 on: /dev/disk/diska_p2
/dev/disk/diskb_p2
Root: lvol3 on: /dev/disk/diska_p2
/dev/disk/diskb_p2
Swap: lvol2 on: /dev/disk/diska_p2
/dev/disk/diskb_p2
Dump: lvol2 on: /dev/disk/diska_p2, 0
8. Add a line to /stand/bootconf so SDUX knows which disks are boot disks.
When patches are swinstalled 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 the p2 OS partition!
# vi /stand/bootconf
l /dev/disk/diska_p2
l /dev/disk/diskb_p2
You wont populate the HPSP partition on the lab system. Proceed to rebuild the EFI
Boot Manager Menu.
Recall that mirror write performance on swap logical volumes may be enhanced by
disabling the Mirror Write Cache. If the primary swap volume is also configured as a
dump volume, its critical to change the consistency recovery policy to NONE to avoid
corrupting dump data in case of a system panic.
Changing the MWC policy for primary swap is a bit tricky since primary swap is
usually activated even in single-user mode!
LVM maintenance mode boots the system without activating vg00, or enabling
primary swap. Without primary swap activated, you should be able to change the
consistency recovery policy on lvol2.
1. Check the current consistency recovery policy on lvol2:
# lvdisplay /dev/vg00/lvol2
Consistency Recovery MWC
3. Interrupt the boot process and boot to LVM maintenance mode. At HPUX prompt
enter boot vmunix lm command and press Enter:
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
4. Activate vg00, change the consistency recovery policy, and update the BDRA:
# vgchange a y vg00
# lvchange M n c n /dev/vg00/lvol2
# lvlnboot R
2. Interrupt the EFI boot manager autoboot by pressing Escape at this screen:
3. Select your mirrored disk from the boot manager selection menu and press
Enter:
4. Verify which disk you booted from when the boot process completes. Corellate
the output of grep command with the result of the execution of setboot
command:
# grep Boot device /var/adm/syslog/syslog.log
vmunix: Boot device's HP-UX HW path is: 2/2/2/2.2.2
# setboot
Objectives
After completing this lab, you should be able to:
Gracefully shut down and reboot the HPUX server
Interact with the EFI Boot Manager
Work with the HPUX kernel loader from the EFI shell
Note
This lab was designed to be performed in teams using the shared MP system
console session.
Requirements
To complete this lab, you will need:
Credentials to access HPVL
One properly configured HP Integrity server (assigned by your instructor)
Credentials for MP access to one Integrity server (available on the HPVL login
page)
Root credentials to access the system through the shared MP console session
(available on the HPVL login page)
Introduction
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 systems console interface via the MP.
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.
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
At tis point MP might ask you if you want to power ON the system. Select ON, and
navigate to main menu by using the ma command.
MP:CM> ma
MP> co
2. If you miss the EFI boot Manager menu, you can configure to not autoboot to
primary disk drive from HPUX interface, and then reboot the system:
# setboot B off
# shutdown ry 0
3. Boot from the primary boot disk. However, as soon as the HPUX kernel loader
countdown begins, press any key to drop out to the HPUX> kernel loader
prompt.
Answer:
HP-UX Boot Loader for IPF -- Revision 2.043
HPUX>
4. At the HPUX> prompt, type exit to return to the EFI Boot Manager menu.
Answer:
HPUX> exit
Answer:
6. Select the Boot from File option on the Boot Option Maintenance Menu and
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:
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 Load File [Core LAN
A] (or B).
In the following steps you will use the File System Explore menu to navigate to
find the HPUX kernel loader. 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 countdown begins, press any key to drop out to the HPUX> kernel
loader prompt.
Answer:
7. Select the boot disk hardware path that contains Part1. It should be the first
one on the list.
Use the prompts that follow to select EFI and press Enter.
8. At the HPUX> prompt, type exit to return to the EFI Boot Manager Boot
Configuration menu.
Answer:
HPUX > exit
In the following steps you will add a custom entry to the EFI Boot Manager
Menu that points to 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.
9. From the EFI Boot Manager select Boot Configuration, and then Add Boot Entry
and press enter.
Answer:
10. Select the device that includes the string Part1in the hardware path.
11. Return to the EFI Boot Manager Menu by pressing ESC and verify that your
custom menu item appears in the boot menu list.
Answer:
The main menu should look like this:
12. Select the new menu item to see if it boots. As soon as the HPUX kernel loader
countdown begins, press any key to drop out to the HPUX> kernel loader
prompt.
Answer:
HP-UX Boot Loader for IPF -- Revision 2.043
HPUX>
13. At the HPUX> prompt, type exit to return to the EFI Boot Manager Menu.
Answer:
HPUX> exit
14. Use the Boot Configuration menu to remove the custom boot menu item that
you just added. Select Remove Boot Entry and press enter.
Answer:
EFI Boot Maintenance Manager ver 1.10 [14.61]
15. Press ESC to return to the previous menu. From the Boot Menu select EFI Shell
[Built-In].
Answer:
Answer:
Shell> help a b
Answer:
Shell> help b info
18. Execute the info b all command to view your systems configuration.
Answer:
Shell> info b all
Answer:
Shell> exit
Answer:
HP-UX Boot Loader for IPF -- Revision 2.036
HPUX>
2. Type the 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
Answer:
HPUX> boot vmunix is
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
Objectives
After completing this lab, you should be able to:
Rebuild missing LVM configuration files
Access a volume containing failed disks
Replace a failed LVM disk
Restore and backup logical volumes
Reset the root password using the System Recovery console
Note
This lab was designed to be performed in teams using the shared MP system
console session.
Requirements
To complete this lab, you will need:
Credentials to access HPVL
One properly configured HP Integrity server (assigned by your instructor)
Credentials for MP access to one Integrity server (available at the HPVL login
page)
Root credentials to access the system through the shared MP console session
(available at the HPVL login page)
Introduction
Carefully follow the instructions below. You will need two disks to complete these
exercises. Use the commands you have learned in the Lab 03 to identify two free
disks. For the reminder of this Lab, these disks will be called diskw and diskx.
diskw = ....................................................................................................
diskx = .....................................................................................................
Answer:
# pvcreate /dev/rdisk/diskw
# pvcreate /dev/rdisk/diskx
# vgcreate V 2.2 S 2t s 4 vg01 /dev/disk/diskw
/dev/disk/diskx
2. Create a 16MB non-mirrored logical volume called simplevol on the first disk
in the volume group. Create a VxFS file system in the logical volume, mount the
file system on /simple, and copy a few files to the file system from
/usr/bin/.
Answer:
# lvcreate n simplevol vg01
# lvextend L 16 /dev/vg01/simplevol /dev/disk/diskw
# newfs /dev/vg01/rsimplevol
# mkdir /simple
# mount /dev/vg01/simplevol /simple
# cp /usr/bin/a* /simple 2>/dev/null
3. Create a 16MB mirrored logical volume called mirrorvol. Create a VxFS file
system in the logical volume, mount the file system on /mirror, and copy a few
files to the file system from /usr/bin/.
Answer:
# lvcreate n mirrorvol vg01
# lvextend L 16 /dev/vg01/mirrorvol /dev/disk/diskw
# lvextend m 1 /dev/vg01/mirrorvol /dev/disk/diskx
# newfs /dev/vg01/rmirrorvol
# mkdir /mirror
# mount /dev/vg01/mirrorvol /mirror
# cp /usr/bin/a* /mirror 2>/dev/null
Answer:
# ll /etc/lvmconf/
Answer:
# vgcfgrestore n vg01 lv
Answer:
# mv /etc/lvmtab_p /etc/lvmtab_p.bkp
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
The ls command succeeds. LVM commands fail.
3. Use the vgscan command to recreate the /etc/lvmtab_p file. Include the
option to use persistent device files. Since you eliminated the /etc/lvmtab_p
file, you may see some warning messages; these can be safely ignored. How
does this command determine which disks belong to which volume groups?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# vgscan -N
Answer:
# lvmadm l
# ll /etc/lvmtab_p*
Answer:
# umount /mirror
# umount /simple
Answer:
# vgchange a n vg01
Volume group "vg01" has been successfully changed.
3. Simulate corruption by writing 64MB of zeroes to the first disk in the volume
group. This should be more than adequate to overwrite the LVM and file system
headers.
Answer:
# dd if=/dev/zero of=/dev/rdisk/diskw bs=8k count=8k
8192+0 records in
8192+0 records out
Answer:
# vgdisplay v vg01
vgdisplay: Volume group not activated.
vgdisplay: Cannot display volume group "vg01".
6. What can you do to activate the volume group without quorum? Make it so!
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# vgchange a y q n vg01
vgchange: Warning: Couldn't attach to the volume group
physical volume "/dev/disk/diskw":
Physical volume contains no LVM information.
Activated volume group.
vgchange: Couldn't resynchronize stale partitions of
the logical volume: I/O error
Volume group "vg01" has been successfully changed.
This still generates error messages, but at least the volume group was activated.
Yes! vgdisplay displays the volume group, but includes error messages
regarding the missing physical volume.
The command fails. vgcfgbackup only works if all physical volumes in the
volume group are available.
The mirrored logical volume should mount successfully, since the logical volumes
data is still accessible via the remaining mirror. The non-mirrored logical volume
mount request should fail, since the only disk in the logical volume is no longer
accessible.
Note
If the disk had physically failed, this is the point where you would detach the disk
with pvchange, physically replace the failed disk and execute the scsimgr
and io_redirect_dsf commands to re-associate the instance numbers and
DSFs. You can skip these steps in the lab since the disk did not physically fail.
3. Since you are not using LVM OLR, there is no need to re-attach the disk with
pvchange; use vgchange to reactivate the entire volume group and recognize
the restored disk instead.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# vgchange a y vg01
Volume group "/dev/vg01" is already active in requested mode.
Unfortunately, since this logical volume was not mirrored, the data must be
restored from tape, or re-copied from /usr/bin/.
# cp /usr/bin/a* /simple 2>/dev/null
3. Recall that you already successfully mounted mirrorvols file system in this
logical volume, even while one of the mirrors was unavailable. Did the user data
survive the disk failure, too?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# ls /mirror
Exercise 6Cleaning up
Before proceeding to the next exercise, remove the vg01 volume group and its
device files.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# umount /mirror
# umount /simple
# lvremove f /dev/vg01/mirrorvol
# lvremove f /dev/vg01/simplevol
# vgreduce vg01 /dev/disk/diskx
# vgremove X vg01
2. At EFI Boot Manager, interrupt the system boot, and select Core LAN A as boot
device. Note the hardware path used for boot, on the EFI Boot Manager marked
as HP-UX Primary Boot.
3. At the prompt to select the operating system to install, select the option 2 to
install the OS version B.11.31. Do NOT leave system unattended at this time, since
it will default to the incorrect target and you will have to start again from step 1.
Downloading file AUTO (226 bytes)
1. target OS is B.11.23 IA
2. target OS is B.11.31 IA
3. Exit Boot Loader
4. Wait for the prompt, and press Enter to cancel batch-mode installation. Answer
y and press Enter again to proceed with the manual installation. Be carefull to
capture the moment prompt appears. Otherwise you will have to reboot and
lose a lot of time waiting.
WARNING: The configuration information calls for a non-
interactive
installation.
5. Use the TAB key to navigate to the Run an Expert Recovery Shell option and
press Enter to continue.
6. At the prompt Networking must be enabled in order to load a shell. (Press any
key to continue.), press Enter.
7. To select lan0 as the default network interface, press Enter.
INFORMATION to verify:
Device file used for '/'(ROOT) is c0t0d0.
The hardware path to disk is 0/3/0/0/0/0.0.0.
Selection: a [Enter]
11. At the HP-UX Recovery Menu, type a and press Enter to mount the root disk and
exit to a shell.
HP-UX Recovery MENU
Selection: a [Enter]
12. At the File System Check Menu, type a and press Enter to perform the file system
check before mounting.
FILE SYSTEM CHECK MENU
Selection: a [Enter]
13. At this point, the System Rescue Image is loaded to the RAM. Your actual root
device is mounted in read only mode on /ROOT/stand. To look around, use
the ls l command. Note that output on your system might look different.
log replay in progress
replay complete - marking super-block as CLEAN
Mounting /dev/dsk/c0t0d0s4 to /ROOT/stand as read only.
Loading /sbin/mount...
Creating temporary ROOT partition.
Loading /sbin/umount...
umount /ROOT/stand.
Executing fsck on /ROOT file system.
Loading /sbin/fsck...
fsck -F vxfs -y /dev/rdsk/c0t0d0s5
log replay in progress
replay complete - marking super-block as CLEAN
Mount /ROOT file system.
/sbin/fs/vxfs/mount /dev/dsk/c0t0d0s5 /ROOT
Loading /sbin/mount...
Mount /ROOT/stand again
/sbin/mount -F vxfs /dev/dsk/c0t0d0s4 /ROOT/stand
===============================================================
==
The root disk has been mounted under /ROOT. If you would like
to
L7 18 HP Confidential For training purposes only Rev. 14.21
Recovering LVM disks and structures
# ls l
total 56
-rw------- 1 root sys 16 Mar 3 06:51
.sh_history
drwxr-xr-x 7 root root 96 Mar 3 05:10
RAMFS1
drwxr-xr-x 8 root root 1024 Mar 3 05:10
RAMFS2
drwxr-xr-x 16 root root 8192 Feb 28 10:39 ROOT
dr-xr-xr-x 2 bin bin 24 Jun 16 2011 cdev
d--------- 2 bin bin 24 Jun 16 2011 core
lrwxr-xr-x 1 root sys 12 Mar 3 05:11 dev -
> ./RAMFS1/dev
drwxr-xr-x 2 bin bin 24 Jun 16 2011 disc
dr-xr-xr-x 4 bin bin 1024 Mar 3 05:23
duped_root
lrwxr-xr-x 1 root sys 12 Mar 3 05:11 etc -
> ./RAMFS2/etc
-rw-r--r-- 1 root sys 546 Mar 3 05:11
installfs.cfg
drwxr-xr-x 2 root root 4096 Jun 16 2011
lost+found
lrwxr-xr-x 1 root sys 12 Mar 3 05:11 opt -
> ./RAMFS2/opt
drwxr-xr-x 5 bin bin 1024 Mar 3 06:49 sbin
drwxr-xr-x 2 bin bin 1024 Mar 3 06:49 stand
-rw-r--r-- 1 root sys 19 Mar 3 06:46
tempfile
lrwxr-xr-x 1 root sys 12 Mar 3 05:11 tmp -
> ./RAMFS2/tmp
lrwxr-xr-x 1 root sys 12 Mar 3 05:11 usr -
> ./RAMFS2/usr
lrwxr-xr-x 1 root sys 12 Mar 3 05:11 var -
> ./RAMFS2/var
14. You might notice that several important system directories, such as opt, dev,
var, usr, tmp point to the RAMFS device. That means that the file system you
are using at the moment does not represents the real root device, but the Rescue
System Image which is loaded to the RAM File System. To access the real disk
device, you have to issue chroot command. System image is kept at minimal
size (8MB), so before using the chroot command, you have to load it to the
Rescue Environment by executing the loadfile command.
# loadfile chroot
# chroot /ROOT /sbin/sh
15. You are ready to change the root password. Issue standard UNIX passwd
command to do that. Please note that if you mistype the root password at this
time, you have to repeat the procedure again which will demand more time. If
you want, you can omit the next command in the lab environment, just to be sure
that the password remains the same.
# passwd root
New password: hp [Enter]
Re-enter new password: hp [Enter]
16. To finish the chroot session, at the root prompt, type exit and press Enter.
# exit
17. Type menu and press Enter to return to the HP-UX Network System Recovery
Main Menu.
# menu
18. In the HP-UX Network System Recovery Main Menu, type b to reboot the system.
Press Enter and wait for system to reboot. After reboot is finished, you will be
able to log in using your previously assigned password.
HP-UX NETWORK SYSTEM RECOVERY
MAIN MENU
This menu is for listing and loading the tools contained on the
core media.
Once a tool is loaded, it may be run from the shell. Some tools
require other
files to be present in order to successfully execute.
Objectives
After completing this lab, you should be able to clone, mount, unmount, and activate
DRD clones.
Note
Ask your instructor which disk you should use as your boot disk clone. This lab
was designed to be performed in teams using the shared MP system console
session.
Requirements
To complete this lab, you will need:
Credentials to access HPVL
One properly configured HP Integrity server (assigned by your instructor)
Credentials for MP access to one Integrity server (available at the HPVL login
page)
Root credentials to access the system through the shared MP console session
(available at the HPVL login page)
One disk to be used as your boot disk clone
Introduction
For the rest of this lab, you will need to know DSF name of the disk to receive system
image during the DRD cloning process. Use command lvlnboot, ioscan and
strings to select disk which is NOT in use by the system.
# lvlnboot v
# ioscan kfnNC disk
# strings /etc/lvmtab
Fill in the information about the disk NOT being used by the system below:
New DRD clone = .............................................. (represented as diskz below)
2. Clone the existing boot volume group to the disk /dev/disk/diskz. 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/diskz -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 should
not appear in the mount table.
Answer:
# mount v
5. Simulate an accidental boot disk misconfiguration 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/hpws22/apache/bin/apachectl start
You should get a message indicating that the daemon cant 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!
Temporarily mount the clones file systems.
Answer:
# drd mount
# mount v
6. 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
7. Use vipw and the output from the diff command to add the www line back
into the active images /etc/passwd file.
Answer:
# vipw
www:*:30:1::/:
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
Answer:
# drd activate
Activating the image simply changes the boot paths in NVRAM. The clone disk
should now be the primary boot device.
Answer:
# shutdown ry 0
14. When the system returns, execute drd status again to verify that the system
booted from the clone disk. Use the output of command to check the DSF of the
Original Disk, Clone Disk and Booted Disk.
Answer:
# drd status
* Clone Disk: /dev/disk/diskz
* 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/diska
* Original EFI Partition: Boot loader and AUTO file present
15. Run drd activate and reboot again to reactivate the original system image.
Answer:
# drd activate x reboot=true
16. Use the drd status command to verify which disk you booted from.
# drd status
17. To verify if the drd clone drive content is not modified, issue following
commands:
# drd mount
# mount -v
# more /var/opt/drd/mnts/sysimage_001/etc/passwd
19. Will drd sync recognize this change in /etc/passwd? Execute drd sync
in the preview mode to find out!
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# drd sync p may take several minutes
20. To prove the data sync, once more issue the following command
# more /var/opt/drd/mnts/sysimage_001/etc/passwd
Answer:
# more /var/opt/drd/sync/files_to_be_copied_by_drd_sync
Answer:
# drd sync may take several minutes
24. Clobber the clone that you created by overwriting the top of the disk with
zeroes.
# dd if=/dev/zero of=/dev/rdisk/diskz bs=1048576
count=1024
Objectives
After completing this lab, you should be able to install and remove applications and
patches using HPs SD-UX suite of software management utilities.
Note
This lab was designed to be performed in teams using the shared MP system
console session.
Requirements
To complete this lab, you will need:
Credentials to access HPVL
One properly configured HP Integrity server (assigned by your instructor)
Credentials for MP access to one Integrity server (available at the HPVL login
page)
Root credentials to access the system through the shared MP console session
(available at the HPVL login page)
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
3. Do you have the JFS product installed on your system? Do you have OnlineJFS?
How can you use the swlist command to find out?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# swlist JFS OnlineJFS
To navigate Text User Interface, use arrow keys (Up / Down), Enter to confirm
action, and TAB key to switch between the menu and main window.
a. View a list of the products that are included in the BaseLVM bundle. (Use
the arrow keys Up / Down).
b. View a list of the sub-products included in the LVM product. (Once you
position the cusor on the LVM Product row, press enter to view sub-
products).
c. View a list of the filesets included in the MinimumRuntime sub-product.
d. View a list of the files included in the LVM-RUN fileset.
5. Exit out of swlist. Use the TAB key to access the File menu, and press enter to
expand it. Use arrow keys to navigate to Exit, and press enter to terminate swlist
command.
Answer:
Select File Exit.
Answer:
# swinstall s /labs/depots/echoapp.depot x autoreboot=true
EchoApp
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
Answer:
# swremove EchoApp
Answer:
# swinstall s /labs/depots/echoapp.depot \
x autoreboot=true EchoApp
Note that the backslash is not part of the command and is only here to indicate
line continuation because the command spans onto 2 lines but needs to be ran
onto 1 line only.
2. List the products installed on your host and verify that EchoApp is installed? Try
running echoapp to see what it does.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# swlist EchoApp
# /opt/echoapp/bin/echoapp
Answer:
# cp /labs/patches.tgz /tmp
2. cd to the /tmp directory, unzip, and untar the patch package. What files are
created as a result?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# cd /tmp
# gzip -d /tmp/patches.tgz
# tar xvf /tmp/patches.tar
3. Unpack the patch's shar archive. Read the .text file. What problem does this
patch fix? Will the patch perform an automatic reboot?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# sh /tmp/PHSS_01111 # Yields PHSS_01111.text and
PHSS_01111.depot
# more /tmp/PHSS_01111.text
4. Follow the directions in the patch's .text file to install the patch. Since you
may need to remove this patch eventually, do not to use the
patch_save_files=false option. Try running echoapp again. Did the
patch seem to work?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# swinstall -x autoreboot=true -x patch_match_target=true \
-s /tmp/PHSS_01111.depot
# /opt/echoapp/bin/echoapp
Again, note that the backslash is not the part of the command. It is used to split
the comand in two lines.
5. swinstall keeps copies of all files that have been replaced by patches in the
/var/adm/sw/save directory. Take a look at the PHSS_01111 files under this
directory. Which two files were replaced by the PHSS_01111 patch?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# cd /var/adm/sw/save
# ll | grep PHSS_01111
# cd PHSS_01111; ll
ECHOAPP-MISC-DOC
ECHO-RUNTIME
Answer:
# /opt/echoapp/bin/echoapp
7. Now run swremove to remove the patch. Again look at the files under
/var/adm/sw/save. What changed?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# swremove PHSS_01111
# ll /var/adm/sw/save/PHSS_01111
# /opt/echoapp/bin/echoapp
Answer:
# swremove EchoApp
Answer:
# swinstall s /labs/depots/echoapp+patch.depot x \
autoreboot=true EchoApp
Note
This feature is new with 11.x.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# /opt/echoapp/bin/echoapp
# ll /var/adm/sw/save/PHSS_01111
3. Now remove the EchoApp product. Afterward, use swlist to see if PHSS_01111
is still installed on your system. When you remove a product, what happens to
the patches associated with that product?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# swremove x autoreboot=true EchoApp
Answer:
# swlist EchoApp PHSS_01111
# ll /var/adm/sw/save/PHSS_01111
Answer:
# swinstall s /labs/depots/echoapp+patch.depot x \
autoreboot=true EchoApp
4. Can you still remove the product associated with the patch? Try it. Then swlist
both the EchoApp product and the patch.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# swremove x autoreboot=true EchoApp
# swlist EchoApp PHSS_01111
Objectives
After completing this lab, you should be able to:
Manualy start and stop services
Enable and disable services to run at the system boot
Note
This lab was designed to be performed in teams using the shared MP system
console session.
Also, portions of this lab may disable your LAN interface card. If you are using
remote lab equipment, log in via the MP console interface for the duration of the
lab.
Requirements
To complete this lab, you will need:
Credentials to access HPVL
One properly configured HP Integrity server (assigned by your instructor)
Credentials for MP access to one Integrity server (available at the HPVL login
page)
Root credentials to access the system through the shared MP console session
(available at the HPVL login page)
Answer the questions below using the output from the ls command above:
1. At which run level does the NFS client functionality start?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# ls /sbin/rc*.d/S* | grep nfs
The NFS client functionality starts at run level 2.
4. At which run level does the "net" script set your IP address?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# ls /sbin/rc*.d/S* | grep net
Run level 2.
5. At which run level does the sendmail daemon begin delivering mail?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# ls /sbin/rc*.d/S* | grep mail
Run level 2.
7. At which run level does the system enable access to ftp, telnet, and other Internet
services?
Hint
Internet services are started by the inetd Internet daemon.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# ls /sbin/rc*.d/S* | grep inet
Run level 2.
Answer:
# /sbin/init.d/sendmail stop
Sendmail is not running. The output on your terminal might end with grep
sendmail. Thats not sendmail daemon running, but actual grep command
captured by ps ef.
4. Restart sendmail properly and then check to ensure the daemon is running.
Answer:
# /sbin/init.d/sendmail start
# ps -ef | grep sendmail
See if you can find the /etc/rc.config.d configuration files for each of the
services below, and determine which of those services are enabled on your system.
Objectives
After completing this lab, you should be able to:
Configure a new host name and IP address for each system in your classroom
Troubleshoot network connectivity problems
Requirements
To complete this lab, you will need:
Credentials to access HPVL
One properly configured HP Integrity server (assigned by your instructor)
Credentials for MP access to one Integrity server (available at the HPVL login
page)
Root credentials to access the system through the shared MP console session
(available at the HPVL login page)
Introduction
In this lab, you will configure a new host name and IP address for each system in
your classroom. Your instructor will assign you a host name to work with.
The first two octets for all Lab Groups will be 192.168, and should be consistent
across all hosts within your classroom.
When configuring new LAN interface, use the lan1 network interface. During this
lab, you will lose SSH connectivity to your server. Make sure that you are using
System Console through the Management Processor to maintain connectivity.
Within the lab environment, you have no external connectivity. During the lab, you
will have to test your network settings by querying the IP address of the server from
the other Lab Group. Ask your instructor what other theam you should be working
with.
After you enter the requested information, the script will display your assigned IP
address and a variety of other network settings that you will use later in the
class. The script will also create a new hosts file in /tmp/hosts. Run the script,
then review the /tmp/hosts file. By default, the script doesnt actually change
your network configuration.
# /labs/netsetup.sh
# cat /tmp/hosts
3. Changing your host name and IP on a running system can wreak havoc on CDE
and other applications. Kill CDE before going any further:
# /sbin/init.d/dtlogin.rc stop
Every machine should have the Networking product loaded. Other LAN
software will vary from system to system.
3. Does your kernel contain the drivers necessary to support your LAN cards?
Which command will tell you if a driver has CLAIMED your LAN cards?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# ioscan funC lan
The drivers should already be installed, and all cards should be CLAIMED.
Note that the solutions below assume that your default LAN card is lan0
6. From the command line, set your interface cards current speed/duplex setting to
auto_on.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# lanadmin X auto_on 0 or...
# nwmgr --set --attribute speed=auto_on -c lan0
7. Did the previous step work? Verify your interface cards speed/duplex setting.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# lanadmin x 0 or...
# nwmgr --get --attribute speed -c lan0
9. From the command line, change your IP address to the address suggested at the
top of the /tmp/hosts file. Be sure to change your netmask to 255.255.0.0,
too!
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# more /tmp/hosts
# ifconfig lan1 w.x.y.z netmask 255.255.0.0 # replace w.x.y.z with
your IP address
10. Is your new IP address set properly? How can you find out?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# ifconfig lan1
ifconfig should indicate that the IP and netmask have been set properly.
13. From the command line, disable IP forwarding by setting the ndd
ip_forwarding parameter to 0.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# ndd set /dev/ip ip_forwarding 0
14. Did the IP forwarding parameter change? How can you find out?
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# ndd get /dev/ip ip_forwarding
Note
Use array index 0.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# vi /etc/rc.config.d/nddconf
TRANSPORT_NAME[0]=ip
NDD_NAME[0]=ip_forwarding
NDD_VALUE[0]=0
16. From the command line, change the TCP/IP and UUCP hostnames to the
hostname suggested at the top of your /tmp/hosts file.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# hostname sanfran # use your assigned hostname
# uname -S sanfran # use your assigned hostname
19. Copy the /tmp/hosts file into place as the default /etc/hosts file. Also
define your instructors first name as an alias for hostname corp.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# cp /etc/hosts /etc/hosts.old
# cp /tmp/hosts /etc/hosts
# vi /etc/hosts
20. Modify the hostname in your /etc/issue file that HP-UX displays at login
time. Your /etc/issue file may be slightly different than the sample file below.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# vi /etc/issue
your_new_hostname [Location: Alpahretta, GA USA] (see
/etc/issue)
2. The hostname command will display your system host name. Check to ensure
that your host name is set properly.
Answer:
# hostname
Your host name should be set properly (it will fail if the hostname was not set).
3. Try to ping the IP address of the server from other lab group. Does this work?
You will have to wait for another Lab Group to have server configured in order
to make ping working.
.................................................................................................................
.................................................................................................................
.................................................................................................................
.................................................................................................................
Answer:
# ping hostname # ask your instructor what IP to use here
Assuming the hostname you ping has been added to /etc/hosts and that the
host is configured properly, this should work.
Performance
Question:
I've noticed a significant drop in system response time and performance. What
steps can I take to improve it?
Answer:
Performance may be affected by many different factors. Sometimes removing
pseudo drivers from the kernel for networking software that you may not be
using improves performance.
The problems may also be in the upper layer software (ftp or telnet). Also, it is
possible that too little memory is allocated to hold fragmented messages in the
IP layer. IP messages may be fragmented into smaller parts when the message is
sent through the system. The fragments must be held in memory for some time so
that the entire message can be reassembled because the fragments arrive at the
destination at different times and possibly out of order. Normally, fragmentation
reassembly memory is limited arbitrarily so that incomplete messages do not
consume all of memory, which could cripple the system.
During stressful networking activity, some fragments might never be delivered
because they are typically dropped in transit; for example, due to a collision or
resource limitations on an intermediate system. However, fragments might also
not be delivered (dropped) if there is insufficient fragmentation reassembly
memory on the destination system during periods of high network activity. This
can degrade performance due to retransmissions of data. If the problem is due
to a high number of fragments dropped after time-out (see the output from the
command netstat -sp ip), you might want to increase the size of the
fragmentation reassembly memory by changing the ip_reass_mem_limit
value using the ndd command. (The default is 2MB for the system.) Enter the
command /usr/bin/ndd -h to display ndd parameters and their use.
Note
Related documentation: Refer to the ifconfig(1M) man page.
or
lanscan
Note
Related documentation: Refer to the nwmgr (1M) or lanscan(1M) man page.
Note
Related documentation: Refer to the lanadmin(1M) man page.
Note
You can also reset the LAN card using the reset operation of the nwmgr
command. See nwmgr(1M) for details.
Tracing
Question:
What's the best way to obtain and format tracing information when I am using
the nettl utility?
Answer:
HP field engineers recommend the following commands.
To begin LAN and loopback tracing, execute:
nettl -tn pduin pduout -e ns_ls_driver -f filename
The file filename.TRC0 is the most recent trace file. If this file does not
contain the trace information you are looking for, check the filename.TRC1 file.
To format your LAN trace using a filter file, execute:
netfmt -c filterfile -N -f filename.TRC0 > fmt0
nettl appends TRC0 or TRC1 to the name you give the raw trace file.
Plumbing error
Question:
L12 16 HP Confidential For training purposes only Rev. 14.21
Configuring and troubleshooting network connectivity
Objectives
After completing this lab, you should be able to perform the installation of the HP-UX
server using the Ignite-UX service.
Requirements
To complete this lab, you will need:
Credentials to access HPVL
One properly configured HP Integrity server (assigned by your instructor)
Credentials for MP access to one Integrity server (available at the HPVL login
page)
Root credentials to access the system through the shared MP console session
(available at the HPVL login page)
One disk to perform the installation to (assigned by your instructor)
CO: Console
VFP: Virtual Front Panel
CM: Command Menu
SMCLP: Server Management Command Line Protocol
CL: Console Log
SL: Show Event Logs
HE: Main Help Menu
X: Exit Connection
[rx26-412] MP> CM
3. At the Command Menu prompt, enter the command PC to enter the Power
Control menu, and use command C to power cycle the system.
[rx26-nnn] MP:CM> pc
PC
Current System Power State: On
4. To confirm that you want to reboot the OS, answer Y at the prompt. MP will
return the prompt. After initiating Power Cycle, press the Ctrl+b command
sequence to return to the main MP menu.
5. System will be power cycled.
You must shut down the OS manually before this command is
executed.
Failure to do this can cause problems when the OS is
restarted.
Confirm? (Y/[N]): Y
[rx26-412] MP:CM>
[Ctrl+b]
6. At the main MP menu, use the CO command to connect to the System Console.
MP MAIN MENU:
CO: Console
VFP: Virtual Front Panel
CM: Command Menu
SMCLP: Server Management Command Line Protocol
CL: Console Log
SL: Show Event Logs
HE: Main Help Menu
X: Exit Connection
[rx26-412] MP> CO
2. At the operating system prompt, select option 2 to install the OS version B.11.31.
Downloading file AUTO (226 bytes)
1. target OS is B.11.23 IA
2. target OS is B.11.31 IA
3. Exit Boot Loader
3. The lab environment you are connected to is made for unintended installation.
At this point, if you leave the Installer running, it will silently boot, install the
predefined operating environment and return at the login prompt after the
installation. Since you want to explore the installation user interface, watch
carefully as the for the installation procedure prompting you to press Enter to
interrupt the automatic boot.
If you are not carefull enough, you will have to reset the server again and then
start from the step 1. To reset the server, press CTRL+b, enter cm command and
then rs to initiate power cycle. Return to the system console by pressing CTRL+b
and then co.
To proceed with the interactive installation, you will have to press Enter at the
prompt below, and then Y to confirm.
WARNING: The configuration information calls for a non-
interactive installation.
Press <Return/Enter> within 10 seconds to cancel
batch-mode installation: [Enter]
Really cancel non-interactive install and start the
user-interface? ([y]/n): Y
4. As the system reaches Welcome to Ignite-UX! screen, select the Install HP-UX
choice (accept default) and press Enter.
9. Once on the Basic tab, navigate to the Configurations field using the TAB key.
10. Use the Space bar to select HP-UX B.11.31 Boot Camp is selected and press
Enter.
11. Use the TAB key to navigate to the Go! button and press Enter.
12. At the Confirmation screen, you will receive a warning because your disk
contains a file system. You can disregard this warning for lab purpose by using
the TAB key again to navigate to the Go! button and press Enter.
HP-UX Installation will continue unattended and will last about 30 minutes.