lslv Command
Purpose
Displays information about a logical volume.
Syntax
To Display Logical Volume Information
lslv [ -L ] [ -l| -m ] [ -n PhysicalVolume ] LogicalVolume
To Display Logical Volume Allocation Map
lslv [ -L ] [ -n PhysicalVolume ] -p PhysicalVolume [ LogicalVolume ]
Description
The lslv command
displays the characteristics and status of the LogicalVolume or
lists the logical volume allocation map for the physical partitions
on the PhysicalVolume. The logical volume can be a name or
identifier.
Note: If the lslv command cannot find information
for a field in the Device Configuration Database, it will insert a
question mark (?) in the value field. As an example, if there is no
information for the LABEL field, the following is displayed:
LABEL: ?
The command attempts to obtain as much information as possible from the description area when it is given a logical volume identifier.
You can use the System Management Interface Tool (SMIT) smit lslv fast path to run this command.
Flags
Item | Description |
---|---|
-L | Specifies no waiting to obtain a lock on the Volume group.
Note: If the volume group is being changed, using the -L flag
gives unreliable date.
|
-l | Lists the following fields for each physical volume in the
logical volume:
|
-m | Lists the following fields for each logical partition:
|
-n PhysicalVolume | Accesses information from the specific descriptor area of PhysicalVolume variable. The information may not be current since the information accessed with the -n flag has not been validated for the logical volumes. If you do not use the -n flag, the descriptor area from the physical volume that holds the validated information is accessed and therefore the information that is displayed is current. The volume group need not be active when you use this flag. |
-p PhysicalVolume | Displays the logical volume allocation map for the PhysicalVolume variable.
If you use the LogicalVolume parameter, any partition allocated
to that logical volume is listed by logical partition number. Otherwise,
the state of the partition is listed as one of the following:
|
If no flags are specified, the following status is displayed:
Item | Description |
---|---|
LOGICAL VOLUME | Name of the logical volume. Logical volume names must be unique system-wide and can range from 1 to 15 characters. |
VOLUME GROUP | Name of the volume group. Volume group names must be unique system-wide and can range from 1 to 15 characters. |
LOGICAL VOLUME IDENTIFIER (LV identifier) | Identifier of the logical volume. |
PERMISSION | Access permission; read-only or read-write. |
VOLUME GROUP STATE (VG state) | State of the volume group. If the volume group is activated with the varyonvg command, the state is either active/complete (indicating all physical volumes are active) or active/partial (indicating all physical volumes are not active). If the volume group is not activated with the varyonvg command, the state is inactive. |
LOGICAL VOLUME STATE (LV state) | State of the logical volume. The Opened/stale status indicates the logical volume is open but contains physical partitions that are not current. Opened/syncd indicates the logical volume is open and synchronized. Closed indicates the logical volume has not been opened. |
TYPE | Logical volume type. |
WRITE VERIFY | Write verify state of on or off. |
MIRROR WRITE CONSISTENCY | Mirror write consistency state of on or off. |
MAX LPs | Maximum number of logical partitions the logical volume can hold. |
PP size | Size of each physical partition. |
COPIES | Number of physical partitions created for each logical partition when allocating. |
SCHEDULE POLICY(Sched policy) | Sequential or parallel scheduling policy. |
LPs | Number of logical partitions currently in the logical volume. |
PPs | Number of physical partitions currently in the logical volume. |
Stale partitions | Number of physical partitions in the logical volume that are not current. |
BB POLICY | Bad block relocation policy. |
INTER-POLICY | Inter-physical allocation policy. |
INTRA-POLICY | Intra-physical allocation policy. |
UPPER BOUND | If the logical volume is super strict, upper bound is the maximum number of disks in a mirror copy. |
RELOCATABLE | Indicates whether the partitions can be relocated if a reorganization of partition allocation takes place. |
MOUNT POINT | File system mount point for the logical volume, if applicable. |
LABEL | Specifies the label field for the logical volume. |
Each LP copy on a separate PV? | The strictness value. Current state of allocation, strict, nonstrict, or superstrict. A strict allocation states that no copies for a logical partition are allocated on the same physical volume. If the allocation does not follow the strict criteria, it is called nonstrict. A nonstrict allocation states that at least one occurrence of two physical partitions belong to the same logical partition. A superstrict allocation states that no partition from one mirror copy may reside the same disk as another mirror copy. |
SERIALIZE IO? | Serialization of overlapping IOs state of yes or no. If serialization is turned on (yes), then overlapping IOs are not allowed on a block range, and only a single IO in a block range is processed at any one time. Most applications, such as file systems and databases, perform serialization; therefore, serialization should be turned off (no). The default setting for new logical volumes is no. |
STRIPE WIDTH | The number of physical volumes being striped across. |
STRIPE SIZE | The number of bytes per stripe. |
INFINITE RETRY | Lists the infinite retry option of the logical volume. |
PREFERRED READ | Lists the preferred logical volume copy for the read operation. |
ENCRYPTION | Lists the data encryption option of the logical volume. This information is available in AIX® 7 with 7200-05, or later. |
Examples
- To display information about the testlv logical
volume, enter:
Information about the testlv logical volume, its logical and physical partitions, and the volume group to which it belongs is displayed as shown in the following example output:lslv testlv
LOGICAL VOLUME: testlv VOLUME GROUP: testvg LV IDENTIFIER: 000e8b6e0000d900000001476c303bc8.1 PERMISSION: read/write VG STATE: active/complete LV STATE: closed/syncd TYPE: jfs WRITE VERIFY: off MAX LPs: 512 PP SIZE: 128 megabyte(s) COPIES: 3 SCHED POLICY: parallel LPs: 10 PPs: 30 STALE PPs: 0 BB POLICY: relocatable INTER-POLICY: minimum RELOCATABLE: yes INTRA-POLICY: middle UPPER BOUND: 32 MOUNT POINT: N/A LABEL: None MIRROR WRITE CONSISTENCY: on/ACTIVE EACH LP COPY ON A SEPARATE PV ?: yes Serialize IO ?: NO INFINITE RETRY: no PREFERRED READ: 3
- To display the logical volume allocation map for hdisk2, enter:
An allocation map for hdisk2 is displayed, showing the state of each partition. Since no LogicalVolume parameter was included, the map does not contain logical partition numbers specific to any logical volume.lslv -p hdisk2
- To display information
about logical volume lv03 by physical volume, enter:
The characteristics and status of lv03 are displayed, with the output arranged by physical volume.lslv -l lv03
- To display information
about physical volume hdisk3 gathered from the descriptor
area on hdisk2, enter:
An allocation map, using the descriptor area on hdisk2, is displayed. Because the LogicalVolume parameter is included, the number of each logical partition allocated to that logical volume is displayed on the map.lslv -n hdisk2 -p hdisk3 lv02
- To display information
about a specific logical volume, using the identifier, enter:
All available characteristics and status of this logical volume are displayed.lslv 00000256a81634bc.2
File
Item | Description |
---|---|
/usr/sbin | Contains the lslv command. |