0% found this document useful (0 votes)
84 views110 pages

QV0121 SG

Uploaded by

mjsamp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views110 pages

QV0121 SG

Uploaded by

mjsamp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 110

V5.4.0.

cover

򔻐򗗠򙳰 Front cover

AIX Problem Determination II:


LVM Issues

(Course code QV012)

Student Notebook
ERC 1.6

UNIX Software Service Enablement


Student Notebook

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:
AIX 6™ AIX® DS4000®
HACMP™
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.

August 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.
V7.0
Student Notebook

TOC Contents
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii

Course description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix

Agenda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi

Unit 1. LVM Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Logical volume manager components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Volume groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
Physical volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5
Physical partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
Logical volumes and logical partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7
Logical volume types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8
Creating a logical volume using specific disks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
Creating a logical volume using a map file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10
Intra-disk allocation policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11
Inter-disk allocation policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12
Volume group types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13
Activating volume groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14
Viewing physical volume mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-15
Viewing physical volume layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16
Viewing logical volume mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-17
Viewing logical volume information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-18
Viewing volume group information (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-19
Viewing volume group information (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-20
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-21
Exercise 1: LVM concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-22
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-23

Unit 2. Mirroring and Striping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Mirroring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Mirrored logical volume scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
Striped logical volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
Mirrored logical volume strictness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
Mirroring rootvg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
Mirror pools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
Creating mirror pools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9
Creating mirror pools - Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10
Using mirror pools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
Using mirror pools - Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12
Using mirror pools - Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13
Using mirror pools - Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14

© Copyright IBM Corp. 2012 Contents iii


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

Changing mirror pools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-15


Changing mirror pools assigned to an LV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-16
Changing a logical volume to use mirror pools . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-17
Viewing mirror pool information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-18
Disabling a mirror pool on an LV copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-19
Removing a physical volume from a mirror pool . . . . . . . . . . . . . . . . . . . . . . . . . . .2-20
Removing a VG and its mirror pools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-21
Mirror pool strictness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-22
Mirror pool strictness - Off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-23
Enabling and changing mirror pool strictness . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-24
Changing to a strict mirror pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-25
Changing to a super strict mirror pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-26
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-27
Exercise 2: Mirroring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-28
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-29

Unit 3. LVM Metadata. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-2
LVM command interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-3
LVM metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-4
Physical volume identifier (PVID) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-5
Viewing the PVID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-6
Logical volume metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-7
Viewing the LVCB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-8
Locating the LVCB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-9
Volume group metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-10
Using lqueryvg to view the VGDA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-11
VGDA expansion and quorum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-12
ODM and VGDA inconsistencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-13
Mirrored write consistency (MWC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-14
Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-15
Exercise 2: Working with LVM metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-16
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-17

Unit 4. Disk Replacement and Other LVM Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-1


Unit objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-2
Disk replacement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-3
Removing physical volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-4
Disk replacement procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-5
Moving data within volume groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-6
Disk replacement using replacepv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-7
Renaming a device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-8
Phantom ODM entries (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-9
Phantom ODM entries (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-10
LVM/ODM inconsistency (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-11
LVM/ODM inconsistency (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-12
Hot sparing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-13
Problem determination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-14

iv AIX LVM Issues © Copyright IBM Corp. 2012


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

TOC Checkpoint (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15


Checkpoint (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-16
Exercise 3: Problem determination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-17
Unit summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-18

Appendix A. Checkpoint solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1

© Copyright IBM Corp. 2012 Contents v


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

vi AIX LVM Issues © Copyright IBM Corp. 2012


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

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:
AIX 6™ AIX® DS4000®
HACMP™
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.

© Copyright IBM Corp. 2012 Trademarks vii


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

viii AIX LVM Issues © Copyright IBM Corp. 2012


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

pref Course description


AIX Problem Determination II: LVM Issues

Purpose
This course teaches problem solving skills related to the Logical
Volume Manager (LVM) on AIX. It includes discussions on how to
identify and fix common LVM issues.

Audience
AIX/Linux technical support individuals, AIX/Linux developers,
AIX/Linux system administrators, system architects and engineers,
and product engineers.

Prerequisites
Students attending this course should have attended the following
course:
• AHQV011 - AIX Problem Determination I: Boot Issues
or have the equivalent experience.

Objectives
After completing this course, you should be able to:
• Identify the components and types of commands for LVM
• Describe the LVM structure and concepts associated with physical
volumes, volume groups, logical volumes, physical partitions,
logical partitions
• Describe the LVM metadata structures and their purpose
• Collect data to help determine the cause of LVM issues
• Identify commands and techniques used to resolve LVM issues
• Describe common LVM problem scenarios and use techniques to
resolve them

© Copyright IBM Corp. 2012 Course description ix


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

x AIX LVM Issues © Copyright IBM Corp. 2012


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

pref Agenda
Welcome
Unit 1 - LVM Components
Exercise 1 - LVM Concepts
Unit 2 - Mirroring and Striping
Exercise 2 - Mirroring
Unit 3 - LVM Metadata
Exercise 3 - Working with LVM Metadata
Unit 4 - Disk Replacement and Other LVM Issues
Exercise 4 - Problem Determination

© Copyright IBM Corp. 2012 Agenda xi


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

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.

xii AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty Unit 1. LVM Components

What this unit is about


This unit describes the components of the Logical Volume Manager.

What you should be able to do


After completing this unit, you should be able to:
• Identify and create the following components of LVM:
- Physical volume
- Physical partition
- Logical partition
- Logical volume
- Volume group

How you will check your progress


Accountability:
• Checkpoint
• Machine exercises

References
AIX Operating System and Device Management
System Management Concepts: Operating System and Devices
Redbook SG24-5432 - AIX Logical Volume Manager:
from A to Z: Introduction and Concepts
Redbook SG24-5433 - AIX Logical Volume Manager:
from A to Z: Troubleshooting and Commands

© Copyright IBM Corp. 2012 Unit 1. LVM Components 1-1


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

Unit objectives
After completing this unit, you should be able to:
• Identify and create the following components of LVM:
– Volume group

– Physical volume

– Physical partition

– Logical volume

– Logical partition

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 1-1. Unit objectives QV0121.6

Notes:

1-2 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Logical volume manager components


• Volume group (VG) Volume group
logical
logical
• Physical volume (PV) volumes
logical
volumes
Logical
volumes
volumes
• Physical partition (PP)
• Logical volume (LV) physical
physical
physical
disks
physical
disks
Physical
disks
• Logical partition (LP) disks
volumes

Logical volume
LP1 LP2 LP3

PP20 PP42 PP52


Physical volume Physical volume

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 1-2. Logical volume manager components QV0121.6

Notes:
The Logical Volume Manager (LVM) is installed with the base operating system and
needs no further configuration. However, it is the responsibility of the system owner to
allocate LVM resources as needed.

© Copyright IBM Corp. 2012 Unit 1. LVM Components 1-3


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

Volume groups
• A collection of physical disks
• To create a volume group
(example): hdisk1 hdisk2 hdisk3
# mkvg -y testvg hdisk1 hdisk2
testvg

• To add a physical volume to a


volume group (example)
hdisk1 hdisk2 hdisk3
# extendvg testvg hdisk3
testvg
• To remove a physical volume
from a volume group
(example): hdisk1 hdisk2 hdisk3
# reducevg testvg hdisk3 testvg

• To delete a volume group


(example):
hdisk1 hdisk2 hdisk3
# reducevg [-d] testvg hdisk1 testvg
hdisk2
UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 1-3. Volume groups QV0121.6

Notes:
A volume group (VG) is a structure used to organize physical and logical volumes. After
installation, the system has one volume group (rootvg) consisting of a base set of
logical volumes and physical volumes required to start the system and any other logical
volumes you specify to the installation script.

1-4 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Physical volumes
• Disk technology
– SCSI, Serial Attached SCSI (SAS), Fibre, SSA

• Disk independence
– Physical type of disk is transparent to the LVM
## lspv
lspv
hdisk0
hdisk0 00f6bccbf0314e2f
00f6bccbf0314e2f rootvg
rootvg active
active
hdisk1
hdisk1 none
none None
None
hdisk2
hdisk2 none
none None
None
hdisk3
hdisk3 none
none None
None
hdisk4
hdisk4 none
none None
None

## lsdev
lsdev -Cc
-Cc disk
disk Physical Disk
hdisk0
hdisk0 Available
Available Virtual
Virtual SCSI
SCSI Disk
Disk Drive
Drive
hdisk1
hdisk1 Available
Available Virtual
Virtual SCSI
SCSI Disk
Disk Drive
Drive
hdisk2
hdisk2 Available
Available Virtual
Virtual SCSI
SCSI Disk
Disk Drive
Drive
hdisk3
hdisk3 Available
Available Virtual
Virtual SCSI
SCSI Disk
Disk Drive
Drive
hdisk4
hdisk4 Available
Available Virtual
Virtual SCSI
SCSI Disk
Disk Drive
Drive

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 1-4. Physical volumes QV0121.6

Notes:
When a disk drive is added to a volume group, it becomes known as a physical volume
(PV). Every physical volume in use belongs to a volume group.

© Copyright IBM Corp. 2012 Unit 1. LVM Components 1-5


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

Physical partitions
• Smallest unit of contiguous storage space on a physical
volume

• Physical partition size is the same for all physical volumes


within a volume group
Physical Disk

...
Physical Partitions

...
UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 1-5. Physical partitions QV0121.6

Notes:

What is a physical partition?


When a physical volume is added to a volume group, the physical volume is partitioned
into contiguous, equal-sized units of space called physical partitions. A physical
partition is the smallest unit of storage space allocation and is a contiguous space on a
physical volume.

Physical partition size


All the physical partitions within a volume group are the same size, although different
volume groups can have different physical partition sizes. The physical partition size is
set at the time the volume group is created. Physical volumes inherit the volume group's
physical partition size. The size can be 4 MB or larger on power of two boundaries 
(e.g. 4 MB, 8 MB, 16 MB, etc.).

1-6 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Logical volumes and logical partitions


Volume Group LOGICAL VOLUME
logical
logical
logical
volumes LP1 LP2 LP3
volumes
logical
volumes
volumes

physical
physical PP20
physical
disks
physical
PP42 PP52
disks
physical
disks
disks
volumes
PHYSICAL VOLUME PHYSICAL VOLUME

STRIPED LOGICAL VOLUME MIRRORED LOGICAL VOLUME

1 23456 LP1 LP1 LP2

PP1 PP1 PP20


PP22 PP2 PP3
PHYSICAL VOLUME PHYSICAL VOLUME PHYSICAL VOLUME PHYSICAL VOLUME

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 1-6. Logical volumes and logical partitions QV0121.6

Notes:

Logical volumes
Within each volume group, one or more logical volumes are defined. Logical volumes
are groups of information located on physical volumes.

Logical partitions
Each logical volume consists of one or more logical partitions. Logical partitions are the
same size as the physical partitions within a volume group. Each logical partition is
mapped to at least one physical partition.

© Copyright IBM Corp. 2012 Unit 1. LVM Components 1-7


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

Logical volume types


• boot • jfs
• paging • jfs2
• sysdump • jfslog
• jfs2log

## lsvg
lsvg -l
-l rootvg
rootvg
rootvg:
rootvg:
LV
LV NAME
NAME TYPE
TYPE LPs
LPs PPs
PPs PVs
PVs LV
LV STATE
STATE MOUNT
MOUNT POINT
POINT
hd5
hd5 boot
boot 11 11 11 closed/syncd
closed/syncd N/A
N/A
hd6
hd6 paging
paging 33 33 11 open/syncd
open/syncd N/A
N/A
hd8
hd8 jfs2log
jfs2log 11 11 11 open/syncd
open/syncd N/A
N/A
hd4
hd4 jfs2
jfs2 22 22 11 open/syncd
open/syncd //
hd2
hd2 jfs2
jfs2 13
13 13
13 11 open/syncd
open/syncd /usr
/usr
hd9var
hd9var jfs2
jfs2 11 11 11 open/syncd
open/syncd /var
/var
hd3
hd3 jfs2
jfs2 11 11 11 open/syncd
open/syncd /tmp
/tmp
hd1
hd1 jfs2
jfs2 11 11 11 open/syncd
open/syncd /home
/home
hd10opt
hd10opt jfs2
jfs2 11 11 11 open/syncd
open/syncd /opt
/opt
hd11admin
hd11admin jfs2
jfs2 11 11 11 open/syncd
open/syncd /admin
/admin
lg_dumplv
lg_dumplv sysdump
sysdump 88 88 11 open/syncd
open/syncd N/A
N/A
livedump
livedump jfs2
jfs2 22 22 11 open/syncd
open/syncd /var/adm/ras/livedump
/var/adm/ras/livedump

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 1-7. Logical volume types QV0121.6

Notes:
Logical volumes can serve a number of system purposes, such as paging, file system
storage or raw data storage. However, each logical volume serves a single purpose
only. Many logical volumes contain a single journaled file system (JFS or JFS2).
The example in the visual shows the default logical volumes on rootvg created by the
installation process.

1-8 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Creating a logical volume using specific disks


• The first logical volume allocation policy is to use specific
disks
• To create a logical volume with 5 logical partitions and use
only hdisk1:
# mklv -y lv1 testvg 5 hdisk1
• To create a logical volume with 8 logical partitions chosen
from only hdisk1 and hisk2:
# mklv -y lv2 testvg 8 hdisk1 hdisk2

lv1 lv2 lv2

hdisk1 hdisk2

testvg
UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 1-8. Creating a logical volume using specific disks QV0121.6

Notes:
When a logical volume is created, you can specify the location of the physical partitions
in the logical volume.
A logical volume can span physical volumes as long as the physical volumes are in the
same volume group. Logical volumes cannot be spanned from one volume group to
another.

© Copyright IBM Corp. 2012 Unit 1. LVM Components 1-9


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

Creating a logical volume using a map file


• A map file specifies the exact physical partitions to allocate for the logical
volume
• Map file example:
hdisk1:54
hdisk1:54
hdisk1:50
hdisk1:50
hdisk1:53
hdisk1:53
hdisk1:51
hdisk1:51
hdisk1:52
hdisk1:52
hdisk2:100
hdisk2:100
hdisk2:101
hdisk2:101
hdisk2:102
hdisk2:102

• To create a logical volume using a map file:


# mklv -m map-file-name testvg 8

testvg LP1 LP2 LP3 LP4 LP5 LP6 LP7 LP8

PP50 PP51 PP52 PP53 PP54 PP100 PP101 PP102

hdisk1 hdisk2
UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 1-9. Creating a logical volume using a map file QV0121.6

Notes:
You can create a file and specify the exact physical partitions to allocate for the logical
volume using the mklv -m mapfile command. The mapfile is a file you create and can
be any name.

1-10 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Intra-disk allocation policy


• Intra-physical volume allocation policy
– Determines where the data will reside on disk
## mklv
mklv -a
-a cc testvg
testvg 44
lv00
lv00
## lslv
lslv -l
-l lv00
lv00
lv00:N/A
lv00:N/A
PV
PV COPIES
COPIES IN
IN BAND
BAND DISTRIBUTION
DISTRIBUTION
hdisk1
hdisk1 004:000:000
004:000:000 100%
100% 000:000:004:000:000
000:000:004:000:000
## mklv
mklv testvg
testvg 33
lv01
lv01
## lslv
lslv -l
-l lv01
lv01
lv01:N/A
lv01:N/A
PV
PV COPIES
COPIES IN
IN BAND
BAND DISTRIBUTION
DISTRIBUTION
hdisk2
hdisk2 003:000:000
003:000:000 100%
100% 000:003:000:000:000
000:003:000:000:000

ee mm cc im
im ie
ie

inner edge (ie)


inner middle (im)
center (c)
outer middle (m)
outer edge (e)
UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 1-10. Intra-disk allocation policy QV0121.6

Notes:
The intra-physical volume allocation policy defines what area on the physical volume
the logical volume will try to use.

© Copyright IBM Corp. 2012 Unit 1. LVM Components 1-11


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

Inter-disk allocation policy


• Inter-physical volume allocation policy
– Specifies the number of physical volumes to extend across
-e x flag : Allocates across the maximum number of physical volumes
-e m flag: Allocates logical partitions across the minimum number of physical
volumes (default)
– Range value can be limited by the UpperBound flag (-u flag)
## mklv
mklv -e
-e mm testvg
testvg 20
20
lv00
lv00

## mklv
mklv -e
-e xx testvg
testvg 20
20
lv01
lv01

## lspv
lspv -l
-l hdisk1
hdisk1
hdisk1:
hdisk1:
LV
LV NAME
NAME LPs
LPs PPs
PPs DISTRIBUTION
DISTRIBUTION MOUNT
MOUNT POINT
POINT
lv00
lv00 20
20 20
20 00..20..00..00..00
00..20..00..00..00 N/A
N/A
lv01
lv01 10
10 10
10 00..10..00..00..00
00..10..00..00..00 N/A
N/A

## lspv
lspv -l
-l hdisk2
hdisk2
hdisk2:
hdisk2:
LV
LV NAME
NAME LPs
LPs PPs
PPs DISTRIBUTION
DISTRIBUTION MOUNT
MOUNT POINT
POINT
lv01
lv01 10
10 10
10 00..10..00..00..00
00..10..00..00..00 N/A
N/A

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 1-11. Inter-disk allocation policy QV0121.6

Notes:
The inter-physical volume allocation policy indicates how many physical volumes to use
to contain the physical partitions of the logical volume.

1-12 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Volume group types


• Normal (original), big and scalable volume groups

VG type Max PVs Max LVs Max PPs per VG Max PP size
Normal VG 32 256 32512 (1016 * 32) 1 GB
Big VG 128 512 130048(1016 * 128) 1 GB
Scalable VG 1024 4096 2097152 128 GB

• PPs per physical volume for normal and big volume groups

Normal volume groups Big volume groups


-t factor Disks PPs per PV Disks -t factor
1 32 1016 128 1
2 16 2032 64 2
4 8 4064 32 4
8 4 8128 16 8
16 2 16256 8 16
N/A N/A 32512 4 32
N/A N/A 65024 2 64

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 1-12. Volume group types QV0121.6

Notes:
Disk space on a physical volume is allocated to logical volumes in chunks called
physical partitions. Each physical partition is the same across all the disks in a volume
group. The physical partition size is set at the time the volume group is created. The
size is set in megabytes on power of two boundaries (e.g.: 4 MB, 8 MB, 16 MB, etc.).
The -t flag of the mkvg command changes the limit of the number of physical partitions
per physical volume. The -t value can be any number from 1 to 16 for normal volume
groups and 1 to 64 for big volume groups.

© Copyright IBM Corp. 2012 Unit 1. LVM Components 1-13


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

Activating volume groups


•varyonvg
– Activates a volume group and logical volumes

– Checks for discrepancy between on-disk structures and ODM

– Can be executed on a volume group that is already varied on and


will resynchronize and redefine the structures in the volume group

•varyoffvg
– Deactivates the volume group and its associated logical volumes

– The logical volumes first must be closed

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 1-13. Activating volume groups QV0121.6

Notes:
For data to be accessible, a volume group must be in an active state. To varyon
(activate) a volume group, the varyonvg command is used. To varyoff (de-activate) a
volume group, the varyoffvg command is used.

1-14 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Viewing physical volume mapping


# lspv -M hdisk0
hdisk0:1 hd5:1 hdisk0:104 hd2:5
hdisk0:2-48 hdisk0:105 hd2:6
hdisk0:49 hd6:1 hdisk0:106 hd2:7
hdisk0:50 hd6:2 hdisk0:107 hd2:8
hdisk0:51 hd6:3 hdisk0:108 hd2:9
hdisk0:52 hd6:4 hdisk0:109 hd2:10
hdisk0:53 lg_dumplv:1 hdisk0:110 hd2:11
hdisk0:54 lg_dumplv:2 hdisk0:111 hd2:12
hdisk0:55 lg_dumplv:3 hdisk0:112 hd2:13
hdisk0:56 lg_dumplv:4 hdisk0:113 hd2:14
hdisk0:57 lg_dumplv:5 hdisk0:114 hd2:15
hdisk0:58 lg_dumplv:6 hdisk0:115 hd2:16
hdisk0:59 lg_dumplv:7 hdisk0:116 hd2:17
hdisk0:60 lg_dumplv:8 hdisk0:117 hd9var:1
hdisk0:61 livedump:1 hdisk0:118 hd9var:2
hdisk0:62 livedump:2 hdisk0:119 hd9var:3
hdisk0:63-96 hdisk0:120 hd3:1
hdisk0:97 hd8:1 hdisk0:121 hd3:2
hdisk0:98 hd4:1 hdisk0:122 hd1:1
hdisk0:99 hd4:2 hdisk0:123 hd1:2
hdisk0:100 hd2:1 hdisk0:124 hd10opt:1
hdisk0:101 hd2:2 hdisk0:125 hd10opt:2
hdisk0:102 hd2:3 hdisk0:126 hd10opt:3
hdisk0:103 hd2:4 hdisk0:127 hd11admin:1
hdisk0:128-239

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 1-14. Viewing physical volume mapping QV0121.6

Notes:
The lspv -M hdisk0 command output shows us the lowest detail level of the mapping
on the disk. It shows the physical partition to logical volume/partition mapping.

© Copyright IBM Corp. 2012 Unit 1. LVM Components 1-15


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

Viewing physical volume layout


## lspv
lspv -p
-p hdisk0
hdisk0
hdisk0:
hdisk0:
PP
PP RANGE
RANGE STATE
STATE REGION
REGION LV
LV NAME
NAME TYPE
TYPE MOUNT
MOUNT POINT
POINT
1-1
1-1 used
used outer
outer edge
edge hd5
hd5 boot
boot N/A
N/A
2-48
2-48 free
free outer
outer edge
edge
49-52
49-52 used
used outer
outer middle
middle hd6
hd6 paging
paging N/A
N/A
53-60
53-60 used
used outer
outer middle
middle lg_dumplv
lg_dumplv sysdump
sysdump N/A
N/A
61-62
61-62 used
used outer
outer middle
middle livedump
livedump jfs2
jfs2 /var/adm/ras/livedump
/var/adm/ras/livedump
63-96
63-96 free
free outer
outer middle
middle
97-97
97-97 used
used center
center hd8
hd8 jfs2log
jfs2log N/A
N/A
98-99
98-99 used
used center
center hd4
hd4 jfs2
jfs2 //
100-116
100-116 used
used center
center hd2
hd2 jfs2
jfs2 /usr
/usr
117-119
117-119 used
used center
center hd9var
hd9var jfs2
jfs2 /var
/var
120-121
120-121 used
used center
center hd3
hd3 jfs2
jfs2 /tmp
/tmp
122-123
122-123 used
used center
center hd1
hd1 jfs2
jfs2 /home
/home
124-126
124-126 used
used center
center hd10opt
hd10opt jfs2
jfs2 /opt
/opt
127-127
127-127 used
used center
center hd11admin
hd11admin jfs2
jfs2 /admin
/admin
128-143
128-143 free
free center
center
144-191
144-191 free
free inner
inner middle
middle
192-239
192-239 free
free inner
inner edge
edge

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 1-15. Viewing physical volume layout QV0121.6

Notes:
To display the status and characteristics of physical volume hdisk0 by physical partition
number:
# lspv -p hdisk0

1-16 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Viewing logical volume mapping


## lslv
lslv -p
-p hdisk0
hdisk0 hd2
hd2
USED
USED FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE 1-10
1-10
FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE 11-20
11-20
FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE 21-30
21-30
FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE 31-40
31-40
FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE 41-48
41-48

USED
USED USED
USED USED
USED USED
USED USED
USED USED
USED USED
USED USED
USED USED
USED USED
USED 49-58
49-58
USED
USED USED
USED USED
USED USED
USED FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE 59-68
59-68
FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE 69-78
69-78
FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE 79-88
79-88
FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE 89-96
89-96

USED
USED USED
USED USED
USED 0001
0001 0002
0002 0003
0003 0004
0004 0005
0005 0006
0006 0007
0007 97-106
97-106
0008
0008 0009
0009 0010
0010 0011
0011 0012
0012 0013
0013 0014
0014 0015
0015 0016
0016 0017
0017 107-116
107-116
USED
USED USED
USED USED
USED USED
USED USED
USED USED
USED USED
USED USED
USED USED
USED USED
USED 117-126
117-126
USED
USED FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE 127-136
127-136
FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE 137-143
137-143

...
...

FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE 192-201
192-201
FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE 202-211
202-211
FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE 212-221
212-221
FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE 222-231
222-231
FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE FREE
FREE 232-239
232-239

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 1-16. Viewing logical volume mapping QV0121.6

Notes:
The lslv -p PV LV command output shows us information about the allocation of
each physical partition on a given physical volume.

© Copyright IBM Corp. 2012 Unit 1. LVM Components 1-17


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

Viewing logical volume information


## lslv
lslv -l
-l hd2
hd2
hd2:/usr
hd2:/usr
PV
PV COPIES
COPIES IN
IN BAND
BAND DISTRIBUTION
DISTRIBUTION
hdisk0
hdisk0 017:000:000
017:000:000 100%
100% 000:000:017:000:000
000:000:017:000:000

## lslv
lslv -m
-m hd2
hd2
hd2:/usr
hd2:/usr
LP
LP PP1
PP1 PV1
PV1 PP2
PP2 PV2
PV2 PP3
PP3 PV3
PV3
0001
0001 0100 hdisk0
0100 hdisk0
0002
0002 0101
0101 hdisk0
hdisk0
0003
0003 0102
0102 hdisk0
hdisk0
0004
0004 0103
0103 hdisk0
hdisk0
0005
0005 0104
0104 hdisk0
hdisk0
0006
0006 0105
0105 hdisk0
hdisk0
0007
0007 0106
0106 hdisk0
hdisk0
0008
0008 0107
0107 hdisk0
hdisk0
0009
0009 0108
0108 hdisk0
hdisk0
0010
0010 0109
0109 hdisk0
hdisk0
0011
0011 0110
0110 hdisk0
hdisk0
0012
0012 0111
0111 hdisk0
hdisk0
0013
0013 0112
0112 hdisk0
hdisk0
0014
0014 0113
0113 hdisk0
hdisk0
0015
0015 0114
0114 hdisk0
hdisk0
0016
0016 0115
0115 hdisk0
hdisk0
0017
0017 0116
0116 hdisk0
hdisk0

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 1-17. Viewing logical volume information QV0121.6

Notes:
The lslv -m hd2 shows mapping information for logical volume hd2. It lists each
logical partition and the physical partitions on the physical volumes that contain the
information. In this case, we only have one copy so nothing is shown under PP2/PV2 or
PP3/PV3.

1-18 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Viewing volume group information (1 of 2)


## lsvg
lsvg rootvg
rootvg
VOLUME
VOLUME GROUP:
GROUP: rootvg
rootvg VG
VG IDENTIFIER:
IDENTIFIER: 00f6bccb00004c0000000136f0314ebc
00f6bccb00004c0000000136f0314ebc
VG
VG STATE:
STATE: active
active PP
PP SIZE:
SIZE: 128
128 megabyte(s)
megabyte(s)
VG
VG PERMISSION:
PERMISSION: read/write
read/write TOTAL
TOTAL PPs:
PPs: 239
239 (30592
(30592 megabytes)
megabytes)
MAX
MAX LVs:
LVs: 256
256 FREE
FREE PPs:
PPs: 193
193 (24704 megabytes)
(24704 megabytes)
LVs:
LVs: 12
12 USED
USED PPs:
PPs: 46
46 (5888
(5888 megabytes)
megabytes)
OPEN
OPEN LVs:
LVs: 11
11 QUORUM:
QUORUM: 22 (Enabled)
(Enabled)
TOTAL
TOTAL PVs:
PVs: 11 VG
VG DESCRIPTORS:
DESCRIPTORS: 22
STALE
STALE PVs:
PVs: 00 STALE
STALE PPs:
PPs: 00
ACTIVE
ACTIVE PVs:
PVs: 11 AUTO
AUTO ON:
ON: yes
yes
MAX
MAX PPs
PPs per
per VG:
VG: 32512
32512
MAX
MAX PPs
PPs per
per PV:
PV: 1016
1016 MAX
MAX PVs:
PVs: 32
32
LTG
LTG size
size (Dynamic):
(Dynamic): 256
256 kilobyte(s)
kilobyte(s) AUTO
AUTO SYNC:
SYNC: no
no
HOT
HOT SPARE:
SPARE: no
no BB
BB POLICY:
POLICY: relocatable
relocatable
PV
PV RESTRICTION:
RESTRICTION: none
none

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 1-18. Viewing volume group information (1 of 2) QV0121.6

Notes:

© Copyright IBM Corp. 2012 Unit 1. LVM Components 1-19


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

Viewing volume group information (2 of 2)


## lsvg
lsvg -l
-l rootvg
rootvg
rootvg:
rootvg:
LV
LV NAME
NAME TYPE
TYPE LPs
LPs PPs
PPs PVs
PVs LV
LV STATE
STATE MOUNT
MOUNT POINT
POINT
hd5
hd5 boot
boot 11 11 11 closed/syncd
closed/syncd N/A
N/A
hd6
hd6 paging
paging 44 44 11 open/syncd
open/syncd N/A
N/A
hd8
hd8 jfs2log
jfs2log 11 11 11 open/syncd
open/syncd N/A
N/A
hd4
hd4 jfs2
jfs2 22 22 11 open/syncd
open/syncd //
hd2
hd2 jfs2
jfs2 17
17 17
17 11 open/syncd
open/syncd /usr
/usr
hd9var
hd9var jfs2
jfs2 33 33 11 open/syncd
open/syncd /var
/var
hd3
hd3 jfs2
jfs2 22 22 11 open/syncd
open/syncd /tmp
/tmp
hd1
hd1 jfs2
jfs2 22 22 11 open/syncd
open/syncd /home
/home
hd10opt
hd10opt jfs2
jfs2 33 33 11 open/syncd
open/syncd /opt
/opt
hd11admin
hd11admin jfs2
jfs2 11 11 11 open/syncd
open/syncd /admin
/admin
lg_dumplv
lg_dumplv sysdump
sysdump 88 88 11 open/syncd
open/syncd N/A
N/A
livedump
livedump jfs2
jfs2 22 22 11 open/syncd
open/syncd /var/adm/ras/livedump
/var/adm/ras/livedump

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 1-19. Viewing volume group information (2 of 2) QV0121.6

Notes:
The lsvg command with the -l VG flag will display logical volume information for the
given volume group.

1-20 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Checkpoint
1.True or False: A physical volume can only belong to one
volume group.

2.True or False: All physical partitions within a volume group


are the same size.

3.True or False: A logical volume can span volume groups.

4.True or False: Logical partitions are the same size as


physical partitions within a volume group.

5.True or False: There must be at least two volume groups on a


system.

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 1-20. Checkpoint QV0121.6

Notes:

© Copyright IBM Corp. 2012 Unit 1. LVM Components 1-21


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

Exercise 1: LVM concepts


This exercise consists of two parts:

– LVM concepts
• Create volume groups and logical volumes

– Physical partition size

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 1-21. Exercise 1: LVM concepts QV0121.6

Notes:

1-22 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Unit summary
• A volume group is a structure used to organize physical and logical
volumes
• When a disk drive is added to a volume group, it becomes known
asa physical volume
• Every physical volume in use belongs to a volume group
• All of the physical volumes in a volume group are divided into
physical partitions
• All the physical partitions within a volume group are the same size
• Within each volume group, one or more logical volumes are defined
• Logical volumes are groups of information located on physical
volumes
• Logical partitions are the same size as the physical partitions within
a volume group
• Each logical partition is mapped to at least one physical partition

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 1-22. Unit summary QV0121.6

Notes:

© Copyright IBM Corp. 2012 Unit 1. LVM Components 1-23


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

1-24 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty Unit 2. Mirroring and Striping

What this unit is about


This unit describes how to mirror and stripe a logical volume. It also
describes the concept of mirror pools and how to use them.

What you should be able to do


After completing this unit, you should be able to:
• Identify and create the following components of LVM:
- Use the commands to mirror and stripe logical volumes
- List the mirror scheduling policies
- Define the mirrored logical volume strictness
- Create mirror pools
- Display mirror pool information
- Use mirror pools when creating a logical volume and adding a
mirrored copy to an existing logical volume
- Change which mirror pools a logical volume is assigned to
- Enable an existing logical volume to use mirror pools
- Disable a mirror pool
- Define mirror pool strictness

How you will check your progress


Accountability:
• Checkpoint
• Machine exercises

References
AIX Operating System and Device Management
System Management Concepts: Operating System and Devices
Redbook SG24-5432 - AIX Logical Volume Manager:
from A to Z: Introduction and Concepts
Redbook SG24-5433 - AIX Logical Volume Manager:
from A to Z: Troubleshooting and Commands

© Copyright IBM Corp. 2012 Unit 2. Mirroring and Striping 2-1


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

Unit objectives
After completing this unit, you should be able to:
• Use the commands to mirror and stripe logical volumes
• List the mirror scheduling policies
• Define the mirrored logical volume strictness
• Create mirror pools
• Display mirror pool information
• Use mirror pools when creating a logical volume, adding a mirrored
copy to an existing logical volume
• Change which mirror pools a logical volume is assigned to
• Enable an existing logical volume to use mirror pools
• Disable a mirror pool
• Define mirror pool strictness

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-1. Unit objectives QV0121.6

Notes:

2-2 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Mirroring
• Logical volumes can be mirrored
• Each logical volume can have one, two or three copies
## lsvg
lsvg -l
-l testvg
testvg
testvg:
testvg:
LV
LV NAME
NAME TYPETYPE LPs
LPs PPs
PPs PVsPVs LVLV STATE
STATE MOUNT
MOUNT POINT
POINT
lv00
lv00 jfs
jfs 33 33 11 closed/syncd N/A
closed/syncd N/A
lv01
lv01 jfs
jfs 22 22 11 closed/syncd
closed/syncd N/AN/A
## mklvcopy
mklvcopy lv00
lv00 22
## lslv
lslv -m
-m lv00
lv00 lv00
lv00:N/A
lv00:N/A
LP
LP PP1
PP1 PV1PV1 PP2
PP2 PV2
PV2 PP3
PP3 PV3
PV3
0001 LP0 LP1 LP2
0001 0193
0193 hdisk1
hdisk1 0195
0195 hdisk2
hdisk2
0002
0002 0194
0194 hdisk1
hdisk1 0196
0196 hdisk2
hdisk2
0003
0003 0195
0195 hdisk1
hdisk1 0197
0197 hdisk2
hdisk2
## mirrorvg
mirrorvg testvg
testvg
0516-1804
0516-1804 chvg:
chvg: The
The quorum
quorum change
change takes
takes effect
effect immediately.
immediately.
## lslv
lslv -m
-m lv01
lv01 PP20 PP2 PP3
PP73
lv01:N/A
lv01:N/A
LP
LP PP1
PP1 PV1PV1 PP2
PP2 PV2
PV2 PP3
PP3 PV3
PV3 PP32 PP44
0001
0001 0193
0193 hdisk2
hdisk2 0196
0196 hdisk1
hdisk1
0002
0002 0194
0194 hdisk2
hdisk2 0197
0197 hdisk1
hdisk1 hdisk1 hdisk2
## lsvg
lsvg -l
-l testvg
testvg
testvg:
testvg:
LV
LV NAME
NAME TYPETYPE LPs
LPs PPs
PPs PVsPVs LVLV STATE
STATE MOUNT
MOUNT POINT
POINT
lv00
lv00 jfs
jfs 33 66 22 closed/syncd
closed/syncd N/AN/A
lv01
lv01 jfs
jfs 22 44 22 closed/syncd
closed/syncd N/AN/A

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-2. Mirroring QV0121.6

Notes:
The basic concept of mirroring is simple – keep multiple copies of the data replicated in
different locations to eliminate the possibility of data loss in case of a disk failure
situation. To provide the best availability, each copy of the mirrored data should be
located on separate physical disks, and accessed using separate I/O adapters. If you
are using SAN disks, you need to know how the SAN disks are divided up. As far as
LVM is concerned, each SAN disk presented is a different disk.
LVM supports one (unmirrored), two, or three copies of a logical volume.

© Copyright IBM Corp. 2012 Unit 2. Mirroring and Striping 2-3


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

Mirrored logical volume scheduling


• Scheduling policies:
– Sequential
Sequential write
– Parallel
with round-robin
read x
read
read y
read z

read 3 *
read 2 *
read 1
with sequential read
* If needed
Parallel write
UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-3. Mirrored logical volume scheduling QV0121.6

Notes:
LVM offers several scheduling policies for mirrored volumes to control how data is
written and read from the copies. The following table shows the scheduling policies and
the mklv or chlv arguments to set the policies.
mklv or chlv
Policy Write Operation Read Operation
argument
Sequential Sequential Sequential -d s
Parallel Parallel Parallel -d p
Parallel/sequential Parallel Sequential -d ps
Parallel/round-robin Parallel Round-robin -d pr

2-4 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Striped logical volumes


• Data spread across disks in such a way that I/O can occur in parallel
• Each logical partition divided into chunks
• Stripe width is the number of disks in one column
• Stripe size is the size of chunks
• Can mirror striped logical volumes for higher availability
LOGICAL VOLUME: stripelv
LP1 LP2 LP3 LP4 LP5 LP6 ...
1-1 1-2 1-3 1-4 2-1 2-2 2-3 2-4 3-1 3-2 3-3 3-4 4-1 4-2 4-3 4-4 5-1 5-2 5-3 5-4 6-1 6-2 6-3 6-4

PP1 PP2 PP3 PP1 PP2 PP3 PP1 PP2 PP3 PP1 PP2 PP3

hdisk14 hdisk15 hdisk16 hdisk17


1st I/O 3rd I/O
2nd I/O 4th I/O
UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-4. Striped logical volumes QV0121.6

Notes:
The striping mechanism, also known as RAID 0, is a technology that was developed to
achieve I/O performance gain. The basic concept of striping is that in the write phase,
each logical partition is chopped into small pieces (called stripe units, or chunks) and
these chunks are written to separate physical volumes in parallel. In the read phase,
these chunks are read from those separate physical volumes in parallel, and
re-assembled into the actual data.

© Copyright IBM Corp. 2012 Unit 2. Mirroring and Striping 2-5


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

Mirrored logical volume strictness


• Strictness controls whether copies of a logical partition can share the same physical
volume
• Types of allocation strictness (flags to mklv and chlv)
-s n : Non-strict (copies for a logical partition can share the same physical volume)
-s y : Strict allocation (copies for a logical partition cannot share the same physical volume)
-s s : Super strict allocation (partitions allocated for one mirror cannot share a physical volume with the
partitions from another mirror)

lv00
LP1 LP2
lv00 Strict Super strict
1-1 1-2 2-1 2-2

LP1 LP2
hdisk1 hdisk2
PP20
PP2 PP3
PP32

PP20 PP2 PP3

PP32 hdisk3 hdisk4


PP20
hdisk1 hdisk2 PP2 PP3
PP32

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-5. Mirrored logical volume strictness QV0121.6

Notes:
Strict allocation requires that the copies of each logical partition cannot share a physical
volume.
Super strict allocation require that copy 1 of LPx cannot be on the same physical
volume as copy 2 of LPy in the same logical volume.

2-6 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Mirroring rootvg
1. Locate disk(s) to add to rootvg. Make sure it is bootable
bootinfo -B hdisk1
2. Add disk(s) to rootvg.
extendvg rootvg hdisk1
3. Mirror rootvg.
mirrorvg -m rootvg hdisk1
4. Update boot record on newly mirrored disk.
bosboot –ad /dev/hdisk1
5. Update bootlist to include new disk.
bootlist -m normal hdisk0 hdisk1
6. Test ability to reboot from new disk.
a) Shutdown
b) Disable hdisk0
c) Reboot
* Note: These steps assume hdisk0 is the current disk in rootvg and hdisk1 is the disk that
is being added to mirror rootvg

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-6. Mirroring rootvg QV0121.6

Notes:
Mirroring the rootvg volume group is important because by maintaining an active
mirrored copy of rootvg on another disk you can ensure AIX will continue to run in the
event of a disk failure.
By having a mirror copy of rootvg on another disk, you have the ability to boot from
more than one disk in the event that another boot disk has failed.

© Copyright IBM Corp. 2012 Unit 2. Mirroring and Striping 2-7


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



Mirror pools
• Physical volumes in a scalable volume group can be separated into
mirror pools
• Simplifies the task of mirroring data
• A physical volume can only belong to one mirror pool at a time
• Logical volume copies that are assigned to a mirror pool will only
allocate partitions from the physical volumes in that mirror pool
• Any changes to mirror pool characteristics will not affect partitions
allocated before the changes were made
• The reorgvg command should be used after mirror pool changes
are made to move the allocated partitions to conform to the mirror
pool restrictions

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-7. Mirror pools QV0121.6

Notes:
A mirror pool is made up of one or more physical volumes. Each physical volume can
only belong to one mirror pool at a time. Mirror pools can only be used with scalable
volume groups.
When a mirrored logical volume is created, each copy can be assigned to a mirror pool.
Once assigned to a mirror pool, the logical volume copies will only allocate partitions
from the physical volumes in their mirror pool.
If something is changed with the characteristics of a mirror pool, new logical partitions
will adhere to those changes but existing logical partitions will not be affected. To bring
all the logical partitions to follow the new characteristics, you must use the reorgvg
command.

2-8 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Creating mirror pools


• A mirror pool is created by assigning one or more physical volumes
to it. This can be done when:
– Creating the volume group: mkvg –S –p mpool PVs
– Extending the volume group: extendvg –p mpool VG PVs
– Assigning a physical volume to a mirror pool: chpv –p mpool PVs

• The lsvg -P command lists the mirror pool that each physical
volume in the volume group belongs to

• The lspv –P command lists the mirror pool that each physical
volume belongs to

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-8. Creating mirror pools QV0121.6

Notes:
Mirror pools are created by just assigning physical volumes to them. This can be done
when first creating a scalable volume group with the mkvg -p flag, or when a physical
volume is added to a volume group with the extendvg -p flag, or when assigning
physical volume to a mirror pool with the chpv -p flag.
To see all the mirror pools in a volume group and the physical volumes that belong to
them, you can use the lsvg -P command.
To see what mirror pool a single physical volume belongs to you can use the lspv -P
command.

© Copyright IBM Corp. 2012 Unit 2. Mirroring and Striping 2-9


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

Creating mirror pools - Example


## lspv
lspv
hdisk0
hdisk0 00f6bccbf0315c5d
00f6bccbf0315c5d rootvg
rootvg active
active
hdisk1
hdisk1 00f6bccb865a4040
00f6bccb865a4040 None
None
hdisk2
hdisk2 00f6bccb865a40b0
00f6bccb865a40b0 None
None
hdisk3
hdisk3 00f6bccb8660533b
00f6bccb8660533b None
None
hdisk4
hdisk4 00f6bccb86698a17
00f6bccb86698a17 None
None
## mkvg
mkvg -S
-S -p
-p MP1
MP1 hdisk1
hdisk1
vg00
vg00
## extendvg
extendvg -p
-p MP2
MP2 vg00
vg00 hdisk2
hdisk2
## chpv -p MP3 hdisk3
chpv -p MP3 hdisk3
0516-320
0516-320 getlvodm:
getlvodm: Physical
Physical volume
volume hdisk3
hdisk3 is
is not
not assigned
assigned to
to
aa volume
volume group.
group.
0516-722
0516-722 chpv:
chpv: Unable
Unable to
to change
change physical
physical volume
volume hdisk3.
hdisk3.
## extendvg vg00 hdisk3
extendvg vg00 hdisk3
## chpv
chpv -p
-p MP3
MP3 hdisk3
hdisk3
## lsvg
lsvg -P
-P vg00
vg00
Physical
Physical Volume
Volume Mirror
Mirror Pool
Pool
hdisk1
hdisk1 MP1
MP1
hdisk2
hdisk2 MP2
MP2
hdisk3
hdisk3 MP3
MP3
## lspv
lspv -P
-P
Physical
Physical Volume
Volume Volume
Volume Group
Group Mirror
Mirror Pool
Pool
hdisk0
hdisk0 rootvg
rootvg
hdisk1
hdisk1 vg00
vg00 MP1
MP1
hdisk2
hdisk2 vg00
vg00 MP2
MP2
hdisk3
hdisk3 vg00
vg00 MP3
MP3
hdisk4
hdisk4 None
None

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-9. Creating mirror pools - Example QV0121.6

Notes:

2-10 AIX LVM Issues © Copyright IBM Corp. 2012


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


Uempty

Using mirror pools


• Mirror pools can be used when:
– Creating a logical volume:
mklv –c NumCopies –p copy[1|2|3]=mpool VG LVsize

– Adding a mirrored copy to an existing logical volume:


mklvcopy –p copy[1|2|3]=mpool LV NumCopies

– Mirroring all logical volumes in a volume group:


mirrorvg –c NumCopies –p copy[1|2|3]=mpool VG

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-10. Using mirror pools QV0121.6

Notes:
When creating a logical volume, you can specify which mirror pool to use for each copy
with the mklv -p flag.
To add a mirrored copy to an existing logical volume with the mklvcopy command, use
the mklvcopy -p flag.
To mirror all the logical volumes in a volume group and assigned the mirror pools to use,
use the mirrorvg command with the -p flag.

© Copyright IBM Corp. 2012 Unit 2. Mirroring and Striping 2-11


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

Using mirror pools – Example 1


• Creating a logical volume
## mklv
mklv -c
-c 22 -p
-p copy1=MP1
copy1=MP1 -p
-p copy2=MP2
copy2=MP2 vg00
vg00 44
lv00
lv00

## lslv
lslv lv00
lv00
LOGICAL
LOGICAL VOLUME:
VOLUME: lv00
lv00 VOLUME
VOLUME GROUP:
GROUP: vg00
vg00
LV
LV IDENTIFIER:
IDENTIFIER: 00f6bccb00004c0000000137907c488b.1
00f6bccb00004c0000000137907c488b.1 PERMISSION:
PERMISSION: read/write
read/write
VG
VG STATE:
STATE: active/complete
active/complete LV
LV STATE:
STATE: closed/syncd
closed/syncd
TYPE:
TYPE: jfs
jfs WRITE
WRITE VERIFY:
VERIFY: offoff
MAX
MAX LPs:
LPs: 512
512 PP
PP SIZE:
SIZE: 32
32 megabyte(s)
megabyte(s)
COPIES:
COPIES: 22 SCHED
SCHED POLICY:
POLICY: parallel
parallel
LPs:
LPs: 44 PPs:
PPs: 88
STALE
STALE PPs:
PPs: 00 BB
BB POLICY:
POLICY: relocatable
relocatable
INTER-POLICY:
INTER-POLICY: minimum
minimum RELOCATABLE:
RELOCATABLE: yes
yes
INTRA-POLICY:
INTRA-POLICY: middle
middle UPPER
UPPER BOUND:
BOUND: 1024
1024
MOUNT
MOUNT POINT:
POINT: N/A
N/A LABEL:
LABEL: None
None
DEVICE
DEVICE UID:
UID: 00 DEVICE
DEVICE GID:
GID: 00
DEVICE
DEVICE PERMISSIONS:
PERMISSIONS: 432432
MIRROR
MIRROR WRITE
WRITE CONSISTENCY:
CONSISTENCY: on/ACTIVE
on/ACTIVE
EACH
EACH LP
LP COPY
COPY ON
ON AA SEPARATE
SEPARATE PV
PV ?:
?: yes
yes
Serialize
Serialize IO
IO ?:
?: NO
NO
DEVICESUBTYPE
DEVICESUBTYPE :: DS_LVZ
DS_LVZ
COPY
COPY 11 MIRROR
MIRROR POOL:
POOL: MP1
MP1
COPY
COPY 22 MIRROR
MIRROR POOL:
POOL: MP2
MP2
COPY
COPY 33 MIRROR
MIRROR POOL:
POOL: None
None

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-11. Using mirror pools - Example 1 QV0121.6

Notes:

2-12 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Using mirror pools – Example 2


• Adding a mirrored copy to an existing logical volume
## mklv
mklv –p
–p copy1=MP1
copy1=MP1 vg00
vg00 22
lv01
lv01
## mklvcopy
mklvcopy -p-p copy2=MP2
copy2=MP2 -p-p copy3=MP3
copy3=MP3 lv01
lv01 33
## lslv
lslv lv01
lv01
LOGICAL
LOGICAL VOLUME:
VOLUME: lv01
lv01 VOLUME
VOLUME GROUP:
GROUP: vg00
vg00
LV
LV IDENTIFIER:
IDENTIFIER: 00f6bccb00004c0000000137966d6ddf.2
00f6bccb00004c0000000137966d6ddf.2 PERMISSION:
PERMISSION: read/write
read/write
VG
VG STATE:
STATE: active/complete
active/complete LV
LV STATE:
STATE: closed/stale
closed/stale
TYPE:
TYPE: jfs
jfs WRITE
WRITE VERIFY:
VERIFY: offoff
MAX
MAX LPs:
LPs: 512
512 PP
PP SIZE:
SIZE: 32
32 megabyte(s)
megabyte(s)
COPIES:
COPIES: 33 SCHED POLICY:
SCHED POLICY: parallel
parallel
LPs:
LPs: 22 PPs:
PPs: 66
STALE PPs:
STALE PPs: 44 BB POLICY:
BB POLICY: relocatable
relocatable
INTER-POLICY:
INTER-POLICY: minimum
minimum RELOCATABLE:
RELOCATABLE: yes
yes
INTRA-POLICY:
INTRA-POLICY: middle
middle UPPER
UPPER BOUND:
BOUND: 1024
1024
MOUNT
MOUNT POINT:
POINT: N/A
N/A LABEL:
LABEL: None
None
DEVICE
DEVICE UID:
UID: 00 DEVICE
DEVICE GID:
GID: 00
DEVICE
DEVICE PERMISSIONS:
PERMISSIONS: 432432
MIRROR
MIRROR WRITE
WRITE CONSISTENCY:
CONSISTENCY: on/ACTIVE
on/ACTIVE
EACH
EACH LP
LP COPY
COPY ON
ON AA SEPARATE
SEPARATE PVPV ?:
?: yes
yes
Serialize
Serialize IOIO ?:
?: NO
NO
DEVICESUBTYPE
DEVICESUBTYPE :: DS_LVZ
DS_LVZ
COPY
COPY 11 MIRROR
MIRROR POOL:
POOL: MP1
MP1
COPY
COPY 22 MIRROR
MIRROR POOL:
POOL: MP2
MP2
COPY
COPY 33 MIRROR
MIRROR POOL:
POOL: MP3
MP3
## syncvg
syncvg -l
-l lv01
lv01

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-12. Using mirror pools - Example 2 QV0121.6

Notes:

© Copyright IBM Corp. 2012 Unit 2. Mirroring and Striping 2-13


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

Using mirror pools – Example 3


• Mirroring all logical volumes in a volume group
## mklv
mklv -p
-p copy1=MP2
copy1=MP2 vg00
vg00 33
lv02
lv02
## mirrorvg
mirrorvg -c
-c 22 -p
-p copy2=MP1
copy2=MP1 vg00
vg00
0516-1804
0516-1804 chvg:
chvg: The
The quorum
quorum change
change takes
takes effect
effect immediately.
immediately.
## lslv
lslv lv02
lv02
LOGICAL
LOGICAL VOLUME:
VOLUME: lv02
lv02 VOLUME
VOLUME GROUP:
GROUP: vg00
vg00
LV
LV IDENTIFIER:
IDENTIFIER: 00f6bccb00004c0000000137907c488b.3
00f6bccb00004c0000000137907c488b.3 PERMISSION:
PERMISSION: read/write
read/write
VG
VG STATE:
STATE: active/complete
active/complete LV
LV STATE:
STATE: closed/syncd
closed/syncd
TYPE:
TYPE: jfs
jfs WRITE
WRITE VERIFY:
VERIFY: offoff
MAX
MAX LPs:
LPs: 512
512 PP
PP SIZE:
SIZE: 32
32 megabyte(s)
megabyte(s)
COPIES:
COPIES: 22 SCHED
SCHED POLICY:
POLICY: parallel
parallel
LPs:
LPs: 33 PPs:
PPs: 66
STALE
STALE PPs:
PPs: 00 BB
BB POLICY:
POLICY: relocatable
relocatable
INTER-POLICY:
INTER-POLICY: minimum
minimum RELOCATABLE:
RELOCATABLE: yes
yes
INTRA-POLICY:
INTRA-POLICY: middle
middle UPPER
UPPER BOUND:
BOUND: 1024
1024
MOUNT
MOUNT POINT:
POINT: N/A
N/A LABEL:
LABEL: None
None
DEVICE
DEVICE UID:
UID: 00 DEVICE
DEVICE GID:
GID: 00
DEVICE
DEVICE PERMISSIONS:
PERMISSIONS: 432432
MIRROR
MIRROR WRITE
WRITE CONSISTENCY:
CONSISTENCY: on/ACTIVE
on/ACTIVE
EACH
EACH LP
LP COPY
COPY ON
ON AA SEPARATE
SEPARATE PV
PV ?:
?: yes
yes
Serialize
Serialize IO
IO ?:
?: NO
NO
DEVICESUBTYPE
DEVICESUBTYPE :: DS_LVZ
DS_LVZ
COPY
COPY 11 MIRROR
MIRROR POOL:
POOL: MP2
MP2
COPY
COPY 22 MIRROR
MIRROR POOL:
POOL: MP1
MP1
COPY
COPY 33 MIRROR
MIRROR POOL:
POOL: None
None

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-13. Using mirror pools - Example 3 QV0121.6

Notes:

2-14 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Changing mirror pools


• The chlv –m command can be used to:
– Change which mirror pools a logical volume is assigned to
– Enable an existing logical volume to use mirror pools
– Syntax: chlv –m copy[1|2|3]=mirrorpool LV

• Any partitions allocated before the chlv command is run will not
belong to the mirror pool specified in the chlv command

• The reorgvg command will need to be run to move the old partitions
to the new mirror pool
– Syntax: reorgvg VG [LV]

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-14. Changing mirror pools QV0121.6

Notes:
The mirror pool that a copy of a logical volume is assigned to can be changed with the 
chlv -m command. The -m flag specifies a mirror pool for each copy of the logical
volume. To specify more than one copy, provide multiple -m flags, one for each copy.
Any physical partitions allocated before the chlv command is run will belong to the
original mirror pool. The reorgvg command will need to be run to move the original
physical partitions to the new mirror pool.

© Copyright IBM Corp. 2012 Unit 2. Mirroring and Striping 2-15


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

Changing mirror pools assigned to an LV


• Use chlv –m to change mirror pools assigned to an LV
## lslv
lslv lv02
lv02 || grep
grep MIRROR
MIRROR
MIRROR
MIRROR WRITE
WRITE CONSISTENCY:
CONSISTENCY: on/ACTIVE
on/ACTIVE
COPY
COPY 11 MIRROR
MIRROR POOL:
POOL: MP2
MP2
COPY
COPY 22 MIRROR
MIRROR POOL:
POOL: MP1
MP1
COPY
COPY 33 MIRROR
MIRROR POOL:
POOL: None
None
## lslv -m lv02
lslv -m lv02
lv02:N/A
lv02:N/A
LP
LP PP1
PP1 PV1
PV1 PP2
PP2 PV2
PV2 PP3
PP3 PV3
PV3
0001
0001 0199
0199 hdisk2
hdisk2 0199
0199 hdisk1
hdisk1
0002
0002 0200
0200 hdisk2
hdisk2 0200
0200 hdisk1
hdisk1
0003
0003 0201
0201 hdisk2
hdisk2 0201
0201 hdisk1
hdisk1
## chlv -m copy1=MP1 -m copy2=MP2
chlv -m copy1=MP1 -m copy2=MP2 lv02lv02
0516-1812
0516-1812 lchangelv:
lchangelv: Warning,
Warning, existing
existing allocation
allocation violates
violates mirror
mirror pools.
pools.
Consider
Consider reorganizing
reorganizing the
the logical
logical volume
volume to
to bring
bring it
it into
into compliance.
compliance.
## lslv -m lv02
lslv -m lv02
lv02:N/A
lv02:N/A
LP
LP PP1
PP1 PV1
PV1 PP2
PP2 PV2
PV2 PP3
PP3 PV3
PV3
0001
0001 0199
0199 hdisk2
hdisk2 0199
0199 hdisk1
hdisk1
0002
0002 0200
0200 hdisk2
hdisk2 0200
0200 hdisk1
hdisk1
0003
0003 0201
0201 hdisk2
hdisk2 0201
0201 hdisk1
hdisk1
## reorgvg vg00 lv02
reorgvg vg00 lv02
0516-962
0516-962 reorgvg:
reorgvg: Logical
Logical volume
volume lv02
lv02 migrated.
migrated.
## lslv -m lv02
lslv -m lv02
lv02:N/A
lv02:N/A
LP
LP PP1
PP1 PV1
PV1 PP2
PP2 PV2
PV2 PP3
PP3 PV3
PV3
0001
0001 0199
0199 hdisk1
hdisk1 0199
0199 hdisk2
hdisk2
0002
0002 0200
0200 hdisk1
hdisk1 0200
0200 hdisk2
hdisk2
0003
0003 0201
0201 hdisk1
hdisk1 0201
0201 hdisk2
hdisk2
UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-15. Changing mirror pools assigned to an LV QV0121.6

Notes:

2-16 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Changing a logical volume to use mirror pools


• Use chlv –m to change an existing LV to use mirror pools
## mklv
mklv -c
-c 22 vg00
vg00 33
lv03
lv03
## lslv
lslv -m
-m lv03
lv03
lv03:N/A
lv03:N/A
LP
LP PP1
PP1 PV1
PV1 PP2
PP2 PV2
PV2 PP3
PP3 PV3
PV3
0001
0001 0195
0195 hdisk3
hdisk3 0202
0202 hdisk2
hdisk2
0002
0002 0196
0196 hdisk3
hdisk3 0203
0203 hdisk2
hdisk2
0003
0003 0197
0197 hdisk3
hdisk3 0204
0204 hdisk2
hdisk2
## lslv
lslv lv03
lv03 || grep
grep MIRROR
MIRROR
MIRROR
MIRROR WRITE
WRITE CONSISTENCY:
CONSISTENCY: on/ACTIVE
on/ACTIVE
COPY
COPY 11 MIRROR
MIRROR POOL:
POOL: None
None
COPY
COPY 22 MIRROR
MIRROR POOL:
POOL: None
None
COPY
COPY 33 MIRROR
MIRROR POOL:
POOL: None
None
## chlv
chlv -m
-m copy1=MP2
copy1=MP2 -m
-m copy2=MP3
copy2=MP3 lv03
lv03
0516-1812
0516-1812 lchangelv:
lchangelv: Warning,
Warning, existing
existing allocation
allocation violates
violates mirror
mirror pools.
pools.
Consider
Consider reorganizing
reorganizing the
the logical
logical volume
volume to
to bring
bring it
it into
into compliance.
compliance.
## lslv
lslv lv03
lv03 || grep
grep MIRROR
MIRROR
MIRROR
MIRROR WRITE
WRITE CONSISTENCY:
CONSISTENCY: on/ACTIVE
on/ACTIVE
COPY
COPY 11 MIRROR
MIRROR POOL:
POOL: MP2
MP2
COPY
COPY 22 MIRROR
MIRROR POOL:
POOL: MP3
MP3
COPY
COPY 33 MIRROR
MIRROR POOL:
POOL: None
None
## reorgvg
reorgvg vg00
vg00 lv03
lv03
0516-962
0516-962 reorgvg:
reorgvg: Logical
Logical volume
volume lv03
lv03 migrated.
migrated.
## lslv -m lv03
lslv -m lv03
lv03:N/A
lv03:N/A
LP
LP PP1
PP1 PV1
PV1 PP2
PP2 PV2
PV2 PP3
PP3 PV3
PV3
0001
0001 0202
0202 hdisk2
hdisk2 0195
0195 hdisk3
hdisk3
0002
0002 0203
0203 hdisk2
hdisk2 0196
0196 hdisk3
hdisk3
0003
0003 0204
0204 hdisk2
hdisk2 0197
0197 hdisk3
hdisk3
UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-16. Changing a logical volume to use mirror pools QV0121.6

Notes:

© Copyright IBM Corp. 2012 Unit 2. Mirroring and Striping 2-17


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

Viewing mirror pool information


## lspv
lspv -P
-P
Physical
Physical Volume
Volume Volume
Volume Group
Group Mirror
Mirror Pool
Pool
hdisk0
hdisk0 rootvg
rootvg
hdisk1
hdisk1 vg00
vg00 MP1
MP1
hdisk2
hdisk2 vg00
vg00 MP2
MP2
hdisk3
hdisk3 vg00
vg00 MP3
MP3
hdisk4
hdisk4 None
None
## lsvg
lsvg -P
-P vg00
vg00
Physical
Physical Volume
Volume Mirror
Mirror Pool
Pool
hdisk1
hdisk1 MP1
MP1
hdisk2
hdisk2 MP2
MP2
hdisk3
hdisk3 MP3
MP3
## lsvg
lsvg -m
-m vg00
vg00
Logical
Logical Volume
Volume Copy
Copy 11 Copy
Copy 22 Copy
Copy 33
lv00
lv00 MP1
MP1 MP2
MP2 None
None
lv01
lv01 MP1
MP1 MP2
MP2 MP3
MP3
lv02
lv02 MP1
MP1 MP2
MP2 None
None
lv03
lv03 MP2
MP2 MP3
MP3 None
None
## lslv
lslv lv03
lv03
LOGICAL
LOGICAL VOLUME:
VOLUME: lv03
lv03 VOLUME
VOLUME GROUP:
GROUP: vg00
vg00
LV
LV IDENTIFIER:
IDENTIFIER: 00f6bccb00004c0000000137966d6ddf.4
00f6bccb00004c0000000137966d6ddf.4 PERMISSION:
PERMISSION: read/write
read/write
VG
VG STATE:
STATE: active/complete
active/complete LV
LV STATE:
STATE: closed/syncd
closed/syncd
TYPE:
TYPE: jfs
jfs WRITE
WRITE VERIFY:
VERIFY: off
off
MAX
MAX LPs:
LPs: 512
512 PP
PP SIZE:
SIZE: 32
32 megabyte(s)
megabyte(s)
COPIES:
COPIES: 22 SCHED
SCHED POLICY:
POLICY: parallel
parallel
...
...
COPY
COPY 11 MIRROR
MIRROR POOL:
POOL: MP2
MP2
COPY
COPY 22 MIRROR
MIRROR POOL:
POOL: MP3
MP3
COPY
COPY 33 MIRROR
MIRROR POOL:
POOL: None
None
UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-17. Viewing mirror pool information QV0121.6

Notes:

2-18 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Disabling a mirror pool on an LV copy


• Use chlv –M copy-num LV to disable a mirror pool copy on a specified
copy for the logical volume:
## lsvg
lsvg -m
-m vg00
vg00
Logical
Logical Volume
Volume Copy
Copy 11 Copy
Copy 22 Copy
Copy 33
lv00
lv00 MP1
MP1 MP2
MP2 None
None
lv01
lv01 MP1
MP1 MP2
MP2 MP3
MP3
lv02
lv02 MP1
MP1 MP2
MP2 None
None
lv03
lv03 MP2
MP2 MP3
MP3 None
None
## lsvg
lsvg -P
-P vg00
vg00
Physical
Physical Volume
Volume Mirror
Mirror Pool
Pool
hdisk1
hdisk1 MP1
MP1
hdisk2
hdisk2 MP2
MP2
hdisk3
hdisk3 MP3
MP3
## chlv
chlv -M
-M 33 lv01
lv01
## lslv
lslv -m
-m lv01
lv01
lv01:N/A
lv01:N/A
LP
LP PP1
PP1 PV1
PV1 PP2
PP2 PV2
PV2 PP3
PP3 PV3
PV3
0001
0001 0197
0197 hdisk1
hdisk1 0197
0197 hdisk2
hdisk2 0193
0193 hdisk3
hdisk3
0002
0002 0198
0198 hdisk1
hdisk1 0198
0198 hdisk2
hdisk2 0194
0194 hdisk3
hdisk3
## lsvg
lsvg -m
-m vg00
vg00
Logical
Logical Volume
Volume Copy
Copy 11 Copy
Copy 22 Copy
Copy 33
lv00
lv00 MP1
MP1 MP2
MP2 None
None
lv01
lv01 MP1
MP1 MP2
MP2 None
None
lv02
lv02 MP1
MP1 MP2
MP2 None
None
lv03
lv03 MP2
MP2 MP3
MP3 None
None

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-18. Disabling a mirror pool on an LV copy QV0121.6

Notes:
If you no longer want to use a mirror pool on a logical volume, you can use the chlv -M
flag to disable it.

© Copyright IBM Corp. 2012 Unit 2. Mirroring and Striping 2-19


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

Removing a physical volume from a mirror pool


• Use chpv –P PV to remove a PV from a mirror pool
• A mirror pool is deleted when there are no more physical volumes
assigned to the mirror pool
## lsvg
lsvg -m
-m vg00
vg00
Logical
Logical Volume
Volume Copy
Copy 11 Copy
Copy 22 Copy
Copy 33
lv00
lv00 MP1
MP1 MP2
MP2 None
None
lv01
lv01 MP1
MP1 MP2
MP2 None
None
lv02
lv02 MP1
MP1 MP2
MP2 None
None
lv03
lv03 MP2
MP2 MP3
MP3 None
None
## chpv
chpv –P
–P hdisk3
hdisk3
## lsvg
lsvg -m
-m vg00
vg00
Logical
Logical Volume
Volume Copy
Copy 11 Copy
Copy 22 Copy
Copy 33
lv00
lv00 MP1
MP1 MP2
MP2 None
None
lv01
lv01 MP1
MP1 MP2
MP2 None
None
lv02
lv02 MP1
MP1 MP2
MP2 None
None
lv03
lv03 MP2
MP2 None
None
## lslv
lslv -m
-m lv03
lv03
lv03:N/A
lv03:N/A
LP
LP PP1
PP1 PV1
PV1 PP2
PP2 PV2
PV2 PP3
PP3 PV3
PV3
0001
0001 0202
0202 hdisk2
hdisk2 0195
0195 hdisk3
hdisk3
0002
0002 0203
0203 hdisk2
hdisk2 0196
0196 hdisk3
hdisk3
0003
0003 0204
0204 hdisk2
hdisk2 0197
0197 hdisk3
hdisk3
## lsvg
lsvg -P
-P vg00
vg00
Physical
Physical Volume
Volume Mirror
Mirror Pool
Pool
hdisk1
hdisk1 MP1
MP1
hdisk2
hdisk2 MP2
MP2
hdisk3
hdisk3 None
None

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-19. Removing a physical volume from a mirror pool QV0121.6

Notes:
To remove a physical volume from a mirror pool, use the chpv -P command.

2-20 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Removing a VG and its mirror pools


• When a volume group is deleted, all mirror pools in that volume
group are removed
## lsvg
lsvg -P
-P vg00
vg00
Physical
Physical Volume
Volume Mirror
Mirror Pool
Pool
hdisk1
hdisk1 MP1
MP1
hdisk2
hdisk2 MP2
MP2
hdisk3
hdisk3 None
None
## reducevg
reducevg -df
-df vg00
vg00 hdisk1
hdisk1 hdisk2
hdisk2 hdisk3
hdisk3
rmlv:
rmlv: Logical
Logical volume
volume lv00
lv00 is
is removed.
removed.
rmlv:
rmlv: Logical
Logical volume
volume lv02
lv02 is
is removed.
removed.
rmlv:
rmlv: Logical
Logical volume
volume lv01
lv01 is
is removed.
removed.
rmlv:
rmlv: Logical
Logical volume
volume lv03
lv03 is
is removed.
removed.
ldeletepv:
ldeletepv: Volume
Volume Group
Group deleted
deleted since
since it
it contains
contains no
no physical
physical volumes.
volumes.
## lspv
lspv -P
-P
Physical
Physical Volume
Volume Volume
Volume Group
Group Mirror
Mirror Pool
Pool
hdisk0
hdisk0 rootvg
rootvg
hdisk1
hdisk1 None
None
hdisk2
hdisk2 None
None
hdisk3
hdisk3 None
None
hdisk4
hdisk4 None
None

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-20. Removing a VG and its mirror pools QV0121.6

Notes:
When a volume group is deleted, all the mirror pools in that volume group are deleted.

© Copyright IBM Corp. 2012 Unit 2. Mirroring and Striping 2-21


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

Mirror pool strictness


• Mirror pool strictness can be used to enforce tighter restrictions on
mirror pool use
• Mirror pool strictness can have one of the following three values:
– off
When mirror pool strictness is set to off, no restrictions are placed on
mirror pool use. This is the default value.
– on
When mirror pool strictness is set to on, each logical volume copy
created in the volume group must be assigned to a mirror pool.
– super
When mirror pool strictness is set to super, the following restrictions
apply:
¾ Partitions allocated for one mirror cannot share a physical volume with the
partitions from another mirror
¾ There can be a maximum of three mirror pools in a volume group
¾ Each mirror pool must contain at least one copy of each logical volume in
the volume group
UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-21. Mirror pool strictness QV0121.6

Notes:
Mirror pool strictness can be used to enforce tighter restrictions on mirror pool use.
When strict mirror pools are enabled, any logical volume created in the volume group
must have mirror pools enabled for each copy of the logical volume. However, logical
volumes created before strict mirror pools are enabled don't have to have mirror pools
enabled.
A super strict allocation policy can be set so that the partitions allocated for one mirror
cannot share a physical volume with the partitions from another mirror. Also, there can
be a maximum of three mirror pools per volume group and each mirror pool must
contain at least one copy of each logical volume.
By default, mirror pool strictness if turned off.

2-22 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Mirror pool strictness - Off


## lsvg
lsvg vg00
vg00
VOLUME
VOLUME GROUP:
GROUP: vg00
vg00 VG
VG IDENTIFIER:
IDENTIFIER:
00f6bccb00004c0000000137966d6ddf
00f6bccb00004c0000000137966d6ddf
VG
VG STATE:
STATE: active
active PP
PP SIZE:
SIZE: 32
32 megabyte(s)
megabyte(s)
VG
VG PERMISSION:
PERMISSION: read/write
read/write TOTAL
TOTAL PPs:
PPs: 2871
2871 (91872
(91872 megabytes)
megabytes)
MAX
MAX LVs:
LVs: 256
256 FREE
FREE PPs:
PPs: 2845
2845 (91040
(91040 megabytes)
megabytes)
LVs:
LVs: 44 USED
USED PPs:
PPs: 26
26 (832
(832 megabytes)
megabytes)
OPEN
OPEN LVs:
LVs: 00 QUORUM:
QUORUM: 11 (Disabled)
(Disabled)
TOTAL
TOTAL PVs:
PVs: 33 VG
VG DESCRIPTORS:
DESCRIPTORS: 33
STALE
STALE PVs:
PVs: 00 STALE
STALE PPs:
PPs: 00
ACTIVE
ACTIVE PVs:
PVs: 33 AUTO
AUTO ON:
ON: yes
yes
MAX
MAX PPs
PPs per
per VG:
VG: 32768
32768 MAX
MAX PVs:
PVs: 1024
1024
LTG
LTG size
size (Dynamic):
(Dynamic): 256
256 kilobyte(s)
kilobyte(s) AUTO
AUTO SYNC:
SYNC: no
no
HOT
HOT SPARE:
SPARE: no
no BB
BB POLICY:
POLICY: relocatable
relocatable
MIRROR
MIRROR POOL
POOL STRICT:
STRICT: off
off
PV
PV RESTRICTION:
RESTRICTION: none
none

## lsvg
lsvg -P
-P vg00
vg00
Physical
Physical Volume
Volume Mirror
Mirror Pool
Pool
hdisk1
hdisk1 MP1
MP1
hdisk2
hdisk2 MP2
MP2
hdisk3
hdisk3 None
None

## lslv
lslv -m
-m lv03
lv03
lv03:N/A
lv03:N/A
LP
LP PP1
PP1 PV1
PV1 PP2
PP2 PV2
PV2 PP3
PP3 PV3
PV3
0001
0001 0202
0202 hdisk2
hdisk2 0195
0195 hdisk3
hdisk3
0002
0002 0203
0203 hdisk2
hdisk2 0196
0196 hdisk3
hdisk3
0003
0003 0204
0204 hdisk2
hdisk2 0197
0197 hdisk3
hdisk3

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-22. Mirror pool strictness - Off QV0121.6

Notes:

© Copyright IBM Corp. 2012 Unit 2. Mirroring and Striping 2-23


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

Enabling and changing mirror pool strictness


• The mkvg -M command enables mirror pool strictness when creating a
volume group:
-M y Mirror pools must be used on each logical volume in the volume group
-M s Super strict mirror pools are enforced on the volume group

• When creating a volume group without the mkvg –M flag, there are no
restrictions on mirror pools
• The chvg -M command changes the mirror pool strictness of a volume
group:
-M y Each logical volume copy created in the volume group must be assigned
to a mirror pool.
-M s Super strict mirror pools are enforced on the volume group.
-M n No restrictions are placed on the user of mirror pool (default)

• Logical volumes created before strict mirror pools are enabled do not have
to have mirror pools enabled

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-23. Enabling and changing mirror pool strictness QV0121.6

Notes:
The mirror pool strictness can be set when the volume group is created with the 
mkvg -M flag.
- The mkvg -M y flag turns on the mirror pool strict policy.
- The mkvg -M s flag turns on the mirror pool super strict policy
When a volume group is created, mirror pool strictness is off by default.
The mirror pool strictness for the volume group can be changed with the chvg -M
command.
- The chvg -M y flag changes the volume group's mirror pool strictness to strict
- The chvg -M s flag changes the volume group's mirror pool strictness to super strict
- The chvg -M n flag turns off mirror pool strictness

2-24 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Changing to a strict mirror pool


• Changing a volume group to strict mirror pools
## lsvg
lsvg -P
-P vg00
vg00
Physical
Physical Volume
Volume Mirror
Mirror Pool
Pool
hdisk1
hdisk1 MP1
MP1
hdisk2
hdisk2 MP2
MP2
hdisk3
hdisk3 None
None
## chvg
chvg -M
-M yy vg00
vg00
## lslv
lslv -m
-m lv03
lv03
lv03:N/A
lv03:N/A
LP
LP PP1
PP1 PV1
PV1 PP2
PP2 PV2
PV2 PP3
PP3 PV3
PV3
0001
0001 0202
0202 hdisk2
hdisk2 0195
0195 hdisk3
hdisk3
0002
0002 0203
0203 hdisk2
hdisk2 0196
0196 hdisk3
hdisk3
0003
0003 0204
0204 hdisk2
hdisk2 0197
0197 hdisk3
hdisk3
## lsvg
lsvg vg00
vg00
VOLUME
VOLUME GROUP:
GROUP: vg00
vg00 VG
VG IDENTIFIER:
IDENTIFIER: 00f6bccb00004c0000000137966d6ddf
00f6bccb00004c0000000137966d6ddf
VG
VG STATE:
STATE: active
active PP
PP SIZE:
SIZE: 32
32 megabyte(s)
megabyte(s)
...
...
MIRROR
MIRROR POOL
POOL STRICT:
STRICT: on
on
...
...
## mklv
mklv -c
-c 22 vg00
vg00 44 hdisk1
hdisk1 hdisk2
hdisk2
0516-1814
0516-1814 lcreatelv: Mirror
lcreatelv: Mirror pools
pools must
must be
be defined
defined for
for each
each copy
copy when
when strict
strict mirror
mirror
pools are enabled.
pools are enabled.
0516-822
0516-822 mklv:
mklv: Unable
Unable toto create
create logical
logical volume.
volume.
## mklv
mklv -c
-c 22 -p
-p copy1=MP1
copy1=MP1 -p-p copy2=MP2
copy2=MP2 vg00
vg00 44
lv04
lv04
UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-24. Changing to a strict mirror pool QV0121.6

Notes:

© Copyright IBM Corp. 2012 Unit 2. Mirroring and Striping 2-25


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

Changing to a super strict mirror pool


• Changing a volume group to super strict mirror pools
## lsvg
lsvg -P
-P vg00
vg00
Physical
Physical Volume
Volume Mirror
Mirror Pool
Pool
hdisk1
hdisk1 MP1
MP1
hdisk2
hdisk2 MP2
MP2
hdisk3
hdisk3 None
None
## chvg
chvg -M
-M ss vg00
vg00
## lsvg
lsvg vg00
vg00
VOLUME
VOLUME GROUP:
GROUP: vg00
vg00 VG
VG IDENTIFIER:
IDENTIFIER: 00f6bccb00004c0000000137966d6ddf
00f6bccb00004c0000000137966d6ddf
VG
VG STATE:
STATE: active
active PP
PP SIZE:
SIZE: 32
32 megabyte(s)
megabyte(s)
...
...
MIRROR
MIRROR POOL
POOL STRICT:
STRICT: super
super
...
...
## mklv
mklv -p
-p copy1=MP1
copy1=MP1 vg00
vg00 22
0516-1829
0516-1829 mklv: Every mirror
mklv: Every mirror pool
pool must
must contain
contain aa copy
copy of
of
the logical volume.
the logical volume.
0516-822
0516-822 mklv:
mklv: Unable
Unable to
to create
create logical
logical volume.
volume.
## mklv
mklv -c 2 -p copy1=MP1 -p copy2=MP2 vg00
-c 2 -p copy1=MP1 -p copy2=MP2 vg00 22
lv05
lv05
## mklv
mklv -c
-c 33 -p
-p copy1=MP2
copy1=MP2 -p
-p copy2=MP2
copy2=MP2 -p-p copy3=MP2
copy3=MP2 vg00
vg00 22
0516-404
0516-404 allocp:
allocp: This
This system
system cannot
cannot fulfill
fulfill the
the allocation
allocation request.
request.
There
There areare not
not enough
enough free
free partitions
partitions oror not
not enough
enough physical
physical volumes
volumes
to
to keep
keep strictness
strictness and
and satisfy
satisfy allocation
allocation requests.
requests. The
The command
command
should
should be be retried
retried with
with different
different allocation
allocation characteristics.
characteristics.
0516-822
0516-822 mklv:
mklv: Unable
Unable to
to create
create logical
logical volume.
volume.
UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-25. Changing to a super strict mirror pool QV0121.6

Notes:

2-26 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Checkpoint
1.True or False: A logical volume can have up to three copies

2.True or False: Mirror pools can be used with any type of volume
group

3.True or False: A physical volume can only belong to one mirror pool
at a time

4.True or False: Any partitions allocated before the chlv command is


run will not belong to the mirror pool specified in the chlv command

5.True or False: Logical volumes created before strict mirror pools are
enabled do not have to have mirror pools enabled

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-26. Checkpoint QV0121.6

Notes:

© Copyright IBM Corp. 2012 Unit 2. Mirroring and Striping 2-27


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

Exercise 2: Mirroring
This exercise consists of two parts:

– Create mirrored logical volumes

– Create and use mirror pools

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-27. Exercise 2: Mirroring QV0121.6

Notes:

2-28 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Unit summary
• Mirroring provides additional copies of data to protect against data loss due to
hardware failure
• Striped logical volumes have the data spread across disks in such a way that
I/O can occur in parallel
• Physical volumes in a scalable volume group can be separated into mirror pools
• Mirror pools can be created with the mkvg, extendvg, and chpv commands
• Mirror pools can be used when creating a logical volume, adding a mirrored
copy to an existing logical volume, and mirroring all logical volumes in a volume
group
• Logical volume copies that are assigned to a mirror pool will only allocate
partitions from the physical volumes in that mirror pool
• Any changes to mirror pool characteristics will not affect partitions allocated
before the changes were made
• The reorgvg command should be used after mirror pool changes are made to
move the allocated partitions to conform to the mirror pool restrictions
• Mirror pool strictness can be used to enforce tighter restrictions on mirror pool
use
UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 2-28. Unit summary QV0121.6

Notes:

© Copyright IBM Corp. 2012 Unit 2. Mirroring and Striping 2-29


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

2-30 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty Unit 3. LVM Metadata

What this unit is about


This unit describes the metadata of the Logical Volume Manager.

What you should be able to do


After completing this unit, you should be able to:
• Describe the following LVM metadata:
- Physical Volume Identifier (PVID)
- Logical Volume Identifier (LVID)
- Volume Group Descriptor Area (VGDA)
- Volume Group Status Area (VGSA)
- Mirror Write Consistency Cache (MWC)

How you will check your progress


Accountability:
• Checkpoint
• Machine exercises

References
AIX Operating System and Device Management
Redbook SG24-5432 - AIX Logical Volume Manager:
from A to Z: Introduction and Concepts
Redbook SG24-5433 - AIX Logical Volume Manager:
from A to Z: Troubleshooting and Commands

© Copyright IBM Corp. 2012 Unit 3. LVM Metadata 3-1


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

Unit objectives
After completing this unit, you should be able to:

• Describe the following LVM metadata:


– Physical Volume Identifier (PVID)

– Logical Volume Control Block (LVCB)

– Volume Group Descriptor Area (VGDA)

– Volume Group Status Area (VGSA)

– Mirror Write Consistency Cache (MWC)

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 3-1. Unit objectives QV0121.6

Notes:

3-2 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

LVM command interface


User Interface JFS mklv

High Level
lcreatelv
Intermediate

Library Calls
lvm_createlv

LVM Device Driver


LVDD
Disk Device Driver

Adapter Device Driver


Disk DD

SCSI DD

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 3-2. LVM command interface QV0121.6

Notes:
The LVM consists of:
- High level commands
- Intermediate level commands
- Logical volume manager subroutine interface library
- Logical volume device driver
- Disk device driver
- Adapter device driver
The visual shows the path from a high level command (mklv) to an intermediate
command (lcreatelv) to a library function (lvm_createlv) to the logical volume device
driver to the disk device driver to the SCSI device driver and to the physical volume.
Other applications, for example, the journaled file system, talk directly to the LVDD.

© Copyright IBM Corp. 2012 Unit 3. LVM Metadata 3-3


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

LVM metadata
• LVM metadata is the configuration and status information
required by the LVM system to operate correctly

• LVM data is the actual contents of the logical volumes

• LVM metadata is stored in multiple places:


– ODM
– On-disk

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 3-3. LVM metadata QV0121.6

Notes:
LVM metadata is the configuration and status information required by the LVM system
to operate correctly. This is in contrast with LVM data, which is the actual contents of the
logical volumes. LVM metadata is stored in a number of places.

3-4 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Physical volume identifier (PVID)


• PVID uniquely identifies the physical volume to the system

• Stored in:
– ODM (as 32 characters)
– Address hex 80 (0x80) on the physical disk

• Combination of the machine’s serial number and the date when it was generated

• PVID value:
– Is initially assigned when the disk is added to a volume group
– Can be assigned with the mkdev
Disk
flag -a pv=yes ODM
– Can be changed with the chdev Platform serial number
flag -a pv=yes
000db97134130580

Creation date code

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 3-4. Physical volume identifier (PVID) QV0121.6

Notes:
The PVID is a hex number which is used to uniquely identify the physical volume to the
system. The PVID contains 32 characters, and is stored in the ODM (CuAt object class)
and at address hex 80 (0x80) on the disk drive. It is a combination of the machine’s
serial number and the date when it was generated. At this time, the last 16 digits of the
PVID are set to zero.

© Copyright IBM Corp. 2012 Unit 3. LVM Metadata 3-5


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

Viewing the PVID


• Two ways to view on-disk PVID value:
## lquerypv
lquerypv -h
-h /dev/hdisk0
/dev/hdisk0
00000000
00000000 C9C2D4C1
C9C2D4C1 00000000
00000000 00000000
00000000 00000000
00000000 |................|
|................|
00000010
00000010 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 |................|
|................|
...
...
00000070
00000070 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 |................|
|................|
00000080
00000080 00F6BCCB
00F6BCCB F0314E2F
F0314E2F 00000000
00000000 00000000
00000000 |.....1N/........|
|.....1N/........|
00000090
00000090 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 |................|
|................|
...
...
000000E0
000000E0 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 |................|
|................|
000000F0
000000F0 00000000
00000000 00000000
00000000 00000000
00000000 00000000
00000000 |................|
|................|

## od
od -N
-N 0x10
0x10 -j
-j 0x80
0x80 -x
-x /dev/hdisk0
/dev/hdisk0
0000000
0000000 00f600f6 bccb
bccb f031
f031 4e2f
4e2f 0000
0000 0000
0000 0000
0000 0000
0000
0000010
0000010

• Two ways to view the PVID value in the ODM (stored in CuAt)
## lsattr
lsattr -Ea
-Ea pvid
pvid -l
-l hdisk0
hdisk0
pvid
pvid 00f6bccbf0314e2f0000000000000000 Physical
00f6bccbf0314e2f0000000000000000 Physical volume
volume identifier
identifier False
False

## lspv
lspv
hdisk0
hdisk0 00f6bccbf0314e2f
00f6bccbf0314e2f rootvg
rootvg active
active
hdisk1
hdisk1 00f6bccb38abc7f2
00f6bccb38abc7f2 testvg
testvg active
active
hdisk2
hdisk2 00f6bccb38abc861
00f6bccb38abc861 testvg
testvg active
active
hdisk3
hdisk3 none
none None
None
hdisk4
hdisk4 none
none None
None
UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 3-5. Viewing the PVID QV0121.6

Notes:

Viewing the PVID value on the physical disk


The PVID on the physical disk can viewed with two different commands:
- Intermediate command: lquerypv -h /dev/hdisk0
- The od command: od -N 0x10 -j 0x80 -x /dev/hdisk0

Viewing the PVID value in the ODM


The PVID value in the ODM is stored in the CuAt object class. It can be viewed with two
different commands.
- The lsattr command: lsattr -Ea pvid -l hdisk0
- The lspv command: lspv

3-6 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Logical volume metadata


• The Logical Volume Control Block (LVCB) holds important logical volume
information

• LVCB location:
– First 512 bytes of logical volume:
• Normal volume group
• Big volume group created without the mklv -T O flag
– Part of the Volume Group Descriptor Area (VGDA):
• Big volume group created with the mklv -T O flag
• Scalable volume group

• Be careful with raw logical volumes that have the LVCB at the beginning of
the logical volume

• Logical Volume Identifier (LVID):


– Soft serial number for the logical volume
– Made up of VGID.<num>

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 3-6. Logical volume metadata QV0121.6

Notes:

Logical Volume Control Block (LVCB)


Each logical volume has an LVCB.
The LVCB holds important information such as:
- Creation date of logical volume
- Allocation policies
- Information about mirrored copies
- Mount point into a JFS/JFS2 file system (if applicable)

Logical Volume Identifier (LVID)


The Logical Volume Identifier (LVID) is stored in the LVCB. It is a soft serial number
used to represent the logical volume to LVM libraries and low level commands. The
LVID is made up of VGID.<num>, where num is the order in which it was created in the
volume group.

© Copyright IBM Corp. 2012 Unit 3. LVM Metadata 3-7


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

Viewing the LVCB


## getlvcb
getlvcb -AT
-AT hd2
hd2
AIX LVCB
AIX LVCB
intrapolicy
intrapolicy == cc
copies
copies == 11
interpolicy
interpolicy == mm
lvid
lvid == 00f6bccb00004c0000000136f0314ebc.5
00f6bccb00004c0000000136f0314ebc.5
lvname
lvname == hd2
hd2
label = /usr
label = /usr
machine
machine id id == 6BCCB4C00
6BCCB4C00
number
number lps == 17
lps 17
relocatable
relocatable == yy
strict
strict == yy
stripe
stripe width
width == 00
stripe
stripe size in
size in exponent
exponent == 00
type = jfs2
type = jfs2
upperbound
upperbound == 32 32
fs
fs == vfs=jfs2:log=/dev/hd8:mount=automatic:type=bootfs:
vfs=jfs2:log=/dev/hd8:mount=automatic:type=bootfs:
vol=/usr:free=false:quota=no
vol=/usr:free=false:quota=no
time
time created == Thu
created Thu Apr
Apr 26
26 19:47:10
19:47:10 2012
2012
time
time modified = Thu Apr 26 19:55:06 2012
modified = Thu Apr 26 19:55:06 2012

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 3-7. Viewing the LVCB QV0121.6

Notes:
The intermediate level command, getlvcb -AT LVNAME, displays the contents of the
LVCB.

3-8 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Locating the LVCB


## lslv
lslv lv03
lv03
LOGICAL
LOGICAL VOLUME:
VOLUME: lv03
lv03 VOLUME
VOLUME GROUP:
GROUP: bigvg
bigvg
LV
LV IDENTIFIER:
IDENTIFIER: 00f6bccb00004c000000013738ea9eab.2
00f6bccb00004c000000013738ea9eab.2 PERMISSION:
PERMISSION: read/write
read/write
VG
VG STATE:
STATE: active/complete
active/complete LV
LV STATE:
STATE: closed/syncd
closed/syncd
TYPE:
TYPE: jfs
jfs WRITE
WRITE VERIFY:
VERIFY: off
off
MAX LPs:
MAX LPs: 512
512 PP SIZE:
PP SIZE: 32
32 megabyte(s)
megabyte(s)
COPIES:
COPIES: 11 SCHED POLICY:
SCHED POLICY: parallel
parallel
LPs:
LPs: 44 PPs:
PPs: 44
STALE PPs:
STALE PPs: 00 BB POLICY:
BB POLICY: relocatable
relocatable
INTER-POLICY:
INTER-POLICY: minimum
minimum RELOCATABLE:
RELOCATABLE: yes
yes
INTRA-POLICY:
INTRA-POLICY: middle
middle UPPER
UPPER BOUND:
BOUND: 128
128
MOUNT
MOUNT POINT:
POINT: N/A
N/A LABEL:
LABEL: None
None
DEVICE
DEVICE UID:
UID: 00 DEVICE
DEVICE GID:
GID: 00
DEVICE
DEVICE PERMISSIONS:
PERMISSIONS: 432
432
MIRROR
MIRROR WRITE CONSISTENCY:
WRITE CONSISTENCY: on/ACTIVE
on/ACTIVE
EACH
EACH LP
LP COPY
COPY ON
ON AA SEPARATE
SEPARATE PV
PV ?:
?: yes
yes
Serialize IO ?:
Serialize IO ?: NO
NO
DEVICESUBTYPE
DEVICESUBTYPE :: DS_LVZ
DS_LVZ
LVCB is not part of the logical volume

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 3-8. Locating the LVCB QV0121.6

Notes:
You can determine where the LVCB is by looking at the output of the lslv command.
If the LVCB is part of the Volume Group Descriptor Area rather than the first 512 bytes
of the logical volume, you will see an additional line at the end of the lslv output.

© Copyright IBM Corp. 2012 Unit 3. LVM Metadata 3-9


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

Volume group metadata


• Volume Group Descriptor Area – VGDA
List of Physical Name
Volumes List

Header List of Logical Trailer


Volumes

• Volume Group Status Area - VGSA


BYTE 0 BYTE 127

........
UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 3-9. Volume group metadata QV0121.6

Notes:

Volume Group Description Area (VGDA)


The VGDA tracks all the logical volumes and physical volumes in the volume group and
maps which physical partitions are allocated to which logical volume. Because it is
critical to locating the data, a copy of the VGDA is kept on every physical volume in the
volume group.

Volume Group Status Area (VGSA)


The Volume Group Status Area (VGSA) contains the state of all allocated physical
partitions on all of the physical volumes in the volume group. It is also used when logical
volumes are mirrored, and it records information on stale partitions.

3-10 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Using lqueryvg to view the VGDA


## lqueryvg
lqueryvg -p
-p hdisk0
hdisk0 -At
-At
Max
Max LVs:
LVs: 256
256
PP Size:
PP Size: 27
27
Free
Free PPs:
PPs: 193
193
LV
LV count:
count: 12
12
PV count:
PV count: 11
Total VGDAs:
Total VGDAs: 22
Conc
Conc Allowed:
Allowed: 00
MAX
MAX PPs
PPs per
per PV
PV 1016
1016
MAX
MAX PVs:
PVs: 32
32
Quorum
Quorum (disk):
(disk): 11
Quorum
Quorum (dd):
(dd): 11
Auto
Auto Varyon
Varyon ?:?: 11
Conc
Conc Autovaryo
Autovaryo 00
Varied
Varied on
on Conc
Conc 00
Logical:
Logical: 00f6bccb00004c0000000136f0314ebc.1
00f6bccb00004c0000000136f0314ebc.1 hd5
hd5 11
00f6bccb00004c0000000136f0314ebc.2
00f6bccb00004c0000000136f0314ebc.2 hd6
hd6 11
00f6bccb00004c0000000136f0314ebc.3
00f6bccb00004c0000000136f0314ebc.3 hd8
hd8 11
00f6bccb00004c0000000136f0314ebc.4
00f6bccb00004c0000000136f0314ebc.4 hd4
hd4 11
00f6bccb00004c0000000136f0314ebc.5
00f6bccb00004c0000000136f0314ebc.5 hd2
hd2 11
00f6bccb00004c0000000136f0314ebc.6
00f6bccb00004c0000000136f0314ebc.6 hd9var
hd9var 11
00f6bccb00004c0000000136f0314ebc.7
00f6bccb00004c0000000136f0314ebc.7 hd3
hd3 11
00f6bccb00004c0000000136f0314ebc.8
00f6bccb00004c0000000136f0314ebc.8 hd1
hd1 11
00f6bccb00004c0000000136f0314ebc.9
00f6bccb00004c0000000136f0314ebc.9 hd10opt
hd10opt 11
00f6bccb00004c0000000136f0314ebc.10
00f6bccb00004c0000000136f0314ebc.10 hd11admin
hd11admin 11
00f6bccb00004c0000000136f0314ebc.11
00f6bccb00004c0000000136f0314ebc.11 lg_dumplv 11
lg_dumplv
00f6bccb00004c0000000136f0314ebc.12
00f6bccb00004c0000000136f0314ebc.12 livedump 11
livedump
Physical:
Physical: 00f6bccbf0314e2f
00f6bccbf0314e2f 22 00
Total
Total PPs:
PPs: 239
239
LTG size:
LTG size: 128
128
HOT
HOT SPARE:
SPARE: 00
AUTO
AUTO SYNC:
SYNC: 00
VG
VG PERMISSION:
PERMISSION: 00
SNAPSHOT
SNAPSHOT VG:
VG: 00
IS_PRIMARY
IS_PRIMARY VG:
VG: 00
PSNFSTPP:
PSNFSTPP: 4352
4352
VARYON
VARYON MODE:
MODE: 00
VG Type:
VG Type: 00
Max
Max PPs:
PPs: 32512
32512
Mirror
Mirror Pool
Pool StSt nn
Sys Mgt Mode:
Sys Mgt Mode: 00
VG
VG Reserved:
Reserved: 11
PV
PV RESTRICTION
RESTRICTION 00

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 3-10. Using lqueryvg to view the VGDA QV0121.6

Notes:
You can use the command lqueryvg -p hdiskX -At to view some of the VGDA
contents. If you issue this command for all the physical volumes in a volume group, the
output should be the same.

© Copyright IBM Corp. 2012 Unit 3. LVM Metadata 3-11


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

VGDA expansion and quorum


Example 1 hdisk0
VGDA LV00
Single disk
Dual VGDA VGDA
Single logical volume

Example 2 hdisk0 hdisk1


Two disks VGDA LV00 VGDA LV00
Three VGDAs
Single logical volume on hdisk0 VGDA
VGDA on hdisk1 "aware"

Example 3 hdisk0 hdisk1 hdisk2


Three disks
VGDA LV00 VGDA LV00 VGDA LV00
Three VGDAs
LV00 on hdisk0 LV01 LV01 LV01
LV01 & LV02 on hdisk2 & hdisk3
LV02 LV02 LV02
VGDA on all disks "aware"

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 3-11. VGDA expansion and quorum QV0121.6

Notes:
Quorum is the check used by the LVM to resolve possible data conflicts and to prevent
data corruption. A quorum ensures data integrity of the VGDA/VGSA areas in the event
of a disk failure.
Each physical disk in a volume group has at least one VGDA/VGSA. In order to form a
quorum, the LVM must be able to access more than 50% of the VGDAs in the volume
group.
A volume group cannot be varied on if there is no quorum. Normally, if quorum is lost
while a volume group is active, an error message is issued and the volume group is
varied off.
There are cases when it is desirable to continue operating the volume group even
though a quorum is lost. In these cases, quorum checking can be turned off for the
volume group with the chvg -Q n command.

3-12 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

ODM and VGDA inconsistencies


• exportvg VG
ODM
ODM

Volume group no longer recognized by AIX, no ODM entries

• importvg –y VG PV
ODM
ODM

Volume group recognized by AIX, ODM information updated

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 3-12. ODM and VGDA inconsistencies QV0121.6

Notes:
exportvg and importvg are used to remove and add volume groups on a system. They
can also be used to fix corrupt LVM information in the ODM.

© Copyright IBM Corp. 2012 Unit 3. LVM Metadata 3-13


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

Mirrored write consistency (MWC)


• If the system crashes during a write, the MWC is used to resynchronize
mirror copies after a crash

• Two types of MWC:


– Active
• Last 62 Logical Track Group (LTG) writes are tracked in MWC area
– Passive
• Open logical volumes are tracked in VGSA

• Use the -w flag in the mklv and chlv commands to set the MWC type to
use:
y or a - Turns on active mirror write consistency
p - Turns on passive mirror write consistency (only big and scalable volume
groups)
n - No mirror write consistency

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 3-13. Mirrored write consistency (MWC) QV0121.6

Notes:
The Mirror Write Consistency (MWC) record identifies which logical partitions may be
inconsistent if the system is not shut down correctly. When the volume group is varied
back on-line, this information is used to make the logical partitions consistent again.

3-14 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Checkpoint
1.True or False: All PVIDs must be unique within a system.

2.True or False: LVM metadata is stored in both the ODM and on physical
volumes.

3.True or False: The LVCB is always located in the first 512 bytes of a
logical volume.

4.True or False: The information in the VGDAs on all disks within a volume
group is the same.

5.A quorum is:


a. Half the number of available disks
b. More than half the number of available disks
c. Half the number of active VGDAs
d. More than half the number of active VGDAs

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 3-14. Checkpoint QV0121.6

Notes:

© Copyright IBM Corp. 2012 Unit 3. LVM Metadata 3-15


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

Exercise 2: Working with LVM metadata


This exercise consists of four parts:

– Intermediate level informational commands

– File system tests

– ODM tests

– Working with quorum

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 3-15. Exercise 2: Working with LVM metadata QV0121.6

Notes:

3-16 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Unit summary
• LVM metadata is the configuration and status information required by
the LVM system to operate correctly
• LVM data is the actual contents of the logical volumes
• LVM metadata includes:
– PVID
– LVCB
– VGDA
– VGSA
– MWC cache
• LVM metadata is stored in multiple places:
– ODM
– On-disk

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 3-16. Unit summary QV0121.6

Notes:

© Copyright IBM Corp. 2012 Unit 3. LVM Metadata 3-17


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

3-18 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty Unit 4. Disk Replacement and Other LVM Issues

What this unit is about


This unit describes proper disk replacement procedures and what can
happen if the procedures are not followed. It also describes some
other LVM issues.

What you should be able to do


After completing this unit, you should be able to:
• Describe the correct way to remove and replace a physical volume
• Describe how to handle phantom ODM entries
• Show how to correct ODM/LVM inconsistencies
• Define the hot spare feature

How you will check your progress


Accountability:
• Checkpoint
• Machine exercises

References
AIX Operating System and Device Management
System Management Concepts: Operating System and Devices
Redbook SG24-5432 - AIX Logical Volume Manager:
from A to Z: Introduction and Concepts
Redbook SG24-5433 - AIX Logical Volume Manager:
from A to Z: Troubleshooting and Commands

© Copyright IBM Corp. 2012 Unit 4. Disk Replacement and Other LVM Issues 4-1
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit objectives
After completing this course, you should be able to:

• Describe the correct way to remove and replace a physical


volume

• Describe how to handle phantom ODM entries

• Show how to correct ODM/LVM inconsistencies

• Describe the hot spare feature

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 4-1. Unit objectives QV0121.6

Notes:

4-2 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Disk replacement
• Many LVM problems result from incorrect procedures when
replacing a disk drive

• Reasons disks may need to be replaced are:


– Disk has physically failed and is offline

– Disk is reporting errors, but is still available

– Disk is working, but doesn't meet the user's needs

• Some procedures vary depending on the number of logical


volume copies

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 4-2. Disk replacement QV0121.6

Notes:
Most of the problems a system administrator encounters are related to physical disks. It
is important to be aware of some of the procedures that can be used for disk
replacement, what can happen if the procedures are not followed, and how to fix the
problem.

© Copyright IBM Corp. 2012 Unit 4. Disk Replacement and Other LVM Issues 4-3
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Removing physical volumes


• reducevg removes a physical volume from a volume group by
removing information about the physical volume from the:
– ODM
– VGDAs on remaining physical volumes in the volume group and target
physical volume

• Syntax: reducevg [-d] VolumeGroup PhysicalVolume(s)

• All logical volumes on, or partially on, the physical volume are
removed (with the -d flag)

• reducevg is NOT the same as exportvg!

ODM
ODM

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 4-3. Removing physical volumes QV0121.6

Notes:
The reducevg command is used to remove a disk from a volume group, and is totally
different from exportvg, because it modifies both ODM and the VGDA.
If a disk is removed from a system without first running reducevg, the VGDA still has
the information about the removed disk, but the physical volume name no longer exists.
To remove this reference to the missing disk you can still use the reducevg command,
but with the PVID instead of the name.
You can use lqueryvg to get the PVIDs from the VGDA, then compare that with the
output from lspv to find the missing disk’s PVID.
# lquerypv -p <PVID_of_any_disk_in_VG> -At

4-4 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Disk replacement procedure


1. Backup single copy LVs 7. Add new PV to ODM
2. Close single copy LVs 8. Add new PV to VG
(e.g. unmount FSs)
3. Remove affected mirrors 9. Create mirrors

4. Remove PV from VG 10. Sync mirrored LVs

5. Remove PV from ODM 11. Recreate single copy LVs and file systems
6. Physically swap disks 12. Restore single copy LVs from backup

myvg

hdisk1 hdisk2 hdisk3

mirrlv (fs1) mirrlv (fs1) mirrlv (fs1)

lv00 (fs2) lv01 (fs3)

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 4-4. Disk replacement procedure QV0121.6

Notes:
This first case study is a scenario where a disk is not responding to queries. A probable
cause is that the disk is failing.
You should be familiar with which logical volumes are on the failing disk. To look at the
contents of a failing drive, use one of the other drives. In the example, use hdisk1 to
look at the logical volumes on hdisk2 with the following command:
# lspv -l -n hdisk1 hdisk2

© Copyright IBM Corp. 2012 Unit 4. Disk Replacement and Other LVM Issues 4-5
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Moving data within volume groups


• replacepv replaces one physical volume with another physical
volume in the volume group
replacepv {SourcePV | SourcePVID} DestinationPV

• migratepv moves allocated physical partitions from one physical


volume to one or more physical volumes
migratepv [-l LV] SourcePV DestinationPV(s)

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 4-5. Moving data within volume groups QV0121.6

Notes:
There are two commands that enable you to move data from one physical device to
another: replacepv and migratepv.
The replacepv command replaces one physical volume in a volume group with one
other physical volume. The allocation of the new physical partitions follows the policies
defined for the logical volumes that contain the physical partitions being replaced.
The basic syntax is: replacepv {sourcepvname | sourcepvid } destpvname
The migratepv command moves allocated physical partitions and the data they contain
from one physical volume to one or more other physical volumes. The allocation of the
new physical partitions follows the policies defined for the logical volumes that contain
the physical partitions being moved.
The basic syntax is: migratepv [-l LV] SourcePV [DestPV..]

4-6 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Disk replacement using replacepv


1. Backup single copy LVs 5. Restore (or recreate) data in
(if possible) single copy LVs (if needed)
2. Physically add new disk 6. Remove old PV from ODM
3. Add new PV to ODM 7. Physically remove old disk
4. Use replacepv command

# replacepv hdisk2 hdisk4


myvg

hdisk1 hdisk2 hdisk3 hdisk4

mirrlv (fs1) mirrlv (fs1) mirrlv (fs1)

lv00 (fs2) lv01 (fs3)

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 4-6. Disk replacement using replacepv . QV0121.6

Notes:
Using the replacepv command saves you several steps.
Note: Using the previous procedure, the replacement disk would get the same name as
the failing disk (hdisk2 in our example). Using replacepv, the new disk will get a new
disk name (hdisk4 in our example) and the failing disk name (hdisk2) will be available
if an additional disk is added later.

© Copyright IBM Corp. 2012 Unit 4. Disk Replacement and Other LVM Issues 4-7
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Renaming a device
• The rendev command can be used to rename devices
– Syntax: rendev -l Name -n NewName

• If the device is in the Available state, the rendev command must


unconfigure the device before renaming it
– If the unconfigure operation fails, the renaming will also fail
– If the unconfigure succeeds, the rendev command will configure the
device, after renaming it, to restore it to the Available state (by default)

• The rendev will fail:


– If the name has already been used or is present in the /dev directory
– If the name formed by appending the new name after the character r is
already used as a device name, or appears in the /dev directory

• Disk drive devices that are members of rootvg, or that will become
members of the rootvg (by means of LVM or install procedures), must
not be renamed

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 4-7. Renaming a device QV0121.6

Notes:
The device to be renamed is specified with the -l flag, and the new name is specified
with the -n flag. The new name can't be longer than 15 characters.
To be able to rename a device, the device must be unconfigured. If the device is in the
Available state, the rendev command will unconfigure the device before renaming it.
This is similar to the operation performed by the rmdev -l command. If it can't
unconfigure the device, it won't be able to rename it. After the rendev renames the
device, it will configure and restore it to the Available state. The -u flag may be used to
prevent the device from being configured and will leave it in a Defined state.
If the name is already in use or is currently in the /dev directory, the rendev command
will fail. A variation of this, is if the name formed by appending the new name after the
character r is already used as a device name, or appears in the /dev directory, the
operation fails.

4-8 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Phantom ODM entries (1 of 2)


• Symptoms:
– A physical volume is removed from a system, leaving behind
phantom ODM entries

• Possible causes:
– Proper procedures were not followed when removing the device

• Solution 1:
– First, try the following steps:
1. Remove the phantom logical volumes with the rmlv command
2. Do a reducevg to remove phantom physical volumes from the
volume group
3. Remove the phantom disk with rmdev

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 4-8. Phantom ODM entries (1 of 2) QV0121.6

Notes:
The most common problem seen at a customer site is when an external disk was
removed without doing the necessary pre-removal operations such as reducevg, rmdev
etc. How best can you clean up the system once the damage has been done? What
operations will purge the ODM of the entries pertaining to the removed disk, its volume
group, its logical volumes and file systems? The lsvg and lspv commands continue to
show you that a volume group that used to exist on the disk is present. However, it is
not really there, because the disk has been removed.

© Copyright IBM Corp. 2012 Unit 4. Disk Replacement and Other LVM Issues 4-9
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Phantom ODM entries (2 of 2)


• Solution 2
– If Solution 1 doesn't work, you will need to remove the phantom entries in
the ODM with ODM commands. Follow these steps:
1. Backup the Cu* files in case you end up deleting more than you should
## mkdir
mkdir /tmp/Cu.bak
/tmp/Cu.bak
## cp
cp /etc/objrepos/Cu*
/etc/objrepos/Cu* /tmp/Cu.bak
/tmp/Cu.bak

2. Search for all instances of the volume group, hdisk#, logical volume
names and log logical volume names in each of the customized classes.
For example:
## odmget
odmget CuAt
CuAt || grep
grep newvg
newvg
## odmget
odmget CuDvDr
CuDvDr || grep
grep hdisk1
hdisk1

3. Use the odmdelete command to delete every object you found in step 2
For example:
## odmdelete
odmdelete -o
-o CuAt
CuAt -q
-q “name=newvg”
“name=newvg”
## odmdelete
odmdelete -o
-o CuDvDr
CuDvDr -q
-q “value3=hdisk3”
“value3=hdisk3”

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 4-9. Phantom ODM entries (2 of 2) QV0121.6

Notes:
If the commands on the previous visual don't work, the only way to completely clean up
the ODM is by using the ODM commands to work directly with the ODM.

4-10 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

LVM/ODM inconsistency (1 of 2)
• Symptoms:
– Inconsistent or missing data when using high level commands
– High level commands fail with error messages

• Possible causes:
– The root (/) or /tmp file systems are full
– ODM corrupted
– Hardware failure
– Incorrect procedures

• Solutions:
– Non-rootvg
• exportvg and importvg
• redefinevg and synclvodm (if exportvg/importvg does not work)
– rootvg
• Try redefinevg and synclvodm
• Boot to maintenance mode

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 4-10. LVM/ODM inconsistency (1 of 2) QV0121.6

Notes:
High level commands use both the ODM and the LVM on-disk metadata. Symptoms of
inconsistency between the ODM and the on-disk metadata can be the failure of high
level commands, or inconsistent or missing data from high level commands.

© Copyright IBM Corp. 2012 Unit 4. Disk Replacement and Other LVM Issues 4-11
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

LVM/ODM inconsistency (2 of 2)
After it boots into maintenance mode, follow these steps to recover rootvg:
1. Get the list of logical volumes from the VGDA of the physical volume, then delete
all of the ODM information about logical volumes on rootvg:
## lqueryvg
lqueryvg -p-p hdisk0
hdisk0 -L
-L || awk
awk '{print
'{print $2}'
$2}' \\
|| while
while read
read LVname;
LVname; dodo
>> odmdelete
odmdelete -q-q “name=$LVname”
“name=$LVname” -o -o CuAt
CuAt
>> odmdelete
odmdelete -q-q “name=$LVname”
“name=$LVname” -o -o CuDv
CuDv
>> odmdelete
odmdelete -q-q “value3=$LVname”
“value3=$LVname” -o -o CuDvDr
CuDvDr
>> done
done
2. Delete the volume group information from ODM:
## odmdelete
odmdelete -q
-q “name=rootvg”
“name=rootvg” -o
-o CuAt
CuAt
## odmdelete
odmdelete -q
-q “parent=rootvg”
“parent=rootvg” -o-o CuDv
CuDv
## odmdelete
odmdelete -q
-q “name=rootvg”
“name=rootvg” -o
-o CuDv
CuDv
## odmdelete
odmdelete -q
-q “name=rootvg”
“name=rootvg” -o
-o CuDep
CuDep
## odmdelete
odmdelete -q
-q “dependency=rootvg”
“dependency=rootvg” -o -o CuDep
CuDep
## odmdelete
odmdelete -q
-q “value1=10”
“value1=10” -o
-o CuDvDr
CuDvDr
## odmdelete
odmdelete -q
-q “value3=rootvg”
“value3=rootvg” -o-o CuDvDr
CuDvDr

3. Add the rootvg associated with the physical volume back to the ODM:
## importvg
importvg -y
-y rootvg
rootvg hdisk0
hdisk0

4. Recreate the information in the ODM for rootvg:


## varyonvg
varyonvg -f
-f rootvg
rootvg
## sync;
sync; sync
sync

5. Reboot
UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 4-11. LVM/ODM inconsistency (2 of 2) QV0121.6

Notes:
For rootvg, the problem is more difficult: rootvg cannot be exported. It may be possible
to fix the problem using the redefinevg or synclvodm commands.
If that doesn’t fix the problem, you must go into the RAM Disk Maintenance Mode (Boot
into Maintenance mode from the DVD/CD-ROM).
Use the steps in the visual to recover the rootvg volume group after booting to
maintenance mode and mounting file systems.This assumes that hdisk0 is part of
rootvg.

4-12 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Hot sparing
hdisk5 hdisk6 hdisk7 hdisk8

1st copy 2nd copy 1st copy 2nd copy


of of of of
data1lv data1lv data2lv data2lv

hdisk10

• Designate hot spare disks


chpv -h [y | n] PV
New copy
of • Set hot spare migration policy for volume group
chvg -h [y | Y | n | r] VG
data1lv
• Set hot spare synchronization policy for volume group
chvg -s [y | n] VG
Hot spare

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 4-12. Hot sparing QV0121.6

Notes:
You can designate disks as hot spare disks for a volume group with mirrored logical
volumes. This support complements but does not replace the sparing support available
with serial storage architecture (SSA) disks. You can also add hot-spare disks using
SSA disks when you add one to your volume group.
When a disk is configured as a hot spare, it is unused until a failure. It is available to
replace any failing mirrored disk in the volume group.
When a disk fails, LVM replaces the failing disk with the hot spare disk from the
remaining copy(ies) of the logical volumes that were on the failing disk. The hot spare
disk is no longer available to replace a failing disk.

© Copyright IBM Corp. 2012 Unit 4. Disk Replacement and Other LVM Issues 4-13
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Problem determination
• Most LVM problems are related to disk failure
– Failure itself
– Incorrect procedures after a disk failure
• First step: Backup data! (if possible)
– Depending on the exact nature of the problem you are experiencing, a recovery
attempt that fails may leave the system in worse condition than before
• Keep a log of the actions you take
• Problem determination methodology:
1. Define the problem
• Gather information from users
• Gather information from the system
• Try easy, no-risk solutions immediately
2. Make hypothesis
3. Check your assumptions This is often an
4. Trial solution iterative process
UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 4-13. Problem determination QV0121.6

Notes:

4-14 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Checkpoint (1 of 2)
1. Which command redefines the set of physical volumes in the ODM,
based on the VGDA of a volume group?
a. synclvodm
b. reducevg
c. redefinevg
d. reducepv

2. If LVM data is corrupt in the ODM but valid in a VGDA, which


command(s) will restore the ODM information:
a. migratevg
b. exportvg/importvg
c. reorgvg
d. extendvg/syncvg

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 4-14. Checkpoint (1 of 2) QV0121.6

Notes:

© Copyright IBM Corp. 2012 Unit 4. Disk Replacement and Other LVM Issues 4-15
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Checkpoint (2 of 2)
3. True or False: The probable cause of phantom entries in the
ODM is not following proper procedures removing the device.

4. True or False: The reducevg command modifies both the ODM


and the VGDA.

5. True or False: You can export a volume group to use in another


system using the reducevg command.

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 4-15. Checkpoint (2 of 2) QV0121.6

Notes:

4-16 AIX LVM Issues © Copyright IBM Corp. 2012


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

Uempty

Exercise 3: Problem determination


This exercise consists of three parts:
– Full file system

– ODM corruption and redefinevg/synclvodm

– Corrupted PVID

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 4-16. Exercise 3: Problem determination QV0121.6

Notes:

© Copyright IBM Corp. 2012 Unit 4. Disk Replacement and Other LVM Issues 4-17
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
Student Notebook

Unit summary
• Many LVM problems result from incorrect procedures when
replacing a disk drive

• The reducevg command removes a disk from a volume


group and also its information from the ODM and VGDAs

• The replacepv and migratepv commands are usually an


easier way to remove a disk

• Phantom ODM entries are usually the result of improper disk


removal procedures

• An inconsistency between the ODM and LVM metatdata


typically results in inconsistent or missing data from LVM
commands

UNIX Software Service Enablement © Copyright IBM Corporation 2012

Figure 4-17. Unit summary QV0121.6

Notes:

4-18 AIX LVM Issues © Copyright IBM Corp. 2012


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

AP Appendix A. Checkpoint solutions

Unit 1, "LVM Components"

Solutions for Figure 1-20, "Checkpoint," on page 1-21

Checkpoint solutions
1. True or False: A physical volume can only belong to one volume group.
The answer is True.

2. True or False: All physical partitions within a volume group are the same
size.
The answer is True.

3. True or False: A logical volume can span volume groups.


The answer is False.

4. True or False: Logical partitions are the same size as physical partitions
within a volume group.
The answer is True.

5. True or False: There must be at least two volume groups on a system.


The answer is False.

UNIX Software Service Enablement © Copyright IBM Corporation 2012

© Copyright IBM Corp. 2012 Appendix A. Checkpoint solutions A-1


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

Unit 2, "Mirroring and Striping"

Solutions for Figure 2-26, "Checkpoint," on page 2-27

Checkpoint solutions
1. True or False: A logical volume can have up to three copies
The answer is True.
2. True or False: Mirror pools can be used with any type of volume
group
The answer is False. Only with scalable volume groups.
3. True or False : A physical volume can only belong to one mirror
pool at a time
The answer is True.
4. True or False : Any partitions allocated before the chlv command is
run will belong to the mirror pool specified in the chlv command
The answer is False.
5. True or False : Logical volumes created before strict mirror pools
are enabled do not have to have mirror pools enabled
The answer is True.
UNIX Software Service Enablement © Copyright IBM Corporation 2012

A-2 AIX LVM Issues © Copyright IBM Corp. 2012


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

AP Unit 3, "LVM Metadata"

Solutions for Figure 3-14, "Checkpoint," on page 3-15

Checkpoint solutions
1. True or False: All PVIDs must be unique within a system.
The answer is True.

2. True or False: LVM metadata is stored in both the ODM and on physical
volumes.
The answer is True.

3. True or False: The LVCB is always located in the first 512 bytes of a logical
volume.
The answer is False.

4. True or False: The information in the VGDAs on all disks within a volume group
is the same.
The answer is True.

5. A quorum is:
a. Half the number of available disks
b. More than half the number of available disks
c. Half the number of active VGDAs
d. More than half the number of active VGDAs
The answer is d.
UNIX Software Service Enablement © Copyright IBM Corporation 2012

© Copyright IBM Corp. 2012 Appendix A. Checkpoint solutions A-3


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

Unit 4, "Disk Replacement and Other LVM Issues"

Solutions for Figure 4-14, "Checkpoint (1 of 2)," on page 4-15

Checkpoint solutions (1 of 2)
1. Which command redefines the set of physical volumes in the ODM,
based on the VGDA of a volume group?
a. synclvodm
b. reducevg
c. redefinevg
d. reducepv
The answer is c.

2. If LVM data is corrupt in the ODM but valid in a VGDA, which


command(s) will restore the ODM information:
a. migratevg
b. exportvg/importvg
c. reorgvg
d. extendvg/syncvg
The answer is b.
UNIX Software Service Enablement © Copyright IBM Corporation 2012

A-4 AIX LVM Issues © Copyright IBM Corp. 2012


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

AP Solutions for Figure 4-15, "Checkpoint (2 of 2)," on page 4-16

Checkpoint solutions (2 of 2)
3. True or False: The probable cause of phantom entries in the
ODM is not following proper procedures removing the device.
The answer is True.

4. True or False: The reducevg command modifies both the ODM


and the VGDA.
The answer is True.

5. True or False: You can export a volume group to use in another


system using the reducevg command.
The answer is False.

UNIX Software Service Enablement © Copyright IBM Corporation 2012

© Copyright IBM Corp. 2012 Appendix A. Checkpoint solutions A-5


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

A-6 AIX LVM Issues © Copyright IBM Corp. 2012


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

backpg
Back page

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy