Professional Documents
Culture Documents
AIX 7 1 AN15 Advanced Administration and Problem Determination Exercises
AIX 7 1 AN15 Advanced Administration and Problem Determination Exercises
Cloud Mobility
Intelligence Centre
Student Manual
CONSEJERÍA DE EMPLEO,
TURISMO Y CULTURA
EDUCATION
S E R V I C E S
V7.0.1
cover
Front cover
.I. n
Power Systems for AIX III:
.T ció
Advanced Administration and
Problem Determination
.
C
(Course code AN15)
.F a
Student Exercises
C rm
to foERC 2.2
ec vo
oy si
u
cl
Ex
pr
Student Exercises
Trademarks
The reader should recognize that the following terms, which appear in the content of this
training document, are official trademarks of IBM or other companies:
IBM® is a registered trademark of International Business Machines Corporation.
The following are trademarks of International Business Machines Corporation in the United
States, or other countries, or both:
.I. n
AIX 5L™ AIX 6™ AIX®
AS/400® DB2® DS8000®
.T ció
HACMP™ Initiate® MWAVE®
Power Systems™ Power® PowerVM®
.
POWER6® POWER7® pSeries®
C
Redbooks® RS/6000® System p®
.F a
Tivoli®
C rm
Intel is a trademark or registered trademark of Intel Corporation or its subsidiaries in the
United States and other countries.
Windows is a trademark of Microsoft Corporation in the United States, other countries, or
both.
to fo
UNIX is a registered trademark of The Open Group in the United States and other
countries.
VMware and the VMware "boxes" logo and design, Virtual SMP and VMotion are registered
ec vo
trademarks or trademarks (the "Marks") of VMware, Inc. in the United States and/or other
jurisdictions.
Other product and service names might be trademarks of IBM or other companies.
oy si
u
cl
Ex
The information contained in this document has not been submitted to any formal IBM test and is distributed on an “as is” basis without
any warranty either express or implied. The use of this information or the implementation of any of these techniques is a customer
responsibility and depends on the customer’s ability to evaluate and integrate them into the customer’s operational environment. While
each item may have been reviewed by IBM for accuracy in a specific situation, there is no guarantee that the same or similar results will
result elsewhere. Customers attempting to adapt these techniques to their own environments do so at their own risk.
TOC Contents
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
.I. n
Exercise 2. The Object Data Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1
.T ció
Exercise 3. Error monitoring. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1
.
Exercise 4. Basic Network Installation Manager configuration . . . . . . . . . . . . . . . 4-1
C
.F a
Exercise 5. System initialization: Accessing a boot image . . . . . . . . . . . . . . . . . . . 5-1
C rm
Exercise 6. System initialization: rc.boot and inittab . . . . . . . . . . . . . . . . . . . . . . . 6-1
.I. n
.T ció
.
C
.F a
C rm
to fo
ec vo
oy si
u
cl
Ex
pr
TMK Trademarks
The reader should recognize that the following terms, which appear in the content of this
training document, are official trademarks of IBM or other companies:
IBM® is a registered trademark of International Business Machines Corporation.
The following are trademarks of International Business Machines Corporation in the United
.I. n
States, or other countries, or both:
.T ció
AIX 5L™ AIX 6™ AIX®
AS/400® DB2® DS8000®
HACMP™ Initiate® MWAVE®
.
Power Systems™ Power® PowerVM®
C
.F a
POWER6® POWER7® pSeries®
Redbooks® RS/6000® System p®
C rm
Tivoli®
Intel is a trademark or registered trademark of Intel Corporation or its subsidiaries in the
United States and other countries.
Windows is a trademark of Microsoft Corporation in the United States, other countries, or
to fo
both.
UNIX is a registered trademark of The Open Group in the United States and other
countries.
ec vo
VMware and the VMware "boxes" logo and design, Virtual SMP and VMotion are registered
trademarks or trademarks (the "Marks") of VMware, Inc. in the United States and/or other
jurisdictions.
oy si
Other product and service names might be trademarks of IBM or other companies.
u
cl
Ex
pr
.I. n
.T ció
.
C
.F a
C rm
to fo
ec vo
oy si
u
cl
Ex
pr
.I. n
Exercise Instructions
This section tells you what to accomplish. There are no definitive
.T ció
details on how to perform the tasks. You are given the opportunity to
work through the exercise given what you learned in the unit
.
presentation, utilizing the Student Notebook, your past experience,
C
and maybe a little intuition.
.F a
Exercise Instructions with Hints
C rm
This section is also an exact duplicate of the Exercise Instructions
and contains solutions and additional tips for the students. It is
recommended that most students use the section with hints. There
may be some advanced students who will prefer the challenge of
to fo
working without the hints, but they should have the hints at ready.
Students can use this part to compare their work with the solutions.
When showing the SMIT method to accomplish a task, each line in
ec vo
changed will be shown, not the entire screen. Once you have reached
the dialog screen portion of SMIT, press Enter ONLY after all indicated
entries have been made.
u
The SMIT steps will be shown for the ASCII version of SMIT. Under
cl
most circumstances these steps match the steps taken if using the
graphics version of SMIT. The exceptions relate to the use of the
function keys. When instructed to press the F3 key back to a particular
Ex
menu, when in graphics SMIT, you will instead click the Cancel box at
the bottom of the screen. When instructed to press the F9 key to shell
out, in graphics mode, simply open another window.
Optional Exercise Parts
pr
.I. n
.T ció
.
C
.F a
C rm
to fo
ec vo
oy si
u
cl
Ex
pr
.I. n
information about your lab system. You will explore the information
center for reference code information, and you will practice collecting
.T ció
snap information.
.
C
.F a
At the end of the lab, you should be able to:
• Obtain configuration information about your system
C rm
• Navigate the information center to find reference code information
• Create, compress, and rename a snap file for upload to AIX
Support
to fo
Introduction
In this exercise, you will obtain and record information about your
ec vo
© Copyright IBM Corp. 2009, 2012 Exercise 1. Problem diagnostic information 1-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
Exercise instructions
Preface
Two versions of these instructions are available; one with hints and one without. You
can use either version to complete this exercise. Also, please do not hesitate to ask the
instructor if you have questions.
.I. n
All exercises of this chapter depend on the availability of specific equipment in your
classroom.
.T ció
Part 1 - Record system information
__ 1. Connect to your assigned LPAR using telnet protocol and log in as root.
.
C
.F a
__ 2. Using commands rather than SMIT, collect and record the following information
C rm
regarding your system:
__ a. The volume groups on your system:
______________________________________________________________
to fo
__ b. The physical volumes on your system:
______________________________________________________________
ec vo
______________________________________________________________
______________________________________________________________
u
cl
EXempty
__ c. Processor type of your system: _____________________________________
.I. n
__ e. LPAR name of your partition: _______________________________________
.T ció
__ 4. Identify the logical volumes that reside on your hdisk0.
Write down the command you used: ____________________________________
.
C
.F a
From the fact that the number of logical partitions is equal to the number of physical
partitions, what can you conclude?
C rm
_________________________________________________________________
to fo
ec vo
oy si
u
cl
Ex
pr
© Copyright IBM Corp. 2009, 2012 Exercise 1. Problem diagnostic information 1-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
.I. n
__ 7. On the IBM Power Systems Hardware Information Center page, expand Systems
Hardware Information in the navigation area (left side).
.T ció
__ 8. Expand Power Systems Information.
.
C
.F a
__ 9. Expand POWER7 systems.
C rm
__ 10. Locate and expand the section on the server model that matches what you recorded
earlier in this exercise.
to fo
__ 11. Notice the various categories of product documentation that is available. Expand the
Troubleshooting, service, and support category.
ec vo
__ 14. In the POWER7 Information Reference codes page (in the content area), notice the
links to documentation on System Reference Codes (SRC) and Service Request
cl
Numbers (SRN).
Click Progress codes.
Ex
__ 15. On the Progress Codes Overview page, click AIX IPL progress codes. This gives
a list of AIX progress codes. Clicking on any one of them provides a brief description
of that code. This course will later cover the codes which are common in diagnosing
pr
__ 16. Return to the IBM Systems Information Centers page (first page that you displayed).
EXempty __ 17. Click AIX Information Center (at the bottom of the content area).
__ 18. Locate the section for AIX 7.1 and click the arrow icon.
__ 19. In the navigation area (on the left), expand AIX 7.1 Information.
.I. n
__ 20. This will display various categories of AIX 7.1 information. Find and then click the
.T ció
Troubleshooting category.
.
__ 21. Briefly scan the list of areas covered.
C
.F a
__ 22. Close the browser window.
C rm
to fo
ec vo
oy si
u
cl
Ex
pr
© Copyright IBM Corp. 2009, 2012 Exercise 1. Problem diagnostic information 1-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
__ 24. Execute the snap command to collect all the information for your system. If there is
not enough space in the /tmp file system, increase the size of /tmp and repeat the
snap execution. Do not collect any dump information to removable media, if
.I. n
prompted.
.T ció
__ 25. Once snap has completed the generation of the information files, change your
directory to the testcase directory and create some files in that directory.
.
C
.F a
__ 26. Change the directory back to your home directory.
C rm
__ 27. Create a compressed pax file of the snap generated directory tree.
to fo
__ 28. Rename the resulting compressed pax file to the standard naming convention, given
the following assumptions:
• Your PMR# is 12121
ec vo
End of exercise
oy si
u
cl
Ex
pr
.I. n
command line interface.
.T ció
What you should be able to do
At the end of the lab, you should be able to:
.
C
• Review the device configuration ODM classes
.F a
• Modify a device attribute’s default value
C rm
• Create self-defined ODM classes (optional)
Introduction
to fo
This exercise has three parts:
1. Review of device configuration ODM classes (PdDv, PdAt, CuDv,
CuAt, CuDep, CuDvDr)
ec vo
© Copyright IBM Corp. 2009, 2012 Exercise 2. The Object Data Manager 2-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
Exercise instructions
Preface
Two versions of these instructions are available; one with hints and one without. You
can use either version to complete this exercise. Also, please do not hesitate to ask the
instructor if you have questions.
.I. n
All exercises of this chapter depend on the availability of specific equipment in your
classroom.
.T ció
Part 1 - Review of device configuration ODM classes
__ 1. Execute the lsdev command and identify all the devices that are supported on your
.
system. Have the lsdev command provide column headers in the output.
C
.F a
What command did you use? _________________________________________
C rm
Which ODM object class is used by the lsdev command to generate this output?
(You may need to look at your Student Guide materials). ___________________
to fo
__ 2. Execute the lsdev command and identify all disk devices that are currently attached
to your system. Have the lsdev command to provide column headers in the output.
What command did you use? _________________________________________
ec vo
Which ODM object class is used by the lsdev command to generate this output?
oy si
_________________________________________________________________
u
__ 3. Request the same listing as above, except customize the reported fields needed to
complete the following list for disk hdisk0:
cl
• Name: _________________________________________________________
• Status: _________________________________________________________
Ex
• Location: _______________________________________________________
• Physical location: ________________________________________________
• Description: _____________________________________________________
pr
__ 4. Use the ODM command line interface and list the ODM object that describes the
hdisk0 disk device. Also, use the ODM command line interface to list the ODM
object that contains the parent adapter’s physical location code as part of its Vital
Product Data information.
From the output complete the following list for disk hdisk0:
• Status: ________________________________________________________
.I. n
• Chgstatus: _____________________________________________________
• Parent: ________________________________________________________
.T ció
• Location: ______________________________________________________
• Connwhere: ____________________________________________________
.
• PdDvLn: _______________________________________________________
C
.F a
• (For parent) CuVDP vdp: __________________________________________
C rm
__ 5. Execute the lscfg command and filter for hdisk0. Compare the physical location
code with the ODM information you just displayed. How do they compare?
_________________________________________________________________
to fo
_________________________________________________________________
ec vo
__ 6. From the previous odmget output and your Student Guide notes (Customized
devices object class), please answer the following question:
What is the meaning of the displayed value of the CuDv descriptor: chgstatus?
oy si
_________________________________________________________________
u
__ 7. List the effective attributes (lsattr) for your hdisk0 device and identify the
physical volume identifier for that disk.
cl
__ 8. Use the ODM command line interface to list the ODM object that stores the physical
pr
© Copyright IBM Corp. 2009, 2012 Exercise 2. The Object Data Manager 2-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
__ 9. The /dev directory contains the special files to access the devices. Write down the
major and minor number of the special file for hdisk0.
• Major number: _____________________
• Minor Number: _____________________
Which ODM class is used to identify the major number and minor number for the
.I. n
device driver? _____________________________________________________
.T ció
__ 10. List all your logical volumes that are part of the rootvg. _____________________
.
_________________________________________________________________
C
.F a
What command did you use? _________________________________________
C rm
__ 11. Query the ODM class CuDep and identify all of the logical volumes that belong to
rootvg.
to fo
What command did you use?
__________________________________________________________
ec vo
oy si
u
cl
Ex
pr
.I. n
__ 12. Display the standard ethernet interface devices. Select one of the interfaces
.T ció
(defined or available) and record its device name: _________________________
You will use this interface in the remainder of this exercise part. Our instructions will
.
assume the interface is en1, but you might be using a different one.
C
.F a
__ 13. Using a high level command, retrieve the effective attributes for en1. What is the
C rm
value of the remmtu attribute? _________________________________________
__ 14. This value is very small. We want to set it to the largest possible value. Use a high
to fo
level command to identify the allowable range of values for the remmtu attribute.
What is the largest value that we can use? _______________________________
__ 15. We could use a high level command to set the effective value of the remmtu
ec vo
attribute for our interface; but, we would have to do this repeatedly each time a new
instance of the device was added. What command would you use to set a new
effective value (but do not run it)?
oy si
_________________________________________________________________
u
__ 16. Verify that the current remmtu attribute value is not already an override to the
cl
default value. Use a high level command to retrieve the default value for the remmtu
attribute for the en1 interface. Is the default the same as the effective attribute value
Ex
__ 17. If we change the default value for the remmtu attribute, each new instance of the
device will automatically have the preferred value. There is no high level command
pr
to modify the default values. What object class holds the default attribute values?
_________________________________________________________________
© Copyright IBM Corp. 2009, 2012 Exercise 2. The Object Data Manager 2-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
__ 18. Before you use ODM commands to make this change, first back up the ODM object
class that you will be changing.
__ 19. To locate the correct object, you will need to know the class, subclass, and type
values associated with the ethernet interface device. Retrieve the ODM customized
device object for en1 and record the pre-defined device link descriptor value
(PdDvLn): ________________________________________________________
.I. n
.T ció
__ 20. The corresponding descriptor value in the predefined ODM database is the
uniquetype descriptor. Using both the attribute descriptor value of remmtu and
the uniquetype descriptor value to qualify the operation, display the predefined
.
attribute object for the remote MTU attribute. Be sure that you see one and only one
C
.F a
object in the display. What is the attribute value displayed? __________________
C rm
__ 21. Repeat this display, only redirect the output to the file: /tmp/remmtu-object.
__ 22. Edit the file you created to change the default value to the maximum value allowed.
to fo
__ 23. Using the same qualification as on the retrieval, replace the ODM object with the
one in your edited file.
ec vo
__ 24. Use a high level command to verify that the remmtu attribute default value has
changed. You can use either the en1 logical device name or the uniquetype value
oy si
__ 25. Display the effective remmtu attribute value for en1. Did it change? ____________
cl
Ex
pr
.I. n
__ b. Using an editor, create a file parts.cre (in your new working directory) with the
.T ció
following class structure:
class parts {
long part_number;
.
char part_description[128];
C
char warehouse[4];
.F a
long contained_in;
C rm
}
__ 27. Create the ODM class using this class structure and check the structure of this
class. Write down the commands you used:
to fo
_________________________________________________________________
_________________________________________________________________
ec vo
Which new files have been created in your present working directory during this
step? ____________________________________________________________
oy si
_________________________________________________________________
_________________________________________________________________
cl
_________________________________________________________________
Ex
© Copyright IBM Corp. 2009, 2012 Exercise 2. The Object Data Manager 2-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
__ 28. Create some objects in ODM class parts, using the following data:
.I. n
10006 Front wheel brake a03 50001
10007 Rear wheel brake a03 50001
.T ció
50001 City Bike Easy Rider x99
.
__ 29. List all objects that are contained in part 50001 (the City Bike Easy Rider). Write
C
down the command you used:
.F a
_________________________________________________________________
C rm
__ 30. Change the warehouse location for part Wheel to b10.
to fo
__ 31. Remove ODM class parts from the system. Write down the command you used.
_________________________________________________________________
ec vo
__ 32. Use the shutdown command to reboot your system You do not need to wait for it to
complete; you will log back into your LPAR in the next exercise.
oy si
End of exercise
u
cl
Ex
pr
.I. n
daemon and the ODM error notification class errnotify.
At the choice of the instructor, this exercise may be broken into
.T ció
multiple lab sessions. If that is the case, you should stop after
completing each exercise part and not continue with the next part until
the related concepts have been covered in lecture and discussion.
.
C
.F a
What you should be able to do
C rm
At the end of the lab, you should be able to:
• Determine what errors are logged on your machine
• Generate different error reports
to fo
• Start concurrent error notification
• Identify errors and warnings sent by the syslogd daemon
• Create and maintain the /etc/syslog.conf file
• Automate error logging with the errnotify object class
ec vo
Introduction
oy si
In Part 1 of this exercise, you will work with the AIX error logging
facility. You should do this part of the exercise during the first lab
u
the ODM error notification class errnotify. You should do this part of
the exercise during the second lab session allotted to this exercise.
Ex
Exercise instructions
Preface
Two versions of these instructions are available; one with hints and one without. You
can use either version to complete this exercise. Also, please do not hesitate to ask the
instructor if you have questions.
.I. n
All exercises of this chapter depend on the availability of specific equipment in your
classroom.
.T ció
Part 1 - Work with the error log
__ 1. Open a terminal emulator window and connect to your assigned LPAR (if you do not
.
already have a session).
C
.F a
C rm
__ 2. Generate a summary report of your system’s error log. Write down the command
that you (or SMIT) used: ____________________________________________
__ 3. Generate a detailed report of your system’s error log. Write down the command that
to fo
you (or SMIT) used: ________________________________________________
__ 4. Use the date command to obtain the current data and time in the format of:
ec vo
__ 5. Using SMIT, generate the following reports. When prompted, select Filename and
do not request CONCURRENT error reporting.
Ex
• A summary report of all errors that occurred during the past 24 hours (place the
date recorded in previous step in the STARTING time interval field). Write
down the command that SMIT executes: _____________________________
pr
• A detailed report of all records with an Error Class of S (software). Write down
the command that SMIT executes:__________________________________
EXempty __ 6. This step requires that you have a windowing workstation where you can have a
telnets from multiple windows. In this environment, start a second terminal
emulation with a telnet connection to your LPAR and log in as root. This could be
another PuTTY session or simply starting a new command window and running the
telnet command.
In one window, start up concurrent error logging, using the errpt command. Write
down the command that you used: ____________________________________
.I. n
.T ció
In the other window, execute the errlogger command to generate an error entry.
Write down the command you used:
________________________________________________________________
.
C
.F a
Is the complete error text shown in the error report?
C rm
________________________________________________________________
Run the errpt command requesting a detailed report and look for the error records
with your text.
oy si
_________________________________________________________________
__ 10. Delete all the error entries that have an error class of Operator. Write down the
command, you (or SMIT) used: _______________________________________
.I. n
End of part 1
.T ció
If you are doing Part 1 of this exercise, stop here. Do not go on to Part 2.
.
C
.F a
C rm
to fo
ec vo
oy si
u
cl
Ex
pr
EXempty Part 2
.I. n
__ 13. Edit the /etc/syslog.conf file and configure the syslogd daemon to log all daemon
.T ció
messages to a file with the name /tmp/syslog.debug.
Write down the line that you added to /etc/syslog.conf:
.
________________________________________________________________
C
.F a
__ 14. Execute the touch command and create the file /tmp/syslog.debug.
C rm
________________________________________________________________
to fo
__ 15. Refresh the syslogd daemon so it will pick up the changes. Write down the
command that you used: ____________________________________________
__ 16. Stop the inetd daemon and restart it in debug mode. Use the appropriate System
ec vo
Resource Controller command to start the inetd daemon in debug mode (-d flag).
Write down the commands that you used:
________________________________________________________________
oy si
________________________________________________________________
u
__ 17. Use the telnet command to telnet back to your own system, log in, and then log
cl
back out of the telnet session. This step is performed to log several debug
messages. Use your login name when you telnet to your system.
Ex
__ 18. Analyze the contents of the file /tmp/syslog.debug. Many debug messages from
the inetd daemon processes are shown.
pr
__ 19. Stop the inetd daemon and restart it without debug mode. Use the appropriate
System Resource Controller command to start the inetd daemon. Write down the
commands that you used:
________________________________________________________________
________________________________________________________________
__ 20. Change the file /etc/syslog.conf. All messages should be directed to the AIX error
log. Write down what you have changed:
________________________________________________________________
.I. n
__ 21. Refresh the syslogd subsystem. Write down the command that you used:
.T ció
________________________________________________________________
.
__ 22. Generate a syslogd message. For example, use an invalid password during a login.
C
Check that the message is posted to the error log.
.F a
________________________________________________________________
C rm
________________________________________________________________
__ 23. Restore the /etc/syslog.conf file from the backup which you created earlier in the
to fo
/tmp directory; then refresh the syslogd subsystem.
.I. n
________________________________________________________________
.T ció
________________________________________________________________
________________________________________________________________
.
C
.F a
__ 25. Execute the errlogger command and create an entry in the errlog. Write down the
command that you used: ____________________________________________
C rm
__ 26. After a short time, check the mail for the root user. The mail processing is batched
and it could take more than a minute before the mail is delivered.
to fo
End of part 2
ec vo
End of exercise
oy si
u
cl
Ex
pr
.I. n
.T ció
.
C
.F a
C rm
to fo
ec vo
oy si
u
cl
Ex
pr
.I. n
define the other LPARs as clients machines, allocate NIM resources to
those clients, and set them up to enable BOS installation.
.T ció
What you should be able to do
.
C
At the end of the lab, you should be able to:
.F a
• Configure an LPAR to be a NIM master and server
C rm
• Define a NIM client machine and setup for a BOS installation
Introduction
to fo
In this exercise, you will perform the following:
• Configuration of a NIM partition
• Define NIM client machine and setup for a BOS installation
ec vo
Requirements
oy si
• This workbook
• A Windows 2000 or Windows XP workstation with a Web browser
u
© Copyright IBM Corp. 2009, 2012 Exercise 4. Basic Network Installation Manager configuration 4-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
Exercise instructions
Preface
The exercise depends on the availability of specific equipment in your classroom. Many
of the steps require you to work as a team with the other students who share the same
server LPAR. The steps, near the end, where you define and configure installation
support for their assigned client LPAR can be done individually.
.I. n
While you will configure your NIM server to support installation of an operating system
.T ció
on your LPAR, we will not use it for this purpose in this course. Instead, in later lab
exercises, we will reconfigure the NIM server to provide support for booting into
maintenance mode over the network.
.
C
.F a
Part 1 - Configuring the NIM master LPAR
C rm
The environment which was installed from the mksysb image, is not configured as a
NIM master yet. You must perform the following steps to create a NIM master’s
environment. The installed environment does contain a subdirectory which has all of the
requirements of an lppsource NIM resource.
to fo
__ 1. Connect to your assigned server LPAR and log in as root.
ec vo
__ 2. Check the current OS level, including technology level (TL) and service pack (SP).
oy si
__ 4. Determine if the environment has the required NIM filesets (NIM master and SPOT)
installed.
cl
Ex
__ 5. If any filesets are missing, install them from the /lpp_source7100-00-01 directory.
__ 6. Make sure your assigned server LPAR and boot client LPARs are defined in the
/etc/hosts file. If your host names are missing, add them with the correct IP address
pr
resolution.
__ 7. Use SMIT to initialize the NIM master with the SMIT fastpath smitty nim. Specify a
network name of ent0. The primary network interface will be en0. Accept all other
defaults.
.I. n
Configure Network Installation Management Master Fileset
.T ció
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
.
* Network Name [ent0]
C
* Primary Network Install Interface [en0] +
.F a
Allow Machines to Register Themselves as Clients? [yes] +
Alternate Port Numbers for Network Communications
C rm
(reserved values will be used if left blank)
Client Registration [] #
Client Communications [] #
to fo
__ 8. Type F3 or <Esc-3> as many times as needed to get back to the main NIM SMIT
screen titled Network Installation Management. If you exited out of SMIT, run
ec vo
smitty nim.
__ 9. Use SMIT to define an AIX 7.1 TL00 SP01 lppsource object with a name of
oy si
lppaix71-00-01. We have already copied the AIX 7.1 filesets from media into
/lpp_source7100-00-01. Specify that the server is master.
u
# smitty nim
Perform NIM Administration Tasks ->
cl
Define a Resource
© Copyright IBM Corp. 2009, 2012 Exercise 4. Basic Network Installation Manager configuration 4-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
[Entry Fields]
* Resource Name [lppaix71-00-01]
* Resource Type lpp_source
* Server of Resource [master] +
* Location of Resource </lpp_source7100-00-01] /
. . .
.I. n
.T ció
__ 10. In the following steps, you will create a shared product object tree (SPOT). This will
require a significant amount of storage. To avoid having any impact on the other file
systems, create a new JFS2 file system with 869 megabytes of space and a mount
.
point of /spots. Request that it be automatically mounted at system restart and also
C
mount it now.
.F a
C rm
__ 11. Press F3 or <Esc-3> as many times as needed to get back to the Manage
Resources screen. If you exit smit, reenter by running smitty nim.
to fo
__ 12. Use SMIT to create a NIM SPOT resource called spot71-00-01. Specify the server
as master. Specify the lppsource you just defined, as the source of the SPOT.
Store the generated SPOT in the recently created /spots directory.
When you are finished entering the values, press Enter. Look in the standard out
ec vo
Define a Resource
Ex
EXempty . . .
.I. n
.T ció
.
C
.F a
C rm
to fo
ec vo
oy si
u
cl
Ex
pr
© Copyright IBM Corp. 2009, 2012 Exercise 4. Basic Network Installation Manager configuration 4-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
__ 13. The remaining part of this exercise can be done separately by each of the team
members, each configuring for their own assigned client LPAR.
Type F3 or <Esc-3> as many times as required to get to the Perform NIM
Administrative Tasks screen or use smitty nim -> Perform NIM
.I. n
Administrative Tasks.
.T ció
From here, we will create a machine object for the AIX client.
# smitty nim
Perform NIM Administration Tasks ->
.
Manage Machines ->
C
Define a Machine ->
.F a
C rm
__ 14. When prompted, enter your client’s hostname in the Host Name of Machine field
and press Enter. This fails if hostname is not resolved. Make sure your client’s
hostname is in the /etc/hosts file.
to fo
Note
ec vo
In the remaining parts of this exercise, the example commands use the machine names
that were on the development system. Your names are likely different and should be
substituted into the example commands.
oy si
u
Press Enter to run the command. When the command is done, press F10 or
<ESC-0> to exit.
.I. n
* Machine Type [standalone] +
* Hardware Platform Type [chrp] +
.T ció
Kernel to use for Network Boot [64] +
Communication Protocol used by client [nimsh] +
Primary Network Install Interface
.
* Cable Type N/A +
C
Network Speed Setting [] +
.F a
Network Duplex Setting [] +
* NIM Network ent0
C rm
to fo * Host Name sys304_118
Note
Next, you will set up NIM to be able to install an operating system. But you must not
ec vo
actually do an overwrite install in this class. Follow the instructions closely to insure that
NIM does not automatically initiate an installation. Initiating an installation will destroy
customizations that are needed for the other exercises which follow this one.
oy si
u
__ 16. Now, let’s enable the bos_inst operation for the new NIM client. This sets up the
NIM master’s environment so that resources are made available and so that NIM
cl
information:
# smitty nim_bosinst
You are asked to choose a Installation Target for the operation. This is asking
pr
you to select the NIM client host on which you want to load AIX. Highlight your
partition’s hostname and press Enter to select it.
You need to enter the following information on the next few entry screens:
• Pick rte for the Installation Type.
• Pick a SPOT resource. There should only be the one you defined earlier.
© Copyright IBM Corp. 2009, 2012 Exercise 4. Basic Network Installation Manager configuration 4-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
• Pick an LPP source. There should only be the one you defined earlier.
.I. n
[TOP] [Entry Fields]
* Installation Target sys304_118
.T ció
* Installation Type rte
* SPOT spot71-00-01
LPP_SOURCE [lppaix71-00-01] +
.
C
.F a
Fill in the additional fields as follows:
• Answer yes to the question:
C rm
Accept new license agreements?
• Scroll down to the question:
Initiate reboot and installation now?
to fo
Set the value to no. To change the value, press F4 or <ESC>4, highlight your
choice, and press Enter.
• Press Enter to effect the setup.
ec vo
__ 17. Verify that NIM is now ready to support the base operating system installation
(bos_inst) operation with your client:
u
• List the attributes of your LPAR’s machine object and look for a Cstate value of
BOS installation has been enabled.
cl
EXempty
Note
Do not execute an installation of AIX into your LPAR at this point. Doing so will destroy
customizations which are needed to complete the remaining exercises. Many other
courses provide opportunities to execute new AIX installations from NIM. If you wish to do
this at the end of the course, that would be the best time.
.I. n
.T ció
__ 18. While we have set up to over-write the install your LPAR with a new image, we are
not going to execute an installation. If we wanted to do this, we would only need to
.
boot the LPAR from the network. The prerequisite class and many other classes in
C
.F a
the curriculum will have you boot a new logical partition over the network in order to
install a new operating system.
C rm
End of exercise
to fo
ec vo
oy si
u
cl
Ex
pr
© Copyright IBM Corp. 2009, 2012 Exercise 4. Basic Network Installation Manager configuration 4-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
.I. n
.T ció
.
C
.F a
C rm
to fo
ec vo
oy si
u
cl
Ex
pr
.I. n
and provide practice in dealing with problems locating and loading a
boot image.
.T ció
What you should be able to do
.
C
At the end of the lab, you should be able to:
.F a
• Boot a machine in maintenance mode
C rm
• Repair a corrupted boot logical volume
• Manage multi-path bootlists
Introduction
to fo
This exercise has five parts:
• Part 1: Identify information on your system
ec vo
Requirements
• The program /home/workshop/ex5prob1
Ex
© Copyright IBM Corp. 2009, 2012 Exercise 5. System initialization: Accessing a boot image 5-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
Exercise instructions
Preface
Two versions of these instructions are available; one with hints and one without. You
can use either version to complete this exercise. Also, please do not hesitate to ask the
instructor if you have questions.
.I. n
All exercises of this chapter depend on the availability of specific equipment in your
classroom.
.T ció
Part 1: Identify information on your system
.
C
.F a
__ 1. What is the boot sequence of your system for a normal boot?
Boot devices: ___________________________________________________
C rm
What command did you use? ______________________________________
to fo
__ 2. Identify which disks are contained within the rootvg:
______________________________________________________________
• What command did you use? ______________________________________
ec vo
• Which disk is the bootable disk? (The disk that contains the boot logical volume
hd5): _________________________________________________________
cl
__ 3. If the bootlist had more than one device, set the normal bootlist so it contains only
the bootable hard disk.
pr
EXempty __ 4. The Logical Volume Manager uses names and IDs when storing information.
Complete the following table that maps names to IDs:
rootvg VGID
First disk PVID
Second disk PVID
.I. n
.T ció
Be careful, the window might need to be enlarged to see the entire output. The
VGID is 32 characters long - be sure to record all of it.
.
• What command did you use to determine the rootvg VGID?
C
______________________________________________________________
.F a
C rm
• What command did you use to determine the physical volume IDs?
______________________________________________________________
to fo
• Using odmget, identify the attribute pvid of one of your disks from ODM class
CuAt. What command did you use?
_____________________________________________________________
ec vo
__ 6. Display and record the physical location code of the Ethernet adapter which your
interface is using (the numeric suffix will match).
Ex
_____________________________________________________________
pr
© Copyright IBM Corp. 2009, 2012 Exercise 5. System initialization: Accessing a boot image 5-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
.I. n
.T ció
__ 7. Using your telnet session to your server LPAR (start one if you do not already have
one), log in as root.
.
__ 8. List the NIM standalone machine objects and locate your client LPAR in the list, by
C
.F a
executing the command:
# lsnim | grep standalone
C rm
You machine object name should match your LPAR’s hostname.
__ 10. If the Cstate value is not ready for a NIM operation, force reset the state of your
ec vo
__ 11. The maintenance boot operation requires that a SPOT is allocated to the machine.
Check that there is a SPOT allocated, by executing the command:
u
If there is not a SPOT allocated, then allocate one that matches the version and
release of your client LPAR’s operating system, by executing the command:
Ex
__ 12. Invoke the maint_boot operation for your client LPAR, by executing the command:
pr
EXempty __ 13. Verify that your client LPAR machine object now has a Cstate of maintenance boot
has been enabled, by executing the command:
# lsnim -l <your-machine-object-name> | grep Cstate
.I. n
.T ció
.
C
.F a
C rm
to fo
ec vo
oy si
u
cl
Ex
pr
© Copyright IBM Corp. 2009, 2012 Exercise 5. System initialization: Accessing a boot image 5-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
.I. n
__ c. Activate your client LPAR into SMS mode.
.T ció
__ d. Network boot your client LPAR into maintenance mode using SMS.
__ e. Shut down your client LPAR from the current maintenance mode.
.
__ f. Start your client LPAR back up into multi-user mode.
C
.F a
Except for the shutdown of a running AIX operating system, details of this will
depend on the level of HMC with which you are working. This course is written to
C rm
expect HMCv7 or later.
Execute the above procedure. Check off each step (above) as you complete it.
If you are not well versed in HMCv7 operations, the details for working with HMCv7
to fo
and SMS follow in the next step. They are there for reference and include
procedures which you will need to complete this step.
ec vo
__ 15. This step is just for reference to support the previous step and for later steps. Do not
re-execute these procedures at this point. They assume that you are working with
the graphic web interface for HMC version 7.
__ a. At your AIX client LPAR (be sure it is not your server LPAR), shut down your AIX
oy si
operating system:
- If you have access to a root level prompt on the client LPAR, execute
u
shutdown -F from the AIX root level command prompt in your LPAR.
cl
- If you do not have a root level prompt at your client LPAR, then:
1) Access the HMC and locate your LPAR as described in substep b.
Ex
.I. n
“Log on and Launch the Hardware Management Console web
application”
.T ció
3) Click the log-on link to launch the HMC logon panel.
4) Enter the your assigned HMC user ID and the password and click the
.
logon button. This should launch the HMC Web interface.
C
.F a
5) In the left navigation area click Systems Management. The Systems
Management item should expand to show Servers and Custom
C rm
Groups.
6) Click the Servers item. The Servers item should expand to show the
managed systems.
to fo
7) Click the managed system which is assigned to your team. In the
Content Area on the right, you should see a list of logical partitions
defined for your assigned system.
8) Select your assigned logical partition by clicking the box under Select
ec vo
for your LPAR. After a short delay you should see a small menu icon
appear to the right of your LPAR name, and the Tasks Area on the
bottom half of the panel should update to reflect operations which are
oy si
Area.
cl
3) When the small menu icon appears, click it to show the menu and
move your mouse over the Operations task and then the revealed
Activate task.
4) When the Activate subtasks appear, click the Profile subtask.
© Copyright IBM Corp. 2009, 2012 Exercise 5. System initialization: Accessing a boot image 5-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
.I. n
Click OK to exit this pop-up.
.T ció
8) On the panel that is labeled Activate Logical Partition: <your LPAR
name>, click OK. Respond to any security pop-up windows, in a
manner which will continue with the connection establishment.
.
C
• Respond yes to: Web sites certificate can not be verified.
.F a
continue?
C rm
• Respond Run to; Application digital certificate can not be
verified. Do you want to run the application?
• Respond No to: Application Components could indicate a
security issue. Block potentially unsafe components from
to fo
being run?
A virtual terminal window should appear and you should see the
system console displays for a boot system, ending in an SMS menu.
(If you do not see the virtual terminal window, it is likely behind some
ec vo
first one (the one that matches the location code recorded earlier).
3) On newer systems, you will be prompted on what protocols to use.
Ex
EXempty The way to modify the values is to enter the number of the parameter
you want to change, type in the replacement value and then press
Enter.
When you are comfortable that the IP Parameters are correct, return
to the previous Network Parameters panel by pressing the <Esc>
key.
6) Next, use the Ping Test to see if the parameters allow you to
.I. n
communicate with the designated server. Select:
.T ció
3. Ping Test
and
.
1. Execute Ping Test
C
.F a
If you do not get a Ping Success result, then check the status of the
server and your IP Parameter values.
C rm
7) Back out to the main menu, using the <Esc> key.
8) From the SMS main menu, select options:
5. Select Boot Options ->
to fo
1. Select Install/Boot Device ->
6. Network
When prompted for a network service, select bootp.
ec vo
You should see the tftp packet count incrementing as it downloads the
cl
boot image. It is not unusual to see one or two retry attempts before
the download is successful; be patient.
Ex
Then, you should see the system booting up into maintenance mode.
It will prompt you to identify the system console. Type 1 and press
Enter.
It will next ask you to identify the language to be used while in
pr
© Copyright IBM Corp. 2009, 2012 Exercise 5. System initialization: Accessing a boot image 5-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
.I. n
2) Click the menu icon, move your mouse over the Operations task and
.T ció
then click the Shutdown subtask. This should result in a pop-up
window.
3) In the shutdown window, select Immediate and then click OK. When
.
prompted, confirm that you want to shutdown the partition. Answer no
C
.F a
if asked if you are replacing a cache battery.
4) The shutdown immediate option is only valid because of the lack of
C rm
any disk activity in the current state. From a multiuser mode do not use
the HMC shutdown immediate. The os shutdown command is
preferable.
to fo
5) The partition shutdown is complete when the Status field for your
LPAR changes from Running to Not Active.
__ f. Start your partition in multiuser mode (normal bootlist). When the partition state
ec vo
2) When the small menu icon appears, click it to show the menu and
move you mouse over the Operations task.
3) When the subtasks appear, click the Activate subtask.
u
5) You should eventually see a login prompt appear in the virtual console
window.
pr
.I. n
__ 17. If you do not already have a virtual console open to your client LPAR, then open one
now and log in as root. What follows are instructions to open a virtual console:
.T ció
__ a. Locate and select your LPAR, as described earlier.
.
__ b. Left-click the menu to the right of your LPAR name.
C
.F a
C rm
__ c. Left-click the Console Window item.
What happens on your system during the reboot? Examine both the HMC
displayed reference code for your LPAR and the virtual console for your LPAR.
oy si
______________________________________________________________
______________________________________________________________
u
______________________________________________________________
______________________________________________________________
cl
Ex
On the virtual console for your LPAR, you should see an SMS menu (resulting from
termination of the retry attempts to find a boot image).
Start by using SMS to execute a network boot of your system.
a. From the SMS main menu, select option 5. Select Boot Options
b. Select option 1. Select Install/Boot Device
© Copyright IBM Corp. 2009, 2012 Exercise 5. System initialization: Accessing a boot image 5-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
.I. n
h. You should see the tftp packet count incrementing as it downloads the boot
image. Then you should see the system booting up into maintenance mode.
.T ció
It will prompt you to identify the system console. Type 1 and press Enter.
i. It will next ask you to identify the language to be used while in maintenance
mode. Type 1 (for English) and press Enter.
.
C
j. It should then display the Maintenance menu.
.F a
k. If the corresponding NIM machine object is in the correct state, your system
should boot to maintenance mode.
C rm
__ 21. Repair the boot logical volume.
to fo
The procedure for using the maintenance menu to repair the boot logical volume is
the same for all environments:
__ a. Access the rootvg with all mounted file systems.
ec vo
__ b. In the maintenance shell, check that hdisk0 is in the normal bootlist. Also check
that the rootvg actually has a boot logical volume on it. Correct if needed.
oy si
__ c. In the maintenance shell, rebuild the boot image on the boot logical volume.
Ensure that your changes are committed to disk. Write down the commands you
u
used.
______________________________________________________________
cl
______________________________________________________________
Ex
.I. n
to an alternate path when there is a problem. On the other hand, the firmware needs be
explicitly told which paths to use in accessing the disk during the boot process. This
.T ció
section is about managing the bootlist in that situation.
.
__ 24. Login to your assigned client LPAR, if not logged in already.
C
.F a
__ 25. List the devices of class disk. Do you see a disk with an AIX location code and a
C rm
description which indicates it is fibre channel (FC) attached? What is the name of
that disk? _________________________________________________________
to fo
__ 26. List the configured devices and filter for just disk devices. Look for a disk which has
the world-wide name (ww_name) for the remote storage subsystem’s port as part of
its physical location code. The ww_name will begin with a W, followed by the
hexadecimal identifier. What is the name of the disk? ______________________
ec vo
__ 27. Identify the parent device of the disk. What is the name and description of the parent
device? __________________________________________________________
oy si
__ 28. Identify the parent device of the device you just described. What is the name and
u
__ 29. List the paths defined for the previously identified fibre channel attached disk,
requesting the pathid as part of the information.
Ex
__ 30. Display the normal mode bootlist. Record the current devices in the bootlist.
_________________________________________________________________
© Copyright IBM Corp. 2009, 2012 Exercise 5. System initialization: Accessing a boot image 5-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
__ 31. Update the normal mode bootlist to include the existing device, the fibre channel
attached disk, and one other non-FC attached disk (such as hdisk1). Keep the
current device as the first in the bootlist order and place the other non-FC attached
disk as the last device.
__ 32. Display the normal mode bootlist. Record the devices in the bootlist.
_________________________________________________________________
.I. n
_________________________________________________________________
.T ció
_________________________________________________________________
_________________________________________________________________
.
C
.F a
Do you notice anything strange? _______________________________________
_________________________________________________________________
C rm
__ 33. Update the normal mode bootlist to only have the original boot device followed by
only the two of the paths to the FC attached disk, and with the other non-FC
to fo
attached disk listed last.
__ 34. Display the normal mode bootlist. Record the devices in the bootlist.
ec vo
_________________________________________________________________
_________________________________________________________________
oy si
__ 35. Update the normal mode bootlist to include only the original device.
u
End of exercise
pr
.I. n
and provide practice dealing with problems during rc.boot and init
execution.
.T ció
What you should be able to do
.
C
At the end of the lab, you should be able to:
.F a
• Repair a corrupted log logical volume
C rm
• Analyze and fix an unknown boot problem
Introduction
to fo
This exercise has two parts:
1. Repair a corrupted log logical volume
2. Analyze and fix a boot failure
ec vo
Required material
oy si
• Program /home/workshop/ex6prob1
• Bootable media that matches the version and release of your
u
boot
Ex
pr
© Copyright IBM Corp. 2009, 2012 Exercise 6. System initialization: rc.boot and inittab 6-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
Exercise instructions
Preface
Two versions of these instructions are available; one with hints and one without. You
can use either version to complete this exercise. Also, please do not hesitate to ask the
instructor if you have questions.
.I. n
All exercises of this chapter depend on the availability of specific equipment in your
classroom.
.T ció
Part 1 - Repair a corrupted log logical volume
Before starting the lab, read the following paragraph.
.
C
Files or directories which are created or updated are stored with their i-nodes and the
.F a
superblock of the file system in memory first. Most write requests are handled in
memory first to improve system performance. Later, the data is written to disk, either
C rm
due to the syncd daemon (every 60 seconds) or due to a threshold of dirty memory
pages being exceeded (for example every 16 KB of changes).
Just before the data is written to disk, these changes to the JFS file systems
to fo
(superblock, i-nodes, list of free data blocks, and so forth) are recorded in a log logical
volume. The rootvg uses, by default, the log logical volume /dev/hd8. When the
changes are written to the disk, the JFS transactions are removed from the log logical
volume. This guarantees the integrity of a file system. Until the file system changes are
ec vo
written to disk, the changes are recorded and held in the log logical volume.
In this part of the lab, we corrupt the jfslog to stress a boot failure.
oy si
__ 1. Check to see if your rootvg file systems are JFS or JFS2. You will need this
information later in this exercise. _______________________________________
u
case L). This program may take as long as 30 seconds to run. It will shut down your
machine. As soon as you see the message Halt Completed, switch over to your
Ex
__ 4. What happens during the reboot? Investigate any reference code that seems to
persist. Examine your Student Guide to find an explanation for the boot failure.
_________________________________________________________________
_________________________________________________________________
EXempty
__ 5. Shutdown your AIX LPAR from the HMC graphic interface:
a. Navigate to the list of LPARs for your assigned server.
b. Select your LPAR
c. From the tasks menu, select: Operations -> Shutdown
.I. n
d. On the Shut Down Partition panel, select Immediate.
e. Click OK.
.T ció
__ 6. Once the partition is Not Activated, boot your machine to maintenance mode. If
.
unsure, follow the procedures in Exercise 5, Part 3 (Booting to maintenance mode).
C
.F a
__ 7. From the Maintenance menu, access the rootvg before mounting the file systems.
C rm
You need to do this, because mounting the file systems in rootvg will fail due to the
corrupted log logical volume.
to fo
__ 8. Reformat the journal log logical volume. Be sure to do a file system check for all file
systems that use /dev/hd8. If you like, use set -o emacs or set -o vi, to enable
command retrieval and edit.
ec vo
__ 9. Use the sync command to flush your changes from memory to the disk. Shut down
your system and reboot your system in normal mode. Were you able to successfully
reboot? __________________________________________________________
oy si
__ 10. If the reboot failed, determine if it is the same problem already identified or a new
u
problem. If it is the same problem, go back and figure out what was missed in the fix
procedure.
cl
Ex
pr
© Copyright IBM Corp. 2009, 2012 Exercise 6. System initialization: rc.boot and inittab 6-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
.I. n
.T ció
__ 12. Reboot the system to maintenance mode.
.
__ 13. Access your machine with the file systems mounted.
C
.F a
__ 14. Examine your system and find the corrupted file that leads to the boot failure.
C rm
Be sure to set the TERM variable to lft or vt320, if you are working on a graphical
display. Otherwise vi or SMIT will not work correctly in the maintenance shell.
to fo
__ 15. Repair the corrupted file. You will find an example in your Student Guide. If you are
not able to fix the boot failure, contact your instructor.
ec vo
oy si
u
cl
Ex
pr
__ 16. Open (in a safe manner) the /sbin/rc.boot file for examination, using a tool that
allows you to search the contents. (Remember to re-position at the start of the file
.I. n
when doing a search for a new string.)
.T ció
There are two types of progress codes.
• One type identifies that an event has occurred or a task has completed, and is
expected to be a transient display. The rc.boot script uses SHOWLED to display
.
these.
C
.F a
• The other type is an error condition that stops any further execution of the script
and is intended to display permanently, until the operator terminates that AIX
C rm
instance. The rc.boot script uses loopled to display these error codes (actually
a loop of issuing SHOWLED).
to fo
__ 17. Search the rc.boot script for where it displays the code 517.
__ a. What mechanism is used to display this code? _________________________
ec vo
__ c. According to the context in the script, what is the situation which caused it to be
oy si
displayed?
______________________________________________________________
u
______________________________________________________________
cl
__ d. Repeat the search to see if there are other places where the code is displayed.
Ex
__ 18. Search the rc.boot script for where it displays the code 557.
__ a. What mechanism is used to display this code? ________________________
© Copyright IBM Corp. 2009, 2012 Exercise 6. System initialization: rc.boot and inittab 6-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
__ c. According to the context in the script, What is the situation which caused it to be
displayed?
_____________________________________________________________
_____________________________________________________________
.I. n
__ d. Repeat the search to see if there are other places where the code is displayed.
.T ció
What are the other situations (if any)?
_____________________________________________________________
.
_____________________________________________________________
C
.F a
__ 19. Search the rc.boot script for where it displays the code 518.
C rm
__ a. What mechanism is used to display this code? ________________________
______________________________________________________________
______________________________________________________________
oy si
__ d. Repeat the search to see if there are other places where the code is displayed.
What are the other situations (if any)?
u
_____________________________________________________________
cl
_____________________________________________________________
Ex
__ 20. Search the rc.boot script for where it displays the code 511.
__ a. What mechanism is used to display this code? ________________________
pr
__ c. According to the context in the script, What is the situation which caused it to be
displayed?
EXempty _____________________________________________________________
_____________________________________________________________
__ d. Repeat the search to see if there are other places where the code is displayed.
What are the other situations (if any)?
_____________________________________________________________
.I. n
_____________________________________________________________
.T ció
__ 21. Search the rc.boot script for where it displays the code 551.
.
__ a. What mechanism is used to display this code? ________________________
C
.F a
__ b. Is this supposed to be transient state or a permanent error? ______________
C rm
__ c. According to the context in the script, What is the situation which caused it to be
displayed?
to fo
_____________________________________________________________
_____________________________________________________________
ec vo
__ d. Repeat the search to see if there are other places where the code is displayed.
What are the other situations (if any)?
_____________________________________________________________
oy si
_____________________________________________________________
u
__ 22. Search the rc.boot script for where it displays the code 554.
cl
__ c. According to the context in the script, What is the situation which caused it to be
pr
displayed?
_____________________________________________________________
_____________________________________________________________
© Copyright IBM Corp. 2009, 2012 Exercise 6. System initialization: rc.boot and inittab 6-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
__ d. Repeat the search to see if there are other places where the code is displayed.
What are the other situations (if any)?
_____________________________________________________________
_____________________________________________________________
__ 23. You may wish to search the rc.boot script for other progress codes discussed in
.I. n
this unit. For each, determine the same information:
.T ció
__ a. What mechanism is used to display this code? ________________________
.
__ b. Is this supposed to be transient state or a permanent error? ______________
C
.F a
__ c. According to the context in the script, What is the situation which caused it to be
C rm
displayed?
_____________________________________________________________
_____________________________________________________________
to fo
__ d. Repeat the search to see if there are other places where the code is displayed.
What are the other situations (if any)?
ec vo
_____________________________________________________________
_____________________________________________________________
oy si
End of exercise
u
cl
Ex
pr
.I. n
additional lab experiences.
.T ció
What you should be able to do
At the end of the lab, you should be able to:
.
C
• Work with importvg and exportvg and manage importvg issues
.F a
• Fix an LVM-related ODM problem involving a user volume group
• Fix an LVM-related ODM problem associated with the rootvg
C rm
Introduction
to fo
This exercise has six parts:
1. In the first part, you will export and import a volume group
2. In the second part, you will work with importvg issues related to
duplicate logical volume and file system names
ec vo
3. In the third part, you will fix an LVM ODM problem using the
importvg and exportvg technique.
4. In the fourth part, you will be asked to analyze and fix an LVM ODM
oy si
6. In the last part, which is optional, you will be asked to analyze and
fix an LVM ODM failure manually.
Ex
© Copyright IBM Corp. 2009, 2012 Exercise 7. LVM metadata and related problems 7-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
Requirements
• /home/workshop/ex7_corrupt_pvid
• /home/workshop/ex7_corrupt_odm
• /home/workshop/rvgrecover
• /home/workshop/ex7_build_vg
• /home/workshop/ex7_corrupt_odm2
.I. n
• /home/workshop/ex7_corrupt_odm3
.T ció
.
C
.F a
C rm
to fo
ec vo
oy si
u
cl
Ex
pr
EXempty
Exercise instructions
Preface
Two versions of these instructions are available; one with hints and one without. You
can use either version to complete this exercise. Also, please do not hesitate to ask the
instructor if you have questions.
.I. n
All exercises of this chapter depend on the availability of specific equipment in your
.T ció
classroom.
.
C
__ 1. Create a new volume group named datavg on a disk that is empty. Check that this
.F a
disk does not belong to another volume group. If you are certain that the disk is not
a part of a volume group, yet the disk has an old VGDA still on it - you may need to
C rm
force the creation of the new volume group. Set the physical partition size to 16 MB.
Write down the command you executed to create the new volume group:
_________________________________________________________________
to fo
__ 2. Check to see if the new volume group has been varied on automatically. Write down
the command you used. _____________________________________________
ec vo
__ 3. Use the fastpath smit mklv to create a logical volume in datavg with the following
characteristics:
oy si
__ 4. Use the fastpath smit jfs2 to create a JFS2 file system in datavg with the
following characteristics:
Ex
__ 5. Verify that the new logical volumes are in datavg with the lsvg command.
Fill in the following table with the logical volume information in datavg:
© Copyright IBM Corp. 2009, 2012 Exercise 7. LVM metadata and related problems 7-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
.I. n
.T ció
__ 6. Mount the new file system and create some files in it.
.
C
__ 7. Export the datavg volume group from your system.
.F a
Write down all the steps you executed to export the volume group.
C rm
_________________________________________________________________
_________________________________________________________________
_________________________________________________________________
to fo
__ 8. Analyze your system to see if it contains any reference to the exported volume
group. For example, check whether the file system which you created exists. (Check
/etc/filesystems.)
ec vo
__ 9. While AIX seems to have no knowledge of the volume group, it’s logical volumes, or
its file systems, let’s see if the disk has that information in its control blocks.
oy si
Directly query the VGDA on the disk that was part of the exported volume group.
u
_________________________________________________________________
_________________________________________________________________
Ex
_________________________________________________________________
__ 10. Directly query the LVCB for logical volume hd2 on the same disk.
pr
EXempty _________________________________________________________________
_________________________________________________________________
__ 11. Given the information in the VGDA and LVCB, we should be able to use that
information to rebuild the related LVM ODM objects.
Import the volume group into your system. Explicitly specify the volume group name
.I. n
datavg; otherwise, the system will generate a new volume group name.
.T ció
Write down the command you used: ____________________________________
.
__ 12. Check to see if the imported volume group, datavg, is varied on.
C
.F a
__ 13. Check to see if the file system information is back.
C rm
__ 14. Mount the /home/mars file system.
Check to see that no files have been lost.
to fo
ec vo
oy si
u
cl
Ex
pr
© Copyright IBM Corp. 2009, 2012 Exercise 7. LVM metadata and related problems 7-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
.I. n
.T ció
__ 15. Export the datavg volume group again. Repeat the steps from the last export.
__ 16. Use the fastpath smit mklv to create a logical volume in rootvg with the following
.
characteristics:
C
.F a
• Logical volume name: lv_raw
C rm
• Number of logical partitions: 1
__ 17. Use the fastpath smit jfs2 to create one JFS2 file system in rootvg with the
following characteristics.
to fo
• Size of file systems: 16 MB (65536 512-byte blocks)
• Mount point: /home/mars
ec vo
__ 18. What is the corresponding logical volume name that has been created for the file
system? _________________________________________________________
oy si
__ 19. Mount the /home/mars file system and add a few files to it.
u
__ 20. At this stage, the following problems will occur when you import the datavg volume
cl
group:
• The logical volumes being imported already exist in rootvg
Ex
__ 21. Write down the new logical volume names that are created for datavg during the
import.
_________________________________________________________________
EXempty
__ 22. Another problem that you should see at this stage, is that the /home/mars file
systems already exists in rootvg.
To fix this problem, first unmount the /home/mars file system.
__ 23. Mount the file systems from datavg over /home/mars. Use the logical volume
.I. n
names that were created. You have to specify the log device that is part of datavg.
.T ció
Write down the command you executed.
_________________________________________________________________
.
C
__ 24. Check the files you have created in /home/mars. They should exist in this directory.
.F a
C rm
__ 25. At the end of this exercise, both file systems should be mounted at the same time.
Start with unmounting /home/mars.
to fo
__ 26. Create a new directory: /datavg/mars.
__ 27. Create a new stanza in /etc/filesystems that describes the file system from datavg.
ec vo
You must use the new logical volume names that have been created during the
import of datavg.
oy si
__ 29. Verify you can access all the files in both file systems.
cl
__ 33. Remove the /home/mars file system from the rootvg volume group.
© Copyright IBM Corp. 2009, 2012 Exercise 7. LVM metadata and related problems 7-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
__ 35. The export and import technique can only be used with non-rootvg volume groups.
You have been provided with a script which will create a volume group (using
hdisk2) and a file system with a special naming convention to match the problem
.I. n
setup script. The script is: /home/workshop/ex7_build_vg.
.T ció
Execute this script.
__ 36. Display the on-line volume groups and then list the logical volumes and physical
.
volumes in the lvmtestvg volume group.
C
.F a
C rm
__ 37. In the /home/workshop directory, you will find a script called ex7_corrupt_odm2.
Execute this script.
__ 38. Display the online volume groups and then list the logical volumes and physical
to fo
volumes in the lvmtestvg. What problems do you see?
_________________________________________________________________
ec vo
__ 39. Try to increase the size of the /lvmtestfs file system by one block. What happened?
_________________________________________________________________
oy si
__ 40. Try to solve the problem using the exportvg and importvg technique. Remember
u
that the volume group must offline. In order to take the volume group offline, all
logical volumes in the volume group must be closed.
cl
__ 41. Display the online volume groups and then list the logical volumes and physical
Ex
__ 42. Try to increase the size of the /lvmtestfs file system by one block. What happened?
pr
_________________________________________________________________
__ 43. Vary off and then remove the lvmtestvg volume group.
__ 44. List the CuAt ODM objects for the hd2 logical volume and redirect the results to the
.I. n
file /tmp/hd2.odm.
.T ció
__ 45. Execute the program /home/workshop/ex7_corrupt_odm.
.
C
__ 46. Verify the following information:
.F a
__ a. Check whether your volume groups are alright. Use lsvg.
C rm
__ b. Check whether your physical volumes are all right. Use lspv. Make note of which
disk is associated with the rootvg. __________________________________
to fo
__ c. Check whether your logical volumes are alright. List all logical volumes that are
part of your rootvg. Use lsvg -l rootvg.
ec vo
What happens?
______________________________________________________________
______________________________________________________________
oy si
______________________________________________________________
u
__ 47. Display information for logical volume hd2. Use lslv hd2.
cl
What happens?
_________________________________________________________________
Ex
_________________________________________________________________
_________________________________________________________________
pr
__ 48. Analyze the ODM problem by viewing the CuDv and CuAt ODM objects for logical
volumes hd2 and hd4. Compare the CuAt ODM entries you retrieved and stored
earlier with the ODM objects you are now listing.
What are the exact ODM problems that you discover?
_________________________________________________________________
© Copyright IBM Corp. 2009, 2012 Exercise 7. LVM metadata and related problems 7-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
_________________________________________________________________
_________________________________________________________________
.I. n
__ a. After making any required changes to the script, fix the ODM problem by
.T ció
executing /home/workshop/rvgrecover. Ignore the error messages. This may
take up to one minute, depending upon the speed of your lab system.
.
C
__ b. Check that your ODM problems have been fixed. Repeat lsvg -l rootvg and
.F a
lslv hd2. They should work now without problems.
C rm
__ 50. Look into /home/workshop/rvgrecover. Remember that this is not an AIX-provided
command, but rather a procedure for fixing rootvg ODM problems. What two main
steps fix your ODM problem?
to fo
__ 51. Another approach to solving the same problem is to use intermediate LVM
commands. Recreate the problem which you just fixed and verify that the problem
ec vo
exists by listing the logical volumes in the rootvg (type information should be: ???).
__ 53. List the logical volumes in the ODM. Is the problem fixed? __________________
cl
Ex
pr
__ 54. List the physical volumes on your system to verify that hdisk2 is available.
__ 55. The problems we want to create next are more extensive than the last problem, so
we will not use the rootvg for this. Instead, you have been provided with a script
.I. n
which will create a volume group (using hdisk2) and a file system with a special
.T ció
naming convention to match the problem setup script. The script is:
/home/workshop/ex7_build_vg.
Execute this script.
.
C
.F a
__ 56. Display the online volume groups and then list the logical volumes and physical
volumes in the lvmtestvg volume group. Record the names:
C rm
_________________________________________________________________
_________________________________________________________________
to fo
__ 57. Verify that the new /lvmtestfs file system is mounted.
ec vo
__ 59. In the /home/workshop directory, you will find a script called ex7_corrupt_odm3.
oy si
__ 60. Display the online volume groups and then list the logical volumes and physical
volumes in the lvmtestvg volume group. What problems did you see?
cl
__ 61. Try to increase the size of the /lvmtestfs file system by one block. Could it be done?
Ex
_________________________________________________________________
__ 62. We could try to solve the problem with our exportvg and importvg technique.
pr
Attempt to export lvmtestvg. You first need to close the logical volumes and vary
the volume group offline. How far can you get before you experience a problem?
_________________________________________________________________
_________________________________________________________________
© Copyright IBM Corp. 2009, 2012 Exercise 7. LVM metadata and related problems 7-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
_________________________________________________________________
__ 63. Mount the /lvmtestfs file system and display the contents of the file you created.
Were you able to access your data? ____________________________________
__ 64. Try using an intermediate level command that will synchronize the LVM information
.I. n
with the ODM. What happened?
_________________________________________________________________
.T ció
__ 65. Use an intermediate level LVM command to redefine the lvmtestvg volume group in
.
the ODM. Use the physical volume that belongs to the lvmtestvg, as recorded
C
.F a
earlier in this exercise.
C rm
__ 66. Display the online volume groups and then list the logical volumes in the lvmtestvg
volume group. What problems do you see?
to fo
__ 67. Try to increase the size of the /lvmtestfs file system by one block. Could it be done?
_________________________________________________________________
ec vo
__ 68. Once again, try using an intermediate level command that will synchronize the LVM
information with the ODM. This failed prior to the execution of the redefinevg
command. What happens when you try it now?
_________________________________________________________________
oy si
u
__ 69. Display the online volume groups and then list the logical volumes and physical
volumes in the lvmtestvg. How did the situation change?
cl
_________________________________________________________________
_________________________________________________________________
Ex
__ 70. Try to increase the size of the /lvmtestfs file system by one block. Could it be done?
_________________________________________________________________
pr
__ 71. Unmount the lvmtestfs file systems and remove the lvmtestvg volume group.
_________________________________________________________________
__ 72. Execute the command, lspv, without any options to list all physical volumes in your
.I. n
system. Complete the following table.
.T ció
Disk name PVID Volume group
.
C
.F a
C rm
__ 73. Execute the command, lsvg -p, to list all physical volumes that are part of your
rootvg. Complete the following table:
to fo
PV_NAME PV STATE TOTAL PPs
ec vo
oy si
u
__ 74. Use the odmget -q command to see the pvid attribute information stored in ODM
for all disks. Write down the command that you used:
cl
_________________________________________________________________
Complete the following table:
Ex
PV_Name PVID
pr
© Copyright IBM Corp. 2009, 2012 Exercise 7. LVM metadata and related problems 7-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
Write down the structure of the stanza (that is, information labels) output by the
odmget command above. You will need this information in a later lab step.
_________________________________________________________________
_________________________________________________________________
_________________________________________________________________
_________________________________________________________________
.I. n
_________________________________________________________________
.T ció
_________________________________________________________________
_________________________________________________________________
.
_________________________________________________________________
C
.F a
__ 75. Execute the program /home/workshop/ex7_corrupt_pvid.
C rm
__ 76. Repeat the lspv command to list your physical volumes. Complete the table and
compare with the table from step 1.
to fo
Disk name PVID Volume group
ec vo
oy si
u
__ 77. Repeat the lsvg -p command you used earlier to list the physical volumes in
cl
rootvg.
What is the output from the command?
Ex
_________________________________________________________________
_________________________________________________________________
_________________________________________________________________
pr
_________________________________________________________________
__ 78. You learned that the LVM stores information about volume groups, physical volumes
and logical volumes in the ODM. Consider the output from the lspv and lsvg -p
commands. What data is missing? Where is the problem?
.I. n
__ 79. Depending on your suspicion, identify the ODM entries which are shown in your
.T ció
Student Guide in Unit 7.
Find out which objects in which ODM class are missing by reviewing the material
.
from your Student Guide.
C
_________________________________________________________________
.F a
C rm
__ 80. Before you fix the problem, please consult one VGDA for each of the volume groups
on your system and compare the missing information with the data in the VGDA. Be
sure that the information you wrote down in the tables above is correct, otherwise
you will not be able to fix the problem.
to fo
What command allows you to query a VGDA? ____________________________
__ 81. Fix the ODM problem by adding the missing objects back into the ODM. Please
ec vo
Use your Student Guide to find out the layout of the corresponding ODM class. Write
down the steps you executed to fix the problem.
u
_________________________________________________________________
cl
_________________________________________________________________
_________________________________________________________________
Ex
_________________________________________________________________
_________________________________________________________________
_________________________________________________________________
pr
_________________________________________________________________
_________________________________________________________________
_________________________________________________________________
_________________________________________________________________
© Copyright IBM Corp. 2009, 2012 Exercise 7. LVM metadata and related problems 7-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
__ 82. Repeat the commands lspv and lsvg -p to check whether your fix works.
If you still have problems, the stanza file you created contains a typo. Find the typo,
delete the objects you just created, and add the fixed file. Did you remember to
include the 16 trailing zeros on your PVID valve?
.I. n
End of exercise
.T ció
.
C
.F a
C rm
to fo
ec vo
oy si
u
cl
Ex
pr
.I. n
What you should be able to do
.T ció
At the end of the lab, you should be able to:
.
• Manage quorum and missing disks issues
C
• Implement the disk replacement procedure for a disk that has not
.F a
yet failed
C rm
Introduction
This exercise has two main topics:
to fo
• Quorum and missing disks
• Disk replacement procedure (rootvg and user volume groups)
This exercise requires one disk to be completely empty. This disk will
be used to create a new volume group. This volume group will be
ec vo
© Copyright IBM Corp. 2009, 2012 Exercise 8. Disk management procedures 8-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
Exercise instructions
Preface
Two versions of these instructions are available; one with hints and one without. You
can use either version to complete this exercise. Also, please do not hesitate to ask the
instructor if you have questions.
.I. n
All exercises of this chapter depend on the availability of specific equipment in your
classroom.
.T ció
Part 1: Work with LVM mirroring and quorum
__ 1. Create a volume group named newvg using one unused disk.
.
C
.F a
__ 2. Use the lsvg command to find the volume group information for the newvg volume
C rm
group.
__ a. Quorum: ______________
to fo
__ b. Number of VGDAs (Volume Group Descriptors): _______________
__ 4. Use the lsvg command to find the volume group information for the newvg volume
group.
u
__ a. Quorum: ____________________
cl
__ 5. Use the lspv command to identify how many VGDAs there are on each disk in the
volume group.
__ 6. Make the second disk (with only one VGDA) unavailable using the following steps.
__ a. Varyoff the newvg volume group.
.I. n
__ b. Make the second disk unavailable using rmdev. Do not delete it from CuDv, just
change the device state from available to defined.
.T ció
__ 7. Try to vary on the newvg volume group. Did it vary on? ____________________
.
What is the status of the disk you unconfigured? __________________________
C
.F a
__ 8. Look in the error log file to see if any errors were logged. What were the error labels
C rm
for the errors related to this experiment? ________________________________
_________________________________________________________________
to fo
__ 9. Bring the second disk in the newvg volume group back to an available state and
verify the state by listing the device.
ec vo
__ 10. Display the physical volumes in the newvg volume group. What is the PV STATE of
the second disk? __________________________________________________
oy si
__ 11. What do you think will bring hdisk2 into an active state in the newvg volume group?
Try your strategy. (Look at the Hints if you do not know.)
u
In the previous steps, you removed the second disk (which only had one VGDA). In the
following steps, you will remove the first disk (which has two VGDAs).
pr
__ 12. Make the first disk unavailable using the following steps.
__ a. Varyoff the newvg volume group.
__ b. Make the first disk unavailable using rmdev. Do not delete it from CuDv.
© Copyright IBM Corp. 2009, 2012 Exercise 8. Disk management procedures 8-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
__ 14. Try to varyon the newvg volume group. Did it varyon? If not, why?
_________________________________________________________________
_________________________________________________________________
.I. n
__ 15. Look in the AIX error log to see if any new errors were logged.
.T ció
__ 16. Vary on the newvg volume group using the force (-f) flag. What is the state of the
.
disk which you just unconfigured? _____________________________________
C
.F a
__ 17. Look in the error log file to see if any errors were logged. What were the labels of the
C rm
errors which are listed?
_________________________________________________________________
_________________________________________________________________
to fo
__ 18. Bring the first disk in the newvg volume group back to an available state and verify
the device state result by listing the device.
ec vo
__ 19. In the previous scenario, we placed the second disk into a defined state and then
varied the volume group online to cause that physical volume to be in a missing
oy si
state. Then, after we brought the second disk back to an available state, the
varyonvg command rebuilt the VGDA information and brought the volume group
back to the original state with both physical volumes active.
u
In the current scenario, try the varyonvg command, followed by the lsvg -p newvg
cl
__ 20. Explicitly change the state of the first physical volume to an active state.
__ 21. Display the physical volumes in the newvg volume group. Has anything changed?
pr
_________________________________________________________________
__ 22. Prove that the first physical volume is truly active in the volume group by creating a
logical volume with one physical partition allocated on that physical volume.
EXempty
__ 23. Remove the newvg volume group. Delete any allocated logical volume as needed
to succeed in the volume group removal.
.I. n
.T ció
.
C
.F a
C rm
to fo
ec vo
oy si
u
cl
Ex
pr
© Copyright IBM Corp. 2009, 2012 Exercise 8. Disk management procedures 8-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
.I. n
You will migrate the rootvg contents from the failing disk to the spare disk and then
replace the failing disk. (This has scared you enough that you plan to eventually mirror
.T ció
the rootvg after the bad disk is replaced).
.
__ 24. Check to see if hdisk1 is assigned to a volume group, If it is, remove it from that
C
volume group.
.F a
C rm
__ 25. Extend the rootvg volume group to include the physical volume hdisk1. You may
have to use the force flag if there is an old VGDA on the disk.
to fo
__ 26. Regenerate the contents of the boot logical volume. You may need more room in
/tmp. If so, delete unneeded files or increase the /tmp file system allocation.
ec vo
__ 29. Migrate all of the rootvg logical volumes remaining on hdisk0 to hdisk1.
cl
__ 30. Verify that all of the logical volumes have been moved from hdisk0 to hdisk1. Then,
remove the hdisk0 physical volume from the rootvg volume group.
pr
__ 32. We will assume that the failing disk has been replaced through a hot swap
procedure. Rediscover and configure the replacement disk.
EXempty __ 33. Later lab exercises have hints which assume that the rootvg resides on hdisk0.
Note
Repeat this procedure to migrate the rootvg back to hdisk0 which will then make your
environment compatible with the later hints.
.I. n
.T ció
__ 34. Remove hdisk1 from the rootvg volume group.
.
C
.F a
C rm
to fo
ec vo
oy si
u
cl
Ex
pr
© Copyright IBM Corp. 2009, 2012 Exercise 8. Disk management procedures 8-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
.I. n
_________________________________________________________________
.T ció
__ 36. Create and mount a new JFS2 file system in the new volume group. Allocate the
minimum amount of space with a default mount point of /myfs.
.
C
.F a
__ 37. Create some files in the new file system by copying configuration files from the /etc
directory.
C rm
__ 38. We will pretend that you have the following situation:
You have your user data in the SAN. The storage subsystem was purchased mainly
to fo
on a criteria of lowest price. The storage subsystem had performance and functional
problems, resulting in the purchase of a replacement storage subsystem. You have
been assigned to (non-disruptively) move the user volume group off of the old disk
and onto the disk that is backed by a LUN in the new storage subsystem.
ec vo
__ 40. Migrate the data which is on the failing disk to the new disk.
Ex
__ 41. Verify that there are no logical volumes left on the failing disk and that they are now
on the other disk.
pr
__ 43. Remove the old disk from the volume group and verify that your volume group now
has only the new disk.
EXempty __ 44. Remove the old disk from the ODM customized device database and verify that it
has been deleted from the ODM.
__ 45. At this point, we will assume that the SAN administrators have created and zoned a
new LUN for our system. Discover and configure the disk. Verify that we now have
an hdisk2 disk.
.I. n
__ 46. Finally, clean up what has been created in this part of the lab exercise.
.T ció
Remove the datavg volume group. You will either need to first remove any logical
volumes or request that the removal of the logical volumes be handled as part of
.
removing the volume group.
C
.F a
C rm
End of exercise
to fo
ec vo
oy si
u
cl
Ex
pr
© Copyright IBM Corp. 2009, 2012 Exercise 8. Disk management procedures 8-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
.I. n
.T ció
.
C
.F a
C rm
to fo
ec vo
oy si
u
cl
Ex
pr
.I. n
What you should be able to do
.T ció
At the end of the lab, you should be able to:
.
• Create an alternate rootvg disk and update it with maintenance
C
without changing the level of the active rootvg
.F a
• Create a standby BOS inside the active rootvg and apply
maintenance without changing the level of the active BOS
C rm
Introduction
to fo
All instructions in this exercise require root authority. There must be
another disk which is large enough to hold the updated rootvg. The
rootvg must have enough free space to hold the standby BOS rootvg
file systems.
ec vo
The disk assignments on your system can vary from what is in the
exercise hints. Adjust your commands to match your situation.
oy si
u
cl
Ex
pr
© Copyright IBM Corp. 2009, 2012 Exercise 9. Install and cloning techniques 9-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
Exercise instructions
Preface
Two versions of these instructions are available; one with hints and one without. You
can use either version to complete this exercise. Also, please do not hesitate to ask the
instructor if you have questions.
.I. n
All exercises of this chapter depend on the availability of specific equipment in your
classroom.
.T ció
Part 1 - Create and work with an alternate rootvg
.
C
__ 1. Open a terminal emulation window using telnet protocol to connect to your assigned
.F a
server logical partition. Log in as root.
C rm
__ 2. AIX 7.1 TL0 SP2 maintenance is stored on your server LPAR in the
/export/AIX_7100-00-02 directory. Verify that there are files under this directory.
to fo
__ 3. Check to see if this maintenance directory has been NFS exported to allow
read-only access (root access allowed) from your client LPARs, using standard AIX
system authentications (sys).
ec vo
__ 4. If it has not been NFS exported, then set up the NFS export for this directory with the
characteristics which were described in the previous step. If it has been NFS
oy si
exported, but your client LPAR does not have root access permission, then just add
your LPAR to that permission list. Be sure to coordinate with the other students
sharing this server LPAR so you do not try to configure NFS at the same time.
u
cl
__ 5. Open a terminal emulation window using telnet protocol to connect to your assigned
client logical partition, you do not already have one. Log in as root.
Ex
__ 6. Check to see if the exported maintenance directory is already mounted to your /mnt
directory mount point, with read-only access. If not, then mount it.
pr
__ 7. Identify the current level of the AIX base operating systems (BOS), including the
technology level and the service pack.
EXempty __ 8. Identify a free disk which has a size greater than the used space in the rootvg. (Use
the disk with the smallest numeric suffix, if possible). Record the disk logical device
name here: _______________________________________________________
__ 9. Use the alt_disk_copy command to create a clone on the disk that was just
identified. Update the clone with all of the AIX 7.1 TL0 SP2 maintenance as it is
being created.
.I. n
Notify your instructor that you have initiated the alternate disk copy operation.
.T ció
The cloning followed by application of maintenance should take a little over 8
minutes to complete. While you are waiting, your instructor will direct you either to
continue with the next part of the exercise, to continue with lecture and discussion,
.
or to take a break.
C
.F a
C rm
__ 10. When the alternate rootvg has been created, display the physical volumes and their
associated volume groups. Is the target disk of the alt_disk_copy operation
identified as the alternate rootvg? _____________________________________
to fo
__ 11. Display the technology and service pack level of the active rootvg. Did it change?
_________________________________________________________________
ec vo
__ 12. Display the normal boot list. Is the active or alternate rootvg listed as the first boot
device? __________________________________________________________
oy si
__ 13. If the bootlist does not have the alternate rootvg disk as the first boot device,
change it to boot from the alternate rootvg.
u
cl
__ 14. Reboot your system in a safe manner. You will lose your current connection to the
LPAR during the shutdown phase.
Ex
__ 15. After the reboot is completed, log back in to your LPAR as the root user, and verify
that the level of the BOS is at the applied TL and SP level.
pr
__ 16. List the physical volumes. What are the associated volume groups? Did they
change?
© Copyright IBM Corp. 2009, 2012 Exercise 9. Install and cloning techniques 9-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
__ 17. Change the bootlist back to using the original boot logical volume and safely reboot
the LPAR.
__ 18. After the reboot, reconnect to your client LPAR and log back in as the root user.
Confirm that the operating system is back to the older level.
.I. n
.T ció
.
C
.F a
C rm
to fo
ec vo
oy si
u
cl
Ex
pr
EXempty Part 2 - Create and work with a standby BOS using multibos
__ 19. Open a terminal emulation window using telnet protocol to connect to your assigned
server logical partition. Log in as root.
__ 20. AIX 7.1 TL0 SP2 maintenance is stored on your server LPAR in the
/export/AIX_7100-00-02 directory. Verify that there are files under this directory.
.I. n
.T ció
__ 21. Check to see if this maintenance directory has been NFS exported to allow
read-only access (root access allowed) from your client LPARs, using standard AIX
system authentications (sys).
.
C
.F a
__ 22. If it has not been NFS exported, then set up the NFS export for this directory, with
the characteristics described in the previous step. If it has been NFS exported, but
C rm
your client LPAR does not have root access permission, then just add your LPAR to
that permission list. Be sure to coordinate with the other students sharing this server
LPAR so you do not try to configure NFS at the same time.
to fo
__ 23. If you do not already have a session with your assigned client LPAR, open a
terminal emulation window using telnet protocol to connect to your assigned client
logical partition. Log in as root.
ec vo
__ 24. Mount the exported maintenance directory to your /mnt directory mount point, with
read-only access.
oy si
__ 25. For the rootvg, determine the amount of space used and the amount of space free.
u
Record the values here (both in the number of physical partitions and in units of
megabytes):
cl
________________________________________________________________
Ex
__ 26. The alternate BOS creation will involve cloning the rootvg file systems and other
logical volumes. We need to ensure that there is enough space on the disk holding
the rootvg to receive all of the system-defined logical volumes that will be cloned.
pr
Extending the volume group and configuring multibos to use an additional disk is
non-trivial.
If there is not more free space than the amount of used space in the rootvg, contact
your instructor.
© Copyright IBM Corp. 2009, 2012 Exercise 9. Install and cloning techniques 9-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
__ 27. Identify the current level (including TL and SP) of the AIX base operating system
(BOS). ___________________________________________________________
__ 28. Create a user-defined enhanced file system (JFS2) in the rootvg which is one
logical partition in size and then mount that file system. The default mount point
directory should be /userfs.
.I. n
__ 29. Create some files in the new file system.
.T ció
__ 30. List the current logical volumes in the rootvg.
.
C
.F a
__ 31. List the current normal bootlist. What is the first boot device in the list?
C rm
_________________________________________________________________
__ 32. Create a standby BOS and extend file systems as needed. Apply maintenance to
to fo
update the BOS to AIX 7.1 TL0 SP2. First run in preview mode. Then, run it to
actually create the standby BOS.
Notify your instructor that you have initiated the creation of the standby BOS.
This will likely take at little over 10 minutes to complete.
ec vo
__ 33. When the standby BOS creation is completed, display the logical volumes in the
oy si
_________________________________________________________________
cl
__ 34. Was there a new copy of your user-defined file system in the standby BOS?
Ex
_________________________________________________________________
__ 35. Display the normal bootlist. How does this differ from what you displayed prior to
standby BOS creation? ______________________________________________
pr
_________________________________________________________________
__ 36. Display what is currently mounted. Are the standby BOS copies of the non-shared
file systems mounted? ______________________________________________
EXempty
__ 37. Mount the standby BOS (using the multibos command) and then display what file
systems are mounted. What is the path to the mount points of the standby BOS
unique file systems?
_________________________________________________________________
.I. n
__ 38. Change your current working directory to the root of the standby BOS unique file
systems, and then create a new directory called special in the standby BOS
.T ció
/bos_inst/usr file system. Create some files in /bos_inst/usr/special and then
change your working directory back to the active BOS root directory.
.
C
.F a
__ 39. Unmount the standby BOS.
C rm
__ 40. Display the directories under the active BOS /usr directory. Is the new special
directory there? ____________________________________________________
to fo
__ 41. Start a standby BOS shell. In the shell, list the OS level (including service pack) and
list the directories under the /usr directory. Then, exit the shell. Was the directory
called special shown?
ec vo
_________________________________________________________________
__ 43. After the reboot has completed, establish a new connection and then log in as root.
u
Display the OS level (including the technology level and the service pack).
cl
__ 44. Display what is mounted. What logical volumes are now mounted to the standard
BOS defined file systems’ mount points? ________________________________
Ex
_________________________________________________________________
_________________________________________________________________
pr
__ 45. Change the normal bootlist to have the original BOS first in the bootlist, and safely
reboot your LPAR. Be careful to use the correct logical device names for the disk
and boot logical volumes.
© Copyright IBM Corp. 2009, 2012 Exercise 9. Install and cloning techniques 9-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
__ 46. When the reboot is complete, reconnect to your LPAR and log back in as the root
user. Display the level of the OS, including technology level and service pack.
End of exercise
.I. n
.T ció
.
C
.F a
C rm
to fo
ec vo
oy si
u
cl
Ex
pr
.I. n
What you should be able to do
.T ció
At the end of the lab, you should be able to:
.
• Backup file systems using a snapshot volume group.
C
• Backup a JFS file system using JFS split copy (optional).
.F a
• Backup a JFS2 file system using JFS2 snapshot.
C rm
Introduction
All instructions in this exercise require root authority.
to fo
ec vo
oy si
u
cl
Ex
pr
© Copyright IBM Corp. 2009, 2012 Exercise 10. Advanced backup techniques 10-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
Exercise instructions
Preface
Two versions of these instructions are available; one with hints and one without. You
can use either version to complete this exercise. Also, please do not hesitate to ask the
instructor if you have questions.
.I. n
All exercises of this chapter depend on the availability of specific equipment in your
classroom.
.T ció
Part 1 - Use a snapshot volume group
__ 1. In the /home/workshop directory you should find a script named: ex10_build_vgs.
.
C
The script creates a mirrored volume group, named testvg, with two included file
.F a
systems (one JFS and one JFS2). It also populates these file systems with data
files.
C rm
Change directory to /home/workshop and execute the ex10_build_vgs script.
__ 2. Display the information for the logical volumes within the created testvg volume
to fo
group. Are the file systems mirrored?
_______________________________________________________________
ec vo
__ 3. Display the mapping of logical partitions to physical partitions for both of the created
logical volumes, testlv and testlv2. Record which disk holds the second copy.
_____________________________________________________________
oy si
u
__ 4. When ready to backup the file system data, you would briefly quiesce the application
and then split the volume group. In this class, our method of quiescing is to simply
cl
not run any commands that affect the data while splitting the mirrored volume group.
Split the volume group, using the disk which holds the second copy as the snapshot
Ex
volume group. Name the new volume group: myvg-snap. Time how long it took to
create the snapshot volume group.
Once the split is completed, you would un-quiesce and resume application
processing. We will represent application processing, later, with a script to update
pr
some files.
How long did it take to split the mirrored volume group? ______________________
__ 5. Display the testvg characteristics. Does it identify the status of having created a
snapshot volume group? Does it have any stale physical volumes?
EXempty _________________________________________________________________
_________________________________________________________________
.I. n
_________________________________________________________________
.T ció
__ 7. Display the information for the logical volumes within the testvg-snap volume
.
groups. What names were generated for the new logical volumes and the contained
C
file systems? Are the new file systems mounted? Is there any indication of
.F a
mirroring?
_________________________________________________________________
C rm
_________________________________________________________________
_________________________________________________________________
to fo
__ 8. Mount the new file systems in the snapshot volume group.
ec vo
__ 9. Display file systems and their space utilization, requesting a unit size of one
megabyte. What is the utilization of the test file systems? How many megabytes are
used by each file system?
oy si
_________________________________________________________________
_________________________________________________________________
u
__ 10. Next, we want to update the data in one of the logical partitions for each file system.
cl
A script has been provided that will do this: ex10_update_files. It updates one file
in each of the file systems, making each file one megabyte smaller.
Ex
__ 11. Display file systems, requesting a unit size of one megabyte. Were the file systems
pr
in the snapshot volume group affected by the update you just executed?
_________________________________________________________________
_________________________________________________________________
© Copyright IBM Corp. 2009, 2012 Exercise 10. Advanced backup techniques 10-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
__ 12. Display the logical volume characteristics for each of the test file systems in the
testvg volume group. Were some of the physical partitions counted as stale?
_________________________________________________________________
_________________________________________________________________
__ 13. The backup of the snapshot contents would either be to a remote server or to
.I. n
removable storage (tape or DVD). In this class, you will backup to your assigned
server LPAR, but you first need to create and access a file system on that server
.T ció
which is large enough to hold the backups.
__ a. What is the size of the /fs/fs/testfs2 file system? (See your answer in the earlier
.
step 9) _______________________________________________________
C
.F a
__ b. Start a terminal emulation with a new connection to your assigned server LPAR
C rm
(if you do not already have one) and log in as root.
__ c. On the server LPAR, create and mount a JFS2 file system which is larger than
to fo
the size of the /fs/fs/testfs2 file system. Use SMIT (fast path smit jfs2) or the
crfs command.
Name the file system: back-<your client LPAR name>, to avoid conflict with the
other team sharing the server.
ec vo
NFS export the new file system (with read-write authority) to your client LPAR
with root access. Be careful to specify the correct IP address for your assigned
client LPAR.
oy si
You may use SMIT (fastpath smit nfs) or the mknfsexp command:
mknfsexp -d <fs to export> -B -S sys -t rw -r <client IP or
u
hostname>
cl
__ d. Return to your client LPAR session and execute an NFS mount (read-write) of
the file system you just created with a mount point of /mnt.
Ex
__ 14. Backup (relative path) the /fs/fs/testfs2 file system to a backup file in the /mnt
directory. Then verify the names of the files in the backup archive.
pr
In the real world, the amount of data would be much greater and would require an
extensive amount of time to complete.
__ 15. Unmount the file systems which are in the snapshot volume group, and then rejoin
the snapshot volume group with the primary volume group. The time it takes to join
EXempty the snapshot volume group to the primary volume group depends mainly upon how
many physical partitions were marked as stale during the existence of the snapshot.
__ 16. List the volume groups to verify that the snapshot volume group no longer exists.
__ 17. List the logical volumes in the testvg volume group to verify that it is back to its
.I. n
normal mirroring with no stale physical partitions.
.T ció
__ 18. Before continuing to other parts of this exercise, remove the testvg volume group by
executing the provided script: ex10_cleanvg.
.
C
.F a
C rm
to fo
ec vo
oy si
u
cl
Ex
pr
© Copyright IBM Corp. 2009, 2012 Exercise 10. Advanced backup techniques 10-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
.I. n
.T ció
__ 20. Display the information for the logical volumes within the created testvg volume
group. Are the file systems mirrored?
_________________________________________________________________
.
C
.F a
__ 21. When ready to backup the file system data, you would briefly quiesce the application
C rm
and then split the mirror for the file system. In this class, our method of quiescing is
to simply not run any commands to affect the data while splitting the file system.
Split the /testfs file system, using the second copy as the split copy. Use /backup
as the mount point for the split copy. Time how long it took to create the split copy.
to fo
Once the split is completed, you would un-quiesce and resume application
processing. We will represent application processing, later, with a script to update
some files.
ec vo
__ 22. Display the information for the logical volumes within the testvg volume group. Does
oy si
it show a file system for the requested split copy? What name was generated for the
new logical volume and the contained file system? Is the new file system mounted?
u
_________________________________________________________________
_________________________________________________________________
cl
_________________________________________________________________
Ex
__ 23. Display the logical volume characteristics for the /testfs file system. Are there
indications that the mirror has been split?
_________________________________________________________________
pr
_________________________________________________________________
__ 24. Display the logical volume characteristics for the /backup file system. Are there
indications that this is a split copy?
EXempty _________________________________________________________________
_________________________________________________________________
__ 25. Display file systems and their space utilization, requesting a unit size of 1 MB.
What is the utilization of the test file systems?
________________________________________________________________
.I. n
.T ció
__ 26. Next we want to update the data in one of the logical partitions for each file system.
A script has been provided that will do this: ex10_update_files. It updates one file
in each of the file systems, making each file 1 MB smaller.
.
C
Execute the script, ex10_update_files.
.F a
C rm
__ 27. Display the /testfs and the /backup file systems, requesting a unit size of 1 MB.
Was the /backup file system affected by the update you just executed?
_________________________________________________________________
to fo
_________________________________________________________________
__ 28. Backup (relative path) the file systems in the split copy file system to a backup file in
the /tmp file system. Then verify the names of the files in the backup archive.
ec vo
In the real world, the amount of data would be much greater and would require an
extensive amount of time to complete.
oy si
__ 29. Unmount the split copy file system and then rejoin the split copy (by removing the
copy). The time it takes to join the snapshot volume group to the primary volume
u
group depends on the number of allocated physical partitions in the file system,
regardless of how much data was updated while it was split. For large file systems,
cl
this could take a fairly long time, during which it is competing for system resources.
Ex
__ 30. List the logical volumes in the testvg volume group to verify that the split copy file
system is gone.
pr
__ 31. Before continuing to other parts of this exercise, remove the testvg volume group by
executing the provided script: ex10_cleanvg.
© Copyright IBM Corp. 2009, 2012 Exercise 10. Advanced backup techniques 10-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
__ 32. Create and mount an enhanced file system (JFS2), with the following
characteristics:
• Volume Group: rootvg
• Size: 200 MB
.I. n
• Mount point /myfs
.T ció
• Internal snapshots: yes
• For all other values, accept the default
.
C
.F a
__ 33. Display the space utilization of the /myfs file system, in megabytes. Record the
amount of free space: _______________________________________________
C rm
__ 34. The /home/workshop directory has a script called filegen which will generate 10
files of 10 MB each in a specified directory. Use the script to place files in the file
to fo
system you just created and then list the files.
The filegen script accepts a single argument with the path to the directory in which
to place the files.
ec vo
done
u
__ 35. Display the space utilization of the /myfs file system, in megabytes. Record the
cl
__ 36. Create an internal snapshot of the /myfs file system, named mysnap.
EXempty
__ 40. Display the space utilization of the /myfs file system, in megabytes. Record the
amount of free space. _______________________________________________
Did the file system size decrease as a result of deleting all the files? Why?
_________________________________________________________________
_________________________________________________________________
.I. n
.T ció
__ 41. Access the snapshot and show that the files are still shown there.
.
__ 42. Restore a single file back to the snappedFS and verify that it is recovered.
C
.F a
__ 43. Restore all of the /myfs file system contents to what they were when the snapshot
C rm
was taken, using the snapshot rollback facility. Verify that all of the files have been
restored.
to fo
__ 44. Change the directory back to your home directory. Verify that the internal snapshot
for /myfs is gone. (It should have been deleted as part of the rollback operation.)
ec vo
__ 45. Create an external snapshot for the /myfs file system, size 100 MB. Record the
name of the created snapshot logical volume _____________________________
oy si
__ 46. Display the snapshots for /myfs and record the free space for the listed external
snapshot. _________________________________________________________
u
__ 49. Display the space utilization of the listed external snapshot. Record the amount of
free space. ________________________________________________________
pr
Did the snapshot space fill up significantly? What would be the impact of running out
of space in a snapshot?
_________________________________________________________________
© Copyright IBM Corp. 2009, 2012 Exercise 10. Advanced backup techniques 10-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
_________________________________________________________________
__ 50. Access the snapshot (mount the external snapshot logical volume) and show that
the files are still shown there.
__ 51. Restore a single file back to the snappedFS and verify that it is recovered.
.I. n
.T ció
__ 52. Restore all of the /myfs file system contents to what they were when the snapshot
was taken, using the snapshot rollback facility.
.
Remember that you have to first unmount the snapshot and then unmount the file
C
system before executing the rollback.
.F a
C rm
__ 53. Remount the file system /myfs and check that the files have been restored to the
same state as when the snapshot was taken.
to fo
ec vo
oy si
u
cl
Ex
pr
.I. n
__ 54. Change your current working directory to the mount point of your /myfs file system.
.T ció
__ 55. Remove any files which are currently stored in the /myfs file system (except
lost+found).
.
C
.F a
__ 56. In /home/workshop, we have provided a script (mk_tree) that will build a directory
tree containing files which are specially built to illustrate potential problems.
C rm
Execute the mk_tree script.
__ 57. Generate a recursive long listing of files under /myfs, including the i-node numbers
to fo
of the files. Examine this report and answer the following questions:
__ b. For the following files (in /myfs/tree/dir2/dataC), who is the owner, what are the
permissions, and what is the time stamp?
oy si
• karim.data
u
- Owner: _____________________________________________________
- Permissions: _________________________________________________
cl
• michel.data
- Owner: _____________________________________________________
- Permissions: _________________________________________________
pr
• ted.data
- Owner: _____________________________________________________
© Copyright IBM Corp. 2009, 2012 Exercise 10. Advanced backup techniques 10-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
- Permissions: _________________________________________________
- Time stamp: _________________________________________________
.I. n
.T ció
__ d. What is the size of the sparse_file in /myfs/tree/dir1/dataA?
______________________________________________________________
.
C
__ e. What is the actual disk space used by sparse_file? _____________________
.F a
C rm
__ 58. Create an internal snapshot of /myfs. Call the snapshot mysnap. Verify that the
new directory tree is shown in the snapshot.
to fo
__ 59. In the snapped file system (/myfs), recursively remove /myfs/tree and verify that it
is gone.
__ 60. Before attempting a recovery of the data, ensure that the /myfs file system has more
ec vo
__ 61. Recover the recently created directory tree from the snapshot, using a recursive cp
command.
u
__ 62. Display a recursive long listing (with inode attributes and inode number) of the files
cl
under /myfs/tree. Examine this report and answer the following questions about
their characteristics, comparing them to your previous answers.
Ex
• karim.data
- Owner: _____________________________________________________
- Permissions: _________________________________________________
- Time stamp: _________________________________________________
EXempty
• michel.data
- Owner: _____________________________________________________
- Permissions: _________________________________________________
- Time stamp: _________________________________________________
.I. n
• ted.data
.T ció
- Owner: _____________________________________________________
- Permissions: _________________________________________________
.
- Time stamp: _________________________________________________
C
.F a
C rm
__ c. What is the relationship between /myfs/tree/dir2/dataB/sparseA and
/myfs/tree/dir1/dataA/sparse_file?
______________________________________________________________
to fo
__ d. What is the size of the sparse_file in /myfs/tree/dir1/dataA?
______________________________________________________________
ec vo
These results are probably not desirable in an actual recovery situation. You will
oy si
next use special options with the cp command to avoid some of these problems.
u
__ 63. In the snapped file system (/myfs), recursively remove /myfs/tree and verify that it
cl
is gone.
Ex
__ 64. Recover the recently created directory tree from the snapshot, using a recursive cp
command, but requesting that symbolic links be copied and that permissions,
ownerships, and timestamps be preserved.
pr
__ 65. Display a recursive long listing (with inode attributes and inode number) of the files
under /myfs/tree. Examine this report and answer the following questions about
their characteristics, comparing them to your previous answers.
© Copyright IBM Corp. 2009, 2012 Exercise 10. Advanced backup techniques 10-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
__ b. For the following files (in /myfs/tree/dir2/dataC), who is the owner, what are the
permissions, and what is the time stamp?
.I. n
• karim.data
.T ció
- Owner: _____________________________________________________
- Permissions: _________________________________________________
.
- Time stamp: _________________________________________________
C
.F a
• michel.data
C rm
- Owner: _____________________________________________________
- Permissions: _________________________________________________
- Time stamp: _________________________________________________
to fo
• ted.data
- Owner: _____________________________________________________
ec vo
- Permissions: _________________________________________________
- Time stamp: _________________________________________________
oy si
/myfs/tree/dir1/dataA/sparse_file?
______________________________________________________________
cl
______________________________________________________________
These results are better than the last copy attempt, but we still have separate files
for a situation where we previously had multiple hard links to a single file and we still
have files losing their sparseness. You will next use the backup and restore utilities
to copy over a directory tree.
EXempty
__ 66. In the snapped file system (/myfs), recursively remove /myfs/tree and verify that it
is gone.
__ 67. Recover the recently created directory tree from the snapshot by executing a
pipeline which uses the following backup and restore commands as filters:
.I. n
# cd /myfs/.snapshot/mysnap
# find ./tree | backup -i -qf - | (cd /myfs; restore -qvf -)
.T ció
__ 68. Display a recursive long listing (with inode attributes and inode number) of the files
.
under /myfs/tree. Examine this report and answer the following questions about
C
.F a
their characteristics, comparing them to your previous answers:
C rm
__ a. What type of file is /myfs/tree/dir1/cmds/mydf?
______________________________________________________________
to fo
__ b. For the following files (in /myfs/tree/dir2/dataC), who is the owner, what are the
permissions, and what is the time stamp?
• karim.data
ec vo
- Owner: _____________________________________________________
- Permissions: _________________________________________________
- Time stamp: _________________________________________________
oy si
• michel.data
u
- Owner: _____________________________________________________
cl
- Permissions: _________________________________________________
- Time stamp: _________________________________________________
Ex
• ted.data
- Owner: _____________________________________________________
pr
- Permissions: _________________________________________________
- Time stamp: _________________________________________________
© Copyright IBM Corp. 2009, 2012 Exercise 10. Advanced backup techniques 10-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
.I. n
__ e. What is the actual disk space used by sparse_file? _____________________
.T ció
You can see that the best results were from using a backup and restore pipeline.
.
There are other file characteristics which we did not explore, but for which the
C
.F a
backup and restore utilities are your best friends in ensuring you do not lose any of
them.
C rm
End of exercise
to fo
ec vo
oy si
u
cl
Ex
pr
.I. n
What you should be able to do
.T ció
At the end of the lab, you should be able to:
.
• Run diagnostics in multi-user mode
C
• Run diagnostics in single user mode
.F a
• Run diagnostics in service mode from a disk
• Boot to diagnostics using an external boot image (NIM server)
C rm
Introduction
to fo
Diagnostics can provide supplemental information about a hardware
related problem.
ec vo
oy si
u
cl
Ex
pr
Exercise instructions
Preface
Two versions of these instructions are available; one with hints and one without. You
can use either version to complete this exercise. Also, please do not hesitate to ask the
instructor if you have questions.
.I. n
All exercises of this chapter depend on the availability of specific equipment in your
classroom.
.T ció
Specifically, it requires either a local machine, where access does not depend upon
network access, or a remote LPAR which is accessible using a virtual terminal (HMC)
with a physical Ethernet adapter.
.
C
.F a
C rm
Part 1: Run diagnostics in multi-user mode
__ 1. Determine if your system has a physical Ethernet adapter port. For the purposes of
this lab exercise, a Logical Host Ethernet Port satisfies this requirement. Record the
to fo
name of the adapter: _______________________________________________
You will run diagnostics on this selected adapter in the remainder of this exercise
part. In the following instructions we will assume that this is ent5.
ec vo
__ 3. If your physical Ethernet adapter’s interface is not configured, then configure it with
a private address which will not conflict with any existing lab subnets. For example,
cl
you might assign it 192.168.252.<your student number>. Check with the instructor if
you are unsure.
Ex
EXempty Using Task Selection, query the vital product data of one of your physical Ethernet
adapters.
__ a. Who will be notified when a hardware error is posted to the error log?
.I. n
.T ció
__ b. If root was not in the notification list, return to the AUTOMATIC ERROR LOG
ANALYSIS AND NOTIFICATION SERVICE AID screen and add root to the
notification list.
.
C
.F a
C rm
to fo
ec vo
oy si
u
cl
Ex
pr
__ 8. Start up diagnostic routines in single user mode using the following steps:
__ a. You will need to be at the system console to do this. If you are using a remote
LPAR, then first open a virtual terminal to your system from the HMC.
.I. n
.T ció
__ b. Shut down your system to single user mode.
Note: In this particular case, it would have been sufficient to detach the interface
.
related to the network adapter, rather than having to shut down to single user
C
mode. However, there will be other situations where one may need to run
.F a
diagnostics from single user mode, maintenance mode, or even booting with a
diagnostic routine provided on CD or over the network.
C rm
__ c. At your system console, log in to single user mode using root’s password.
to fo
__ d. Start the diagnostics facility.
ec vo
__ 9. Test the communication adapter again in maintenance mode. What happens now?
__ 11. Start up the diagnostic utility in service mode from the hard drive using the following
steps:
__ a. Shut down AIX and power off your machine or logical partition:
.I. n
.T ció
__ b. Boot your system to diagnostics using service mode off the hard drive.
.
__ 12. Test the communication adapter again in maintenance mode. What difference did
C
.F a
you see from the previous diagnostics mode?
_________________________________________________________________
C rm
_________________________________________________________________
_________________________________________________________________
to fo
__ 13. Exit the diagnostic utility. This will warn you that exiting the diagnostic tool will
generate a shutdown. Press Enter to concur.
ec vo
__ 14. Once the halt is completed and the partition is Not Active, boot your system in
normal (multi-user) mode.
oy si
.I. n
then network boot your machine to use that image.
.T ció
First you will configure your NIM server.
__ 16. Login to your server LPAR (if you do not already have a session with it).
.
C
.F a
__ 17. List the attributes of your client LPAR’s NIM machine object, by executing the
commands:
C rm
# lsnim | grep machines
# lsnim -l <your-machine-object-name>
to fo
__ 18. If the Cstate value is not ready for a NIM operation, force reset the state of
your client machine object, by executing the command:
# nim -o reset -F <your-machine-object-name>
ec vo
__ 19. The maintenance boot operation requires that a SPOT is allocated to the machine.
Check that there is a SPOT allocated, by executing the command:
oy si
__ 20. Invoke the diag utility for your client LPAR, by executing the command:
Ex
__ 21. Verify that your client LPAR machine object now has a Cstate of maintenance boot
pr
__ 22. Now, you will boot your LPAR into SMS mode and use the SMS menus to boot the
LPAR from the network, using the NIM server as the boot server.
EXempty Connect to and log in to your HMC graphical interface, is you do not already have a
session.
__ 23. If your assigned client LPAR is currently running, shut it down in an organized
manner. Once the logical partition is in a Not Activated state, continue to the next
step.
.I. n
__ 24. When the partition state is Not Activated, activate your LPAR into SMS mode.
.T ció
__ 25. Boot your LPAR from the network into diagnostic mode using SMS.
.
C
.F a
C rm
__ 26. Test the communication adapter again in diagnostics mode.
Note
to fo
When booting to special modes, you can not assume that the logical device name for a
resource will be the same as when in a multi-user mode. Use the description and physical
location code attributes to identify the device.
ec vo
_________________________________________________________________
_________________________________________________________________
u
_________________________________________________________________
cl
End of exercise
.I. n
.T ció
.
C
.F a
C rm
to fo
ec vo
oy si
u
cl
Ex
pr
.I. n
system data that you would provide to AIX Support. During this
exercise, you will also use the kdb command, but only at a very
.T ció
introductory level.
.
C
.F a
After completing this exercise, you should be able to:
• Work with the AIX dump facility
C rm
• Work with a dedicated dump logical volume
• Generate a firmware assisted dump
• Initiate a dump from the HMC
to fo
Introduction
ec vo
In this exercise you will create a dump and use the kdb command to
look at that dump.
You will need root authority to complete this exercise.
oy si
u
cl
Ex
pr
© Copyright IBM Corp. 2009, 2012 Exercise 12. The AIX system dump facility 12-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
Exercise instructions
Preface
Two versions of these instructions are available; one with hints and one without. You
can use either version to complete this exercise. Also, please do not hesitate to ask the
instructor if you have questions.
.I. n
All exercises of this chapter depend on the availability of specific equipment in your
classroom.
.T ció
Note: All users must perform this exercise together if there is more than one user on
.
your system.
C
.F a
Part 1 - Work with the AIX dump facility
C rm
__ 1. If you do not already have a telnet connection to your client LPAR, start one now.
to fo
__ 2. If you do not have a Web browser session with your HMC, establish this before
starting this exercise. Navigate to the panel listing your LPARs. You will need this in
order to observe the reference code.
ec vo
__ 4. Execute the command to display the estimated size of a dump and record the
estimate you obtain: _______________________________________________
Ex
__ 5. Verify that the dump copy directory is large enough to hold the dump size
reported on the previous command.
pr
If there is not enough space, you must increase the size of the corresponding file
system. If necessary, use the chfs command to increase the size of the appropriate
file system, typically /var. After increasing the size, reverify that the file system is
large enough.
EXempty
__ 6. Ensure that the value of the autorestart attribute for sys0 is set to true. (If
autorestart is set to true, the system will reboot after a crash.)
__ 7. Use the command sysdumpstart -p to start a dump to the primary dump device.
.I. n
Record the time when you executed the command. ________________________
.T ció
What dump progress code for your LPAR is reported at the HMC for several minutes
after this command is entered? This is referred to as an Operator Panel Value
.
(pre-HMCv7) or as the Reference Code (HMCv7) in the HMC display across from
C
your LPAR name. __________________________________________________
.F a
C rm
__ 8. Eventually, the dump will complete and the AIX system will reboot. After the system
reboots, reestablish a telnet session with your LPAR and log in as root. Record the
time when the login prompts appears: __________________________________
How long did the dump require from initiation to reboot completion? ___________
to fo
__ 9. Determine and write down the size, uncompressed size, and filename for your
system dump:
ec vo
- Size: _______________________________________________________
- Uncompressed size: ___________________________________________
oy si
__ 10. Uncompress the dump file (for example, /var/adm/ras/vmcore.#.BZ). When doing
the dump-uncompress, keep the original compressed file. Based on the reported
cl
Uncompressed Size just reported, you may need to further increase the size of /var
to accommodate the size of the uncompressed dump (in addition to the already
Ex
__ 11. Execute the kdb command on the uncompressed dump that was created. Write
down the command you used:
pr
_________________________________________________________________
© Copyright IBM Corp. 2009, 2012 Exercise 12. The AIX system dump facility 12-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
__ 12. Use the kdb stat and status subcommands to show the system name and time of
the dump, and the threads that were running when the dump occurred. Quit the kdb
command when you are done.
__ 13. Remove the uncompressed dump, but keep the original compressed dump. This will
ensure proper processing of the system dump by the snap command, which you will
use in a subsequent lab step.
.I. n
.T ció
__ 14. Check to see how much free space is currently available in /tmp.
If necessary, increase your /tmp file system so that there is at least 210 MB of free
.
space. We need this space in the next lab step.
C
.F a
Write down the commands you used:
_________________________________________________________________
C rm
_________________________________________________________________
__ 15. Run the command snap -a. This command required a little more than 6 minutes to
to fo
complete on our development system.
Review the output of this command. This output will include a list of various
ec vo
directories (in /tmp/ibmsupt) to which the snap command writes its output.
In these directories, you will find files with names that end in .snap, which are ASCII
files. Review the content of a few of these files.
oy si
u
cl
Ex
pr
.I. n
__ 17. List the estimated size of a dump on your systems. Record it here:
.T ció
________________________________________________________________
.
__ 18. List the physical partition size for your rootvg. ___________________________
C
.F a
__ 19. Calculate how many physical partitions you must allocate to satisfy the estimated
C rm
size of a dump. Record it here: ________________________________________
__ 20. Verify that the file system that holds the copy directory has enough free space, given
to fo
the estimated dump size. Increase the file system size, if necessary.
__ 21. Create a logical volume in rootvg that has more than enough physical partitions to
ec vo
handle the estimated dump size. Name it dumplv and specify a logical volume type
of sysdump.
oy si
__ 22. Permanently define this new logical volume as the primary dump device.
u
__ 23. Verify that you new logical volume is defined as the primary dump device.
cl
__ 24. Initiate a dump of your operating system to your primary dump device. On our
Ex
__ 25. In your HMC GUI interface, examining the reference code field across from your
client LPAR, monitor the dump progress. 0c2 indicates the dump is in progress.
pr
Eventually, the dump will complete and the AIX system will reboot.
__ 26. After the system reboots, reestablish a telnet session with your LPAR and log in as
root. List the dump status. What was the size of the dump? Was there a Dump copy
filename line in the report? __________________________________________
© Copyright IBM Corp. 2009, 2012 Exercise 12. The AIX system dump facility 12-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
_________________________________________________________________
__ 27. Examine the copy directory. Is there a vmcore file located in that directory?
_________________________________________________________________
.I. n
__ 28. Copy the dump and the current kernel to the dump copy directory.
.T ció
__ 29. Again, examine the copy directory. Is there a vmcore file located in that directory?
______________________________________________________________
.
C
.F a
C rm
to fo
ec vo
oy si
u
cl
Ex
pr
__ 30. If you do not already have an web browser window with a connection to the HMC,
.I. n
establish one now.
.T ció
__ 31. If you do not already have a virtual terminal to your assigned client LPAR, establish
one at this point, and log in as root.
.
C
.F a
__ 32. Remove any dump files currently in /var/adm/ras, if they exist
C rm
__ 33. List the current system dump configuration.
What is the current type of dump? _____________________________________
to fo
Is the primary dump device a dedicated dump device? _____________________
__ 34. Modify your system to permanently use a firmware assisted dump. Is the change
ec vo
__ 35. List your systems dump configuration to verify the current situation. What type of
oy si
__ 36. Shutdown and reboot your AIX system. Log back in as root when you receive a login
prompt.
cl
__ 37. List your systems dump configuration to verify the current situation. What type of
Ex
__ 38. Initiate a dump to your primary device and record the time that you executed the
pr
command. _______________________________________________________
__ 39. Examine the HMC reference code for you client LPAR. What is the progress code?
________________________________________________________________
© Copyright IBM Corp. 2009, 2012 Exercise 12. The AIX system dump facility 12-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
__ 40. Continue to observe the reference code field in your HMC. Note the time when the
dump progress code goes away. ______________________________________
__ 41. Continue to observe the reference code field in your HMC. At some point you should
see some text (instead of a code) in the reference field about the dump processing
(just prior to starting the AIX operating system). What is the text?
.I. n
________________________________________________________________
.T ció
__ 42. Watch your virtual console. You may be quick enough to see a SoftRos issued
message about dump processing on your system console.
.
Record the time when you receive a login prompt. ________________________
C
.F a
How long did it take from dump initiation to the completion of the reboot with login
prompt? _________________________________________________________
C rm
How did this compare to the traditional dump processing? __________________
________________________________________________________________
to fo
__ 43. Login as root and display the results of the last dump.
________________________________________________________________
ec vo
__ 44. Copy the dump and the current kernel to the dump copy directory.
oy si
__ 45. Examine the copy directory. Is there a vmcore file located in that directory?
______________________________________________________________
u
cl
Ex
pr
.I. n
__ 46. If you do not already have an web browser window with a connection to the HMC,
establish one now.
.T ció
__ 47. If you do not already have a virtual terminal to your assigned client LPAR, establish
.
one at this point, and log in as root.
C
.F a
__ 48. In your HMC web browser interface, locate and select your assigned client LPAR.
C rm
__ 49. From the task menu, select Operations -> Restart.
to fo
__ 50. In the pop-up Restart Partition window, select the Dump option and click OK.
ec vo
__ 51. Examine the HMC reference code for you client LPAR. What is the progress code?
________________________________________________________________
oy si
__ 52. You do not need to wait for the dump to complete. Notify the instructor that you are
done with this lab exercise.
u
cl
End of Exercise
Ex
pr
© Copyright IBM Corp. 2009, 2012 Exercise 12. The AIX system dump facility 12-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises
.I. n
.T ció
.
C
.F a
C rm
to fo
ec vo
oy si
u
cl
Ex
pr
Ex backpg
Back page
cl
pr u
oy si
ec vo
to fo
C rm
.F a
.T ció
.I. n
C
.
Ex
cl
pr u
oy si
ec vo
to fo
C rm
.F a
.T ció
.I. n
C
.
CONTACTO
Teléfono
91 761 21 78
Póngase en contacto con nuestro equipo y le
informaremos de cualquier duda o cuestión
que pueda surgirle.
Email
formacion@arrowecs.es
Mándenos un email y le atenderemos
enseguida.
Online
@Arrow_Edu_ES
O bien puede contactarnos a través de
nuestro perfil en Twitter.
Visítenos
Arrow ECS Education Services
Avenida de Europa 21,
Parque Empresarial La Moraleja
28108 Alcobendas, Madrid
EDUCATION
S E R V I C E S