AIX Jumpstart for UNIX
Professionals
(Course code AN14)
Student Exercises
with hints
ERC 3.1
cover
September 2013 edition
The information contained in this document has not been submitted to any formal IBM test and is distributed on an “as is” basis without any warranty either express or implied. The use of this information or the implementation of any of these techniques is a customer responsibility and depends on the customer’s ability to evaluate and integrate them into the customer’s operational environment. While each item may have been reviewed by IBM for accuracy in a specific situation, there is no guarantee that the same or similar results will result elsewhere. Customers attempting to adapt these techniques to their own environments do so at their own risk.
© Copyright International Business Machines Corporation 2009, 2013.
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:
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.
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®
TOC
Contents
Trademarks . . . vii Exercises description . . . ix Exercise 1. Introduction to AIX and IBM Power Systems . . . 1-1 Exercise instructions with hints . . . 1-2 Part 1: Accessing the AIX Infocenter . . . 1-2 Part 2: Environment information, access, and familiarity . . . 1-4 Exercise 2. Using system management tools in AIX . . . 2-1 Exercise instructions with hints . . . 2-2 Part 1: Using SMIT . . . 2-2 Part 2: IBM Systems Director Console for AIX (pconsole) . . . 2-6 Exercise 3. AIX software installation and maintenance . . . 3-1 Exercise instructions with hints . . . 3-2 Part 1: AIX LPP packaged software . . . 3-2 Part 2: (Optional) RPM packaged software . . . 3-10 Exercise 4. System configuration and devices . . . 4-1 Exercise instructions with hints . . . 4-2 Part 1: List device configuration . . . 4-2 Part 2: List and change device attributes . . . 4-4 Part 3: Device states (changing the status of a disk drive device) . . . 4-5 Exercise 5. TCP/IP implementation . . . 5-1 Exercise instructions with hints . . . 5-2 Part 1: TCP/IP configuration . . . 5-2 Part 2: (Optional) NFS . . . 5-6 Exercise 6. System startup and shutdown . . . 6-1 Exercise instructions with hints . . . 6-2 Part 1: Multiuser mode . . . 6-2 Part 2: Using the HMC to shut down and activate an AIX partition . . . 6-6 Exercise 7. Configuring logical partitions . . . 7-1 Exercise instructions with hints . . . 7-2 Exercise 8. AIX installation . . . 8-1 Exercise instructions with hints . . . 8-2 Part 1: Setting up the NIM server . . . 8-2 Part 2: Activate the LPAR to SMS and initiate a network boot . . . 8-5 Exercise 9. Working with LVM . . . 9-1
Exercise instructions with hints . . . 9-2 Part 1: Creating and manipulating volume groups . . . 9-2 Part 2: Creating and manipulating logical volumes . . . 9-5 Part 3: Migrating logical volumes . . . 9-8 Part 4: Mirroring rootvg . . . 9-10 Part 5: Exploring and documenting your LVM environment . . . 9-12 Part 6: (Optional) Striped logical volumes . . . 9-14 Exercise 10. File system administration . . . .10-1 Exercise instructions with hints . . . 10-2 Part 1: Working with file systems . . . 10-2 Part 2: (Optional) File system block sizes . . . 10-6 Exercise 11. The Object Data Manager . . . .11-1 Exercise instructions with hints . . . 11-2 Part 1: Device configuration ODM classes . . . 11-2 Part 2: (Optional) Modifying a device attribute default value . . . 11-6 Exercise 12. LVM metadata issues . . . .12-1 Exercise instructions with hints . . . 12-3 Part 1: Using intermediate LVM commands . . . 12-3 Part 2: Export and import a volume group . . . 12-9 Part 3: (Optional) Analyze import messages . . . 12-11 Part 4: (Optional) Fixing LVM ODM problems with importvg and exportvg . . . . 12-15 Part 5: (Optional) Fix an LVM ODM problem using rvgrecover . . . 12-18 Exercise 13. Disk management procedures . . . .13-1 Exercise instructions with hints . . . 13-2 Part 1: rootvg disk replacement . . . 13-2 Part 2: User VG disk replacement procedure . . . 13-5 Part 3: (Optional) Working with quorum . . . 13-7 Exercise 14. Backup and restore . . . .14-1 Exercise instructions with hints . . . 14-2 Part 1: mksysb backup of rootvg . . . 14-2 Part 2: savevg backup and restore of lvmtestvg . . . 14-6 Part 3: Backup and restore by name . . . 14-9 Part 4: (Optional) Incremental backups (backup and restore by inode) . . . 14-11 Part 5: Using JFS2 snapshots . . . 14-13 Part 6: (Optional) Using JFS2 internal snapshots . . . 14-17 Part 7: (Optional) Using a snapshot volume group . . . 14-20 Exercise 15. Error monitoring. . . .15-1 Exercise instructions with hints . . . 15-2 Part 1: Error log reports and management . . . 15-2 Part 2: Error notification with errnotify . . . 15-4 Part 3: (Optional) Redirecting syslogd messages to AIX error log . . . 15-5
TOC Exercise 16. System Initialization - I . . . 16-1 Exercise instructions with hints . . . 16-2 Part 1: Identifying information on your system . . . 16-2 Part 2: Preparing NIM to support booting to maintenance mode . . . 16-4 Part 3: Booting to maintenance mode . . . 16-6 Part 4: Repair a corrupted boot logical volume . . . 16-11 Part 5: Part 5 (Optional): Working with multi-path bootlists . . . 16-14 Exercise 17. System Initialization - II . . . 17-1 Exercise instructions with hints . . . 17-2 Part 1: Repair a corrupted log logical volume . . . 17-2 Part 2: (Optional) Analyze and fix a phase 3 boot problem . . . 17-6 Exercise 18. System dump . . . 18-1 Exercise instructions with hints . . . 18-2 Part 1: Working with the AIX dump facility . . . 18-2 Part 2: (Optional) Processing an AIX dump . . . 18-5 Part 3: (Optional) Working with a dedicated dump logical volume . . . 18-9 Exercise 19. Advanced install techniques . . . 19-1 Exercise instructions with Hints . . . 19-2 Part 1: Creating and working with an alternate rootvg . . . 19-2 Part 2: Creating and working with a standby BOS using multibos . . . 19-6 Part 3: (Optional) Applying software maintenance to a standby BOS . . . 19-11
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:
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.
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®
pref
Exercises description
Exercise instructions — This section contains what it is you are to
accomplish. There are no definitive details on how to perform the tasks. You are given the opportunity to work through the exercise given what you learned in the unit presentation, utilizing the unit Student Notebook, your past experience, and maybe a little intuition.
Exercise instructions with hints — This section is an exact duplicate
of the Exercise instructions section, except that in addition, specific details or hints, or both are provided to help step you through the exercise. A combination of using the Instructions section along with Instructions with hints section can make for a rewarding combination; providing you with, no hints when you don't want them, and hints when you need them.
Optional exercises — This section gives you additional exercises to
perform relating to the unit of discussion. It is strictly optional and should be performed when you have completed the required exercises. The required exercises pertain to the most pertinent information provided in the unit. This section can help round out the hands-on experience for a related unit.
EXempty
Exercise 1. Introduction to AIX and IBM Power
Systems
(with hints)
What this exercise is about
This exercise is about accessing the AIX documentation and the course lab environment.
What you should be able to do
At the end of the exercise, you should be able to: • Access and navigate the AIX information center
• Log in and log out of the classroom environment, including both the HMC and a logical partition
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.
Exercise instructions
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.
Part 1: Accessing the AIX Infocenter
__ 1. Using a web browser on your classroom machine, connect to the IBM Systems Information Center. The URL to enter is:
http://publib.boulder.ibm.com/eserver
__ 2. In the navigation area, on the left, click AIX Information Center.
__ 3. In the content area, on the right, locate the section for AIX 7.1 and click the arrow icon.
__ 4. In the content area, click AIX PDFs. Do not download these PDF files at this time, but notice that the entire AIX documentation library is available in softcopy.
__ 5. At the topic of the content area, there is a link for the original AIX 7.1 information web page. Click that link to return to the IBM AIX 7.1 Information Center page. The rest of the content area has links to related resources.
__ 6. Expand the AIX 7.1 information menu in the navigation area, by clicking on the twisty. The navigation area on the left is an alternate way to locate information in a hierarchical manner.
__ 7. For example, you might want instructions on how to install an AIX operating system. In the navigation area, locate and expand the How-to scenarios item.
EXempty Expand Administrator how-to’s, by clicking on the twisty. __ 9. This reveals a list of How-To categories.
Expand the Software installation and maintenance category.
__ 10. This reveals a list of How-To topics in that category.
Click Installing AIX using the media to install a partition with an HMC.
In the content area, on the right, you should see an article on the selected topic. __ 11. At the top of the content area, you should see a crumb list which identifies the
hierarchical path that could be used to reach this topic. The first link in this list should be AIX 7.1 information.
Click AIX 7.1 information to return to the Welcome page for the IBM AIX 7.1 Information Center.
__ 12. The AIX Infocenter also has a keyword search capability. Locate the Search field in the upper left and type JFS2.
__ 13. In the Search Results there are many links to web pages that matched your search criteria. Click the link titled: JFS and JFS2. There is a basic definition of the file systems and additional links for more detailed information.
__ 14. Return to the IBM AIX 7.1 Information page. __ 15. Bookmark this web page for future use.
Part 2: Environment information, access, and familiarity
__ 16. Establish connectivity to the remote lab environment. » Your instructor will provide details on how to achieve this.
__ 17. Obtain the following information from your instructor (keep this on hand for the rest of the exercises):
Your assigned LPAR name: _____________________ and IP address (en0 interface):_______________________
LPAR (AIX) root password (if not ibmaix): _____________________________ HMC admin login user and password: ________________________________ HMC IP address: ________________________________________________ Managed system name: __________________________________________ NIM server IP address: ___________________________________________ __ 18. Connect and log in to your assigned HMC. In the following steps, you will have a choice between using a command line interface or using the HMC browser-based graphic interface.
__ a. If using the command line interface:
Open a terminal window and connect to your HMC using ssh protocol to obtain an interactive command prompt. For example, you might use PuTTY. Log in using your assigned HMC admin login user and password.
__ b. 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.
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.
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.
__ 20. Open a virtual console to your assigned LPAR. __ a. If using the command line interface:
From the HMC command line, access your assigned lab system (LPAR) by opening a virtual console session, as follows:
# mkvterm -m <managed system> -p <lpar_name> __ b. If using the graphic interface:
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
The terminal emulation window might be hidden behind existing windows.
__ 21. Log in as the user root. The password is ibmaix. __ 22. Terminate the virtual console session.
__ a. If using the command line interface:
Type a tilde (~) and a dot (.). Respond with yes (y) when prompted. __ b. If using the graphic interface, close the virtual terminal emulation window. __ 23. Exit the HMC session.
__ a. If using the command line interface:
Type exit to log out of the command line window. __ b. If using the graphic interface:
Click Logout at the upper right area of the HMC window.
__ 24. Again, using a terminal emulation window, access your assigned AIX logical
partition directly (not through the HMC), using telnet protocol, and log in as the root user.
__ 25. Determine who you are, including: your user and group ID, your current directory, and your home directory:
UID: ______ GID: _________ Current directory: ___________ Home directory: ___________ » # 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.)
EXempty
Exercise 2. Using system management tools in
AIX
(with hints)
What this exercise is about
AIX provides several different tools to manage the environment and perform system administration tasks. This exercise provides an
opportunity to use both the System Management Interface Tool (SMIT) and the IBM Systems Director Console.
What you should be able to do
At the end of the exercise, you should be able to: • Use SMIT
• Navigate through the SMIT menus • Use SMIT function keys
• Display the SMIT history files: smit.log, smit.transaction, and smit.script
• Use the IBM Systems Director Console for AIX
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.
Exercise instructions
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.
Part 1: Using SMIT
__ 1. Log in to your assigned LPAR as the root user.
__ 2. Remove any smit files from the root directory and start SMIT in ASCII mode. » # rm /smit*
» # smitty
__ 3. Add a user to the system, named team100. When completed exit SMIT. » In SMIT, select Security & Users > Users > Add a User
* User NAME [team100] » Accept all other defaults.
» Press Enter to run. » Exit smit.
__ 4. Analyze the output in the smit.script, smit.log, and smit.transaction files.
» View each file in turn: » more /smit.log
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.
__ c. List ALL subsystems to see that syslogd is inoperative. __ d. Restart syslogd.
__ e. Continue to the next step. Do not press F3 or exit SMIT.
» Press F9 (or Esc+9) and press Enter. » # date
» Press Ctrl-d to return to SMIT.
» From the Main menu, select Processes and Subsystems > Subsystems > Stop
Subsystem > Stop a Single Subsystem.
» Press F4 (or Esc+4) to see the list of Subsystem Process IDs. » Select syslogd. (You may need to scroll down to find it.) » Press Enter to stop the subsystem.
» Press F6 (or Esc+6) to view the command.
» Press F3 (or Esc+3) repeatedly, to return to the Subsystems menu. » Select List All Subsystems (syslogd should be inoperative).
» Press F3 (or Esc+3) back to the Subsystems menu. » Select Start a Subsystem.
» Press F4 (or Esc+4) to see the list of Subsystem Names. » Select syslogd.
» Press Enter to start the subsystem.
__ 9. You should have the COMMAND STATUS screen displayed. Capture an image of this screen. Exit SMIT.
» Press F8=(Image) (or Esc+8) and press Enter. » Press F10 (or Esc+0, or Ctrl+C) to exit SMIT.
__ 10. Look at the SMIT history files using pg or more. Look for the image you captured in the previous step.
What information is in each of these files? ___________________________ _____________________________________________________________ _____________________________________________________________ _____________________________________________________________ » # more/tmp/smit.log
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.
Part 2: IBM Systems Director Console for AIX (pconsole)
__ 11. Check to see if the IBM Systems Director Console is running on your assigned LPAR.
» # lssrc -s pconsole » # netstat -a |grep 5336 » Output should be:
tcp 0 0 *.5336 *.* LISTEN __ 12. If not, start pconsole by typing startsrc -s pconsole
__ 13. Using a web browser, connect to the IBM Systems Director Console running on your assigned LPAR. If you are not sure, your instructor will advise you how to do this. » https://<LPAR IP address>:5336/ibm/console/
__ 14. Login as the root user and briefly explore the pconsole applications: __ a. OS Management
• SMIT, classic and tree view __ b. Monitoring
__ c. Health
__ 15. Using the Health function in the Navigation area, record the following information: Firmware version: __________________________
System model: _____________________________ Total allocated paging space __________________ __ 16. Log out from the IBM Systems Director Console. » Select the Logout link at the top right side of the browser.
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.
EXempty
Exercise 3. AIX software installation and
maintenance
(with hints)
What this exercise is about
In this exercise, you will install and manipulate software on the AIX system.
What you should be able to do
At the of the exercise, you should be able to:
• List the operating system level and query installed software • Install (apply, reject, and commit) LPP filesets
• Remove installed software
• View the history of installed software
• (optional) Query RPM packages installed on the system • (optional) Install an RPM package
Introduction
This exercise is designed to give you experience with applying, committing, updating, and rejecting software on AIX.
Exercise instructions
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.
Part 1: AIX LPP packaged software
__ 1. Access your assigned lab system and login as the root user.
__ a. What is the OS level of the system? _______________________________ Ensure that your answer includes the technology and service pack levels. » # oslevel -s
__ 2. Check to see if the alex.grumpy (Grumpy Application) fileset is installed on the system. __________
» # lslpp -l alex.grumpy
__ 3. Set your present working directory to /home/AN14/SW. » # cd /home/AN14/SW
__ 4. Install (Apply and commit) the alex.grumpy fileset at level 1.1.0.0. Accept the defaults for all other options. The software should be located in directory:
/home/AN14/SW/grumpy1100.
» If you are using the command line interface: » # cd ./grumpy1100
» # installp -acd . alex.grumpy » If you are using the SMIT tool:
» # smit installp Install Software
EXempty » Press Enter.
Install Software Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[TOP] [Entry Fields] * INPUT device / directory for software ./grumpy1100
* SOFTWARE to install [_all_latest] + PREVIEW only? (install operation will NOT occur) no + COMMIT software updates? yes + SAVE replaced files? no + AUTOMATICALLY install requisite software? yes + EXTEND file systems if space needed? yes + . . .
» Position your cursor on the Software to install line. » Press F4 (or Esc-4).
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. | | alex.grumpy ALL
| + 1.1.0.0 Grumpy Application » Move your cursor to the alex.grumpy package and press F7 (or Esc-7) to select it. » Press Enter.
» You should be back at the Install Software dialogue panel. » Press Enter to execute the described task.
» Scroll through the command status panel to be sure the result was successful.
__ 5. Install (Apply only) an update to the alex.grumpy fileset at level 1.1.0.1. It should be located in directory /home/AN14/SW/grumpy1101. Check the installation summary carefully to ensure the software update has been applied successfully. » If you are using the command line interface:
»# cd ../grumpy1101
»# installp -aBd . alex.grumpy Installation Summary
» If you are using the SMIT tool: »# smit installp
Install Software
* INPUT device / directory for software [./grumpy1101] + » Press Enter.
Install Software Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[TOP] [Entry Fields] * INPUT device / directory for software ./grumpy1101
* SOFTWARE to install [_all_latest] + PREVIEW only? (install operation will NOT occur) no + COMMIT software updates? no + SAVE replaced files? yes + AUTOMATICALLY install requisite software? yes + EXTEND file systems if space needed? yes +
» Position your cursor on the Software to install line. » Press F4 (or Esc-4).
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. | | alex.grumpy ALL
| + 1.1.0.1 Grumpy Application » Move your cursor to the alex.grumpy package and press F7 (or Esc-7) to select it. » Press Enter.
» You should be back at the Install Software dialogue panel.
» Position your cursor on the COMMIT software updates? line and change the value to no.
» Position your cursor on the SAVE replaced files? line and change the value to yes. » Press Enter to execute the described task.
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 Move cursor to desired item and press Enter.
Install and Update Software
List Software and Related Information Software Maintenance and Utilities Software Service Management
. . .
» Select Software Maintenance and Utilities > Reject Applied Software Updates
(Use Previous Version).
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 + . . .
» Position your cursor on SOFTWARE name.
» 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.
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.
List Installed Software
[Entry Fields]
* SOFTWARE name [all] + SHOW superseded levels? 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.
__ 7. Reinstall (Apply only) the 1.1.0.1 update to alex.grumpy. » Follow hint instructions in previous Step 5.
__ 8. This time, commit the applied update. Check that the software has been committed. » If you are using the command line interface:
»# installp -c alex.grumpy »# lslpp -l alex.grumpy » If you are using the SMIT tool:
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.
List Installed Software
[Entry Fields]
* SOFTWARE name [all] + SHOW superseded levels? 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.
__ 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:
» Select Software Maintenance and Utilities > Remove Installed Software.
* SOFTWARE name [alex.grumpy] + PREVIEW only? (remove operation will NOT occur) no + REMOVE dependent software? no + EXTEND file systems if space needed? no + 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.
__ 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
EXempty » # smit install
» Select List Software and Related Information > List Installed Software and Related
Information > List Files Included in a Fileset.
[Entry Fields] * SOFTWARE name [bos.net.tcp.server]
Part 2: (Optional) RPM packaged software
__ 13. List all of the RPM packages installed on the system. » # rpm -qa
__ 14. Install the Bourne-again (BASH) shell RPM package. It should be located in directory /home/AN14/SW/bash.
» # cd /home/AN14/SW/bash » # rpm -i bash321.rpm
__ 15. Invoke a BASH shell and test that it works successfully. » # bash
» (Type some commands; you should now be able to scroll up and down command history using up/down arrow keys).
__ 16. (Optional) Uninstall the bash shell from the system, unless you wish to use the bash shell during the class.
» Quit the bash shell session: # exit » # rpm -e bash-3.2-1
__ 17. Exit from the system. » # lsvg -l rootvg
» You should find that the problem is fixed. The type field is now corrected.
EXempty
Exercise 4. System configuration and devices
(with hints)
What this exercise is about
This exercise allows students to understand how to list, change, and configure devices on an AIX system.
What you should be able to do
At the end of the exercise, you should be able to: • List the device configuration on a system • List and change device parameters
• Change device states and configure a device to make it available for use
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.
Exercise instructions
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.
Part 1: List device configuration
__ 1. Access your assigned lab system and log in as the root user. __ 2. Invoke the prtconf command. Analyze the output.
» # prtconf | more
__ 3. Using the output from the prtconf command, answer the following questions: Processor type: __________________________________
Number of processors: ____________________________ Platform firmware level: ____________________________ The physical location code of:
ent0 __________________________________________ hdisk0 ________________________________________
__ 4. Translate the meaning of the physical location code of the Ethernet adapter. What part of the code represents:
__ a. The port on the adapter card? _____________________________________ __ b. The enclosure where the adapter card resides? _______________________ __ c. The unique device attached to the adapter? __________________________ __ d. The parent bus where the adapter card resides? ______________________ __ e. Is the device (and its parent adapter and bus) real or virtual? _____________ » See device code explanation in the course unit.
EXempty » An example location code (yours will likely differ) is: » U8203.E4A.06FDDF1-V2-C2-T1
» In the example: » The port is T1
» The enclosure is U8203.E4A.06FDDF1
» There is no unique device attached to the port.
» The parent bus is: V2 (the virtual bus on LPARID 2) which is what tells us this Ethernet adapter is a virtual adapter.
__ 5. List all the configured devices on the system.
____________________________________________________________ »# lsdev -C -H | more
__ 6. Using the lsdev command, list all of the adapters on the system. »# lsdev -Cc adapter
__ 7. What is the parent device of the Ethernet adapter ent0? _______________ What command did you use? ____________________________________ »# lsdev -Cl ent0 -F parent
OR
»# lsparent -Cl ent0
» These two commands may give equivalent answers, but not always. The lsdev command lists the actual parent. The lsparent command lists the possible parents. __ 8. List the disks on your system. Record how many you have: _______________ » # lsdev -Cc disk
__ 9. Using the lscfg command, record the network address of the Ethernet adapter ent0: _________________
Part 2: List and change device attributes
__ 10. Using the lsattr command, discover the total amount of physical memory assigned to your partition.
» # lsattr -El mem0
__ 11. List the attributes of the Ethernet interface en0: ____________________ Are there any attributes that cannot be changed? ____________________ No
» # lsattr -El en0
Change the value of en0’s remmtu to 1500. Record your command here: _______________________________________
» # chdev -l en0 -a remmtu=1500
__ 12. Re-check the value of remmtu to make sure it has been changed. » # lsattr -El en0
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.
EXempty
Exercise 5. TCP/IP implementation
(with hints)
What this exercise is about
This exercise provides an opportunity to implement and configure TCP/IP on AIX.
What you should be able to do
At the end of the exercise, you should be able to: • Configure TCP/IP
• Configure NFS (optional)
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.
Exercise instructions
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 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.
Part 1: TCP/IP configuration
__ 1. Access your assigned lab system and log in as the root user.
__ 2. Collect the current network configuration information on your system.
IP address (for en0): _____________________________________________ Network mask (for en0): __________________________________________ Hostname _____________________________________________________ Default gateway: ________________________________________________ » To collect the information run the following commands:
» # ifconfig en0 (the mask is in hex, you will need to convert to dotted decimal) OR
» # lsattr -El en0 (the mask is already in dotted decimal)
» # 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 LPAR’s 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 student’s 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
» If using the graphic interface:
- In the navigation area (on the left), expand the Systems Management item and then expand the Servers item. Click the name of your assigned system. In the Content area, you will see the defined LPARs listed.
- 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 student’s 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
EXempty » Following are suggested commands: # netstat -rn | grep default # hostname
# ifconfig en0
__ 9. Use SMIT to do a minimum configuration on your en0 interface. (tcpip is an easy to remember fastpath which covers the SMIT menus for network configuration.) Enter the TCP/IP configuration information which you recorded earlier in Step 1 and execute the dialogue panel.
» smitty tcpip
» Select Minimum Configuration & Startup.
» Select en0 from the Available Network Interface pop-up menu.
*HOSTNAME [your hostname] *Internet Address [your IP address] *Network MASK (dotted decimal) [your netmask] . . .
Default Gateway
Address (dotted decimal or symbolic name) [your gateway IP] » Press Enter to reconfigure TCP/IP.
» Press F10 to exit SMIT.
__ 10. Verify that you now have a network configuration, both in the kernel and in the ODM. » Following are suggested commands:
# netstat -rn | grep default # hostname
# ifconfig en0 # lsattr -El inet0 # lsattr -El en0
__ 11. Connect from your student workstation to your assigned LPAR using either the telnet or ssh protocols, and log in as the root user.
Part 2: (Optional) NFS
__ 12. For this optional part, you will need to be working together in teams of two. Decide which system will be the NFS server and which system will be the NFS client: NFS Server: _______________________
NFS Client: _______________________ __ 13. On the NFS server:
__ a. Create two directories: • /server/rw
• /server/root_rw
» Following are suggested commands: # mkdir -p /server/rw
# mkdir -p /server/root_rw
__ b. Change group ownership of /server/rw to staff and change permissions to 775. » Following are suggested commands:
# chgrp staff /server/rw # chmod 775 /server/rw
__ c. Change group ownership of /server/root_rw to staff and change permissions to 775.
» Following are suggested commands: # chgrp staff /server/root_rw # chmod 775 /server/root_rw
__ d. Export the following directories (you can either edit the configuration file, use a high-level command, or use SMIT):
• /usr/man Permissions: read-only • /server/rw Permissions: read-write
• /server/root_rw Permissions: read-write including the NFS client root user. » If editing the configuration file:
# vi /etc/exports /usr/man -ro /server/rw
/server/root_rw -root=<client name> # exportfs -va
EXempty » If using a high-level command:
# mknfsexp -d /usr/man -t ro # mknfsexp -d /server/rw
# mknfsexp -d /server/root_rw -r <client hostname or IP addr>
» If using SMIT: # smit nfs
Select Network File System (NFS) > Add a Directory to Exports List. (In panel below, only selected fields are shown)
Pathname of directory to export [/server/root_rw] / * Export directory now, system restart or both both + * Security method 1 [sys] + * Mode to export directory read-write + Hostname list. If exported read-mostly []
Hosts & netgroups allowed client access []
Hosts allowed root access [LPAR99]
» Repeat for other directories.
__ e. Verify that the directories are exported. » # exportfs
__ f. Start the NFS subsystems, to start now, and at system restart. » If using the command line interface:
# mknfs -B » If using SMIT:
# smit nfs
» Select Network File System (NFS) > Configure NFS on This System > Start NFS. * START NFS now, on system restart or both both
__ g. List the NFS subsystems and check that the nfsd, biod, rpc.mountd, rpc.statd, and rpc.lockd are running.
» # lssrc -g nfs
__ 14. On the NFS client, check to see which directories the NFS server is exporting. » # showmount -e <nfs_server>
__ 15. Create three mount point directories: /clp1_man, /clp2_rw, and /clp3_root_rw. » # mkdir /clp1_man /clp2_rw /clp3_root_rw
__ 16. Mount the NFS server directories: • /usr/man > /clp1_man
• /server/rw > /clp2_rw
• /server/root_rw > /clp3_root_rw » Following are suggested commands:
# mount <nfs_server>:/usr/man /clp1_man # mount <nfs_server>:/server/rw /clp2_rw
# mount <nfs_server>:/server/root_rw /clp3_root_rw __ 17. List the NFS mounts, using the df command.
» # df
__ 18. As root, attempt to create a file in each of the local NFS client directories. Which write was successful?
________________________________________________________________ » Following are suggested commands:
# cd /clp1_man; touch file # cd /clp2_rw; touch file # cd /clp3_root_rw; touch file
» The write to the /clp3_root_rw directory should be successful. This is because the directory was exported with this root on this client being authorized to act as root on the server.
» The write to /clp1_man fails because it is exported read-only.
» The write to /clp2_rw fails because root is mapped to user nobody and, by default, the nobody user gains the rest of the world permission's (which in this case, do not include write).
__ 19. Switch to user, user01, and attempt to create a file in the /clp2_rw directory. Was the write successful?_________________________________________________ » Following are suggested commands:
# su - user01
$ cd /clp2_rw; touch file
» Yes, the write to /clp2_rw should be successful. This is because the client user (user01) has a matching user definition (matched on User ID) that is a member of the staff group. And the exported directory provides write authority to members of the group staff.
__ 20. Exit back to root. » # exit
EXempty » The suggested commands are: # cd / # umount /cpl1_man # umount /cpl2_rw # umount /cpl3_root_rw
End of exercise
EXempty
Exercise 6. System startup and shutdown
(with hints)
What this exercise is about
This exercise familiarizes you with the system startup and shutdown process, and using the System Resource Controller (SRC).
What you should be able to do
At the end of the exercise, you should be able to: • List subsystems and subsystem processes • Create startup and shutdown control scripts
• Use the alog command to view the boot messages
• Shutdown an AIX partition into single user mode and switch back to multi-user mode
• Use the HMC to shutdown and activate a partition
Introduction
All instructions involve using the system unit for starting and stopping the system in various modes.
Exercise instructions
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.
Part 1: Multiuser mode
__ 1. Log in to your assigned LPAR as the root user.
__ 2. View the /etc/inittab file. Take a moment to become familiar with its contents. What is the run level of init? _______ 2
What does it mean? ___________________________________ This sets the default run level. Run level 2 represents AIX multi-user mode.
» # more /etc/inittab
__ 3. Using the PID of the SRC master process, produce a process tree listing of all the subsystems and subservers running on the system.
» Following are suggested commands: # ps -ef |grep srcmstr
# ps -T <pid of the srcmstr process> __ 4. List all subsystems running on the system. »# lssrc -a | more
__ 5. List all subsystems that are part of the TCP/IP group. »# lssrc -g tcpip
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
Preparation for single user mode
Shutting a system down to single user mode removes the TCP/IP network configuration. Because of this, you need to log in to the system using a virtual console session, while performing the rest of the lab steps. To start a virtual console session, you must first log in directly to the HMC and then open a console session to your assigned LPAR (as completed in Exercise 1).
In the following steps, you can choose between using the HMC command line interface or the HMC browser based graphical interface. Hints are provided for both options.
__ 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.
» 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.
__ 9. Open a virtual terminal for your assigned LPAR. » If using the command line interface:
- From the HMC, use the vtmenu command to open a virtual terminal for your assigned LPAR.
- When 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 student’s 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
» If using the graphic interface:
- In the Navigation area (on the left), expand the Systems Management item and then expand the Servers item. Click the name of your assigned system. In the Content area, you will see the defined LPARs listed.
- 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.
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 student’s 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
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.