cover front cover · course exercises guide aix internals & performance iii: i/o management -...

56
V11.0 cover IBM Systems Software Education Front cover Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0

Upload: others

Post on 11-Mar-2020

14 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

V11.0

cover

IBM Systems Software Education

Front cover

Course Exercises Guide

AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O)Course code AHQV473   ERC 1.0

Page 2: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

Trademarks

IBM® and the IBM logo are registered trademarks of International Business Machines Corporation.

The following are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide:

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.

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 6™ AIX® DB2®DS8000® Express® FlashSystem™GPFS™ IBM FlashSystem® Power Systems™Power® PowerHA® PowerSC™PowerVM® POWER6® POWER7+™POWER7® POWER8® PurePower System™SystemMirror® Systems Director VMControl™

November 2012 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 2012.This document may not be reproduced in whole or in part without the prior written permission of IBM.Note to U.S. Government Users — Documentation related to restricted rights — Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp.

Page 3: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

TOC

Contents

Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v

Exercises description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii

Exercise 1. I/O Internals Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1

Exercise 2. Logical and Virtual File System Layers . . . . . . . . . . . . . . . . . . . . . . . . . 2-1

Exercise 3. File System Implementation Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1

Exercise 4. File System Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1

Exercise 5. Kernel LVM Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Contents iii

Page 4: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

iv AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 5: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

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® and the IBM logo are registered trademarks of International Business Machines Corporation.

The following are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide:

UNIX is a registered trademark of The Open Group in the United States and other countries.

Other product and service names might be trademarks of IBM or other companies.

AIX 5L™ AIX 6™ AIX®GPFS™ POWER Hypervisor™ Power Systems™Power® POWER6® POWER7®Redbooks®

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Trademarks v

Page 6: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

vi AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 7: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

pref

Exercises description

In the exercise instructions you will see each step prefixed by a line. You may wish to check off each step as you complete it to keep track of your progress.

Most exercises include required sections which should always be completed. These may be required before performing later exercises. Some exercises may also include optional sections that you may wish to perform if you have sufficient time and want an additional challenge.

This course includes two versions of the course exercises, “with hints” and “without hints”.

The standard “Exercise instructions” section provides high-level instructions for the tasks you should perform. You need to apply the knowledge you gained in the unit presentation to perform the exercise.

The “Exercise instructions with hints” provide more detailed instructions and hints to help you perform the exercise steps.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercises description vii

Page 8: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

Text highlighting

The following text highlighting conventions are used throughout this book:

Bold Identifies file names, file paths, directories, user names, principals, menu paths and menu selections. Also identifies graphical objects such as buttons, labels and icons that the user selects.

Italics Identifies links to web sites, publication titles, is used where the word or phrase is meant to stand out from the surrounding text, and identifies parameters whose actual names or values are to be supplied by the user.

Monospace Identifies attributes, variables, file listings, SMIT menus, code examples and command output that you would see displayed on a terminal, and messages from the system.

Monospace bold Identifies commands, subroutines, daemons, and text the user would type.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

viii AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 9: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

EXempty

Exercise 1. I/O Internals Framework

What this exercise is about

This exercise covers accessing the remote lab environment used in this course and it provides you with experience displaying various items of AIX configuration information.

What you should be able to do

At the end of the exercise, you should be able to:

• Verify that your remote lab environment is accessible

• Display information about the kernel on your system

• Display and examine information regarding hypervisor calls

• Obtain information regarding the disk storage resources of your partition

Requirements

In the normal lab environment for this class, each lab team will be assigned a logical partition (LPAR) on a managed system. The assigned logical partition should be running AIX 7.1 and should normally be on a POWER6 or POWER7 processor-based system.

You will not be sitting directly in front of your lab system. Instead, you will be using your personal PC to connect to your lab system.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercise 1. I/O Internals Framework 1-1

Page 10: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

Exercise instructions

Preface

This exercise includes information for you to read, and exercise steps for you to perform. The following examples illustrate the numbered checklist format used to identify exercise steps:

__ 1. (This is example step one.) Login to ...

__ 2. (This is example step two.) Execute the following ...

Two versions of these instructions are available: one with hints and one without. You can use either version to complete this exercise (or flip back and forth between the two versions). In other words, use these two versions of the exercise in whatever way best aids your learning. Also, please do not hesitate to ask the instructor if you have questions.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

1-2 AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 11: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

EXempty

Section 1 - Displaying kernel-related information

__ 1. Log on to your assigned AIX system as root.

__ 2. Use the ls command to verify that /unix is a symbolic link that points to the kernel image file /usr/lib/boot/unix_64 on your lab system.

__ 3. AIX 7 provides and supports only a 64-bit kernel. Use the -k flag of the prtconf command to verify that a 64-bit kernel is currently in use on your lab system.

__ 4. AIX 7 runs only on 64-bit hardware. Use the -c flag of the prtconf command to confirm that the CPU hardware type of your lab system is 64-bit.

__ 5. The following command can be used to display information about files used in building the /unix kernel nucleus:

# what /unix

JFS2 source files are located under the bos/kernel/j2 subdirectory. Thus, evidence that JFS2 is integrated into the /unix kernel nucleus (rather than being implemented as a separately loaded kernel extension) can be observed by running the following command:

# what /unix | grep bos/kernel/j2

Does the output of this command indicate that JFS2 source files are used in building the /unix kernel nucleus?

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercise 1. I/O Internals Framework 1-3

Page 12: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

Section 2 - Obtaining kernel extension-related information

__ 6. The genkex program can be used to display a list of kernel extensions currently loaded into the kernel on your system and the address, size, and path name for each extension listed.

Enter the genkex command with no parameters.

__ 7. Examine the output of the genkex command. Does the path name /usr/lib/drivers/nfs.ext appear in this output?

__ 8. Change your working directory to /usr/lib/drivers.

__ 9. Use the file command to determine the file type of /usr/lib/drivers/nfs.ext.

Did the output you obtained indicate that /usr/lib/drivers/nfs.ext is a 64-bit kernel extension?

__ 10. When invoked with no parameters, the kdb command can be used to examine the running kernel. Invoke kdb on the running kernel.

Note: When kdb starts, it provides an initial display that includes address information for some key symbols and then provides a prompt. The initial kdb prompt on your lab system should be (0)>. Various kdb subcommands can be entered at the kdb prompt.

__ 11. Review the following additional information about the use of kdb:

• kdb includes a built-in screen pager. Any output that exceeds one screen is displayed one screen at a time.

• Press <Enter> to view the next screen, or <Ctrl-C> to return to the kdb prompt.

• The q subcommand quits (exits) kdb. The e subcommand is an alias for q.

__ 12. In a previous lab step, you used the genkex command to list the currently loaded kernel extensions. The kdb subcommand lke can also be used to list the loaded kernel extensions. When invoked with no arguments, the lke subcommand shows a one line summary of each loader_entry structure in the kernel load list. Enter the lke subcommand (with no arguments) at the kdb prompt and examine the output of this subcommand. Remember that kdb has a built-in pager; press the <Enter> key to obtain a new page of output.

The output of the lke subcommand is covered in much greater detail elsewhere. Our goal here is simply to show that this subcommand can be used to list the currently loaded kernel extensions.

