AN143XSTUDHINT
AN143XSTUDHINT
AN143XSTUDHINT
cover
Front cover
Student Exercises
with hints
ERC 3.1
Student Exercises with hints
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:
AIX 5L AIX 6 AIX
Approach AS/400 DB2
Electronic Service Agent Everyplace HACMP
Initiate MVS Notes
Power Architecture POWER Hypervisor Power Systems
Power PowerHA PowerVM
POWER6 POWER7+ POWER7
pSeries RS/6000 System p
System Storage Tivoli WebSphere
PostScript is either a registered trademark or a trademark of Adobe Systems Incorporated
in the United States, and/or other countries.
Intel is a trademark or registered trademark of Intel Corporation or its subsidiaries in the
United States and other countries.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or
both.
Windows is a trademark of Microsoft Corporation in the United States, other countries, or
both.
UNIX is a registered trademark of The Open Group in the United States and other
countries.
Java and all Java-based trademarks and logos are trademarks or registered trademarks
of Oracle and/or its affiliates.
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.
Other product and service names might be trademarks of IBM or other companies.
TOC Contents
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Exercises description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
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
States, or other countries, or both:
AIX 5L AIX 6 AIX
Approach AS/400 DB2
Electronic Service Agent Everyplace HACMP
Initiate MVS Notes
Power Architecture POWER Hypervisor Power Systems
Power PowerHA PowerVM
POWER6 POWER7+ POWER7
pSeries RS/6000 System p
System Storage Tivoli WebSphere
PostScript is either a registered trademark or a trademark of Adobe Systems Incorporated
in the United States, and/or other countries.
Intel is a trademark or registered trademark of Intel Corporation or its subsidiaries in the
United States and other countries.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or
both.
Windows is a trademark of Microsoft Corporation in the United States, other countries, or
both.
UNIX is a registered trademark of The Open Group in the United States and other
countries.
Java and all Java-based trademarks and logos are trademarks or registered trademarks
of Oracle and/or its affiliates.
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.
Other product and service names might be trademarks of IBM or other companies.
Introduction
The classroom environment is likely to be housed in a remote location.
This exercise will familiarize you with the systems you will be working
with throughout the week.
Copyright IBM Corp. 2009, 2013 Exercise 1. Introduction to AIX and IBM Power Systems 1-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Preface
Two versions of these instructions are available; one with hints and one without. You can
use either version to complete this exercise. Also, do not hesitate to ask the instructor if you
have questions.
General notes, applicable to all exercises:
Your instructor will provide you with instructions for accessing the remote environment. For
example, this might involve using a web browser or Virtual Private Network (VPN). Your
instructor will further provide you with all the details and login IDs required.
Unless otherwise stated, log in, to systems HMC/LPAR using a terminal window, for
example through PuTTY or a Linux command line.
All hints are marked with a >> sign.
The system we used to capture the example output was, obviously different from the
system that you will be working on. Thus, the output you see will have differences from
what our example output shows. This will also make some of your answers slightly
different than what our hints show.
Copyright IBM Corp. 2009, 2013 Exercise 1. Introduction to AIX and IBM Power Systems 1-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
EXempty Accept any certificate issues and permit pop-ups as necessary to continue.
On the next window to pop up, enter your assigned HMC admin login user and
password. If presented with an option to reconnect to an existing disconnected
session, click the New Session button to create a new session.
__ 19. Display all of the LPARs defined on the managed system.
__ a. If using the command line interface:
Obtain the names of the systems being managed by this HMC by entering the
following command.
# lssyscfg -r sys -F name
Copyright IBM Corp. 2009, 2013 Exercise 1. Introduction to AIX and IBM Power Systems 1-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Use the lssyscfg command and format the output so just the name, state, and
operating system (OS) level attributes are displayed, as follows:
# lssyscfg -m <managed system> -r lpar -F name state os_version
__ b. If using the graphic interface:
In the navigation area (on the left), expand Systems Management and then
expand Servers. Click the name of your assigned system. In the content area
you will see the defined LPARs listed.
EXempty Select your assigned LPAR so there is a check mark in the box. When the small
chevron icon appears to the right of the LPAR name, click that icon. This will
display a menu. Select Console Window in the task menu and then click the
submenu Open Terminal Window. A virtual terminal emulation window should
be started, as a result.
Note
Copyright IBM Corp. 2009, 2013 Exercise 1. Introduction to AIX and IBM Power Systems 1-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
# id
# pwd
/
# echo $HOME
/
__ 26. To verify that you do, in fact, have root privileges, cat out the file
/etc/security/passwd. This file holds the encrypted passwords for the users
on your system. Only root can look at this file. More details on this file are
mentioned later in the course. Did you see the contents of the file? __________
Yes.
# cat /etc/security/passwd
(Be careful to not misspell the file name.)
End of exercise
Introduction
This exercise is designed to give you experience working with the
system management tools supplied with AIX. In most classrooms,
each student should be provided with their own AIX partition.
Copyright IBM Corp. 2009, 2013 Exercise 2. Using system management tools in AIX 2-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Preface
Two versions of these instructions are available: one with hints and one without. You can
use either version to complete this exercise. Also, do not hesitate to ask the instructor if you
have questions.
General notes, applicable to all exercises:
Your instructor will provide you with instructions for accessing the remote environment. For
example, this might involve using a web browser or Virtual Private Network (VPN). Your
instructor will further provide you with all the details and login IDs required.
Unless otherwise stated, log in to systems (HMC/LPAR) using a terminal window (for
example through PuTTY or a Linux command line).
On some terminal emulations, the function keys are not operative and you might need to
substitute escape sequences. For example, instead of pressing F3, you might need to
press <Esc+3> for the same function.
All hints are marked with a >> sign.
The output shown in the answers is an example. Your output and answers based on the
output might be different.
EXempty __ 5. Using SMIT, assign a password for the new user. Set the password to be the same
as the user name. When the password has been set, exit from SMIT.
Invoke SMIT:
# smitty
In SMIT, select Security & Users > Users > Change a User's Password
User Name [team###]
Changing password for team###
teamxx's New password: team### (The password will not appear on the screen)
Enter the new password again: team###
Press F10 (or Esc+0) and exit from SMIT.
__ 6. Start SMIT using the options to redirect the smit.script and smit.log files to
the /tmp directory. From the main SMIT menu, select Processes & Subsystems.
Display all the current process running on your system. Examine the output.
# smitty -s /tmp/smit.script -l /tmp/smit.log
Select Processes & Subsystems > Processes > Show All Current Processes >
Show THREAD information? The pop-up box is displayed. Select no.
Press F6 (to view the command).
Press F3 - Cancel until you are back at the System Management screen.
__ a. Which command do you think was executed? _______________.
ps -ef
__ b. How can you find out? ___________________________________________
Pressing the F6 key from the output screen displays a pop-up box that shows the
command that was executed.
__ c. Return to the main menu.
__ 7. Select each of the main SMIT menu entries, briefly examine the sub-menu, then use
the F3 key (or Esc+3) to back up to the previous menu. Do not execute any
commands that can cause changes to the system. Because you are logged in as
root, you must be very careful. We will discuss many of these SMIT menus in later
units.
Select each entry.
Press F3.
Repeat as appropriate.
__ 8. Shell out (F9 or Esc+9) and execute the date command. Return to SMIT and do the
following:
__ a. Stop syslogd subsystem.
__ b. View the command that was executed.
Copyright IBM Corp. 2009, 2013 Exercise 2. Using system management tools in AIX 2-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
EXempty The smit.log file contains a reference to each menu screen selected, the commands
executed, output from the commands, and all screen images. The smit.script files
contains the high-level commands executed.
Why should these files be monitored?
_____________________________________________________________
Both files should be monitored regularly and purged periodically so disk space is not
wasted.
Copyright IBM Corp. 2009, 2013 Exercise 2. Using system management tools in AIX 2-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Note
All of the exercises throughout the rest of the week can be performed using SMIT, pconsole
or the command line. You are welcome to use the tool you feel most comfortable with.
End of exercise
Introduction
This exercise is designed to give you experience with applying,
committing, updating, and rejecting software on AIX.
Copyright IBM Corp. 2009, 2013 Exercise 3. AIX software installation and maintenance 3-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Preface
Two versions of these instructions are available: one with hints and one without. You can
use either version to complete this exercise. Also, do not hesitate to ask the instructor if you
have questions.
All exercises of this unit depend on the availability of specific equipment in your classroom.
All hints are marked with a >> sign.
The output shown in the answers is an example. Your output and answers based on the
output might be different.
In many of the following instructions, you will have a choice between using the command
line interface or the SMIT management tool. This will be seen as options in the hints. If
using the SMIT panels, you might want to use the F6 (or Esc-6) option to see the
underlying command or script which is executed by that panel.
Install Software
Installation Summary
alex.grumpy 1.1.0.1 USR APPLY SUCCESS
Copyright IBM Corp. 2009, 2013 Exercise 3. AIX software installation and maintenance 3-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Install Software
EXempty __ 6. Reject the applied update of alex.grumpy 1.1.0.1 fileset. Default all other
options. Check to ensure that the fileset has reverted back to version 1.1.0.0.
If you are using the command line interface:
# installp -r alex.grumpy
# lslpp -l alex.grumpy
If you are using the SMIT tool:
# smit install
Software Installation and Maintenance
Select Software Maintenance and Utilities > Reject Applied Software Updates
(Use Previous Version).
[Entry Fields]
* SOFTWARE name [alex.grumpy ] +
PREVIEW only? (reject operation will NOT occur) no +
REJECT dependent software? no +
EXTEND file systems if space needed? yes +
DETAILED output? no +
. . .
Copyright IBM Corp. 2009, 2013 Exercise 3. AIX software installation and maintenance 3-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
SOFTWARE name |
| Move cursor to desired item and press F7. Use arrow keys to scroll.
| ONE OR MORE items can be selected.
| Press Enter AFTER making all selections.
|
| # Name Level
| #
-------------------------------------------------------------------
| > alex.grumpy 1.1.0.1
Press Enter to execute the specified task.
Scroll through the Command Status panel to check that there were no problems.
Press F3 (or Esc-3) repeatedly until you are at the Software Installation and
Maintenance menu.
Select List Software and Related Information > List Installed Software and Related
Information > List Installed Software.
Either type in the fileset name, or press F4 (or Esc-4) and locate the alex.grumpy
fileset in the list of applied filesets, select it and then press Enter to return to the dialog
panel.
Examine the Command Status panel to see the output of the command.
EXempty Select Software Maintenance and Utilities > Commit Applied Software Updates
(Remove Saved Files).
[Entry Fields]
* SOFTWARE name [alex.grumpy] +
PREVIEW only? (commit operation will NOT occur) no +
COMMIT requisites? yes +
EXTEND file systems if space needed? yes +
DETAILED output? no +
Either type in the fileset name or press F4 (or Esc-4) and locate the alex.grumpy fileset
in the list of applied filesets, select it, and then press Enter to return to the dialog panel.
Examine the Command Status panel to see the output of the command.
Press F3 (or Esc-3) repeated until you are at the Software Installation and Maintenance
menu.
Select List Software and Related Information > List Installed Software and Related
Information > List Installed Software.
Either type in the fileset name or press F4 (or Esc-4) and locate the alex.grumpy fileset
in the list of applied filesets, select it and then press Enter to return to the dialog panel.
Examine the Command Status panel to see the output of the command.
__ 9. Remove fileset alex.grumpy from the system.
If you are using the command line interface:
# installp -u alex.grumpy
If you are using the SMIT tool:
# smit install
Copyright IBM Corp. 2009, 2013 Exercise 3. AIX software installation and maintenance 3-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Either type in the fileset name or press F4 (or Esc-4) and locate the alex.grumpy fileset
in the list of applied filesets, select it and then press Enter to return to the dialog panel.
Examine the Command Status panel to see the output of the command.
__ 10. Discover which LPP fileset the binary /usr/bin/whois is part of.
List the fileset____________________
If you are using the command line interface:
# lslpp -w /usr/bin/whois
If you are using the SMIT tool:
# smit install
Select List Software and Related Information > List Installed Software and Related
Information > List Fileset Containing File.
[Entry Fields]
File Name to Search For [/usr/bin/whois]
__ 11. View the install history of the bos.net.tcp.server filesets using the lslpp command.
If you are using the command line interface:
# lslpp -h bos.net.tcp.server
If you are using the SMIT tool:
# smit install
Select List Software and Related Information > List Installed Software and Related
Information > Show Software Installation History.
[Entry Fields]
* SOFTWARE name [bos.net.tcp.server]
__ 12. Discover which files are contained in the bos.net.tcp.server fileset.
If you are using the command line interface:
# lslpp -f bos.net.tcp.server |more
If you are using the SMIT tool:
[Entry Fields]
* SOFTWARE name [bos.net.tcp.server]
Copyright IBM Corp. 2009, 2013 Exercise 3. AIX software installation and maintenance 3-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
End of exercise
Introduction
This exercise is designed for you to become familiar with the methods
you can use to discover what devices are on your system and how
they are configured. It deals exclusively with adapters and disk
devices.
Copyright IBM Corp. 2009, 2013 Exercise 4. System configuration and devices 4-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Preface
Two versions of these instructions are available: one with hints and one without. You can
use either version to complete this exercise. Also, do not hesitate to ask the instructor if you
have questions.
All exercises of this chapter depend on the availability of specific equipment in your
classroom. If your lab environment uses remote System p/AIX platforms, the instructor will
provide you with the addressing (IP address or hostname) and instructions for accessing
the remote machine. For example, you might be using telnet, an X-windows server, or a
VNC client. Whatever tool you are using, at various points in the exercises you might need
to re-launch your remote access tool to obtain a new login prompt.
All hints are marked with a >> sign.
The output shown in the answers is an example. Your output and answers based on the
output might be different.
Copyright IBM Corp. 2009, 2013 Exercise 4. System configuration and devices 4-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
EXempty Part 3: Device states (changing the status of a disk drive device)
__ 13. List the status and device location of the disk device, hdisk3.
_____________________________________
_____________________________________
# lsdev -Cl hdisk3
# lscfg -l hdisk3
The disk should be in Available state.
__ 14. Change the state of hdisk3 to a Defined state.
# rmdev -l hdisk3
# lsdev -Cl hdisk3
(hdisk1 should be Defined)
__ 15. Change the state of hdisk3 back to the Available state.
# mkdev -l hdisk3
# lsdev -Cl hdisk3
__ 16. Remove the disk device from the system.
# rmdev -l hdisk3 -d
# lsdev -Cl hdisk3
You should not see hdisk3 listed.
__ 17. Rediscover and configure that same disk for use. Does the device re-appear with
the same location code? ________________________________________
____________________________________________________________
# cfgmgr
# lsdev -Cl hdisk3
# lscfg | grep hdisk
(hdisk3 should be Available)
In our scenario, the disk will reappear with the same logical device name and location
code. If yet another disk had been added prior to rerunning cfgmgr, it might have taken
this logical device name and the original disk might have been assigned a new logical
device name.
End of exercise
Copyright IBM Corp. 2009, 2013 Exercise 4. System configuration and devices 4-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Introduction
TCP/IP has been configured on your systems prior to class start in
order to provide remote access to the lab systems, needed for earlier
exercises. In this exercise, you will eliminate that network
configuration and then recreate it.
An optional activity is to configure NFS.
Preface
Two versions of these instructions are available: one with hints and one without. You can
use either version to complete this exercise. Also, do not hesitate to ask the instructor if you
have questions.
General notes, applicable to all exercises:
Your instructor will provide you with instructions for accessing the remote environment. For
example, this might involve using a web browser or Virtual Private Network (VPN). Your
instructor will further provide you will all the details and login IDs required.
Unless otherwise stated, log in to systems (HMC/LPAR) using a terminal window (for
example through PuTTY or a Linux command line).
On some terminal emulations, the function keys are not operative and you might need to
substitute escape sequences. For example, instead of pressing F3, you might need to
press Esc+3 for the same function.
All hints are marked with a >> sign.
The output shown in the answers is an example. Your output and answers based on the
output might be different.
# hostname
# netstat -r | grep default
__ 3. How many Ethernet adapters are defined on your system? _______________
# lsdev -Cc adapter |grep Ether
EXempty Since we are going to unconfigure the TCP/IP configuration, you will need to access your
system through a path which does not depend upon the LPARs TCP/IP configuration, such
as the system console.
__ 4. Connect to your assigned HMC and log in using your assigned administrative user
name (or use an existing connection, if one exists already).
If using the command line interface:
- Establish an interactive ssh session to the HMC (if you do not already have one) and
log in with your assigned administrative user name.
If using the graphic interface:
- Start your browser (Firefox if using the e-lab environment) and type in the URL
https://<IP address of assigned HMC>
- At the resulting web page, click the Log on and launch the Hardware
Management Console web application link.
- On the next window to pop-up, enter your assigned HMC admin login user and
password. If presented with an option to reconnect to an existing disconnected
session, click the New Session button to create a new session.
__ 5. Open a virtual terminal for your assigned LPAR (if you do not already have one).
If using the command line interface:
- From the HMC, use the vtmenu command to open a virtual terminal for your
assigned LPAR.
- If presented with the Managed Systems list, enter the number for your server.
- When presented with the Partitions list, enter the number for your assigned LPAR.
Note
Only one console terminal at a time can be open to a given LPAR. If you get an error that a
terminal session is already open, first check to be sure you did not try to access another
students LPAR.
If there is a terminal session is still active to your LPAR, for which you do not have a
window on your workstation, type:
~> rmvterm -m <managed system> -p <your assigned LPAR>
and then repeat your attempt to open a new session.
x
- Select your assigned LPAR so there is a check mark in the box. When the small
chevron icon appears to the right of the LPAR name, click that icon. This will display
a menu. We will call this the task menu.
- Select the Console Window item from the task menu and then click the Open
Terminal Window sub-menu item. A virtual terminal emulation window should be
started, as a result.
Note: The terminal emulation window might be hidden behind existing windows.
Note
Only one console terminal at a time can be open to a given LPAR. If you get an error that a
terminal session is already open, first check to be sure you did not try to access another
students LPAR.
If there is a terminal session is still active to your LPAR, for which you do not have a
window on your workstation:
In the Task menu for your LPAR, click the Select the Console Window menu item. Then
click the Close Terminal Window sub-menu item.
Then repeat your attempt to open a new session.
x
__ 6. Log on through the virtual terminal connection to the LPAR as the root user.
__ 7. To allow you to configure networking, you will first need to remove the current
network configuration not only from the kernel but also from the ODM database. You
need to do this without effecting the et0 configuration which is needed later on to
support VNC connections to your LPAR.
(This will disrupt any existing TCP/IP connections you might have with the LPAR.)
We have provided a script that will handle this for you.
__ a. List the inet0 and en0 device attributes.
__ b. Execute the clearnet script located in the /home/AN14 directory.
__ c. List the inet0 and en0 attributes again to verify that the configuration has been
cleared from the ODM.
Following are suggested commands:
# lsattr -El inet0
# lsattr -El en0
# /home/AN14/clearnet
# lsattr -El inet0
# lsattr -El en0
__ 8. Display the kernel interface configuration to verify that the default route, hostname,
IP address and mask for en0 and the hostname are gone.
# exportfs -va
If using SMIT:
# smit nfs
Select Network File System (NFS) > Add a Directory to Exports List.
(In panel below, only selected fields are shown)
End of exercise
Introduction
All instructions involve using the system unit for starting and stopping
the system in various modes.
Copyright IBM Corp. 2009, 2013 Exercise 6. System startup and shutdown 6-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Preface
Two versions of these instructions are available: one with hints and one without. You can
use either version to complete this exercise. Also, do not hesitate to ask the instructor if you
have questions.
General notes, applicable to all exercises:
Your instructor will provide you with instructions for accessing the remote environment. For
example, this might involve using a web browser or Virtual Private Network (VPN). Your
instructor will further provide you with all the details and login IDs required.
Unless otherwise stated, log in to systems (HMC/LPAR) using a terminal window (for
example through PuTTY or a Linux command line).
On some terminal emulations, the function keys are not operative and you might need to
substitute escape sequences. For example, instead of pressing F3, you might need to
press Esc+3 for the same function.
All hints are marked with a >> sign.
The output shown in the answers is an example. Your output and answers based on the
output might be different.
EXempty __ 6. Determine if the tftpd process is currently active. Edit the /etc/inetd.conf file. If
the tftp service is commented out, uncomment it and if the tftp service is not
commented out, then comment it out. Refresh the inetd subsystem. Confirm the
state of the tftpd process is affected by the change.
Following are suggested commands:
# ps -T <pid of the srcmstr process> |grep tftp
# vi /etc/inetd.conf
/tftp
Either add or remove the comment symbol in column 1.
#tftp dgram udp6 SRC nobody /usr/sbin/tftpd tftpd -n
Save and exit the file.
Refresh inetd and examine resulting process tree:
# refresh -s inetd
# ps -T <pid of the srcmstr process> |grep tftp
The tftp service is normally defined as a subserver to the inetd subsystem. Any ftpd
daemons should have inetd as their parent process. You should see an ftpd daemon as
a inetd child process only if the inetd.conf configuration file has it as an effective
definition.
Note
__ 7. Using a separate command line window, log in to the HMC as an admin user. Your
instructor will provide you with the following information:
Managed system name: _________________________
HMC name/IP address: __________________________
HMC admin user: ______________________________
HMC admin password: __________________________
__ 8. Connect to your assigned HMC and log in using your assigned administrative user
name.
Copyright IBM Corp. 2009, 2013 Exercise 6. System startup and shutdown 6-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Note
Only one console terminal at a time can be open to a given LPAR. If you get an error that a
terminal session is already open, first check to be sure you did not try to access another
students LPAR.
If there is a terminal session is still active to your LPAR, for which you do not have a
window on your workstation, type:
~> rmvterm -m <managed system> -p <your assigned LPAR>
and then repeat your attempt to open a new session.
x
EXempty - Select the Console Window item from the task menu and then click the Open
Terminal Window sub-menu item. A virtual terminal emulation window should be
started, as a result.
Note: The terminal emulation window might be hidden behind existing windows).
Note
Only one console terminal at a time can be open to a given LPAR. If you get an error that a
terminal session is already open, first check to be sure you did not try to access another
students LPAR.
If there is a terminal session is still active to your LPAR, for which you do not have a
window on your workstation:
In the task menu for your LPAR, click the Select the Console Window menu item. Then
click the Close Terminal Window sub-menu item.
Then repeat your attempt to open a new session.
x
__ 10. Log in to the LPAR as the root user and shutdown the system into single user
mode.
# shutdown -Fm
You will see several messages appear. Enter the root password when you see the
following:
INIT: Single-User Mode
PASSWORD:
__ 11. Verify that the SRC subsystems have been stopped.
# lssrc -a
__ 12. Verify that there are few processes running on the system.
# ps -ef
__ 13. Reset the run level back to multi-user mode, log back in as root, and run
/etc/rc.net to configure and start the network interfaces.
# telinit 2
# /etc/rc.net
__ 14. Use the bootlist command to display the boot device used during a normal boot
operation.
# bootlist -m normal -o
__ 15. Keep the present console terminal window open.
Copyright IBM Corp. 2009, 2013 Exercise 6. System startup and shutdown 6-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Part 2: Using the HMC to shut down and activate an AIX partition
__ 16. If using the command line interface for the HMC, your existing ssh session is busy
being used for the virtual terminal emulation (through the vtmenu command). You
will need another ssh session to enter some more HMC commands.
Open (another) separate terminal emulation window, establish an ssh protocol
connection (for example, by using a tool such as PuTTY), and log in to the HMC.
If using the graphic interface, there is nothing you need to do in this step.
__ 17. From the HMC, perform an operating system immediate shutdown of your assigned
LPAR.
If using the command line interface:
- From the HMC command line, enter:
~> chsysstate -m <managed system name> -r lpar -o osshutdown \
--immed -n <lpar name>
(note the double dash flag for the immediate option)
If using the graphic interface:
- Use the small chevron icon next to your selected LPAR to bring up the task menu.
Select the Operations menu item and then click the Shutdown sub-menu item.
- This will display a Shutdown Partitions window. In that window, select the Operating
System Immediate option and then click OK.
EXempty
__ 18. Return to your virtual console session. Patiently wait for and observe the shutdown
messages.
__ 19. Once the console displays Halt Completed, check on the HMC display that your
assigned LPAR is no longer active.
If you are using the command line interface, enter the command:
~> lssyscfg -m <managed system name> -r lpar -F name state \
--filter "lpar_names=<lpar name>"
Copyright IBM Corp. 2009, 2013 Exercise 6. System startup and shutdown 6-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
End of exercise
Introduction
In this exercise, you become familiar with the HMC applications and
menus that enables you to create and configure partitions.
Requirements
This workbook
A student workstation connected to a network with a browser to
access the HMC GUI
A POWER5 or later processor-based managed system connected
to the same network as the student workstations
Copyright IBM Corp. 2009, 2013 Exercise 7. Configuring logical partitions 7-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Preface
All exercises in this chapter depend on the availability of specific equipment in your
classroom. You will need a computer system and a managed system accessible to each
other on a network.
Note
Some lab environment can have two NIM servers, where one is the NIM server used to
provision the class lab environment and the other is a NIM server created for the students
to use (usually another LPAR on your assigned server). Do not use the provisioning NIM
server. Ask your instructor, if you are not sure of which server to use.
Hints are provided for exercises in case you need them and provide solutions for
the exercise steps. All hints are marked by a sign.
In this exercise, you will define a new logical partition. In the next exercise, you will install a
new AIX operating system into this new logical partition.
__ 1. Before we start, you will need to record the IP network parameters for your assigned
LPAR. We will later use these parameters to configure the network boot of your new
LPAR. The network parameters can be obtain from the configuration sheets
(provided by your instructor). Some of the network parameters can be determined
by running commands in your existing assigned LPAR.
ILPAR IP address: _____________________________________________
LPAR Hostname: ______________________________________________
Network mask: ________________________________________________
Default gateway: _______________________________________________
NIM server LPAR IP address: _____________________________________
HMC IP address _______________________________________________
HMC name for your server _______________________________________
VLAN ID: _____________________________________________________
Partition ID for LPAR you will define: ________________________________
Following are example commands that could be used to discover some of the
network configuration:
# ifconfig en0
# netstat -in
# hostname
Note
Copyright IBM Corp. 2009, 2013 Exercise 7. Configuring logical partitions 7-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
in the HMC GUI, and choose Configuration > Create Logical Partition > AIX or
Linux. The Create Lpar Partition Wizard task window opens.
The following steps will walk you through each page in the wizard.
__ 6. In the Create Lpar Wizard, set the partition ID and the partition name according to
what you recorded earlier. Click the Next button on the bottom of the screen to
advance to the next page.
EXempty See the following example of the Create Partition window for partition: mylpar2.
__ 7. On the Partition Profile panel, name the partition profile normal and click the Next
button. At any time during the LPAR creation and profile definition, you can use the
Back and Next buttons to navigate. You can also go directly to any parameter
Copyright IBM Corp. 2009, 2013 Exercise 7. Configuring logical partitions 7-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
already defined by clicking the corresponding step name at the left part of the
screen.
__ 8. The next panel prompts you to choose either a dedicated (entire processor) or a
shared processor (partial processing unit) configuration. We want to use a fractional
amount of a processors capacity to make more efficient use of the scarce
resources. Configure your partition for shared processors, and then click Next.
EXempty __ 9. Set the minimum, desired, and maximum amount of processing units in the
corresponding fields. Check the box for uncapped. Accept the defaults for Virtual
Processors. The values we want you to use are:
- Minimum = 0.1
- Desired = 0.2
- Maximum = 0.3
- Check box for uncapped (*** this is important for performance reasons ***)
- Accept the defaults for all other fields.
After entering these amounts, click Next.
__ 10. For memory allocation, if presented with a choice between shared or dedicated,
choose dedicated.
__ 11. Allocate the minimum, desired, and maximum memory with 768 MB, 1 GB, and 1
GB values. Following is an example configuration.
See the following example:
Copyright IBM Corp. 2009, 2013 Exercise 7. Configuring logical partitions 7-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
__ 14. On the Virtual Adapters screen, notice that two Server Serial adapters are defined
by default as required.
We will define one virtual Ethernet adapter and one virtual SCSI adapter.
__ a. Change the value of Maximum virtual adapters from 10 to 70.
__ b. Click Create Virtual Adapter > Ethernet Adapter in the Actions menu to create
a Virtual Ethernet Adapter.
__ c. Your instructor should have provided you with the VLAN ID of the VLAN which is
bridged to an external network. You need to enter this into the appropriate field
on the Create Virtual Ethernet panel. Depending upon the level of HMC
firmware, this field will either be labeled: VLAN ID or Port Virtual Ethernet.
Accept the defaults for all other options.
__ d. Click Create Virtual Adapter > SCSI Adapter in the Actions menu to create a
SCSI client adapter. Set the Virtual SCSI adapter slot number (Adapter field) to
the number you recorded in Step 4 on page 7-3.
__ e. Then, specify your VIOS partition in the Server partition field, and specify the
VSCSI server adapter slot number (the same as your client partitions Virtual
SCSI adapter number) in the Server adapter ID field. Click OK.
EXempty Here is an example of this screen, in which we assumed we were team #2:
Copyright IBM Corp. 2009, 2013 Exercise 7. Configuring logical partitions 7-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
End of exercise
Introduction
You will install an AIX operating system into hdisk0 of the LPAR you
have created, by booting over the network and using a NIM server.
EXempty __ b. List the machine objects and find the machine object for your assigned LPAR.
(The machine object name should match the hostname of your originally
assigned LPAR).
# lsnim | grep <substring of your LPARs original hostname>
__ c. List the attributes for your machine object.
# lsnim -l <NIM object name for your machine>
__ d. The Cstate attribute value should be: Ready for NIM operation. We would
like it to be: BOS installation has been enabled.
__ 2. Execute the bos_inst operation for your new LPAR. This sets up the NIM masters
environment so that resources are made available, NIM properly responds to your
LPARs bootp request, and NIM correctly handles the installation of this NIM client.
Invoke SMIT with the smitty command using the fast path to the NIM base
operating system install panel.
$smitty nim_bosinst
You are asked to choose a TARGET for the operation. This is asking you to select
the NIM client host on which you want to load AIX. Highlight your partitions
hostname and press Enter to select it.
You need to enter the following information on the next few entry screens:
__ a. Pick rte for the TYPE of installation.
__ b. Pick an LPP source. There should be one with a naming convention which
indicates it is for AIX7.1 TL2 SP1.
__ c. Pick a SPOT resource. There should be one with a naming convention which
indicates it is for AIX7.1 TL2 SP1.
__ 3. This should bring up a dialogue panel that looks like:
Install the Base Operating System on Standalone Clients
__ c. Press Enter to effect the setup. Press Enter once and again when you are asked
Are you sure?
__ d. When it is done, exit SMIT (F10 or Esc+0).
__ 4. Verify that NIM is now ready to support the base operating system installation
(bos_inst) operation with your client:
List the attributes of your LPARs machine object and look for a Cstate value of BOS
installation has been enabled.
# lsnim -l <your clients name> | grep Cstate
EXempty Part 2: Activate the LPAR to SMS and initiate a network boot
In this part, you will activate your new LPAR to SMS and boot from your network adapter.
By configuring the network boot parameters, a bootp request will be sent to your NIM
server which has been setup to support a BOS installation.
Remember that your new LPAR has a name ending in mylparXX (where XX is your team
#).
There are two options for executing this procedure. You can either use the HMC graphical
web interface or you can use the HMC command line interface (CLI).
If you choose the graphical interface, start out executing Step 6.
If you choose the command line interface, then start out executing at Step 7.
In either case, once you have a virtual terminal window and the logical partition is booting,
the remaining steps, beginning at Step 10, are the same.
__ 6. This step will activate the partition and start a virtual terminal using the HMC
graphical Web interface.
If you do not already have a graphical connection to your assigned HMC, use the
web browser on your student workstations to establish one now.
__ a. The URL will be:
https://<IPaddress of HMC>
(Note the use of the SSL secure https protocol.)
__ b. When prompted about certificates, accept and trust them. You will also need to
permit pop-ups.
__ c. Log in using your assigned HMC user ID and password.
__ d. Click your assigned managed system in the HMC GUI to obtain a list of the
partitions.
__ e. Select your recently created LPAR and choose Operations > Activate > Profile.
__ f. Click the Open a terminal window or console session check box on the
Activate Logical Partition window.
__ g. Click the Advanced button to boot a partition into SMS mode. In the Advanced
window, override the boot mode and set it to SMS. Then click OK, and OK again,
to activate the partition. Respond positively to any pop-ups concerning
certificates.
EXempty __ h. If this is the first time you have established the virtual terminal connection, you
will need to respond to series of security pop-ups. Respond to allow the
connection to continue. Be careful and read each prompt; sometimes you will
see a final prompt that requires an answer of No in order to continue.
__ i. A virtual console window opens (you might need to bring it to the foreground).
You might be asked to press 0 to select it as your console. Eventually, the SMS
menu will be shown.
__ 7. Skip this, and the next two steps, if you used the HMC graphical user interface.
This step will activate your new partition and start a virtual terminal using the HMC
command line interface.
__ a. If you do not currently have an interactive ssh session to the HMC, establish one
at this point and log in with your assigned administrative user name.
__ b. If you do not already have a window with a virtual terminal to your new LPAR,
start one now. From the HMC command line, access your new LPAR by opening
a virtual console session, as follows:
~> mkvterm -m <managed system> -p <your new LPAR>
-OR-
~> vtmenu
When presented with the Managed Systems list, enter the number for your
server.
When presented with the Partitions list, enter the number for your new LPAR.
Since the new LPAR is not yet active, we do not expect to see anything in this
virtual terminal at this point.
Note
Only one console terminal can be open at a time. If there is a session is still active, for
which you do not have a window on your workstation, type:
~> rmvterm -m <managed system> -p <your assigned LPAR>
and then repeat your attempt to open a new session.
x
__ 8. Open a second terminal emulation window and connect to your HMC using ssh
protocol. Log in with your assigned HMC user ID.
__ 9. In your new window, activate your newly defined LPAR into SMS mode, as follows:
~> chsysstate -m <managed system name> -r lpar -o on -n <lpar name> \
-f normal -b sms
Make sure that you are booting the LPAR that you created and not your originally
assigned LPAR. If you continue with the network boot using the originally provided
LPAR, the resulting installation will overwrite (and thus lose) files which are needed
for later exercises.
Return to the window running your virtual terminal session with your LPAR.
The following instructions are the same regardless of whether you started a virtual terminal
and activated the partition using a graphical or using the command line interface. In either
case, you will use the SMS menu in the window that has the virtual terminal.
__ 10. In your virtual console session, you should see the system boot up into system
firmware with an SMS Main Menu being displayed. Interact with the SMS menu to
configure and test the network boot IP parameters.
EXempty Enter the network gateway address for the Gateway IP Address.
Enter the subnet mask.
__ g. Press Esc to exit to the Network Parameters menu.
__ h. Type 2 to select 2 Adapter Configuration. Disable the Spanning tree. Press 2,
then 2 again to disable. Press Esc repeatedly to go back to the Network
Parameters menu. (Note that the name of the option is Spanning Tree Enable,
this name is not any indication of whether it is enabled or disabled).
__ i. On the Network parameters screen, select 3 to select 3 Ping Test. Type 1 and
press Enter to execute the ping test. After a moment or two, it should say Ping
Success if the ping test succeeded. Press any key to return to the Ping Test
screen. If the ping test fails, check your IP parameters.
__ j. Press Esc (repeatedly) to escape out of the Ping Test screen and go back to the
Main Menu.
__ 11. Configure SMS to boot using the Virtual Ethernet Adapter.
__ a. Select 5 Select Boot Options.
__ b. Select 1 Select Install/Boot Device.
__ c. Select 6 Network, 1 BOOTP.
__ d. Select the Interpartition Logical LAN (or it might be labeled Virtual Ethernet
Adapter).
__ e. Select 2 Normal Mode Boot.
__ f. Select 1 Yes when asked Are you sure you want to exit System
Management Services to exit SMS.
__ g. You should see indications of a network boot, including a tftp transfer byte count.
Do not worry if the tftp has to restart a few times; this is not uncommon. Once the
network boot image has been transferred, you should see the LPAR booting -
using that image. Be patient. The progress codes shown on the HMC will go
through a sequence such as: C46, C40, C42, C31.
-------------------------------------------------------------------------------
Welcome to AIX.
boot image timestamp: 16:47 01/14
The current time and date: 19:28:37 04/19/2013
processor count: 1; memory size: 640MB; kernel size: 23461769
boot device: /vdevice/l-lan@30000002:speed=auto,duplex=auto,10.6.51.118,,10.6.52
-------------------------------------------------------------------------------
EXempty __ 13. At the Please define the System Console window, select 1 and press Enter to use
this terminal as the system console.
At the next prompt, select 1 again and press Enter to use English during the install.
__ 14. You will now be at the Welcome to Base Operating System Installation and
Maintenance main menu. Select option 2 to review the Change/Show Installation
Settings and Install options.
Select option 2 and press Enter.
__ 15. It is important that we do an overwrite install on hdisk0. (It should be the only disk
available, in this exercise.)
Check that the system settings are set to:
Method of Installation.............New and Complete Overwrite
Disk Where You Want to Install.....hdisk0
If they are not set as specified, you will have an opportunity to correct them in the
next step.
__ 16. In a more realistic environment, you would have a list of disks to choose from, and
you cannot be sure that the installation utility will name the disks in the same order
as the AIX operating system does. We should verify that hdisk0 is the disk we think
it is.
__ a. Type 1 and press Enter to examine the System Settings.
__ b. If an operating system is detected on the selected disk, you will be prompted for
the method of installation. If presented with a Change Method of Installation
panel, select New and Complete Overwrite option and then press Enter.
__ c. On the Change Disk(s) Where You Want to Install panel, you will note that there
is no AIX location code. That is because the disks are being provided by the
Virtual I/O Server.
Note
If you see multiple disks to choose from, stop and ask for assistance from your
instructor. In this exercise, you should see only one disk. If you see multiple disks, it
is likely that you started the wrong logical partition.
__ g. Now you can see the physical location codes. This is a good unique identifier of
the disk we are about to use.
__ h. Type 99 and press Enter to return to the Installation and Settings menu.
__ 17. On the Installation and Settings menu, select 4 to proceed to the More options
(Software install options) panel. On the next panel, entering the number of the
software install option toggles between a yes and a no response. Answer no to both
the Graphics Software (AIX Windows) and the Enable System Backups to install on
any system options. This will vastly speed up the installation.
Install Options
1. Graphics Software.................................... no
2. System Management Client Software.................... yes
3. Create JFS2 File Systems............................. yes
4. Enable System Backups to install any system.......... no
(Installs all devices)
Then type 99 and press Enter to return to the Installation and Settings menu.
__ 18. On the Installation and Settings menu, select 0 to proceed to install using these
settings. This will display the Overwrite Installation Summary. Finally, select 1 to
confirm and install the system.
The system should install in approximately 20-30 minutes depending on the network
speed and traffic on the network. Your instructor will likely suggest either a break or
that you start on the next unit while waiting.
From the Installation and Settings menu, select 0 and press Enter.
From the Overwrite Installation Summary, select 1 and press Enter.
__ 19. When the system has completed installing, log in as the root user. Run the lspv
command to see that your disk is in the rootvg volume group.
# lspv
Congratulations, you have successfully completed an AIX BOS install into a
partition.
__ 20. At this point, we want to return to using your originally assigned LPAR.
Execute a fast shutdown of the LPAR which you just installed (do not reboot).
# shutdown -F
__ 21. When AIX has halted, exit the AIX console session.
If you are using the HMC command line interface:
# ~.
End of exercise
Introduction
In this exercise, you work extensively with the Logical Volume
Manager. First, you will create and manipulate volume groups followed
by logical volumes. When you are comfortable with working with the
Logical Volume Manager you will mirror the root volume group. Finally,
you will work with LVM commands to query and document the
environment you have just created.
Feel free to use the command line, SMIT or the IBM director console
to perform the following steps.
Copyright IBM Corp. 2009, 2013 Exercise 9. Working with LVM 9-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Preface
Two versions of these instructions are available: one with hints and one without. You can
use either version to complete this exercise. Also, do not hesitate to ask the instructor if you
have questions.
General notes, applicable to all exercises:
Your instructor will provide you with instructions for accessing the remote environment. For
example, this might involve using a web browser or Virtual Private Network (VPN). Your
instructor will further provide you with all the details and login IDs required.
Unless otherwise stated, log in to systems (HMC/LPAR) using a terminal window (for
example through PuTTY or a Linux command line).
You have the option of using the command line interface or SMIT to accomplish the tasks in
this exercise.
On some terminal emulations, the function keys are not operative and you might need to
substitute escape sequences. For example, instead of pressing F3, you might need to
press Esc+3 for the same function.
All hints are marked with a >> sign.
The output shown in the answers is an example. Your output and answers based on the
output might be different.
EXempty Select Volume Groups > Add a Volume Group > Add an Original Volume Group.
Copyright IBM Corp. 2009, 2013 Exercise 9. Working with LVM 9-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
OR
# smitty lvm
Select Volume Groups > Set Characteristics of a Volume Group > Remove a
Physical Volume from a Volume Group.
(Use F4 or <Esc-4> to pick values off of a list.)
Note
Copyright IBM Corp. 2009, 2013 Exercise 9. Working with LVM 9-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Copyright IBM Corp. 2009, 2013 Exercise 9. Working with LVM 9-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Copyright IBM Corp. 2009, 2013 Exercise 9. Working with LVM 9-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Note
The suggested commands are (there are two very different approaches listed):
Approach #1:
# mirrorvg rootvg hdisk1
OR
# smit lvm
Select Volume Groups > Mirror a Volume Group.
(Use F4 or <Esc-4> to pick values off of a list.)
* VOLUME GROUP name [rootvg] +
Approach #2:
# mirrorvg -s rootvg hdisk1
# syncvg -v rootvg &
# lsvg -l rootvg (run repeatedly and observe the STATUS of the LVs.
This allows you to monitor progress of the synchronization; when there
are no more STALE LVs, the syncrhonization is complete.)
Copyright IBM Corp. 2009, 2013 Exercise 9. Working with LVM 9-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Copyright IBM Corp. 2009, 2013 Exercise 9. Working with LVM 9-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
End of exercise
Copyright IBM Corp. 2009, 2013 Exercise 9. Working with LVM 9-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Introduction
In this exercise, you will work extensively with file systems. There are
two parts:
Part 1: You will add, remove, extend, and shrink file systems.
(Optional) Part 2: You will be given the chance to understand the
effects of file system block sizes.
Copyright IBM Corp. 2009, 2013 Exercise 10. File system administration 10-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Preface
Two versions of these instructions are available: one with hints and one without. You can
use either version to complete this exercise. Also, do not hesitate to ask the instructor if you
have questions.
General notes, applicable to all exercises:
Your instructor will provide you with instructions for accessing the remote environment. For
example, this might involve using a web browser or Virtual Private Network (VPN). Your
instructor will further provide you with all the details and login IDs required.
Unless otherwise stated, log in to systems (HMC/LPAR) using a terminal window (for
example through PuTTY or a Linux command line).
On some terminal emulations, the function keys are not operative and you might need to
substitute escape sequences. For example, instead of pressing F3, you might need to
press Esc+3 for the same function.
All hints are marked with a >> sign.
The output shown in the answers is an example. Your output and answers based on the
output might be different.
This exercise assumes that rootvg is on hdisk0 and that the myVG volume group is
defined with datalv1 defined with allocations in myVG.
Copyright IBM Corp. 2009, 2013 Exercise 10. File system administration 10-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
__ 9. Record the size (in MB) of the file system /myfs: ________________________
# df -m /myfs
You should see the same size as you recorded after you created the logical volume.
__ 10. Increase the size of /myfs by 500 MB. Check that the file system size was increased.
The suggested commands are:
# chfs -a size=+500M /myfs
# df -m /myfs
__ 11. Decrease the size of /myfs by 300 MB. Check that the file system size was
decreased.
Copyright IBM Corp. 2009, 2013 Exercise 10. File system administration 10-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
EXempty __________________________________________________________________
__________________________________________________________________
File systems with smaller block sizes are more efficient at storing lots of small files.
14297 512 byte files should have been created in the /test4096 file system.
61352 512 byte files should have been created in the /test512 file system.
Note: There is some space overhead for the structure of the JFS2 file system.
Remember also to take into account the size and space required for the inodes, which
by default are 512 bytes each in size.
__ 18. Remove the /test512 and /test4096 file systems.
What needs to be done before they can be removed?
______________________________________________________.
The suggested commands are:
# unmount /test512
# rmfs /test512
The suggested commands are:
# umount /test4096
# rmfs /test4096
__ 19. Remove the myVG volume group. Request deletion of any logical volumes. Verify
that no physical volumes assigned to myVG.
The example command is:
# reducevg -d myVG hdisk2
# lspv
End of exercise
Copyright IBM Corp. 2009, 2013 Exercise 10. File system administration 10-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Introduction
This exercise has two parts:
Part 1: Review of device configuration ODM classes (PdDv, PdAt,
CuDv, CuAt, CuDep, and CuDvDr).
(Optional) Part 2: Modify a device attribute default value.
All instructions in this exercise require root authority.
Copyright IBM Corp. 2009, 2013 Exercise 11. The Object Data Manager 11-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
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.
All exercises of this unit depend on the availability of specific equipment in your classroom.
All hints are marked with a >> sign.
The output shown in the answers is an example. Your output and answers based on the
output might be different.
Copyright IBM Corp. 2009, 2013 Exercise 11. The Object Data Manager 11-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
__ 6. From this 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 descriptor: chgstatus?
__________________________________________________________
A value of 2 (the expected result) indicates that the status of the disk device has not
changed since the last reboot.
__ 7. List the effective attributes (lsattr) for your hdisk0 device and identify the physical
volume identifier for that disk.
What is the command you used?
__________________________________________________________
# lsattr -El hdisk0
Write down the physical volume ID of the disk:
pvid: ______________________________________________________
This value can be obtained from the output of the command lsattr -El hdisk0, but
answers will vary. On two systems previously used to test this exercise, the pvid values
obtained were 0009330f2d01c69f0000000000000000 and
00cee60e58b2d39a0000000000000000. Note that while these are 32-digit values, the
last 16 digits are zeros.
__ 8. Use the ODM command line interface, and list the ODM object that stores the
physical volume identifier (pvid) device attribute:
What is the command you used?
__________________________________________________________
Suggested commands are:
# odmget -q"name=hdisk0 and attribute=pvid" CuAt
OR
# odmget CuAt | grep -p hdisk0 | grep -p pvid
__ 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: _____________________
# ls -l /dev/hdisk0
Which ODM class is used to identify the major number and minor number for the
device driver?
__________________________________________________________
CuDvDr
EXempty Enter the following command to see the relevant entry in the CuDvDr object class:
# odmget -q value3=hdisk0 CuDvDr
__ 10. List all your logical volumes that are part of the rootvg.
What is the command you used?
__________________________________________________________
# lsvg -l rootvg
__ a. Query the ODM class CuDep and identify all logical volumes that belong to
rootvg.
What is the command you used?
__________________________________________________________
Suggested commands are:
# odmget -qname=rootvg CuDep
OR
# odmget -q parent=rootvg CuDv
Copyright IBM Corp. 2009, 2013 Exercise 11. The Object Data Manager 11-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
EXempty __ 16. Before you use ODM commands to make this change, first back up the ODM object
class that you will be changing.
The suggested commands are:
# odmget PdAt > /tmp/PdAt-back
OR
# mkdir /tmp/objrepos
# cp /etc/objrepos/* /tmp/objrepos
__ 17. 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):
_______________________________________________________________
# odmget -q name=en1 CuDv
__ 18. 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 object in
the display.
What is the attribute value displayed? __________________
# odmget -q uniquetype=if/EN/en AND attribute=remmtu PdAt
__ 19. Repeat this display, only redirect the output to the file: /tmp/remmtu-object.
# odmget -q uniquetype=if/EN/en AND attribute=remmtu PdAt >
/tmp/remmtu-object
__ 20. Edit the file you created to change the default value to the maximum value allowed.
# vi /tmp/remmtu-object
Change the deflt descriptor value to 1500.
Write and quit the edit session.
__ 21. Using the same qualification as on the retrieval, replace the ODM object with the
one in your edited file.
# A suggested command is:
# odmchange -o PdAt -q uniquetype=if/EN/en AND \
attribute=remmtu /tmp/remmtu-object
__ 22. 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 to
identify the object.
# lsattr -D -l en1 -a remmtu
Copyright IBM Corp. 2009, 2013 Exercise 11. The Object Data Manager 11-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
End of exercise
Introduction
This exercise has five parts:
Part 1: You are asked to fix another ODM failure. It is a failure
which requires you to use intermediate level ODM commands to fix
the problem.
Part 2: You export a volume group and then import the volume
group.
(Optional) Part 3: You deal with errors during the import of a
volume group.
(Optional) Part 4: You will fix an LVM ODM problem using the
importvg and exportvg technique.
(Optional) Part 5: You will be asked to analyze and fix an LVM
ODM failure by using the rvgrecover procedure.
You will need root authority to complete this exercise.
Requirements
/home/AN14/corrupt_pvid
/home/AN14/corrupt_odm
/home/AN14/rvgrecover
/home/AN14/build_vg
Copyright IBM Corp. 2009, 2013 Exercise 12. LVM metadata issues 12-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
/home/AN14/corrupt_odm2
/home/AN14/corrupt_odm3
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.
All exercises of this unit depend on the availability of specific equipment in your classroom.
All hints are marked with a >> sign.
The output shown in the answers is an example. Your output and answers based on the
output might be different.
This lab exercise assumes that rootvg on hdisk0 and that all other disks are free.
Copyright IBM Corp. 2009, 2013 Exercise 12. LVM metadata issues 12-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
__ 4. Display the online VGs and then list the logical volumes and physical volumes in the
lvmtestvg volume group. Record the names of any physical volumes that belong to
the lvmtestvg volume group:
________________________________________________________________
Suggested commands are:
# lsvg -o
lvmtestvg
rootvg
# lsvg -l lvmtestvg
lvmtestvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT
POINT
lvmtestlv jfs2 1 1 1 open/syncd
/lvmtestfs
loglv00 jfs2log 1 1 1 open/syncd N/A
# lsvg -p lvmtestvg
lvmtestvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE
DISTRIBUTION
hdisk2 active 1092 1090
219..216..218..218..219
__ 5. Verify that the new /lvmtestfs file system is mounted.
# mount
__ 6. Create a data file in the /lvmtestfs directory.
# echo hello world > /lvmtestfs/testfile
__ 7. In the /home/AN14 directory you will find a script called corrupt_odm3. Execute
this script.
# /home/AN14/corrupt_odm3
0518-307 odmdelete: 8 objects deleted.
0518-307 odmdelete: 2 objects deleted.
0518-307 odmdelete: 1 objects deleted.
0518-307 odmdelete: 2 objects deleted.
0518-307 odmdelete: 2 objects deleted.
__ 8. Display the online VGs and then list the logical volumes in the lvmtestvg volume
group. What problems did you see?
The suggested commands are:
EXempty # lsvg -o
0516-304 : Unable to find device id 00c07f7f00004c0000000121ad0e4aee in the Device
Configuration Database.
vgid=00c07f7f00004c0000000121ad0e4aee
rootvg
# lsvg -l lvmtestvg
0516-306 : Unable to find volume group lvmtestvg in the Device
Configuration Database.
# lsvg -p lvmtestvg
0516-306 : Unable to find volume group lvmtestvg in the Device
Configuration Database.
__ 9. Try to increase the size of the /lvmtestfs file system by one block. Could it be done?
_____________________________________________________________
# chfs -a size=+1 /lvmtestfs
0516-306 /usr/sbin/getlvodm: Unable to find lvmtestlv in the Device
Configuration Database.
chfs: Cannot get lv id from odm.
__ 10. Display the contents of the testfile that you created earlier. Were you able to access
your data? _________________________________
The suggested commands are:
# cat /lvmtestfs/testfile
hello world
It is interesting that while the corruption prevents us from executing important LVM
commands, it does not impact our ability to access the user data.
__ 11. We could try to solve the problem with the exportvg and importvg technique. Attempt
to export lvmtestvg (you first need to close the logical volumes and vary the VG
offline). How far can you get before you experience a problem?
________________________________________________________________
________________________________________________________________
________________________________________________________________
Suggested commands are:
# umount /lvmtestfs
# varyoffvg lvmtestvg
0516-306 getlvodm: Unable to find volume group lvmtestvg in the Device
Configuration Database.
0516-942 varyoffvg: Unable to vary off volume group lvmtestvg.
Copyright IBM Corp. 2009, 2013 Exercise 12. LVM metadata issues 12-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
The procedure fails before we can even try to execute the exportvg command, which
requires that the volume group be inactive.
__ 12. Mount the /lvmtestfs file system.
The suggested command is:
# mount /lvmtestfs
__ 13. Try using an intermediate level command that will synchronize the LVM information
with the ODM. What happened?
_____________________________________________________________
The suggested command is:
# synclvodm lvmtestvg
0516-306 : Unable to find volume group lvmtestvg in the Device
Configuration Database.
0516-502 synclvodm: Unable to access volume group lvmtestvg.
The command requires that certain volume group information be in the ODM. The
corruption deleted this ODM information, preventing us from using the synclvodm
command.
__ 14. Use an intermediate-level LVM command to redefine the lvmtestvg volume group in
the ODM. Specify the disk which you recorded in step 4.
The suggested command is:
# redefinevg -d hdisk2 lvmtestvg
__ 15. Display the online VGs and then list the logical volumes in the lvmtestvg volume
group. What problems do you see?
The suggested commands are:
# lsvg -o
lvmtestvg
rootvg
# lsvg -l lvmtestvg
lvmtestvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
lvmtestlv ??? 2 2 1 open/syncd /lvmtestfs
loglv00 jfs2log 1 1 1 open/syncd N/A
# lsvg -p lvmtestvg
lvmtestvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk2 active 1092 1089 219..215..218..218..219
EXempty The volume group and its physical volume and logical volume membership is
recovered, but the data for the logical volumes does not appear to be complete, given
the type value of ???.
__ 16. Try to increase the size of the /lvmtestfs file system by one block. Could it be done?
_____________________________________________________________
# chfs -a size=+1 /lvmtestfs
0516-306 /usr/sbin/getlvodm: Unable to find lvmtestlv in the Device
Configuration Database.
chfs: Cannot get lv id from odm.
Even though the logical volumes are known to be in the volume group, the logical
volume information needed by the chfs command is still missing. Specifically, it is
missing the logical volume ID.
__ 17. 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?
_____________________________________________________________
The suggested command is:
# synclvodm lvmtestvg
It succeeds this time.
It should be noted that, if we had attempted an importvg command as our first fix
attempt after creating the problem, it would have failed (gives error messages); but, the
importvg command would have completed enough repairs to the ODM to allow the
synclvodm command to run successfully. Under the covers, the importvg shell script
executes the redefinevg command! As they say in New Orleans, there is more than
one way to skin a catfish.
__ 18. Display the online VGs and then list the logical volumes and physical volumes in the
lvmtestvg. How did the situation change? ____________________________
______________________________________________________________
The suggested commands are:
# lsvg -o
lvmtestvg
rootvg
# lsvg -l lvmtestvg
lvmtestvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
lvmtestlv jfs2 2 2 1 open/syncd /lvmtestfs
loglv00 jfs2log 1 1 1 open/syncd N/A
Copyright IBM Corp. 2009, 2013 Exercise 12. LVM metadata issues 12-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
# lsvg -p lvmtestvg
lvmtestvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk2 active 1092 1089 219..215..218..218..219
We no longer see any problems with the displays of LVM information.
__ 19. Try to increase the size of the /lvmtestfs file system by one block. Could it be done?
_____________________________________________________________
# chfs -a size=+1 /lvmtestfs
Filesystem size changed to 262144
Copyright IBM Corp. 2009, 2013 Exercise 12. LVM metadata issues 12-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
__ 23. 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.
Suggested commands are:
# lsvg
# lsfs
/lvmtestfs does not exist on the system.
# more /etc/filesystems
/etc/filesystems contains no reference to a file system that is in the volume group that
has been exported.
__ 24. Import the volume group into your system. Explicitly specify the volume group name
lvmtestvg; otherwise, the system will generate a new volume group name.
Write down the command you executed:
______________________________________________________________
# importvg -y lvmtestvg hdisk2
__ 25. Check whether the imported volume group, lvmtestvg, is varied on.
# lsvg -o
(lvmtestvg should be varied on.)
__ 26. Check to see if the file system information is back.
Suggested commands are:
# lsfs
# cat /etc/filesystems
# mount
References to the filesystem are there but the file system is not mounted.
__ 27. Mount the /lvmtestfs file system.
Check that no files have been lost.
# mount /lvmtestfs
# ls /lvmtestfs
Copyright IBM Corp. 2009, 2013 Exercise 12. LVM metadata issues 12-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
__ 31. Use the fastpath smit jfs2 to create one JFS2 file system in rootvg with the
following characteristics (these are the same as in Part 1).
Size of file systems: 16 MB (65536 512-byte blocks)
Mount points:
- File system: /lvmtestfs
The suggested commands are:
# smit jfs2
Add an Enhanced Journaled File System
EXempty _______________________________________________________________
lv_raw has been changed to fslv01 (Example names).
__ 35. Another error message, that you should seen, was that the /lvmtestfs file systems
already exists in rootvg.
To fix this problem, first unmount the /lvmtestfs file system.
# cd
# umount /lvmtestfs
__ 36. Mount your JFS2 file system from lvmtestvg over the /lvmtestfs mount point. Use the
new logical volume name that you just created. You have to specify the log device
that is part of lvmtestvg.
Write down the commands you executed.
_______________________________________________________________
_______________________________________________________________
Example commands are (be sure to substitute the logical volume names that you list in
the mount command):
# lsvg -l lvmtestvg (to obtain lv names)
lvmtestvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT
POINT
lvmtestlv jfs2 5 5 1 closed/syncd N/A
loglv00 jfs2log 1 1 1 closed/syncd N/A
fslv01 jfs 1 1 1 closed/syncd N/A
Copyright IBM Corp. 2009, 2013 Exercise 12. LVM metadata issues 12-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
EXempty Part 4: (Optional) Fixing LVM ODM problems with importvg and
exportvg
The export and import technique can only be used with non-rootvg volume groups.
__ 47. This exercise requires the use of hdisk2. Display the physical volumes on your
system to determine if hdisk2 is available (not assigned to a volume group).
List the name of the volume group which is using hdisk2, if it is not available:
_________________________________________________________
List the names of all the disks which are used by the above listed volume group:
_________________________________________________________
# lspv
__ 48. If hdisk2 is not available, eliminate the using volume group in order to free it up.
Remember to first unmount any file systems in that volume group before reducing it.
Any logical volumes or file systems which are allocated in that volume group can be
deleted.
Suggested commands are:
# lsvg -l (vg_name>
For each mounted filesystem:
# umount <filesystem mount point>
Once the unmounts are completed:
# reducevg -d <vg_name> <list of disks in the volume group>
__ 49. 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
setup script. The script is: /home/AN14/build_vg. Execute this script.
# /home/AN14/build_vg
__ 50. Display the online VGs and then list the logical volumes and physical volumes in the
lvmtestvg volume group.
Suggested commands are:
# lsvg -o
lvmtestvg
rootvg
# lsvg -l lvmtestvg
lvmtestvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
lvmtestlv jfs2 1 1 1 open/syncd /lvmtestfs
loglv00 jfs2log 1 1 1 open/syncd N/A
Copyright IBM Corp. 2009, 2013 Exercise 12. LVM metadata issues 12-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
# lsvg -p lvmtestvg
lvmtestvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk2 active 1092 1090 219..216..218..218..219
__ 51. In the /home/AN14 directory, you will find a script called corrupt_odm2. Execute
this script.
# /home/AN14/corrupt_odm2
__ 52. Display the online VGs and then list the logical volumes and physical volumes in the
lvmtestvg. What problems do you see?
_________________________________________________________________
_________________________________________________________________
The suggested commands are:
# lsvg -o
lvmtestvg
rootvg
# lsvg -l lvmtestvg
lvmtestvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
lvmtestlv ??? 4 4 1 open/syncd /lvmtestfs
loglv00 jfs2log 1 1 1 open/syncd N/A
# lsvg -p lvmtestvg
lvmtestvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk2 active 1092 1090 219..216..218..218..219
The command is unable to locate the type attribute for the lvmtestlv logical volume.
__ 53. Try to increase the size of the /lvmtestfs file system. What happened?
_________________________________________________________________
_________________________________________________________________
The suggested commands are:
# chfs -a size=+1 /lvmtestfs
0516-306 /usr/sbin/getlvodm: Unable to find lvmtestlv in the Device
Configuration Database.
chfs: Cannot get lv id from odm.
The command fails because it is unable to find the logical volume in the ODM.
__ 54. Try to solve the problem using the exportvg and importvg technique. Remember that
the volume group must off-line. In order to take the VG offline, all logical volumes in
the volume group must be closed.
# lsvg -l lvmtestvg
lvmtestvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
lvmtestlv jfs2 1 1 1 open/syncd /lvmtestfs
loglv00 jfs2log 1 1 1 open/syncd N/A
# lsvg -p lvmtestvg
lvmtestvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk2 active 1092 1090 219..216..218..218..219
__ 56. Try to increase the size of the /lvmtestfs file system. What happened?
_________________________________________________________________
_________________________________________________________________
The suggested command is:
# chfs -a size=+1 /lvmtestfs
The attempt is now successful. The problem is fixed.
__ 57. Unmount the /lvmtestfs file system and remove the lvmtestvg volume group,
deleting any logical volumes that are allocated in the volume group.
Suggested commands are:
# umount /lvmtestfs
# reducevg -d lvmtestvg hdisk2
Copyright IBM Corp. 2009, 2013 Exercise 12. LVM metadata issues 12-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
EXempty __ 61. Analyze the ODM problem by comparing the CuDv and CuAt objects for your hd2
logical volume with a logical volume in your user volume group. What is the ODM
situation with other rootvg logical volumes?
What causes the ODM problems?
__________________________________________________________
__________________________________________________________
__________________________________________________________
Use the following commands:
# odmget -q name=hd2 CuDv
# odmget -q name=lvmtestlv CuDv
The results indicate that the logical volumes are missing in CuDv.
# odmget -q name=hd2 CuAt
# odmget -q name=lvmtestlv CuAt | more
The results indicate that the LVIDs are missing in CuAt.
# odmget -q name=hd4 CuDv
# odmget -q name=hd4 CuAt
The results indicate that other logical volumes in the rootvg have a similar problem.
__ 62. Examine the /home/AN14/rvgrecover script and modify it if necessary to match
your situation (the specified disk must be one in your rootvg).
# view /home/AN14/rvgrecover
After making any required changes to the script, fix the ODM problem by executing
/home/AN14/rvgrecover. Ignore the error messages. This can take up to one minute,
depending upon the speed of your lab system.
# /home/AN14/rvgrecover
Check that your ODM problems have been fixed. Repeat lsvg -l rootvg and lslv
hd2. They should work now without problems.
# lsvg -l rootvg
# lslv hd2
__ 63. Look into /home/AN14/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?
The two main steps are:
Deleting all rootvg related ODM objects
Importing new ODM objects by reading the information from the VGDA and
LVCB on the boot disk.
Copyright IBM Corp. 2009, 2013 Exercise 12. LVM metadata issues 12-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
__ 64. 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 is
installed by listing the logical volumes in the rootvg
(type information should be: ???).
# /home/AN14/corrupt_odm
# lsvg -l rootvg
__ 65. Use an intermediate-level command to request a synchronization of the LVM
information in the ODM for the rootvg volume group.
# synclvodm rootvg
__ 66. List the logical volumes in the ODM. Is the problem fixed? __________________
# lsvg -l rootvg
You should find that the problem is fixed. The type field is now corrected.
End of exercise
Introduction
This exercise has three parts:
Part 1: Disk replacement procedure for rootvg
Part 2: Disk replacement procedure for user VGs
(Optional) Part 3: Working with LVM mirroring quorum
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
exported and imported.
All instructions in this exercise require root authority.
Copyright IBM Corp. 2009, 2013 Exercise 13. Disk management procedures 13-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
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.
All exercises of this unit depend on the availability of specific equipment in your classroom.
All hints are marked with a >> sign.
The output shown in the answers is an example. Your output and answers based on the
output might be different.
This exercise assumes that the rootvg is on hdisk0 and that all of the other disks are
free.
Copyright IBM Corp. 2009, 2013 Exercise 13. Disk management procedures 13-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Copyright IBM Corp. 2009, 2013 Exercise 13. Disk management procedures 13-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Note
Let your instructor know when you have finished parts 1 and 2.
Create the volume group with one disk: (We will assume that this disk is hdisk2 in the
rest of the exercise examples.)
# mkvg -y newvg hdisk2
__ 27. Use the lsvg command to find the volume group information for the newvg volume
group.
a. Quorum: ________
b. Number of VGDAs (VG Descriptors): ____________
c. Active physical volumes: ___________
Command and sample output:
# lsvg newvg
VOLUME GROUP: newvg VG IDENTIFIER:
00c07f7f00004c00000001218da898f3
VG STATE: active PP SIZE: 128 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 546 (69888 megabytes)
MAX LVs: 256 FREE PPs: 546 (69888 megabytes)
LVs: 0 USED PPs: 0 (0 megabytes)
OPEN LVs: 0 QUORUM: 2 (Enabled)
TOTAL PVs: 1 VG DESCRIPTORS: 2
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 1 AUTO ON: yes
MAX PPs per VG: 32512
MAX PPs per PV: 1016 MAX PVs: 32
LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
Quorum: 2
2 VGDAs
1 active physical volume
__ 28. Add a second unused disk to the newvg volume group.
We will assume that this disk is hdisk3 in the rest of this exercise.
# extendvg -f newvg hdisk3
Copyright IBM Corp. 2009, 2013 Exercise 13. Disk management procedures 13-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
__ 29. Use the lsvg command to find the volume group information for the newvg volume
group.
a. Quorum: ____________________
b. Number of VGDAs: ____________
c. Active physical volumes: ___________
Command and sample output:
# lsvg newvg
VOLUME GROUP: newvg VG IDENTIFIER:
00c07f7f00004c00000001218da898f3
VG STATE: active PP SIZE: 128 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 625 (80000 megabytes)
MAX LVs: 256 FREE PPs: 625 (80000 megabytes)
LVs: 0 USED PPs: 0 (0 megabytes)
OPEN LVs: 0 QUORUM: 2 (Enabled)
TOTAL PVs: 2 VG DESCRIPTORS: 3
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 2 AUTO ON: yes
MAX PPs per VG: 32512
MAX PPs per PV: 1016 MAX PVs: 32
LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
Quorum: 2
3 VGDAs
2 active physical volumes
The number of PVs and the number of VGDAs both increased.
__ 30. Use the lspv command to identify how many VGDAs there are on each disk in the
VG.
Number of VGDAs on original PV for newvg (hdisk2): ____________
Number of VGDAs on additional PV for newvg (hdisk3): ____________
Commands and sample output:
# lspv hdisk2 | grep -i descriptor
TOTAL PPs: 546 (69888 megabytes) VG DESCRIPTORS: 2
2 VGDAs on hdisk2
1 VGDA on hdisk3
EXempty __ 31. Make the second disk (with only one VGDA) unavailable using the following steps.
__ a. Varyoff the newvg volume group.
# varyoffvg newvg
__ b. Make the second disk unavailable using rmdev. Do not delete it from CuDv, just
change the device state from available to defined.
Use rmdev -l <disk>. Do not use the rmdev -d flag.
# rmdev -l hdisk3
hdisk3 Defined
__ 32. Try to vary on the newvg volume group. Did it vary on? _____________________
What is the status of the disk you unconfigured? __________________________
Command and sample output:
# varyonvg newvg
PV Status: hdisk2 00c07fbf59f134be PVACTIVE
hdisk3 00c07f7f8db00776 PVMISSING
varyonvg: Volume group newvg is varied on.
The volume group did vary on, but the second disk was missing.
__ 33. Look in the error log file to see if any errors were logged.
You should only have to look at the first two errors. There were two errors logged:
Copyright IBM Corp. 2009, 2013 Exercise 13. Disk management procedures 13-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
# errpt -A | pg
---------------------------------------------------------------------------
LABEL: LVM_QUORUMNOQUORUM
Date/Time: Fri May 29 15:09:19 2009
Type: INFO
Resource Name: LIBLVM
Description
Activation of a no quorum volume group without 100% of the disks.
Detail Data
MAJOR/MINOR DEVICE NUMBER
0021 0000
SENSE DATA
00C0 7F7F 0000 4C00 0000 0121 8DA8 98F3 0000 0000 0000 0000 0000 0000 0000 0000
---------------------------------------------------------------------------
LABEL: LVM_MISSPVADDED
Date/Time: Fri May 29 15:09:19 2009
Type: UNKN
Resource Name: LIBLVM
Description
PHYSICAL VOLUME DEFINED AS MISSING
Detail Data
MAJOR/MINOR DEVICE NUMBER
0011 0003
SENSE DATA
0000 0000 0000 0000 0000 0000 0000 0000
---------------------------------------------------------------------------
__ 34. Bring the second disk in the newvg volume group back to an available state and
verify the state by listing the device.
Use cfgmgr to bring hdisk3 on-line.
# cfgmgr
OR
# mkdev -l hdisk3
Use lsdev to list the state.
# lsdev -l hdisk3
hdisk3 Available Virtual SCSI Disk Drive
__ 35. Display the physical volumes in the newvg volume group. What is the PV STATE of
the second disk?
_______________________________________________________________
Commands and sample output:
# lsvg -p newvg
newvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk2 active 546 546 110..109..109..109..109
hdisk3 missing 79 79 16..16..15..16..16
Copyright IBM Corp. 2009, 2013 Exercise 13. Disk management procedures 13-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Why did if fail this time? This time you removed hdisk2 that had two active VGDAs
leaving only one active VGDA, which is less than 51% of the total VGDAs.
__ 41. Look in the AIX error log to see if any new errors were logged.
# errpt -A | pg
Note: No new errors were logged.
__ 42. Vary on the newvg volume group using the force (-f) flag. What is the state of the
disk which you just unconfigured?
_____________________________________________________________
The force (-f) option to varyonvg must be used.
# varyonvg -f newvg
PV Status: hdisk2 00c07fbf59f134be PVREMOVED
hdisk3 00c07f7f8db00776 PVACTIVE
varyonvg: Volume group newvg is varied on. The disk is in a removed state.
__ 43. Look in the error log file to see if any errors were logged.
There were two errors logged:
# errpt -A | pg
---------------------------------------------------------------------------
LABEL: LVM_FORCEVARYON
Date/Time: Fri May 29 15:36:06 2009
Type: INFO
Resource Name: LIBLVM
Description
Forced activation of a volume group.
Detail Data
MAJOR/MINOR DEVICE NUMBER
0021 0000
SENSE DATA
00C0 7F7F 0000 4C00 0000 0121 8DA8 98F3 0000 0000 0000 0000 0000 0000 0000 0000
---------------------------------------------------------------------------
LABEL: LVM_MISSPVADDED
Date/Time: Fri May 29 15:36:06 2009
Type: UNKN
Resource Name: LIBLVM
Description
PHYSICAL VOLUME DEFINED AS MISSING
Detail Data
MAJOR/MINOR DEVICE NUMBER
0011 0000
SENSE DATA
0000 0000 0000 0000 0000 0000 0000 0000
---------------------------------------------------------------------------
EXempty __ 44. Bring the first disk in the newvg volume group back to an available state and verify
that the device state result by listing the device.
Use cfgmgr to bring hdisk2 on-line.
# cfgmgr
OR
# mkdev -l hdisk2
The PV states are the same as they were before. The first physical volume is in a
removed state. It did not fix the problem.
__ 46. Explicitly change the state of the first physical volume to an active state.
# chpv -v a hdisk2
__ 47. Display the physical volumes in the newvg volume group. Has anything changed?
Example command and output:
# lsvg -p newvg
newvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk2 active 546 546 110..109..109..109..109
hdisk3 active 79 79 16..16..15..16..16
Copyright IBM Corp. 2009, 2013 Exercise 13. Disk management procedures 13-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
The first physical volume has changed from a state of removed to a state of active.
__ 48. 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.
Example command and output:
# mklv newvg 1 hdisk2
lv01
# lspv -l hdisk2
hdisk2:
LV NAME LPs PPs DISTRIBUTION MOUNT POINT
lv01 1 1 00..01..00..00..00 N/A
The chpv command has logic to make the specified Active state truly effective without
having to vary on the volume group.
__ 49. Remove the newvg volume group. Delete any allocated logical volume as needed to
succeed in the VG removal.
End of exercise
Introduction
In this exercise, you will create a mksysb backup of rootvg and
perform a backup and restore of a non-rootvg volume group. You will
explore AIX backup and restore commands. In addition, you will learn
how to create and use a consistent snapshot of a file system.
Copyright IBM Corp. 2009, 2013 Exercise 14. Backup and restore 14-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Preface
Two versions of these instructions are available: one with hints and one without. You can
use either version to complete this exercise. Also, do not hesitate to ask the instructor if you
have questions.
General notes, applicable to all exercises:
Your instructor will provide you with instructions for accessing the remote environment. For
example, this might involve using a web browser or Virtual Private Network (VPN). Your
instructor will further provide you with all the details and login IDs required.
Unless otherwise stated, log in to systems (HMC/LPAR) using a terminal window (for
example through PuTTY or a Linux command line).
On some terminal emulations, the function keys are not operative and you might need to
substitute escape sequences. For example, instead of pressing F3, you might need to
press Esc+3 for the same function.
All hints are marked with a >> sign.
The output shown in the answers is an example. Your output and answers based on the
output might be different.
This exercise assumes that rootvg is on hdisk0 and that all other disks are free.
EXempty Select Volume Groups > Add a Volume Group > Add an Original Volume Group.
Copyright IBM Corp. 2009, 2013 Exercise 14. Backup and restore 14-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
OR
# smitty
Select System Storage Management (Physical & Logical Storage) > System
Backup Manager > Back Up the System > Back Up This System to Tape/File.
EXempty # cd /
# restore -qxvf /backup/my_mksysb ./home/user01/.profile \
./home/user01/.sh_history
OR
# cd /
# restorevgfiles -f /backup/my_mksysb ./home/user01/.profile \
./home/user01/.sh_history
OR
# smitty
Select System Storage Management (Physical & Logical Storage) > System
Backup Manager > Restore Files in a System Image.
Copyright IBM Corp. 2009, 2013 Exercise 14. Backup and restore 14-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
EXempty Select Volume Groups > Back Up a Volume Group > Back Up a Volume Group to
Tape/File.
* Backup DEVICE or FILE [/backup/testvg.bk] +/
* VOLUME GROUP to back up [lvmtestvg] +
List files as they are backed up? no +
Generate new vg.data file? yes +
Create MAP files? no +
EXCLUDE files? no +
EXPAND /tmp if needed? yes +
__ 16. Umount all of the file systems in lvmtestvg.
There are a couple of ways to do this:
First, you can list the LVs, note the mounted file systems, and manually unmount each:
# lsvg -l lvmtestvg
# umount <name of filesystem> (repeat for each filesystem)
OR
You can use a script to do it all in one step.
# lsvg -l lvmtestvg | grep -v N/A | grep open | awk '{print $7}' | \
while read lvname
do
umount $lvname
done
__ 17. Vary off and export the lvmtestvg volume group from the system.
# varyoffvg lvmtestvg
# exportvg lvmtestvg
__ 18. Confirm lvmtestvg has been removed from the system.
# lspv
__ 19. Using the savevg backup file, restore the volume group, lvmtestvg.
The suggested commands are:
# restvg -q -f /backup/testvg.bk
OR
# smitty lvm
Copyright IBM Corp. 2009, 2013 Exercise 14. Backup and restore 14-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Copyright IBM Corp. 2009, 2013 Exercise 14. Backup and restore 14-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
__ 24. List the names of the files in the two backup files just created.
The suggested commands are:
# restore -Tvf /backup/absolute_home.bk
# restore -Tvf /backup/relative_home.bk
OR
(The example below only gives the relative path backup listing; repeat using the
absolute path backup file name.)
# smitty
Select System Storage Management (Physical & Logical Storage) > Files &
Directories > List Contents of a Backup.
Copyright IBM Corp. 2009, 2013 Exercise 14. Backup and restore 14-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Copyright IBM Corp. 2009, 2013 Exercise 14. Backup and restore 14-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
# /home/AN14/filegen /myfs
# ls -l /myfs
__ 41. Create an external snapshot for the /myfs file system, size 100 MB. Record the
name of the created snapshot logical volume _____________________________
The suggested commands are:
# snapshot -o snapfrom=/myfs -o size=100M
OR
# smitty jfs2
Select Create Snapshot for an Enhanced Journaled File System > Create
Snapshot for an Enhanced Journaled File System in New Logical Volume.
EXempty ___________________________________________________________
The suggested commands are:
# snapshot -q /myfs
OR
# smitty jfs2
Select List Snapshots for an Enhanced Journaled File System.
Copyright IBM Corp. 2009, 2013 Exercise 14. Backup and restore 14-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Copyright IBM Corp. 2009, 2013 Exercise 14. Backup and restore 14-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
The file system size did not significantly decrease. That is because the deleted files
were first copied to the snapshot which is also part of the file system space allocation.
__ 57. Access the snapshot and show that the files are still shown there.
The suggested commands are:
# cd /myfs/.snapshot/mysnap
# ls
__ 58. Restore a single file back to the snappedFS and verify that it is recovered.
The suggested commands are:
# cp sfile0 /myfs
# ls /myfs
__ 59. Restore all of the /myfs file system contents to what they were when the snapshot
was taken, using the snapshot rollback facility.
The suggested commands are:
# cd /
# unmount /myfs
# rollback -n mysnap /myfs
OR
# cd /
# unmount /myfs
# smitty jfs2
Select Rollback an Enhanced Journaled File System to a Snapshot >
Rollback an Enhanced Journaled File System to an Internal Snapshot.
Copyright IBM Corp. 2009, 2013 Exercise 14. Backup and restore 14-19
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
# lslv -m testlv2
testlv2:/testfs2
LP PP1 PV1 PP2 PV2 PP3 PV3
0001 0204 hdisk2 0204 hdisk3
0002 0205 hdisk2 0205 hdisk3
0003 0206 hdisk2 0206 hdisk3
0004 0207 hdisk2 0207 hdisk3
0005 0208 hdisk2 0208 hdisk3
0006 0209 hdisk2 0209 hdisk3
0007 0210 hdisk2 0210 hdisk3
0008 0211 hdisk2 0211 hdisk3
In the sample output, both logical volumes have their second copies on hdisk3.
__ 67. When ready to backup the file system data, you would briefly quiesce the application
and then split the VG. In this class, our method of quiescing is to simply not run any
commands that affect the data while splitting the mirrored VG.
Split the volume group, using the disk which holds the second copy as the snapshot
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
some files.
How long did it take to split the mirrored VG? __________________________
Following is an example command:
# timex splitvg -y testvg-snap -c 2 testvg
real 8.04
user 0.89
sys 0.41
Copyright IBM Corp. 2009, 2013 Exercise 14. Backup and restore 14-21
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
In the example output, the splitvg command took only 8 seconds. While larger numbers
of physical partitions will require some more time, it is not much more. An 8 GB drive
fully populated with data, involving over one thousand physical partitions required 17
seconds to complete the split. What took longer was not the amount of data but the
number of logical partitions. This is significant, since in very large databases, the
volume groups typically use a much larger PP size, thus requiring fewer logical
partitions to contain the same amount of data.
__ 68. Display the testvg characteristics. Does it identify the status of having created a
snapshot VG? Does it have any stale PVs?
______________________________________________________________
______________________________________________________________
Following is a suggested command and sample output:
# lsvg testvg
VOLUME GROUP: testvg VG IDENTIFIER:00f6060300004c000000012f21d4122f
VG STATE: active PP SIZE: 8 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 2030 (16240 megabytes)
MAX LVs: 256 FREE PPs: 1994 (15952 megabytes)
LVs: 4 USED PPs: 36 (288 megabytes)
OPEN LVs: 4 QUORUM: 1 (Disabled)
TOTAL PVs: 2 VG DESCRIPTORS: 2
STALE PVs: 1 STALE PPs: 1
ACTIVE PVs: 1 AUTO ON: yes
MAX PPs per VG: 32768 MAX PVs: 1024
LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
SNAPSHOT VG: testvg-snap
PV RESTRICTION: none
In the example output, you can identify that this volume group has a snapshot because
the SNAPSHOT VG field lists the name of the snapshot VG. You can also see that one
of the PPs is marked as stale.
__ 69. Display the testvg-snap volume group characteristics. What information does it
provide about the snapshot situation?
_______________________________________________________________
_______________________________________________________________
Copyright IBM Corp. 2009, 2013 Exercise 14. Backup and restore 14-23
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Copyright IBM Corp. 2009, 2013 Exercise 14. Backup and restore 14-25
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Name the file system: back-<your client LPAR name>, to avoid conflict with the
other team sharing the server.
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.
You can use SMIT (fastpath nfs) or the mknfsexp command:
mknfsexp -d <fs to export> -B -S sys -t rw -r <client IP or
hostname>
The example commands are:
# crfs -v jfs2 -g rootvg -a size=65M -m /back-sys304_118
# mount /back-sys304_118
# mknfsexp -d /back-sys304_118 -B -S sys -t rw -r 10.6.52.118
__ 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.
# mount -o rw 10.6.52.117:/back-sys304_118 /mnt
__ 77. Backup (relative path) the /fs/testfs2 file system to a backup file in the /mnt
directory. Then verify the names of the files in the backup archive.
In the real world, the amount of data would be much greater and would require an
extensive amount of time to complete.
Following are suggested commands and sample output:
# cd /fs/testfs2
# find . | backup -q -i -v -f /mnt/vgsnap-fs2.bak
Backing up to /mnt/vgsnap-fs2.bak
Cluster 51200 bytes (100 blocks).
Volume 1 on /mnt/vgsnap-fs2.bak
a 0 .
a 8044544 ./data1
a 4194304 ./data10
. . .
a 4194304 ./data14
a 4186112 ./data15
a 4194304 ./data2
. . .
a 4194304 ./data9
a 0 ./lost+found
total size: 66756608
Done at Mon Apr 4 21:59:45 2011; 130400 blocks on 1 volume(s)
# restore -Tvf /mnt/vgsnap-fs2.bak
EXempty __ 78. Unmount the file systems which are in the snapshot VG, and then rejoin the
snapshot VG with the primary VG. The time it takes to join the snapshot VG to the
primary VG depends mainly upon how many PPs were marked as stale during the
existence of the snapshot.
Following are suggested commands:
# cd /
# umount /fs/testfs
# umount /fs/testfs2
# joinvg testvg
__ 79. List the volume groups to verify that the snapshot VG no longer exists.
Following is a suggested command and sample output:
# lsvg
rootvg
testvg
__ 80. List the logical volumes in the testvg volume group to verify that it is back to its
normal mirroring with no stale PPs.
Following is a suggested command and sample output:
# lsvg -l testvg
testvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
testlv2 jfs2 8 16 2 open/syncd /testfs2
testlv jfs 8 16 2 open/syncd /testfs
loglv00 jfs2log 1 2 2 open/syncd N/A
loglv01 jfslog 1 2 2 open/syncd N/A
__ 81. Before continuing to other parts of this exercise, remove the testvg volume group by
executing the provided script: clean_mirror_vg.
Following is a suggested command and sample output:
# cd /home/AN14
# ./clean_mirror_vg
rmlv: Logical volume testlv2 is removed.
rmlv: Logical volume testlv is removed.
rmlv: Logical volume loglv00 is removed.
rmlv: Logical volume loglv01 is removed.
ldeletepv: Volume Group deleted since it contains no physical volumes.
End of exercise
Copyright IBM Corp. 2009, 2013 Exercise 14. Backup and restore 14-27
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
(with hints)
Introduction
This exercise has three parts:
Part 1: Error log reports and management
Part 2: You will work with the ODM error notification class errnotify.
(Optional) Part 3: You will work with redirecting syslog message to
the AIX error log.
You will need root authority to complete this exercise.
Copyright IBM Corp. 2009, 2013 Exercise 15. Error monitoring. 15-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
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.
All exercises of this chapter depend on the availability of specific equipment in your
classroom.
All hints are marked with a >> sign.
The output shown in the answers is an example. Your output and answers based on the
output might be different.
EXempty ____________________________________________________________
# smit errpt
After generating the report, press F6 or <Esc-6> to see the command used.
The command SMIT executes is errpt -s mmddhhmmyy (where mmddhhmmyy
were the month, day, hour, minute, and year 24 hours ago).
A detailed report of all records with an Error Class of hardware. Write down the
command that SMIT executes:
____________________________________________________________
# smit errpt
After generating the report, press F6 or <Esc-6> to see the command used.
The command SMIT executes is errpt -a -d H.
__ 5. Write down the characteristics of your error log:
LOGFILE: ___________________________________________________
Maximum LOGSIZE: __________________________________________
Memory BUFFER SIZE: _______________________________________
What command have you used to show these characteristics?
____________________________________________________________
# smit errdemon
OR
# /usr/lib/errdemon -l
Notice that the labels for these characteristics used by SMIT are somewhat
different from the labels used when you execute errdemon directly.
__ 6. List the entries that have an error class of operator.
# errpt -d O
__ 7. Clean up all error entries that have an error class of operator. Write down the
command which you (or SMIT) used:
____________________________________________________________
# errclear -d O 0
__ 8. Verify that the operator entries are now gone.
# errpt -d O
Copyright IBM Corp. 2009, 2013 Exercise 15. Error monitoring. 15-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
End of exercise
Copyright IBM Corp. 2009, 2013 Exercise 15. Error monitoring. 15-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Introduction
This exercise has four parts:
Part 1: Identify information for your system
Part 2: Prepare NIM server to support maintenance boot
Part 3: Validate successful maintenance boot
Part 4: Repair a corrupted boot logical volume
All instructions in this exercise require root authority.
Requirements
The program /home/AN14/bootprob1
A NIM server that you can customize to support your LPAR
Copyright IBM Corp. 2009, 2013 Exercise 16. System Initialization - I 16-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
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.
All exercises of this chapter depend on the availability of specific equipment in your
classroom.
The output shown in the answers is an example. Your output and answers based on the
output might be different.
All hints are marked with a >> sign.
Which disk is the bootable disk? (That means the disk that contains the boot
logical volume hd5): ______________________
What command did you use? ___________________________________
lspv -l hdisk0 (for example) or lslv -m hd5
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
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? _______________
# lsvg rootvg
What command did you use to determine the physical volume IDs? __________
# lspv
__ 5. Using odmget, identify the attribute pvid of one of your disks from ODM class CuAt.
What command did you use?_____________________________________
odmget -q "name=hdisk0 and attribute=pvid" CuAt
Copyright IBM Corp. 2009, 2013 Exercise 16. System Initialization - I 16-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Copyright IBM Corp. 2009, 2013 Exercise 16. System Initialization - I 16-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Copyright IBM Corp. 2009, 2013 Exercise 16. System Initialization - I 16-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
7) In the new pop-up window, click the menu icon to the right of Boot Mode and
select SMS.
Click OK to exit this pop-up.
8) On the panel that is labeled Activate Logical Partition: <your lpar name>, click
OK. Respond yes to any security pop-up windows.
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 other window and you
will need to bring it to the foreground).
__ d. Network boot your LPAR into maintenance mode using SMS:
1) From the SMS main menu, select option:
2. Setup Remote IPL (Initial Program Load)
2) From the list of Network Interface Card (NIC) Adapters, choose the first one
(the one that matches the location code recorded earlier).
3) On newer systems, you will be prompted on what protocols to use. Select
IPv4 and bootp.
4) This should bring up the Network Parameters panel. Select option:
1. IP Parameters
5) On the IP Parameters panel, if the network parameters are already set,
validate that they are correct (The server IP address, if already set, is likely to
be wrong for this exercise; it should be the server that you configured in Part2
of the this exercise.) If they are not correct, then modify them.
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.
The values will be the same ones you used during the AIX Installation
exercise.
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 communicate with
the designated server. Select:
3. Ping Test
and
1. Execute Ping Test
If you do not get a Ping Success result, then check the status of the server
and your IP Parameter values.
7) Back out to the main menu, using the <Esc> key.
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.
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 maintenance
mode. Type 1 (for English) and press Enter.
It should then display the Maintenance menu.
__ e. Shut down the partition from maintenance mode.
1) If you have accessed the volume group, simply run sync;sync;halt - this
can be done because there is no disk activity in the current state. If you have
not accessed the volume group (perhaps you are looking at the maintenance
menu), you will have to use the HMC to shutdown the LPAR - as follows:
2) On the HMC Content Area, make sure your LPAR (and only your LPAR) is
currently selected.
3) Click the menu icon, move your mouse over the Operations task and then
click the Shutdown subtask. This should result in a pop-up window.
4) In the shutdown window, select Immediate and then click OK. When
prompted, confirm that you want to shutdown the partition. Answer no if
asked if you are replacing a cache battery.
The shutdown immediate option is only valid because of the lack of any disk
activity in the current state. From a multiuser mode, do not use the HMC
shutdown immediate. The os shutdown option is preferable.
5) The partition shutdown is complete when the Status field for your LPAR
changes from Running to Not Active.
Copyright IBM Corp. 2009, 2013 Exercise 16. System Initialization - I 16-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
__ f. Start your partition in multiuser mode (normal bootlist). When the partition state
is Not Activated, proceed to activate the partition:
1) Select the partition (if not already selected).
2) When the small menu icon appears, click it to show the menu and move you
mouse over the Operations menu item.
3) When the sub-menu appears, move your mouse pointer over the Activate
menu item. Then click the Profile item.
4) In the pop-up window Activate Logical Partition: <your lpar name>, click the
small box next to Open a terminal window or console session (unless you
already have a virtual console window open) and click OK.
5) You should eventually see a login prompt appear in the virtual console
window.
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.
______________________________________________________________
______________________________________________________________
______________________________________________________________
______________________________________________________________
On an LPAR system (using the HMC console):
Access the HMC and locate your partition as described in the previous section.
The state of the partition will depend on the level of code. On older POWER5 systems,
you might see a state of open firmware. On newer systems, you might see a state of
starting with a reference code of AA060011.
The boot record at the beginning of your partition has been removed. When an LPAR is
unable to locate a boot image, its behavior depends on the firmware level. On older
firmware levels, it automatically booted to SMS, which is a menu front end to the system
Copyright IBM Corp. 2009, 2013 Exercise 16. System Initialization - I 16-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
firmware. At newer firmware levels, it repeatedly retries the bootlist and displays a
message of:
No OS image was detected by firmware
At least one disk in the bootlist was not found yet
Firmware is now retrying the entries in the bootlist
__ 21. Terminate any looping condition that might exist.
Press Ctrl-C to stop retrying.
This signal will trigger a boot to SMS mode.
__ 22. Boot to maintenance mode to do the repair.
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).
Use SMS to execute a network boot of your system.
1) From the SMS main menu, select options:
5. Select Boot Options
1. Select Install/Boot Device
6. Network
When prompted for a network service, select bootp.
Select the device number of your network adapter.
2) Then select:
2. Normal Mode Boot
1. Yes (to exit SMS)
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.
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 maintenance
mode. Type 1 (for English) and press Enter.
It should then display the Maintenance menu.
If the corresponding NIM machine object is in the correct state, your system should
boot to maintenance mode.
__ 23. Repair the boot logical volume.
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.
EXempty Since you are booting from NIM, you will already be at the Maintenance menu.
From the Maintenance menu, select option 1, Access a Root Volume Group.
Type 0 to continue.
Next, the Access a Root Volume Group screen is displayed. This screen lists all of the
volume groups (root and otherwise) on your system.
Select the option for the root volume group whose logical volume information you want
to display. If there are multiple volume groups to choose from, choose the one which
matches the VGID that you recorded in Part 1 of this exercise (it is likely identified as
hdisk0).
After entering your selection, the Volume Group Information screen is displayed.
Select option 1, Access this volume group and start a shell. Selecting this choice
imports and activates the volume group and mounts the file systems for this root volume
group before providing you with a shell and a system prompt.
__ 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.
The suggested commands are:
# bootlist -o -m normal
# lsvg -l rootvg
__ 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
used.
____________________________________________________________
____________________________________________________________
The suggested commands are:
# bosboot -ad /dev/hdisk0 (for example)
# sync
# sync
__ 24. If the command executes successfully, reboot your system in normal mode.
# reboot
We would normally recommend a shutdown command, but since there is no disk
activity in the current state, it is safe to use the reboot command. Also, use of the
shutdown command would generate multiple errors related to the assumption that the
shutdown is being issued from a multi-user mode (which it is not true in this situation).
__ 25. When you receive a login prompt, the repair is complete.
Copyright IBM Corp. 2009, 2013 Exercise 16. System Initialization - I 16-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
EXempty __ 33. 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.
# bootlist -m normal hdisk0 hdisk# hdisk1
__ 34. Display the normal mode bootlist. Record the devices in the bootlist.
_________________________________________________________
_________________________________________________________
_________________________________________________________
_________________________________________________________
_________________________________________________________
Do you notice anything odd? __________________________________
_________________________________________________________
# bootlist -o -m normal
When you specify a fibre channel attached device for the bootlist without any path restrictions, an
attempt is made to add an entry for each of the known paths. This can cause a problem in situation
where the number of Paths fills up the bootlist capacity, preventing a later disk from being included.
In the current example, the bootlist filled up. On the development system, there were 6
possible paths to the disk and only four could fit into the bootlist. The third (non-FC
attached) disk also could not be included, even though it was specified.
__ 35. 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
attached disk listed last.
# bootlist -m normal hdisk0 hdisk# pathid=1,3 hdisk1
__ 36. Display the normal mode bootlist. Record the devices in the bootlist.
_________________________________________________________
_________________________________________________________
_________________________________________________________
_________________________________________________________
# bootlist -o -m normal
Because you controlled which paths to include for the FC attached disks, you were able
get a total bootlist that included all the of the disks that you specified.
__ 37. Update the normal mode bootlist to include only the original device.
# bootlist -m normal hdisk0
Copyright IBM Corp. 2009, 2013 Exercise 16. System Initialization - I 16-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
End of exercise
Introduction
This exercise has two parts:
Part 1: Repair a corrupted log logical volume
(Optional) Part 2: Analyze and fix a phase 3 boot problem
All instructions in this exercise require root authority.
Required material
Script /home/AN14/bootprob2
Script /home/AN14/bootprob3
Bootable media that matches the version and release of your
system or a NIM server setup that can be used to execute a remote
boot.
Copyright IBM Corp. 2009, 2013 Exercise 17. System Initialization - II 17-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
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.
All exercises of this chapter depend on the availability of specific equipment in your
classroom.
All hints are marked with a >> sign.
The output shown in the answers is an example. Your output and answers based on the
output might be different.
EXempty __ 5. Once the partition state is Not Activated, attempt to activate your LPAR to a
multiuser mode from the HMC.
Follow the instructions in the step Start your partition to multiuser mode in Exercise 16,
Part 3.
__ 6. 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.
_____________________________________________________________
_____________________________________________________________
LED, LCD or HMC Reference Code field will show 0557 and will not change from that
code. A 557 progress code indicates that the mount of /dev/hd4, root file system,
failed.
__ 7. Boot your machine in maintenance mode.
Use your HMC to shut down your partition and then activate your partition to
maintenance mode as described by the procedures described in Exercise 16, Part 3
(Booting to maintenance mode).
__ 8. From the Maintenance menu, access the rootvg before mounting the file systems.
You need to do this, because mounting the file systems in rootvg will fail due to the
corrupted log logical volume.
Select your terminal.
Select your language.
If booting from media, you will see: Welcome to the Base Operating System Installation
and Maintenance. From here, select Start Maintenance Mode for System Recovery.
From the Maintenance menu, select option 1, Access a Root Volume Group.
Type 0 to continue.
The Access a Root Volume Group screen displays. Select the volume group that is
causing the problem.
Copyright IBM Corp. 2009, 2013 Exercise 17. System Initialization - II 17-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Select option 2, Access this volume group and start a shell before mounting file
systems. Notice the error messages while rootvg is varied on. These provide more
clues to the problem:
Importing Volume Group...
imfs: can't find log for volume group rootvg
rootvg
Checking the / filesystem.
fsck: Cannot find the vfs value for file system /dev/hd4
.Checking the /usr filesystem.
fsck: Cannot find the vfs value for file system /dev/hd2
.Exit from this shell to continue the process of accessing the
root volume group.
__ 9. 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.
If it is a JFS2 file system:
# logform -V jfs2 /dev/hd8
logform: Destroy /dev/hd8 (y)? y
# fsck -y -V jfs2 /dev/hd1
# fsck -y -V jfs2 /dev/hd2
# fsck -y -V jfs2 /dev/hd3
# fsck -y -V jfs2 /dev/hd4
# fsck -y -V jfs2 /dev/hd9var
# fsck -y -V jfs2 /dev/hd10opt
# fsck -y -V jfs2 /dev/hd11admin
__ 10. Use the sync command to flush your changes from memory to the disk. Shut down
your system and reboot your system in normal mode. Where you able to
successfully reboot? _____________________________________________
Here are example commands:
# sync
# sync
# reboot
(Use of the reboot command is appropriate for the current state of the machine, but
the shutdown command should be used when the machine is in a multiuser mode.)
If you are unable to shutdown the system from the command prompt, then use the HMC
to stop and start your system:
See the HMC instructions in Exercise 16.
EXempty __ 11. If the reboot failed, determine if it is the same problem already identified or a new
problem. If it is the same problem, go back and figure out what was missed in the fix
procedure.
Copyright IBM Corp. 2009, 2013 Exercise 17. System Initialization - II 17-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
EXempty The Access a Root Volume Group screen displays. Select the volume group that is
causing the problem.
Select option 1, Access this volume group and start a shell. Selecting this choice
imports and activates the volume group and mounts the file systems for this root volume
group before providing you with a shell and a system prompt.
Set an appropriate terminal emulation. For example, when using the HMC virtual
terminals to an LPAR, issue the command:
# export TERM=vt420
The corrupted file is /etc/inittab.
__ 18. Repair the corrupted file. You will find an example in your Student Notebook. If you
are not able to fix the boot failure, contact your instructor.
Notice that the file has a semi-colon instead of a colon as the first delimiter. Correct this
by manually editing /etc/inittab.
# vi /etc/inittab
:%s/;/:/g
:wq!
Shut down your system and reboot your system in normal mode. Your machine should
boot now without any boot failure.
# sync
# sync
# reboot
Use of the reboot command is appropriate for the current state of the machine, but the
shutdown command should be used when the machine is in a multiuser mode.
End of exercise
Copyright IBM Corp. 2009, 2013 Exercise 17. System Initialization - II 17-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Introduction
In this exercise you will create a dump and, optionally, include it in a
snap of data to be provided to the AIX Support Line personnel.
You will need root authority to complete this exercise.
Copyright IBM Corp. 2009, 2013 Exercise 18. System dump 18-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
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.
All exercises of this chapter depend on the availability of specific equipment in your
classroom.
All hints are marked with a >> sign.
The output shown in the answers is an example. Your output and answers based on the
output might be different.
Note
All users must perform this exercise together if there is more than one user on your system.
EXempty __ 4. Verify that the dump copy directory is large enough to hold the dump size
reported on the previous command.
# df -m /var
You could also use the command /usr/lib/ras/dumpcheck -p to check if the size of
the copy directory is large enough. If no message is sent to stdout, then the size is
sufficient.
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 filesystem is
large enough.
# chfs -a size=+##M /var
where ## represents the number of megabytes that /var must be increased by to hold
the dump.
On a system with approximately 1 GB of memory that was used in testing this
exercise, the value used for ## was 245.
Note that chfs will now accept M (Megabytes) and G (Gigabytes) unit identifiers
for file system size specifications. In our example, the command chfs -a
size=+245M /var can be used to indicate that the size of /var should be
increased by 245 MB.
# /usr/lib/ras/dumpcheck -p
__ 5. 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.)
Suggested commands are:
# lsattr -El sys0 -a autorestart
(if necessary) # chdev -l sys0 -a autorestart=true
__ 6. Use the command sysdumpstart -p to start a dump to the primary dump device.
# sysdumpstart -p
What LED code appears 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 your LPAR name.
_______________________________________________
0c2
__ 7. After the system reboots, re-establish a telnet session with your LPAR and log in as
root. Determine and write down the size, uncompressed size, and file name for your
system dump:
_________________________________________________________________
_________________________________________________________________
Copyright IBM Corp. 2009, 2013 Exercise 18. System dump 18-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
# sysdumpdev -L
Sample output is given below:
Device name: /dev/hd6
Major device number: 10
Minor device number: 2
Size: 65926144 bytes
Uncompressed Size: 757624951 bytes
Date/Time: Mon Aug 29 20:01:53 2011
Dump status: 0
Type of dump: traditional
dump completed successfully
Dump copy filename: /var/adm/ras/vmcore.0.BZ (if its the first
dump)
Note that the value shown for Uncompressed Size is much larger than the
value shown for Size. Also note that the .BZ extension means that the
compressed dump cannot be uncompressed using the uncompress
command.
Copyright IBM Corp. 2009, 2013 Exercise 18. System dump 18-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
SYSTEM STATUS:
sysname... AIX
nodename.. sys304_118
release... 1
version... 7
build date Aug 31 2010
build time 16:22:09
label..... 1034B_710
machine... 00F606034C00
nid....... F606034C
time of crash: Mon Aug 29 20:01:53 2011
age of system: 6 min., 43 sec.
xmalloc debug: enabled
FRRs active... 0
FRRs started.. 0
CRASH INFORMATION:
CPU -1 CSA 052AA6C8 at time of crash, error code for LEDs:
00000000
<ctrl-c>
(0)> status
CPU INTR TID TSLOT PID PSLOT PROC_NAME
0 1200057 288 6C0002 108 sysdumpstart
1 180031 24 E001C 14 wait
2 190033 25 F001E 15 wait
3 1B0037 27 100020 16 wait
4 1C0039 28 110022 17 wait
5 1D003B 29 120024 18 wait
6 1E003D 30 130026 19 wait
7 1F003F 31 140028 20 wait
8-1023 Disabled
(0)> q
__ 10. 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.)
Copyright IBM Corp. 2009, 2013 Exercise 18. System dump 18-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
__ 16. Rename the resulting compressed pax file to the standard naming convention, given
the following assumptions:
Your PMR# is 12121.
Your branch# is 989.
Use your own country code (if you do not know it, for this class, just use 000).
# cd /tmp/ibmsupt
# mv snap.pax.Z pmr12121.b989.c000.snap.pax.Z
__ 21. Verify that the file system that holds the copy directory has enough free space, given
the estimated dump size. Increase the filesystem size, if necessary.
# df -m /var
# chfs -a size=+16M /var
__ 22. Create a logical volume, out of the rootvg, that has more than enough physical
partitions to handle the estimated dump size. Name it dumplv and specify a logical
volume type of sysdump.
# mklv -y dumplv -t sysdump rootvg 46
__ 23. Permanently define this new logical volume as the primary dump device.
# sysdumpdev -P -p /dev/dumplv
Copyright IBM Corp. 2009, 2013 Exercise 18. System dump 18-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
__ 24. Verify that you new logical volume is defined as the primary dump device.
# sysdumpdev -l
__ 25. Initiate a dump of your operating system to your primary dump device. On our
development system, this require a little more than 7 minutes to complete.
# sysdumpstart -p
__ 26. 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.
Eventually, the dump will complete and the AIX system will reboot.
__ 27. 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? __________________________________________
________________________________________________________________
# sysdumpdev -L
Sample output is given below:
Device name: /dev/dumplv
Major device number: 10
Minor device number: 12
Size: 68368896 bytes
Uncompressed Size: 767622000 bytes
Date/Time: Mon Aug 29 20:48:57 2011
Dump status: 0
Type of dump: traditional
dump completed successfully
__ 28. Examine the copy directory. Is there a vmcore file located in that directory?
______________________________________________________________
# ls /var/adm/ras/vmcore*
There should not be any vmcore files in the directory. The dump may be left in the
dedicated dump device and is not automatically copied to the copy directory.
__ 29. Copy the dump and the current kernel to the dump copy directory.
# savecore /var/adm/ras /unix
There should now be a new vmcore file in the directory.
__ 30. Again, examine the copy directory. Is there a vmcore file located in that directory?
______________________________________________________________
# ls /var/adm/ras/vmcore*
Copyright IBM Corp. 2009, 2013 Exercise 18. System dump 18-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
Introduction
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.
The disk assignments on your system can vary from what is in the
exercise hints. Adjust your commands to match your situation.
Copyright IBM Corp. 2009, 2013 Exercise 19. Advanced install techniques 19-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
If exported, but your LPAR does not have root access permission:
# smitty nfs
Select Network File System (NFS) > Change / Show Attributes of an Exported
Directory.
When prompted, provide the name of the exported maintenance directory.
When prompted, specify version 3.
In the dialogue panel, under Security method 1, add your LPAR IP address to the list
(comma or colon delimited) next to Hosts allowed root access.
__ 5. Open a terminal emulation window using telnet protocol to connect to your assigned
LPAR. Log in as root.
__ 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.
The suggested commands are:
# mount
If not already mounted:
# mount -o ro <NIMserver IPaddr>:/export/AIX_7100-02-02 /mnt
__ 7. Identify the current level of the AIX base operating systems (BOS), including the
technology level and the service pack.
The suggested commands are:
# oslevel -s
7100-02-01-1245
__ 8. Verify that hdisk1 is not part of an existing volume group. If it is, remove hdisk1 from
that volume group, specifying that any allocated logical volumes be deleted.
The suggested commands are:
# lspv
(If necessary): # reducevg -d <VG_name> hdisk1
Copyright IBM Corp. 2009, 2013 Exercise 19. Advanced install techniques 19-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
__ 9. Use the alt_disk_copy command to create a clone on hdisk1. Update the clone
with all of the AIX 7.1 TL2 SP2 maintenance as it is being created.
Notify your instructor that you have initiated the alternate disk copy operation.
The cloning followed by application of maintenance could take anywhere from a few
minutes up to almost an hour, depending on the type of disk storage being used. If
setup properly, it should run fairly quickly (15 minutes in our development lab). While
you are waiting, your instructor may direct you either to continue with the next part of
the exercise, to continue with lecture and discussion, or to take a break.
The suggested commands are:
# alt_disk_copy -b update_all -l /mnt -d hdisk1
If you receive an error message stating that the disk might not be bootable, use the -g
flag to override the check. Ignore any /dev/ipldevice and bosboot errors.
__ 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?
_________________________________________
The suggested commands are:
# lspv
hdisk0 00c07f6f584cd485 rootvg active
hdisk1 00c07f6f820feea0 altinst_rootvg
The target disk now is identified as belonging to the altinst_rootvg volume group.
__ 11. Also display the normal boot list. Is the active or alternate rootvg listed as the first
boot device? ____________________________________________________
The suggested commands are:
# bootlist -o -m normal
hdisk1 blv=hd5 pathid=0
The normal bootlist has been changed to have the altinst_rootvg disk as the only device
in the list.
__ 12. If the bootlist does not have the alternate rootvg disk as the first boot device, change
it to boot off of the alternate rootvg.
The suggested commands are:
(If needed:) # bootlist -m normal hdisk#
__ 13. Reboot your system in a safe manner.
The suggested command is:
# shutdown -Fr
EXempty __ 14. After the reboot is completed, log back into your LPAR as the root user, and verify
that the level of the BOS is at the applied TL and SP level.
The suggested commands are:
# oslevel -s
7100-02-02-1316
__ 15. List the physical volumes. What are the associated volume groups? Did they
change?
The suggested commands are:
# lspv
hdisk0 00c07f6f584cd485 old_rootvg
hdisk1 00c07f6f820feea0 rootvg active
In the hint example, the volume group name for hdisk0 has been changed from rootvg
to old_rootvg, while the volume group name for hdisk1 has been changed from
altinst_rootvg to rootvg.
__ 16. Change the bootlist back to using the original boot logical volume and safely reboot
the LPAR.
The suggested commands are:
# bootlist -m normal hdisk# (where hdisk# is the original rootvg disk)
# shutdown -Fr
__ 17. Reconnect and log back into the logical partition as the root user. Confirm that the
operating system is back to the older level.
The suggested command is:
# oslevel -s
Copyright IBM Corp. 2009, 2013 Exercise 19. Advanced install techniques 19-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
# mount /userfs
Copyright IBM Corp. 2009, 2013 Exercise 19. Advanced install techniques 19-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
The closed state for the standby BOS file systems indicates that they are not mounted.
__ 23. Was there a new copy of your user defined file system in the standby BOS? ______
________________________________________________________________
Your should see that your user defined file system is available, but it is the same logical
volume rather than a unique copy related to the standby BOS.
__ 24. Display the normal bootlist. How does this differ from what you displayed prior to
standby BOS creation? ____________________________________________
______________________________________________________________
The example command and output is:
# bootlist -o -m normal
hdisk0 blv=bos_hd5
hdisk0 blv=hd5
You will notice that the standby BOS have been established as the first boot device. If
this is not what is desired, the multibos command has an option to suppress making
this automatic change.
__ 25. Mount the standby BOS. and then display what file systems are mounted. What is
the path to the mount points of the standby BOS unique file system?
_____________________________________________________________
The suggested commands are:
# multibos -m
# mount
node mounted mounted over vfs date options
-------- --------------- --------------- ------ ------------ ---------------
/dev/hd4 / jfs2 Apr 14 12:05 rw,log=/dev/hd8
/dev/hd2 /usr jfs2 Apr 14 12:05 rw,log=/dev/hd8
/dev/hd9var /var jfs2 Apr 14 12:06 rw,log=/dev/hd8
/dev/hd3 /tmp jfs2 Apr 14 12:06 rw,log=/dev/hd8
/dev/hd1 /home jfs2 Apr 14 12:06 rw,log=/dev/hd8
/dev/hd11admin /admin jfs2 Apr 14 12:06 rw,log=/dev/hd8
/proc /proc procfs Apr 14 12:06 rw
/dev/hd10opt /opt jfs2 Apr 14 12:06 rw,log=/dev/hd8
/dev/fslv01 /userfs jfs2 Apr 14 12:14 rw,log=/dev/hd8
/dev/bos_hd4 /bos_inst jfs2 Apr 14 15:29 rw,log=/dev/hd8
/dev/bos_hd2 /bos_inst/usr jfs2 Apr 14 15:29 rw,log=/dev/hd8
/dev/bos_hd9var /bos_inst/var jfs2 Apr 14 15:29 rw,log=/dev/hd8
/dev/bos_hd10opt /bos_inst/opt jfs2 Apr 14 15:29 rw,log=/dev/hd8
The file systems under the /bos_inst directory are now mounted.
__ 26. 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
/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.
Copyright IBM Corp. 2009, 2013 Exercise 19. Advanced install techniques 19-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
# mount
node mounted mounted over vfs date options
-------- --------------- --------------- ------ ------------ ---------------
/dev/bos_hd4 / jfs2 Apr 14 15:48 rw,log=/dev/hd8
/dev/bos_hd2 /usr jfs2 Apr 14 15:48 rw,log=/dev/hd8
/dev/bos_hd9var /var jfs2 Apr 14 15:48 rw,log=/dev/hd8
/dev/hd3 /tmp jfs2 Apr 14 15:48 rw,log=/dev/hd8
/dev/hd1 /home jfs2 Apr 14 15:49 rw,log=/dev/hd8
/proc /proc procfs Apr 14 15:49 rw
/dev/bos_hd10opt /opt jfs2 Apr 14 15:49 rw,log=/dev/hd8
/dev/hd11admin /admin jfs2 Apr 14 15:49 rw,log=/dev/hd8
__ 32. 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 name for the disk
where you created your standby BOS).
The example commands and output are:
# bootlist -m normal hdisk0 blv=hd5 hdisk0 blv=bos_hd5
# bootlist -o -m normal
hdisk0 blv=hd5
hdisk0 blv=bos_hd5
# shutdown -Fr
__ 33. When the reboot is complete, reconnect to your LPAR and log back in as the root
user.
If exported, but your LPAR does not have root access permission:
# smitty nfs
Select Network File System (NFS) > Change / Show Attributes of an Exported
Directory.
When prompted, provide the name of the exported maintenance directory.
When prompted, specify version 3.
In the dialogue panel, under Security method 1, add your LPAR IP address to the list
(comma or colon delimited) next to Hosts allowed root access.
Copyright IBM Corp. 2009, 2013 Exercise 19. Advanced install techniques 19-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Exercises with hints
__ 38. 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 LPAR.
Log in as root.
__ 39. Mount the exported maintenance directory to your /mnt directory mount point, with
read-only access.
The suggested command is:
# mount -o ro <NIMserver IPaddr>:/export/AIX_7100-02-02 /mnt
__ 40. Identify the current level (including TL and SP) of the AIX base operating system
(BOS). ___________________________________________________________
The suggested commands are:
# oslevel -s
7100-02-01-1245
__ 41. Perform a customized update of the software in the standby BOS and extend file
systems as needed. Apply maintenance to update the BOS to AIX 7.1 TL2 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 could take between 9 and 20 minutes to complete (It could take longer if the lab
has not been setup to avoid disk contention problems, or it could just a few minutes
if using a fibre channel accessed cached storage subsystem).
The suggested commands are:
# multibos -p -Xca -l /mnt
# multibos -Xca -l /mnt
__ 42. Start a standby BOS shell. In the shell, display the OS level including the technology
level and service pack. Was update effective? When done, exit the shell.
________________________________________________________________
The suggested commands are:
# multibos -S
MULTIBOS> oslevel -s
MULTIBOS> exit
You should see that the standby bos now has the newer level.
End of exercise
backpg
Back page