[ Previous | Next | Contents | Glossary | Search ]
Performance Toolbox Version 1.2 and 2 for AIX: Guide and Reference

lvedit Command

Purpose

The logical volume editor is used for interactive definition and placement of logical volumes within a volume group. This command does not apply to AIX Version 4.2 or later.

Syntax

lvedit VolumeGroup

Description

The lvedit command invokes the logical volume editor in the context of a particular volume group (VolumeGroup). From within the editor, a user can inspect the current state of logical and physical volumes in the volume group and can make changes to this state interactively. A user can make the same changes that are possible using the mklv , chlv , extendlv and rmlv commands, but can have much more precise control over the placement of logical volumes on physical volumes (mapping of logical partitions to physical partitions).

When a user changes a logical volume from within the editor, the editor checks that the modification is permissible in the context of the current editor state. If the change is allowed, the editor state is modified to reflect it, so that the user can preview the results from within the editor. However, the actual system logical and physical volumes are not altered until the user elects to commit the changes, upon exiting the editor.

The logical volume editor permits both precise allocation of physical volumes to logical volumes within a volume group as well as the definition of logical volume attributes. However, this editor does not currently support the creation and modification of higher level abstractions built on these logical volumes, such as file systems and paging spaces. After arranging the logical volumes within a volume group, a user must still create or modify file systems, paging spaces, and journaling logs, for example. This can be done from within SMIT or by using commands such as mkfs , chfs , swapon , and chps . The editor also does not support creation or extension of volume groups, which must be defined prior to entering the editor.

Most editing operations (other than extension) are not permitted on logical volumes that are in active use. These consist of logical volumes with mounted file systems, active paging spaces, and journaling logs that are in current use. In general, before these logical volumes can be edited, they must be unmounted or deactivated. Furthermore, in the case of mounted file systems, any valuable data they contain should be archived (for example, to tape) prior to unmounting and editing.

Note: The lvedit command cannot be used to reduce the size of an existing logical volume. However, the reduce command of the logical volume editor can be used to reduce the size of a logical volume that has been extended but not yet committed.

General Interface Characteristics

The logical volume editor's interface has the following hierarchical structure:

Volume Group Editing

  1. Logical Volume Editing
    1. Logical Volume Extending
    2. Logical Volume Reducing
    3. Logical Volume Changing
  2. Physical Volume Editing
    1. Logical Volume Extending
    2. Logical Volume Reducing
    3. Logical Volume Changing
  3. Logical Volume Creation
    1. Logical Volume Extending
  4. Logical Volume Deletion

Each indentation level in the above outline represents the corresponding nesting level in the hierarchy of editor contexts, with the topmost level (volume group editing) being the most general context.

In general, within an editor context, a screenful of pertinent information is displayed, and the user is prompted to select one of the following types of actions:

The screen is typically divided into the following areas:

The prompt consists of some highlighted prompt text, followed by a default response enclosed in square brackets. If the user simply presses Enter, the default response is assumed. All keywords in user responses can be abbreviated to a unique prefix and are not case-sensitive; however, names of system objects (logical and physical volumes) must be entered completely, using the proper case. Responses must be terminated by pressing Enter.

The following control characters can be entered at any time (even during a response) to produce the corresponding screen effects:

Ctrl-U
Pages up.
Ctrl-D
Pages down.
Ctrl-R
Refreshes the screen.
Ctrl-W
Displays help information.

Volume Group Editing Context

This is the most general context of the editor. It is the initial context upon entering the editor and divides the screen into the following three sections:

Header Information
Volume Group Name
PPSize
Size of physical partitions (in megabytes)
Pageable Information

A list of logical volumes, with each entry having the following fields:

LV NAME
Logical volume name
NUMLPS
Number of logical partitions (size)
STATUS
Indication of whether the logical volume is in current use (active or mounted)
TYPE
jfs, jfslog, paging, boot, copy, or sysdump
MOUNT POINT
Directory path of file-system mount point; otherwise, not applicable if a file system has not been defined.

A list of physical volumes, with each entry having the following fields:

PV NAME
Physical volume name
NUMPPS
Number of physical partitions (size)
FREE
Number of free physical partitions
Commands
edit LogicalVolume
Enters the logical volume editing context.
edit PhysicalVolume
Enters the physical volume editing context.
add [ LogicalVolume ]
Enters the logical volume creation context.
delete LogicalVolume
Deletes a logical volume.
quit
Exits the editor.
Notes: If the logical volume name is not supplied for the add command, a name is automatically generated by the system. The delete operation is immediate and does not enter another editor context. Upon entering the quit command, the user is prompted on whether to commit changes (that is, whether to change the state of the volume group in the real system).