Note: It is perfectly normal to see multiple entries for the object named /unix in the output of the lke subcommand. Certain kernel extensions add system calls to the kernel. When this happens, a new copy of the system call table is created. Since the system call table is in the global /unix namespace, this causes a new loader entry with the name /unix to be created. However, the existence of multiple /unix entries

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

1-4 AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 13: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

EXempty

in the output of the lke subcommand does not mean that the entire kernel is loaded multiple times.

__ 13. Check the list of kernel extensions in the output of the lke subcommand. Does /usr/lib/drivers/nfs.ext appear in this list?

__ 14. Use the q subcommand of kdb to quit (exit) from kdb.

Note: You can also enter e at the kdb prompt to terminate a kdb session and return to the shell prompt. Recall that many kdb subcommands have aliases and that e is an alias for q.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercise 1. I/O Internals Framework 1-5

Page 14: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

Section 3 - Obtaining hypervisor-related information

__ 15. The lparstat command reports LPAR-related information and statistics. When the lparstat command is invoked with the -h flag (and no other flags or other parameters), the resulting output will show the percentage of processing time spent in hypervisor mode (in the %hypv column) and the number of hypervisor calls (in the hcalls column) since the last time the partition was booted (as well as partition configuration information and other utilization statistics). Enter the lparstat command with the -h flag (and no other parameters) to obtain this summary of hypervisor call activity for your system.

__ 16. Use the output you just obtained to answer the following questions:

• How many hypervisor calls have been made since your partition was booted?

• What percentage of processing time has been spent in hypervisor mode since your system was booted?

__ 17. When the lparstat command is invoked with the -H flag (and no other flags or other parameters), the resulting output will show detailed information regarding hypervisor calls since the last time the partition was booted. The following information will be displayed for each of the hypervisor calls:

• Number of calls: The number of hypervisor calls of this type made

• %Total Time Spent: Percentage of total time spent in this type of call

• %Hypervisor Time Spent: Percentage of hypervisor time spent in this type of call

• Average Call Time: Average call time for this type of call in nanoseconds

• Maximum Call Time: Maximum call time for this type of call in nanoseconds

Enter the lparstat command with the -H flag (and no other parameters) to obtain detailed hypervisor call information for your system.

__ 18. Use the output you just obtained to answer the following questions:

• How many enter hypervisor calls (used to add entries into the partition page frame table maintained by the hypervisor) have been made in your partition since your partition was booted?

• What has been the average call time in nanoseconds for enter hypervisor calls since your system was booted?

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

1-6 AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 15: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

EXempty

Section 4 - Obtaining information regarding disk resources

__ 19. The lsdev command displays information about devices in the system and their characteristics.You can list the disk resources for your partition using the command lsdev -Cc disk.

Use the lsdev command to list the disk resources for your partition.

How many disks are listed in the output of lsdev -Cc disk on your system?

__ 20. A disk resource provided via a virtual I/O server (VIOS) will be described in the output of lsdev -Cc disk as a "Virtual SCSI Disk Drive." Is any disk resource for your partition described as a "Virtual SCSI Disk Drive"?

__ 21. Let your instructor know that you have completed the exercise.

End of exercise

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercise 1. I/O Internals Framework 1-7

Page 16: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

1-8 AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 17: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

EXempty

Exercise 2. Logical and Virtual File System Layers

What this exercise is about

This exercise provides you with an opportunity to examine and interpret LFS and VFS data structures.

What you should be able to do

At the end of the exercise, you should be able to:

• Apply what you have learned about the LFS and VFS layers

• Locate the LFS/VFS structures for an open file

• Identify what file a process has opened

Requirements

In the normal lab environment for this class, each lab team will be assigned a logical partition (LPAR) on a managed system. The assigned logical partition should be running AIX 7.1 and should normally be on a POWER6 or POWER7 processor-based system.

You will not be sitting directly in front of your lab system. Instead, you will be using your personal PC to connect to your lab system.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercise 2. Logical and Virtual File System Layers 2-1

Page 18: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

Exercise instructions

Preface

This exercise includes information for you to read, and exercise steps for you to perform. The following examples illustrate the numbered checklist format used to identify exercise steps:

__ 1. (This is example step one.) Login to ...

__ 2. (This is example step two.) Execute the following ...

Two versions of these instructions are available: one with hints and one without. You can use either version to complete this exercise (or flip back and forth between the two versions). In other words, use these two versions of the exercise in whatever way best aids your learning. Also, please don’t hesitate to ask the instructor if you have questions.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

2-2 AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 19: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

EXempty

Section 1 - A Few Review Questions

Use the following list of terms to best complete the six statements below:

vnode file systemsystem file table ufdvnodeops vmount

__ 1. The v_gnode element of the __________ structure points to a gnode structure.

__ 2. A vfs structure represents a _____________.

__ 3. The gfs structure contains pointers to the vfsops and the _____________ structures.

__ 4. The ___________ structure contains specifics about a mount request.

__ 5. The ____________ has one entry for each open of a file.

__ 6. The fp element of the __________ structure points to an entry in the system file table.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercise 2. Logical and Virtual File System Layers 2-3

Page 20: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

Section 2 - Examining LFS and VFS structures

Introduction

In this section of the exercise, you will run a small C program. This program opens a file called foo in the current directory, initializes the file by writing a few bytes to it, and then pauses. The pause allows you to use the kdb command to examine the various structures that are created when the file is opened.

The objective of this section of the exercise is to follow the LFS/VFS structures and locate the inode number for the file (foo) opened by the lab program. You will also locate the major and minor numbers of the logical volume for the file system containing this file.

Important note about subcommands used to display inode information

The in-core inode for a file from a JFS2 file system is not the same as the in-core inode for a file from a JFS file system. Be sure to use the correct kdb subcommand (inode2 versus inode), depending on the file system type of the file in which you are interested.

The file system type is shown in the TYPE field in the output of the vfs subcommand of kdb. Another way to determine the file system type is by looking at the vmt_gfstype item in vmount. The value of this item will be 0 (MNT_J2) for JFS2 or 3 (MNT_JFS) for JFS. (These constants are defined in /usr/include/sys/vmount.h, along with the vmount structure.) You can also determine the file system type of a file system in which you are interested by using the command lsvg -l <volume group name>.

Additional information will be given in the steps that follow. The following example shows the steps used to examine the structures of interest for a file from a JFS2 file system, but the steps required for a file from a JFS file system are quite similar. (The main differences have already been noted.)

Initial steps

__ 7. Change your working directory to /home/QV473/lfs_vfs.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

2-4 AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 21: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

EXempty

The C code for the program used in this section of the exercise is located in /home/QV473/lfs_vfs in a file called opener.c. A copy of this C code is given below for your reference:

#include <fcntl.h>#include <errno.h>

main(){ int fd; if ((fd=open("foo",O_RDWR|O_CREAT,0700)) == -1){ perror("open"); exit(1); } write(fd,"abcd",4); close(fd); fd=open("foo", O_RDONLY); printf("fd=%d\n", fd); pause();}

As previously mentioned, this program opens a file called foo in the current directory. The close() followed by a second call to open() is required to ensure that the write is committed to disk and the inode is updated.

__ 8. Compile opener.c using the following command:

# make opener

__ 9. Execute opener (the program that you created in the previous step) in the background. The program will print the file descriptor number of the file it creates and will then pause. Make note of both the process ID and the file descriptor number.

Finding the address of the file structure

Our initial objective is to find the address of the file structure for the open file in the user’s file descriptor table. Use the next few steps to accomplish this initial objective.

__ 10. Start kdb on the live kernel.

__ 11. Determine the thread table slot number of the initial (and only) thread of the lab program (opener) using the following command:

(0)> th * | grep opener

__ 12. Display file information from the u-area of this thread using the user subcommand and the thread table slot number you obtained in the previous lab step, as shown below:

(0)> user -f <thread table slot number>

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercise 2. Logical and Virtual File System Layers 2-5

Page 22: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

__ 13. Page down through the output until you find a file descriptor table similar to the one shown below. Locate the pointer to the file structure for the file descriptor number (typically 3) displayed by the lab program:

File descriptor table at..F00000002FF4A008:

ufd block (U_fdblks[ 0]) @..F00000002FF4A0C8 ufd_maxfd of this block..00000004 fd 0 fp..F1000F1E50116A00 count..00000000 flags. ALLOCATED FP fd 1 fp..F1000F1E50116A00 count..00000000 flags. ALLOCATED FP fd 2 fp..F1000F1E50116A00 count..00000000 flags. ALLOCATED FP fd 3 fp..F1000F1E50116F00 count..00000000 flags. ALLOCATED FP

Following the pointers

The next step is to follow the pointers, beginning with the pointer to the file structure, to determine the inode contents. We will do this with the specialized kdb subcommands file, vnode, vfs, gnode, and inode or inode2. The appropriate procedure is indicated by the lab steps that follow.

__ 14. First, we display the file structure. This is performed using the file subcommand with the pointer to the file structure obtained from the file descriptor entry shown in the output of the user -f command. An example of using the file command is shown below.

(0)> file F1000F1E50116F00ADDR COUNT OFFSET DATA TYPE FLAGS

F1000F1E50116F00 1 0000000000000000 F1000A0601832020 VNODE READ

node............. 0 slot............. 3951f_flag. 0000000000000001 f_count........ 00000001f_options.......... 0000 f_type............. 0001f_data......... F1000A0601832020 f_offset....... 0000000000000000f_dir_off...... 0000000000000000 f_cred......... F1000A040071D07Cf_lock@........ F1000F1E50116F30 f_lock......... 0000000000000000f_offset_lock@. F1000F1E50116F38 f_offset_lock.. 0000000000000000f_vinfo........ 0000000000000000 f_ops.......... 02D791F8 vnodefops+000000f_pathp........ F1000F1E50116F58 f_fid_len...... 0018f_name......... fooVNODE.......... F1000A0601832020v_flag.... 00000000 v_count... 00000001v_vfsgen.. 00000000 v_vfsp.... F1000A0400291210 v_lock@... F1000A0601832030 v_lock.... 0000000000000000v_mvfsp... 0000000000000000 v_gnode... F1000A0601831CB0 v_next.... 0000000000000000 v_vfsnext. F1000A0601822020v_vfsprev. F1000A0601842020 v_pfsvnode 0000000000000000v_audit... 0000000000000000

Note the following points regarding the output of the file subcommand:

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

2-6 AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 23: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

EXempty

• The label f_data is used to display the value of the f_uvnode element of the file structure. In this example, this element points to the vnode structure for the file foo.

• The file subcommand then goes on to display (below the label VNODE) the contents of the object that the f_data element points to (the vnode structure for the file foo in this case).

• The file subcommand has already provided us with the contents of the vnode structure, including the v_gnode value (F1000A0601831CB0 in this example) and the v_vfsp value (F1000A0400291210 in this example). So, we really do not have to use the vnode command.

• On AIX 7.1, the f_name field of the file structure will in most cases contain the name of the file system object the structure refers to. In the example above, the field shows the name of the file (foo) that was opened by the lab program (opener).

__ 15. We should now determine (or confirm) the file system type before proceeding. To do this, we need to use the vfs structure pointer (v_vfsp) that we just obtained from the vnode structure to display file system information. In this example, we use the following command:

(0)> vfs F1000A0400291210 GFS DATA TYPE FLAGS

0 F1000A0400291210 02D80378 F1000A0600F03880 JFS2 DEVMOUNT... /dev/hd1 mounted over /home...

In this case, the first few lines of the vfs subcommand output indicate that we are dealing with a JFS2 file system, that the file foo is in the /home file system, and that the logical volume that contains the /home file system is /dev/hd1.

Note: In the normal lab environment for this class, foo will be located in the /home file system, and /home will be a JFS2 file system.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercise 2. Logical and Virtual File System Layers 2-7

Page 24: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

__ 16. Next, we get the inode pointer (gn_data) by printing out the gnode structure. We use the gnode subcommand with the value of v_gnode we just obtained, as shown below:

(0)> gnode F1000A0601831CB0GNODE............ F1000A0601831CB0 F1000A0601831CB0gn_type....... 00000001 gn_flags...... FFFF8010gn_seg........ 00000000008104A8gn_mwrcnt..... 00000000 gn_mrdcnt..... 00000000 gn_rdcnt...... 00000001gn_wrcnt...... 00000000 gn_excnt...... 00000000 gn_rshcnt..... 00000000gn_ops........ 00000000022B3098 j2_vnopsgn_vnode...... F1000A0601832020 gn_rdev....... 8000000A00000008gn_chan....... 00000000 gn_reclk_event 00000000FFFFFFFFgn_reclk_lock@ F1000A0601831CF8 gn_reclk_lock. 0000000000000000gn_filocks.... 0000000000000000 gn_data....... F1000A0601831C80 gn_type....... REG gn_flags...... UIOMOVE XPAGER

__ 17. Now we can examine the inode to determine our inode number and device numbers. In this example, we use the subcommand inode2 since the file is located on a JFS2 file system. (We would use the inode command if we were dealing with a JFS file system.)

(0)> inode2 F1000A0601831C80 ADDRESS DEVICE I_NUM/FS COUNT TYPE FLAGF1000A0601831C80 8000000A00000008 12327/16 00001 VREG...

Note: In the normal lab environment for this class, the file system will be a JFS2 file system.

__ 18. The information we are looking for will be shown on the first line of data in the inode2 subcommand output:

• The DEVICE column contains the device number. In this example, the entry in this column indicates that the major and minor device numbers for the device containing this inode are 0xA (decimal 10) and 0x8 (decimal 8), respectively. (Note: The 8 in the leftmost digit of the entry in this column can be ignored when determining the major and minor device number components of a device number.)

• The I_NUM column indicates the inode number, which is 12327 in this example.

• The FS column indicates the JFS2 fileset number that the inode belongs to, which is 16 in this example.

• The COUNT column indicates the number of system file table entries which refer to this inode, which is 1 in this example.

• The TYPE column indicates the type of file system object that the inode refers to, which is VREG in this example, indicating the inode refers to a regular file.

Note that the address and inode values mentioned above are examples. The values you obtain will likely be different. Use the output of the inode2 subcommand to

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

