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.
lvedit VolumeGroup
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.
The logical volume editor's interface has the following hierarchical structure:
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:
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:
A list of logical volumes, with each entry having the following fields:
A list of physical volumes, with each entry having the following fields:
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).
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.
Note: The lvedit command cannot create or edit striped filesystems.
A list of contiguous logical partition ranges, with the following fields for each range:
A list of free physical partition ranges, with the following fields for each range:
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.
A list of contiguous physical partition ranges, with the following fields for each range:
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.
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.
A list of the following attributes, with current value and permissible values:
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.
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).
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).
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:
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.
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.
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.