Logical Volume Editing Context

This context is entered from either the volume group editing context or the logical volume creation context. It permits the user to change all modifiable aspects of a logical volume.

Header Information
Logical Volume Name
Mount Point
For file system logical volumes
Type
jfs, jfslog, paging, boot, copy, or sysdump
Copies
Number of copies
Perm
Access permissions (r = read-only, w = read-write)
BBReloc
Bad block relocation enabled?
Sched
Mirrored write scheduling policy (p = parallel, s = sequential, r = striped)
Note: The lvedit command cannot create or edit striped filesystems.
MaxLPs
Maximum number of logical partitions
Verify
Write verification enabled?
Pageable Information

A list of contiguous logical partition ranges, with the following fields for each range:

LPS
Logical partition numbers
PV1 NAME
Physical volume name (1st copy)
PPS1
Physical partition numbers (1st copy)
PV2 NAME
Physical volume name (2nd copy)
PPS2
Physical partition numbers (2nd copy)
PV3 NAME
Physical volume name (3rd copy)
PPS3
Physical partition numbers (3rd copy)

A list of free physical partition ranges, with the following fields for each range:

FREE PPS
Free physical partition numbers
PV NAME
Name of physical volume with free space
Commands
extend
Adds logical partitions to the logical volume.
reduce
Removes logical partitions from the logical volume.
change
Changes the logical volume attributes.
quit
Exits to the volume group editing context.

Physical Volume Editing Context

This context is entered from the volume group editing context. It allows a user to make the same sort of changes to logical volumes as are made from the logical volume editing context. However, the information is presented from the point of view of a physical volume. Only the volume's physical partitions and allocations are listed.

Header Information
Physical Volume Name
Size
Number of physical partitions
Pageable Information

A list of contiguous physical partition ranges, with the following fields for each range:

PPS
Physical partition numbers
LV NAME
Logical volume name (if free)
LPS
Logical partition numbers (if not free)
CP
Copy number (if not free)
Commands
extend LogicalVolume
Adds logical partitions to a logical volume.
reduce LogicalVolume
Removes logical partitions from a logical volume.
change LogicalVolume
Changes the attributes of a logical volume.
quit
Exits to the volume group editing context.
Note: When extending a logical volume from the physical volume editing context, the physical volume name can be omitted from the physical partition lists, in which case the current physical volume is assumed.

Logical Volume Creation Context

This context is entered from the volume group editing context whenever a user enters the add command. The user is first permitted to change the attributes of the logical volume being created. Then the user is placed in the logical volume editing context to permit the user to define logical partitions for the logical volume.

Header Information
Logical Volume Name
Mount Point (for file system logical volumes)
Pageable Information

A list of the following attributes, with current value and permissible values:

TYPE
Intra
Intradisk allocation policy (preferred placement within a physical volume):
e
Edge
m
Middle
c
Center
im
Inner middle
ie
Inner edge
inter
Interdisk allocation policy (preferred number of physical volumes to be used for allocations):
m
Minimum
x
Maximum
Upper
Maximum number of physical volumes to be used for allocations.
Strict
Allocate each logical partition copy on a separate physical volume?
Relocate
Relocate logical volume during reorganization?
Label
Logical volume label string.
MaxLPs
Maximum number of logical partitions.
Schedule
Scheduling policy for mirrored writes:
p
Parallel
s
Sequential
r
Striped (not permissible)
Permission
Access permission:
r
Read-only
w
Read-write
BBRelocate
Bad block relocation enabled?
Verify
Write verification enabled?
Copies
Number of copies.
Consistency
Mirrored read-write consistency enabled?
Commands
cancel
Cancels creation of this logical volume.
Attribute Value
Changes the value of an attribute.
quit
Creates the logical volume as specified, and exits to the logical volume editing context for this logical volume.
Notes: The Intra, Inter, Upper and Strict values are associated with the logical volume and used by the system mklv command and extendlv command. However, they are not relevant when using the logical volume editor, since the editor permits precise placement regardless of the allocation policy attributes. When first created, a logical volume will not have any logical partitions defined for it. However, since a real logical volume must consist of at least one logical partition, the user must extend the logical volume before committing changes in order for it to be actually created. Changing the permission of the logical volume to read-only will prevent the user from making any other changes to the logical volume. However, the user can change the permission to read-write and make the logical volume modifiable.