2-8 AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 25: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

EXempty

determine the inode number for foo (the file opened by the lab program) on your system, the major number for the device containing foo, and the minor number for the device containing foo. Record these values in the spaces below:

Inode number: __________

Major number: __________

Minor number: __________

__ 19. Exit kdb.

__ 20. Ordinarily the name of the directory containing a file that has been opened by a process can not easily be determined. In this case, we know (from examining the C code shown at the beginning of this section of this exercise) that the file opened by the lab program is a file named foo located in the current directory. This information is also displayed in the f_name field of the file structure.

So, the correctness of the inode number displayed by the inode2 subcommand can be verified using the ls command, as illustrated below:

# ls -li foo12327 -rwx------ 1 root system 4 Jul 05 09:29 foo

Notice that, in this case, the inode number shown for foo in the output from thels -li command is 12327. This inode number matches the inode number displayed in the output from the inode2 subcommand shown above.

__ 21. We also know (from the vfs subcommand output we obtained earlier in this section of this exercise) which logical volume contains the file system (normally /home) in which foo is located. In this example, the logical volume is /dev/hd1. So, the correctness of the major number and minor number displayed by the inode2 subcommand can also be verified using the ls command, as illustrated below:

# ls -l /dev/hd1brw-rw---- 1 root system 10, 8 Jun 15 15:49 /dev/hd1

Notice that, in this case, the major and minor device numbers for /dev/hd1 (the logical volume that contains the /home file system) are 10 and 8, respectively. These major and minor device numbers match the major and minor device numbers displayed in the output from the inode2 subcommand shown above.

__ 22. The name of the directory containing the file that has been opened by the application would not ordinarily be known, but the name of the file system and the inode number of the file are known. In this case, you can search the file system looking for the object with the identified inode number. This can be performed using the find or ncheck commands. For example:

# find /home -inum 12327 -xdev/home/QV473/lfs_vfs/foo

__ 23. When the process in question is still running on the system, then the procfiles command can be used to display information about the usage of the file descriptors

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercise 2. Logical and Virtual File System Layers 2-9

Page 26: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

of the process. Invoke the procfiles command with the -n flag and specify the process ID of the opener process. For example:

# procfiles -n 60293906029390 : ./opener Current rlimit: 2000 file descriptors 0: S_IFCHR mode:00 dev:10,4 ino:69 uid:0 gid:0 rdev:20,1 O_RDWR name://dev/pts/1 1: S_IFCHR mode:00 dev:10,4 ino:69 uid:0 gid:0 rdev:20,1 O_RDWR name://dev/pts/1 2: S_IFCHR mode:00 dev:10,4 ino:69 uid:0 gid:0 rdev:20,1 O_RDWR name://dev/pts/1 3: S_IFREG mode:0500 dev:10,8 ino:12310 uid:0 gid:0 rdev:0,0 O_RDONLY size:0 name:/home/QV473/lfs_vfs/foo

In the example output above, file descriptor 3 is used to access the file /home/QV473/lfs_vfs/foo. File descriptors 0 (standard input), 1 (standard output), and 2 (standard error) are all attached to the pseudo-terminal device /dev/pts/1.

__ 24. Terminate the program (opener) that you started in the background near the start of this section of the exercise.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

2-10 AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 27: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

EXempty

Section 3 - Identifying what files a program has open

Overview

In this section of the exercise, you will use the kdb and ncheck commands to identify what file or files a program has opened.

A program called findme will be used in this section of the lab. This program simply opens a file and pauses. Your job will be to identify what file the findme program opened. (Don’t peek at the source code for findme unless you really need additional clues to complete this section of the exercise!)

__ 25. If your current working directory is not /home/QV473/lfs_vfs, change your working directory to /home/QV473/lfs_vfs now.

__ 26. Build the findme program using the following command:

# make findme

__ 27. Start findme in the background using the command:

# ./findme &

__ 28. Use kdb to determine the inode and file system for the file that findme opened. Use the techniques introduced in Section 2, but be careful about your assumptions.

__ 29. Now identify the name of this file. (Note: The file name used as an argument in the call to the open() routine in findme might be a symbolic link.)

To find the name of a file given the file system name and inode, use the ncheck command. For example, if you are trying to determine the name of the file with inode number 16758 in the / file system, use the following command:

# ncheck -i 16758 /

The ncheck command can also be used to check all (with certain exceptions) file systems for files with a given inode number. (Recall that inode numbers are unique only within a particular file system.) For example, the following command will list all files with inode number 63 in their respective file systems:

# ncheck -i 63

__ 30. Terminate the findme program.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercise 2. Logical and Virtual File System Layers 2-11

Page 28: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

Section 4 - Inodes for mounted file systems

Introduction

In this section of the exercise, you will use kdb to answer the following question: Is the inode number displayed by the ls command that of the usr directory in the root file system, or is it the inode number of the “root” of the usr file system?

__ 31. List the inode number of /usr using the following command:

# ls -liad /usr

Record the inode number for /usr reported by the ls -liad /usr command in the space provided here: _____

__ 32. Start kdb on the live kernel.

__ 33. List summary information regarding the vfs structures for all the mounted file systems on your system by using the kdb subcommand vfs with no parameters.

Note the index for the vfs structure for /usr (the number at the start of the entry for /usr). Also note the file system type (JFS or JFS2) for /usr.

__ 34. Use the index obtained in the previous lab step to display the contents of the vfs structure for the /usr file system.

__ 35. Recall that the vfs structure for the /usr file system has pointers to both the vnode structure for the usr directory (in the root file system) and the vnode structure of the “root” of the usr file system. These pointers are vfs_mntdover and vfs_mntd, respectively. Record the values of vfs_mntdover and vfs_mntd for /usr obtained using the command in the previous step in the spaces provided below:

Value of vfs_mntdover ____________________

Value of vfs_mntd ____________________

__ 36. Now follow the appropriate pointers (starting with vfs_mntdover and vfs_mntd) to determine which of the two inodes (the inode for the usr directory in the root file system or the inode of the “root” of the usr file system) has the same inode number as that displayed by the ls command entered earlier in this section of the exercise.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

2-12 AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 29: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

EXempty

Section 5 - Checking the size of the system file table

Introduction

There is no simple kdb subcommand that can be used to determine the size of the system file table. However, it is possible to use kdb to determine the size of the system file table by using the procedure described below.

As mentioned in the student notes for the lecture portion of this unit, AIX 7.1 currently uses three 256 MB memory segments to contain file structure information on each SRAD in the system. The number of SRADs available in an instance of AIX will be dependent on the hardware configuration of the system and the configuration of the LPAR.

In the lab steps that follow, you’ll first determine the number of entries in the table for one SRAD. You’ll then multiply the number of entries in the table for one SRAD by the number of SRADs (or by the number of pointers in an array called the file_table_ptrs array) to determine the total number of entries in the system file table. (The number of SRADs and the number of pointers in the file_table_ptrs array is typically 1, at least on the systems used to complete the exercises for this class.)

__ 37. Start kdb on the live kernel.

__ 38. Enter the kdb subcommand dd file_table_ptrs 2 to display the first two 64-bit values in the file_table_ptrs array.

The required subcommand and sample output are shown below:

(0)> dd file_table_ptrs 2file_table_ptrs+000000: F1000F1E50020000 000000000000000 ....P...........

The value of the first double word (64 bits/8 bytes) of the output is a pointer to the file table for the first SRAD on the system. The value of the second double word is 0000000000000000. So, it appears that, in this case, the file_table_ptrs array contains only one pointer and that the system contains only one SRAD. (On the systems typically provided for use in completing the exercises for this class, the expected number of pointers in the file_table_ptrs array is 1, and the expected number of SRADs on the system is 1.) In the sample output shown above, the starting address of the file table for the first (and only) SRAD on the system is F100081B50010000.

__ 39. Display the first two double words of the file table for the first SRAD using the kdb subcommand dd <address obtained in the previous lab step> 2:

A sample subcommand and sample output are shown below. However, be sure to substitute the file table address you obtained in the previous step if the address you obtain is different from the address shown in the example below.

(0)> dd F1000F1E50020000 2F1000F1E50020000: 0000000000000000 00000000002FFDFF ............./..

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercise 2. Logical and Virtual File System Layers 2-13

Page 30: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

The value of the second double word of the output (00000000002FFDFF in the sample output) is the number of entries in the file table for the first SRAD. Note that 00000000002FFDFF is a hexadecimal number.

__ 40. You can determine the number of file table entries for the entire system by multiplying the number of entries in the file table for the first SRAD (00000000002FFDFF in this example) by the number of pointers in the file_table_ptrs array on the system (or by the number of SRADs on the system).

Note: On the systems/partitions used for this class, the expected number of pointers in the file_table_ptrs array is 1, and the expected number of SRADs is 1.

Determine the total number of file table entries for your instance of AIX by multiplying the number of entries in the file table for the first SRAD on your system by the number of pointers in the file_table_ptrs array. Record the result in the space provided below:

Total number of slots in the system file table ____________________

__ 41. The hcal subcommand of kdb evaluates hexadecimal expressions and displays the result in both hexadecimal and decimal. Use the hcal subcommand to display the number of entries in the system file table as a decimal number.

The expected result is that you will determine that there are 3145215 entries (expressed as a decimal value) in the system file table on your lab system/partition.

__ 42. Let your instructor know that you have completed the exercise.

End of exercise

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

2-14 AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 31: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

EXempty

Exercise 3. File System Implementation Layer

What this exercise is about

In this exercise, you will examine JFS2 file and directory structures.

What you should be able to do

At the end of the exercise, you should be able to:

• Display file system information for a JFS2 file system

• Use the fsdb utility to examine a JFS2 file system

• Locate a JFS2 file’s data in the file system

• Create and view properties of JFS2 snapshots

Requirements

In the normal lab environment for this class, each lab team will be assigned a logical partition (LPAR) on a managed system. The assigned logical partition should be running AIX 7.1 and should normally be on a POWER6 or POWER7 processor-based system.

You will not be sitting directly in front of your lab system. Instead, you will be using your personal PC to connect to your lab system.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercise 3. File System Implementation Layer 3-1

Page 32: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

Exercise instructions

Preface

This exercise includes information for you to read, and exercise steps for you to perform. The following examples illustrate the numbered checklist format used to identify exercise steps:

__ 1. (This is example step one.) Login to ...

__ 2. (This is example step two.) Execute the following ...

Two versions of these instructions are available: one with hints and one without. You can use either version to complete this exercise (or flip back and forth between the two versions). In other words, use these two versions of the exercise in whatever way best aids your learning. Also, please do not hesitate to ask the instructor if you have questions.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

3-2 AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 33: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

EXempty

Section 1 - Examining JFS2 files using fsdb

Introduction

In this exercise, you will run the fsdb utility against a JFS2 file system that you create. The file system should not be mounted when running fsdb. The file system may be mounted to examine the files; just be sure to unmount it before running fsdb.

Note: The mount point for the file system used in this portion of this exercise is /jfs2lab.

__ 1. Run the script /home/QV473/jfs2/jfs2_lab_setup to create the /jfs2lab file system. (Note: This script also creates another file system, which will be used later in this exercise.) The name of the logical volume for the file system, which should be /dev/fslv00 in most cases, is chosen automatically by the script. (If a volume called fslv00 already exists when the script is run, another name will be chosen.) The script will take a few minutes to complete.

__ 2. Start fsdb on the logical volume /dev/fslv00. (Recall that the logical volume name may be some other name instead. You can run lsvg -l rootvg and check /etc/filesystems first to determine the proper name.) Use a command similar to the one given below:

# fsdb /dev/fslv00

What is the aggregate block size used in this file system?

__ 3. Type help to view the fsdb sub-commands. The sub-commands you will be using in this lab are: inode, directory and display

__ 4. What inode number represents the fileset root directory inode?

__ 5. Display the root inode for the file set. What sub-command did you use?

Note that after the inode is displayed, a sub-menu of commands is shown. This will be used later. Hit <Enter> to go back to the fsdb prompt ”>”.

Note: If you want to display the aggregate inodes instead of the fileset inode, append an a to the command. (Example: inode 2 a)

__ 6. Find the inode number of each file or directory in the root directory of the file system, using the sub-command dir 2.

Locate and display fileA

In the next few steps, you will locate and display fileA’s data.

__ 7. Display the inode of fileA. What command did you use?

__ 8. Use the inode you displayed to answer the following questions:

What is the file size of fileA? ______________________

How many disk blocks is fileA’s data using? __________

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercise 3. File System Implementation Layer 3-3

Page 34: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

(Note that this number represents aggregate blocks so that, for example, if the aggregate blocksize were 4096, di_nblocks = 1 indicates the file is using one 4096-byte aggregate block.)

__ 9. After the inode is displayed, a sub-menu of commands is shown. Using the sub-menu described previously, type a t to display the B+ tree root header.

__ 10. Examine the flags in the header; what flags are set? ______________________

__ 11. Hit <Enter> to walk down the xad structures for this node. Continue hitting <Enter> until no more xad structures are displayed (and you see a simple > prompt again). How many xad structures are used for this file? ___________

__ 12. The address field in the xad shows the aggregate block number of the first data block of fileA. Use a display (or d) sub-command.

__ 13. Examine the content of fileA. What data does it contain?

__________________________________________

Locate and display fileB, fileC, and fileD

Use the commands and techniques you learned earlier in the exercise to examine fileB, fileC, and fileD. Answer the following questions about these files:

__ 14. What number inodes are used for fileB, fileC, and fileD?

fileB: _________

fileC: _________

fileD: _________

__ 15. How many xad structures are used to describe fileB’s data blocks? _________

__ 16. How many xad structures are used to describe fileC’s data blocks? _________

__ 17. Examine the inode for fileD. How big is this file (as shown in di_size)? _________

__ 18. How many aggregate blocks are being used by fileD?

Are enough aggregate blocks allocated to store the entire file? Explain your answer.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

3-4 AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 35: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

EXempty

Section 2 - JFS2 directories

Small directories

Continue with the fsdb session that you previously started. Use the following steps to examine the directory inode for the directory named small.

__ 19. What is the inode number for small? ____________

__ 20. Examine the directory node root header. Is this header a root, internal, or leaf header? _______________________________

__ 21. How many files are in the small directory? _________

__ 22. Examine the directory sorted table array stbl[] (displayed in the header). What file name is associated with the first entry in the sorted table array?

__ 23. Exit fsdb and mount the file system.

__ 24. Create the file /jfs2lab/small/a

Can you predict what the stbl[] table for directory small will look like now?

__ 25. Unmount the file system, run fsdb, and check your prediction.

Larger directories

In the next few steps, you will examine the directory inode structures for some larger directories.

__ 26. What is the inode number for the directory called medium?

__ 27. Display the inode and look at the root tree header. The flags should indicate that this is an internal header.

__ 28. One entry should be found for each leaf node. Display the entries with the <Enter> key. How many leaf nodes are there?

__ 29. Use the down subcommand (at the prompt displayed after the display of the stbl entry) to display the first leaf node header. How many entries is this header currently describing?

What is the maximum number of entries (files) that can be described by this leaf node?

__ 30. Examine the big directory. Not counting the root node, how many internal nodes are in big?

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercise 3. File System Implementation Layer 3-5

Page 36: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

Section 3 - JFS2 snapshots

External snapshots

In this exercise, you will create and view properties of a JFS2 external snapshot.

__ 31. Mount the /jfs2lab file system.

__ 32. Create an external snapshot for the /jfs2lab file system. Use 300000 bytes for the size of the new logical volume.

The snapshot command is used to create, modify, and view properties of JFS2 snapshots.

• The -o snapfrom=snappedFS parameter creates a snapshot of the file system specified by snappedFS.

• The -o size=size parameter specifies the size of a new logical volume for an external snapshot. If the size field is followed by an M, the value is treated as megabytes. If the Size field is followed by a G, the value is treated as gigabytes. If neither M nor G are used, the value is treated as 512-byte blocks.

__ 33. Check the status of the snapshot using the command snapshot -q /jfs2lab

• The -q flag of the snapshot command displays information about snapshots.

__ 34. Mount the snapshot in the /snapshot directory. (Use the -o flag and specify the snapshot option in the mount command you enter.)

__ 35. Use the ls -l command to examine the contents of the root directories of both the /jfs2lab file system and the /snapshot file system. Are the contents the same?

__ 36. Use touch command to create some files in /jfs2lab directory.

__ 37. Use the ls -l command again to examine the contents of the root directories of both the /jfs2lab file system and the /snapshot file system. Are the contents still the same?

__ 38. Unmount and delete the snapshot. (The -d flag of the snapshot command is used to delete a snapshot.)

Internal snapshot

In this exercise, you will create and view properties of a JFS2 internal snapshot.

__ 39. Now, create an internal snapshot for the /jfs2lab file system.

The snapshot command is used to create, modify, and view properties of JFS2 snapshots.

• The -o snapfrom=snappedFS parameter creates a snapshot of the file system specified by the snappedFS parameter. If the -n flag is specified, an internal snapshot is created.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

3-6 AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 37: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

EXempty

• The -n snapshotName parameter specifies the access point for the internal snapshot under the snappedFS/.snapshot/snapshotName directory.

Why did the snapshot command fail? ________________________________________________________

__ 40. The script /home/QV473/jfs2/jfs2_lab_setup has already created a file system with the isnapshot option enabled. The file system is called /jfs2forisnapshot. As the file system is ready to be used, you just need to mount it, using the mount command.

__ 41. Create an internal snapshot for the /jfs2forinsapshot file system.

__ 42. Check the status of the snapshot.

__ 43. Delete the internal snapshot.

__ 44. Let your instructor know that you have completed the exercise.

End of exercise

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercise 3. File System Implementation Layer 3-7

Page 38: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

3-8 AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 39: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

EXempty

Exercise 4. File System Cache

What this exercise is about

In the first part of this exercise you will experiment with the JFS2 read-ahead mechanism. In the second part of this exercise you will experiment with the release behind on read mount option.

What you should be able to do

At the end of the exercise, you should be able to:

• Demonstrate the effects of the ioo j2_minPageReadAhead and j2_maxPageReadAhead tunables on sequential read-ahead

• Demonstrate the effects of the mount options on release-behind

Requirements

In the normal lab environment for this class, each lab team will be assigned a logical partition (LPAR) on a managed system. The assigned logical partition should be running AIX 7.1 and should normally be on a POWER6 or POWER7 processor-based system.

You will not be sitting directly in front of your lab system. Instead, you will be using your personal PC to connect to your lab system.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercise 4. File System Cache 4-1

Page 40: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

Exercise instructions

Preface

This exercise includes information for you to read, and exercise steps for you to perform. The following examples illustrate the numbered checklist format used to identify exercise steps:

__ 1. (This is example step one.) Login to ...

__ 2. (This is example step two.) Execute the following ...

Two versions of these instructions are available: one with hints and one without. You can use either version to complete this exercise (or flip back and forth between the two versions). In other words, use these two versions of the exercise in whatever way best aids your learning. Also, please do not hesitate to ask the instructor if you have questions.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

4-2 AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 41: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

EXempty

Part 1 - Exercise Preparation

This part of the exercise creates a volume group, file system and file that you will use in the other parts of the exercise. The commands and sample output are given.

__ 1. Login to your assigned system as the root user.

__ 2. Change directory to /home/QV473/ex4.

__ 3. Identify an available physical volume on your system.

__ 4. Create a volume group named testvg on the identified physical volume. The -s flag is specifying the physical partition size. If you get an error message, include the -f flag.

# mkvg -y testvg -s 128 hdisk10516-1398 mkvg: The physical volume hdisk1, appears to belong toanother volume group. Use the force option to add this physical volumeto a volume group.0516-862 mkvg: Unable to create volume group.

# mkvg -f -y testvg -s 128 hdisk1testvg

__ 5. Create a JFS2 file system named jfs2fs in the testvg volume group that is 2 GB in size.

# crfs -v jfs2 -g testvg -m /jfs2fs -a size=2GFile system created successfully.2096884 kilobytes total disk space.New File System size is 4194304

__ 6. Mount the /jfs2fs file system.

# mount /jfs2fs

__ 7. Set the file size resource limit to unlimited.

# ulimit -f unlimited

__ 8. Create a 1024 MB file in the /jfs2fs file system.

# dd if=/dev/zero of=/jfs2fs/bigfile bs=1m count=1024 1024+0 records in.1024+0 records out.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercise 4. File System Cache 4-3

Page 42: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

Part 2 - Sequential read-ahead

This part of the exercise demonstrates the effects of sequential read-ahead when reading a large sequential file. The first test uses the default values for the ioo sequential read-ahead tunables. The second test effectively turns off sequential read-ahead by setting the ioo sequential read-ahead values to 0.

__ 9. In your existing login session on your lab system, run the following command:

# vmstat -I 5

Make the window as wide as you can to better view the output. Keep this command running throughout the remainder of the exercise.

__ 10. Open another telnet session to your lab system, and login as the root user.

__ 11. In the new telnet session, find the values for the following ioo tunables:

__ a. j2_minPageReadAhead: ____________________

__ b. j2_maxPageReadAhead: ____________________

__ 12. Unmount then mount the /jfs2fs file system (to clear the file buffer cache).

__ 13. Run the vmstat -s command and record the following values:

__ a. total address trans. faults: _____________________

__ b. iodones: _____________________

__ c. cpu context switches: _____________________

__ d. device interrupts: _____________________

__ 14. Run the following command:

# time dd if=/jfs2fs/bigfile of=/dev/null bs=4k

As it’s running, note the vmstat output in the other window.

When the command is finished, record the following values:

__ a. Real time (from the time command): __________________

__ b. User time (from the time command): __________________

__ c. System time (from the time command): __________________

__ d. Largest wa value (from vmstat): __________________

__ 15. Run the vmstat -s command and record the following values:

__ a. total address trans. faults: _____________________

__ b. iodones: _____________________

__ c. cpu context switches: _____________________

__ d. device interrupts: _____________________

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

4-4 AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 43: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

EXempty

__ 16. Calculate the difference in the following values from vmstat -s when it ran before and after the dd command.

__ a. total address trans. faults: _____________________

__ b. iodones: _____________________

__ c. cpu context switches: _____________________

__ d. device interrupts: _____________________

__ 17. Unmount the /jfs2fs file system.

__ 18. Turn off sequential read-ahead by setting the ioo tunables, j2_minPageReadAhead and j2_maxPageReadAhead, to 0.

» Commands and output:

__ 19. Mount the /jfs2fs file system.

__ 20. Run the vmstat -s command and record the following values:

__ a. total address trans. faults: _____________________

__ b. iodones: _____________________

__ c. cpu context switches: _____________________

__ d. device interrupts: _____________________

__ 21. Be sure the vmstat -I 5 command is still running in a telnet window. Then in the other window, run the command:

# time dd if=/jfs2fs/bigfile of=/dev/null bs=4k

As it’s running, note the vmstat output in the other window.

When the command is finished, record the following values:

__ a. Real time (from the time command): __________________

__ b. User time (from the time command): __________________

__ c. System time (from the time command): __________________

__ d. Largest wa value (from vmstat): __________________

__ 22. Run the vmstat -s command and record the following values:

__ a. total address trans. faults: _____________________

__ b. iodones: _____________________

__ c. cpu context switches: _____________________

__ d. device interrupts: _____________________

For reference, following are the descriptions for the vmstat -s counters:

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercise 4. File System Cache 4-5

Page 44: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

- total address trans. faults counter is incremented for each occurrence of an address translation page fault. I/O may or may not be required to resolve the page fault.

- iodones counter is incremented at the completion of each VMM I/O request.

- cpu context switches counter is incremented for each processor context switch (dispatch of a new process).

- device interrupts counter is incremented on each hardware interrupt.

__ 23. Calculate the difference in the following values from vmstat -s when it ran before and after the dd command.

__ a. total address trans. faults: _____________________

__ b. iodones: _____________________

__ c. cpu context switches: _____________________

__ d. device interrupts: _____________________

__ 24. Transfer your data from the two runs into the table below, then answer the following questions.

__ a. Why was the time so much faster when sequential read-ahead was turned on?

__ b. Why is the I/O wait time (wa) lower when sequential read-ahead is turned on?

__ 25. Explain why the vmstat -s counters you recorded were higher when sequential read-ahead was not used.

__ 26. Unmount the /jfs2fs file system.

Sequential Read-Ahead on

Sequential Read-Ahead off

real time (from time)

user time (from time)

sys time (from time)

wa (from vmstat)

total address trans. faults (difference) (from vmstat -s)iodones (difference) (from vmstat -s)cpu context switches (difference) (from vmstat -s)device interrupts (difference) (from vmstat -s)

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

4-6 AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 45: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

EXempty

__ 27. Set the sequential read-ahead ioo tunables, j2_minPageReadAhead and j2_maxPageReadAhead back to their default values.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercise 4. File System Cache 4-7

Page 46: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

Part 3 - JFS2 release-behind

This part of the exercise demonstrates the effects of JFS2 release-behind when reading a large sequential file. The first test has you mount a file system normally, so it does not use release-behind. The second test has you mount a file system with the rbr (release-behind-when-reading) option.

__ 28. If your two telnet windows are not still opened from the last part of the exercise, open two telnet windows to your assigned system and login to each as the root user.

__ 29. In one telnet window, if the vmstat -I 5 command is not running, start it:

# vmstat -I 5

Keep this running throughout the exercise.

__ 30. Mount the /jfs2fs file system.

__ 31. Run the following command:

# /home/QV473/ex4/ndisk64 -f /jfs2fs/bigfile -S -r100 -b1M -t30 -s1024M

When used with these options, it will sequentially read the file /jfs2fs/bigfile using a 1 MB read request size. When it reaches the end of the file it will start reading the file sequentially from the start again. It will continue doing this for 30 seconds and will then terminate. The output will indicate the number of I/Os per second attained during the elapsed runtime, along with the data throughput.

As ndisk64 is running, note the vmstat output in the other window and answer the questions listed below.

__ a. During the peak of activity, what was the percentage system time recorded for that interval? ___________________

__ b. During the same interval, what was the idle time recorded? _____________

__ c. During the same interval, what was the maximum I/O wait time recorded? __________

__ d. What was the total number of I/O operations reported by the ndisk64 program? __________

__ e. What average throughput (in MB/sec) was reported by the ndisk64 program? __________

__ f. Explain what was happening with paging and the free page list.

__ 32. Be sure the vmstat -I 5 command is still running in a telnet window. Then in the other window, unmount the /jfs2fs file system.

As it’s unmounted, note the vmstat output in the other window.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

4-8 AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 47: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

EXempty

What happened to the free list after the file system was unmounted?

__ 33. Be sure the vmstat -I 5 command is still running in a telnet window. Then in the other window, mount the /jfs2fs file system with the release-behind-when-reading option.

__ 34. Run the command:

# /home/QV473/ex4/ndisk64 -f /jfs2fs/bigfile -S -r100 -b1M -t30 -s1024M

As ndisk64 is running, note the vmstat output in the other window and answer the following questions:

__ a. What was the average system time recorded while the ndisk64 command was running? ___________________

__ b. What was the average idle time recorded while the ndisk64 command was running? ___________________

__ c. What was the average I/O wait time recorded while the ndisk64 command was running? ___________________

__ d. What was the total number of I/O operations reported by the ndisk64 program? __________

__ e. What average throughput (in MB/sec) was reported by the ndisk64 program? __________

__ f. Explain what was happening with paging and the free page list and compare it to the run when the file system was mounted without any options.

__ g. Compare the throughput and number of I/Os achieved during this run with the rbr mount option versus the first run without the option.

__ 35. Be sure the vmstat -I 5 command is still running in a telnet window. Then in the other window, unmount the /jfs2fs file system.

As it’s unmounted, note the vmstat output in the other window.

What happened to the free list after the file system was unmounted?

__ 36. Remove the /jfs2fs file system with the following command.

# rmfs -r /jfs2fsrmlv: Logical volume fslv00 is removed.

__ 37. Remove the testvg volume group and its logical volumes. The command below assumes hdisk1 was the physical volume in the volume group.