Logical Volume Extending Context

This context can be entered from either the logical volume or physical volume editing contexts. In both cases, the header and pageable screen data remain unchanged, but the user is prompted for an allocation policy (sequential or parallel) and for up to three physical partition lists (one per copy). Each list (CopyPPList) specifies the physical partitions making up that copy of the new logical partitions, as illustrated in the following chart:

             |   LP1   |   LP2   |   LP3   |   LP4   ...
----------------------------------------------------
Copy1PPList  |  PP1.1  |  PP1.2  |  PP1.3  |  PP1.4  ...
----------------------------------------------------
Copy2PPList  |  PP2.1  |  PP2.2  |  PP2.3  |  PP2.4  ...
----------------------------------------------------
Copy3PPList  |  PP3.1  |  PP3.2  |  PP3.3  |  PP3.4  ...

A CopyPPList is a list of lists, in which each sublist is the list of physical partitions for a single physical volume (PVPPList). The PVPPLists are separated by semicolons:

<PV1PPList> [ ; <PV2PPList> ... ]

Each PVPPList consists of a physical volume name followed by a list of physical partition ranges. The volume name is separated from the partition list by a colon, and the ranges in the list are separated from each other by commas:

<PVName> : <PPRange1> [ , <PPRange2> ... ]

Each PPRange can consist of an actual range or a single value:

<LowPPNum> - <HighPPNum>

OR

<PPNum>

For example, to specify a list consisting of PPs 1-5 and 11-15 from hdisk0 and PPs 20 and 22 from hdisk2, enter:

hdisk0:1-5,11-15;hdisk2:20,22

The allocation policy determines the order in which physical partitions are allocated to logical partitions from the lists. A sequential allocation policy specifies that PPs be allocated from each list in the order listed. However, a parallel policy specifies that PPs be allocated from each list by alternating between physical volumes as much as possible, in a round-robin fashion. For example, given a specification for six logical partitions, made up of three physical partitions from each of hdisk0 and hdisk1:

hdisk0:1-3;hdisk1:1-3

the two allocation policies are illustrated in the following chart:

              LP1    |   LP2    |   LP3    |   LP4    |   LP5    |   LP6
----------------------------------------------------------------------------
Sequential| hdisk0:1 | hdisk0:2 | hdisk0:3 | hdisk1:1 | hdisk1:2 | hdisk1:3
----------------------------------------------------------------------------
Parallel  | hdisk0:1 | hdisk1:1 | hdisk0:2 | hdisk1:2 | hdisk0:3 | hdisk1:3
Notes: If the extending context is entered from the physical volume editing context, the physical volume name can be omitted from the physical partition lists, in which case the current physical volume is assumed.

Entering cancel as a response for either prompt will cancel the extension and return the user to the parent context (editing a logical or physical volume). 

Logical Volume Reducing Context

This context can be entered from either the logical volume or physical volume editing contexts. In both cases, the header and pageable screen data remain unchanged, but the user is prompted for a list of logical partitions to be deleted from the logical volume. The response should consist of a list of logical partition ranges, separated by commas, with each range consisting of an actual range or a single value. For example, to specify a list consisting of LPs 11-15, 20, and 25-28, enter:

11-15,20,25-28

The specified logical partitions are deleted from the logical volume, their associated physical partitions are freed, and all subsequent logical partitions in the logical volume are renumbered to eliminate gaps.

Entering cancel as a response will cancel the reduction and return the user to the parent context (editing a logical or physical volume).

Logical Volume Changing Context

This context is very much like the logical volume creation context. It permits modification of logical volume attributes. However, it has a slightly different set of commands:

Attribute Value
Changes the value of an attribute.
quit
Exits to the parent (logical or physical volume editing) context.

Logical Volume Removal

Logical volume removal is an option within the volume group editing context. Whenever a user enters the delete command, the target inactive logical volume is removed from the volume group.

Security

The lvedit command accesses the AIX system configuration database (ODM), must be owned by root, and have the set-uid-on-execution mode set in its permissions. Execute permission is granted to root and members of the system group.

Related Information

The chfs command, chlv command, chps command, extendlv command, lslv command, lsps command, lspv command, lsvg command, mkfs command, mklv command, rmlv command, smit command, swapon command.

Logical Volume Storage Overview in AIX Version 4 System Management Guide: Operating System and Devices explains the logical volume manager, physical volumes, logical volumes, and volume groups.


[ Previous | Next | Contents | Glossary | Search ]