# reducevg -f -d testvg hdisk1rmlv: Logical volume loglv00 is removed.ldeletepv: Volume Group deleted since it contains no physical volumes.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercise 4. File System Cache 4-9

Page 48: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

End of exercise

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

4-10 AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 49: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

EXempty

Exercise 5. Kernel LVM Information

What this exercise is about

This exercise provides you with an opportunity to examine and interpret LVM data structures maintained in kernel memory by the LVM device driver.

What you should be able to do

At the end of the exercise, you should be able to:

• View volume group information using the volgrp subcommand

• View logical volume information using the lvol subcommand

• View partition map information using the part subcommand

• View physical volume information using the pvol subcommand

Requirements

In the normal lab environment for this class, each lab team will be assigned a logical partition (LPAR) on a managed system. The assigned logical partition should be running AIX 7.1 and should normally be on a POWER6 or POWER7 processor-based system.

You will not be sitting directly in front of your lab system. Instead, you will be using your personal PC to connect to your lab system.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercise 5. Kernel LVM Information 5-1

Page 50: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

Exercise instructions

Preface

This exercise includes information for you to read, and exercise steps for you to perform. The following examples illustrate the numbered checklist format used to identify exercise steps:

__ 1. (This is example step one.) Login to ...

__ 2. (This is example step two.) Execute the following ...

Two versions of these instructions are available: one with hints and one without. You can use either version to complete this exercise (or flip back and forth between the two versions). In other words, use these two versions of the exercise in whatever way best aids your learning. Also, please do not hesitate to ask the instructor if you have questions.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

5-2 AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 51: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

EXempty

Section 1 - Creating a mirrored logical volume

__ 1. Log on to your lab system as root, using the password supplied by the instructor.

__ 2. Use the ls command to list the contents of the /etc/vg directory. There should be a lock file for each active volume group. The lock file for a volume group is removed when the volume group is varied off. There may be additional lock files in the directory for volume groups that do not exist on your system if it was installed by cloning a mksysb image.

__ 3. Use the lspv command to identify two disks that are not currently part of any volume group. There should be at least two such disks on your lab system.

__ 4. Create the volume group datavg using two available disks using the following command, where hdisk1 and hdisk2 are replaced with the names of the available disks determined in the previous step:

# mkvg -f -y datavg hdisk1 hdisk2

__ 5. Use the ls -l command to view the entry in the /dev directory that was just created for the datavg volume group. Note the major of the device special file.

Major number of datavg volume group: __________

__ 6. Use the ls -l command to list the contents of the /etc/vg directory. Is there an additional lock file in the directory?

__ 7. Create a mirrored logical volume called mirlv in the volume group datavg, with 2 copies, and 10 LPs using the following command:

# mklv -y mirlv -c 2 datavg 10

__ 8. Use the ls -l command to view the entry in the /dev directory that was just created for the mirlv logical volume. Note the major and minor numbers of the logical volume.

Major number of mirlv logical volume: __________

Minor number of mirlv logical volume: __________

__ 9. Does the logical volume mirlv have the expected major number?

Section 2 - Examining LVM kernel data structures

__ 10. Start the kdb program to examine the running kernel image as follows:

# kdb

__ 11. Use the following subcommand to determine if the LVM device driver is currently loaded:

lke -n hd_pin

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercise 5. Kernel LVM Information 5-3

Page 52: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

__ 12. Use the volgrp subcommand to list the current active volume groups. Note the address of the volgrp structure and the hexadecimal value of the device number for datavg.

Address of volgrp structure: __________

Device number in hexadecimal: __________

__ 13. Is the major number for the datavg volume group the same as the value obtained by looking at the device special file entry in /dev?

__ 14. Using the hexadecimal value of the device major number for datavg, use the devsw subcommand to examine the corresponding device switch table entry. Note the value of the dsdptr field.

Value of dsdptr field: __________

__ 15. Does the value of the dsdptr field for datavg match the address of the volgrp structure obtained in previous step?

__ 16. Invoke the volgrp subcommand using the address of the volgrp structure for datavg as an argument.

__ 17. What is the PP size being used by the datavg volume group?

__ 18. What are the names and minor device numbers of the logical volumes that are shown as being part of the datavg volume group in the output of the volgrp subcommand?

Logical volumes: ___________________________________

__ 19. Invoke the volgrp subcommand using the -n flag to specify the name of the datavg volume group as an argument. Is the output the same as the output obtained previously using the volgrp structure address for the datavg volume group?

Make a note of the volume group ID for the datavg volume group.

VGID: ___________________________________

__ 20. Does the VGID of the volume group match the one used in the name of the lock file that was created in /etc/vg?

__ 21. Invoke the lvol subcommand to examine the lvol structure for the mirlv logical volume.

__ 22. How many copies are there of the mirlv logical volume?

__ 23. Which field of the lvol subcommand output did you use to answer the previous question?

__ 24. Invoke the part subcommand with the address value shown in the part[0] field of the output of the lvol subcommand from the previous step.

Determine which disk the logical partition copy is stored on.

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

5-4 AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 53: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student ExercisesV7.0

EXempty

__ 25. Invoke the part subcommand to examine the first partition (partition 0) of the second copy (copy number 1) of the mirlv logical volume.

Determine which disk the logical partition copy is stored on.

Is this partition stored on the same disk as the first partition of the first copy of the logical volume?

__ 26. Use the pvol subcommand to examine the pvol structure for hdisk0.

__ 27. Use the volgrp command to examine the volgrp structure for the volume group that owns hdisk0.

__ 28. How many logical volumes in this volume group are currently open?

__ 29. Are any of the logical volumes in this volume group mirrored? How did you reach your answer?

__ 30. What is the PP size being used by this volume group? Is it the same PP size as datavg?

Section 3 - Examining LVM information using the command line

In this section of the exercise, you will use appropriate AIX commands, such as lsvg, lslv etc. to verify the results you obtained when examining volgrp, lvol and pvol structures using kdb.

__ 31. Use the lsvg -o command to list the current active volume groups.

__ 32. Invoke the command lsvg datavg to examine the information reported for the datavg volume group.

__ 33. Invoke the command lspv hdisk1 to examine the information reported for the hdisk1 physical volume.

__ 34. Invoke the command lspv hdisk2 to examine the information reported for the hdisk2 physical volume.

__ 35. Invoke the command lslv mirlv to examine the information reported for the mirlv logical volume.

__ 36. Invoke the command lslv -m mirlv to examine the partition map information reported for the mirlv logical volume.

__ 37. Invoke the command lspv -M hdisk1 to examine the physical partition usage information reported for the hdisk1 physical volume.

__ 38. Invoke the command lspv -M hdisk2 to examine the physical partition usage information reported for the hdisk2 physical volume.

__ 39. Let your instructor know that you have completed the exercise.

End of exercise

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

© Copyright IBM Corp. 2012 Exercise 5. Kernel LVM Information 5-5

Page 54: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

Student Exercises

Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

5-6 AIX I/O Internals Part 1 © Copyright IBM Corp. 2012

Page 55: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012

V7.0

backpg

Back page
Page 56: cover Front cover · Course Exercises Guide AIX Internals & Performance III: I/O Management - Part 1 (Conventional I/O) Course code AHQV473 ERC 1.0. Student Exercises November 2012