[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 1


chlv Command

Purpose

Changes only the characteristics of a logical volume.

Syntax

To Change the Characteristics of a Logical Volume

chlv [ -a Position ] [ -b BadBlocks ] [ -d Schedule ] [ -e Range ] [ -L label ] [ -p Permission ] [ -r Relocate ] [ -s Strict ] [ -t Type ] [ -u Upperbound ] [ -v Verify ] [ -w MirrorWriteConsistency ] [ -x Maximum ] [ -U Userid ] [ -G Groupid ] [ -P Modes ] LogicalVolume ...

To Change the name of a Logical Volume

chlv -n NewLogicalVolume LogicalVolume

Note: Changing the name of a log logical volume requires that you run the chfs -a Log=LVName on each filesystem using that log.

Description

Attention: The name change option of this command is not allowed if the volume group is varied on in concurrent mode.

The chlv command changes the characteristics of a logical volume according to the command flags. The LogicalVolume parameter can be a logical volume name or logical volume ID. Each current characteristic for a logical volume remains in effect unless explicitly changed with the corresponding flag.

The changes you make with the -a, -e, -s, and -u flags take effect only when new partitions are allocated or partitions are deleted. The other flags take effect immediately.

To change the name of a logical volume, use the -n flag and use the NewLogicalVolume parameter to represent the new logical volume name. Do not use other flags with this syntax.

If the volume group which contains logical volume being changed is in big vg format, U, G, and P flags can be used to set the ownership, group and permissions respectively, of the special device files. Only root user will be able to set these values. If the volume group is exported, these values can be restored upon import if R flag is specified with importvg command.

Notes:
  1. Changes made to the logical volume are not reflected in the file systems. To change file system characteristics, use the chfs command.
  2. To use this command, you must either have root user authority or be a member of the system group.

You can use the Volumes application in Web-based System Manager (wsm) to change logical volume characteristics. You could also use the System Management Interface Tool (SMIT) smit chlv fast path to run this command.

Flags

Note: When changing the characteristics of a striped logical volume, the -d, -e, and -u flags are not valid.

-a Position Sets the intraphysical volume allocation policy (the position of the logical partitions on the physical volume). The Position variable is represented by one of the following:

m
Allocates logical partitions in the outer middle section of each physical volume. This is the default position.

c
Allocates logical partitions in the center section of each physical volume.

e
Allocates logical partitions in the outer edge section of each physical volume.

ie
Allocates logical partitions in the inner edge section of each physical volume.

im
Allocates logical partitions in the inner middle section of each physical volume.
-b BadBlocks Sets the bad-block relocation policy. The BadBlocks variable is represented by one of the following:

y
Causes bad-block relocation to occur.

n
Prevents bad block relocation from occurring.
-d Schedule Sets the scheduling policy when more than one logical partition is written. Must use parallel or sequential to mirror striped lv. The Schedule variable is represented by one of the following:

p
Establishes a parallel scheduling policy.

ps
Parallel write with sequential read policy. All mirrors are written in parallel but always read from the first mirror if the first mirror is available.

pr
Parallel write round robbin read. This policy is similar to the parallel policy except an attempt is made to spread the reads to the logical volume more evenly across all mirrors.

s
Establishes a sequential scheduling policy.

 
When specifying policy of parallel or sequential strictness, set to "s" for super strictness.
-e Range Sets the interphysical volume allocation policy (the number of physical volumes to extend across, using the volumes that provide the best allocation). The value of the Range variable is limited by the Upperbound variable, set with the -u flag, and is represented by one of the following:

x
Allocates logical partitions across the maximum number of physical volumes.

m
Allocates logical partitions across the minimum number of physical volumes.
-G Groupid Specifies group ID for the logical volume special file.
-L Label Sets the logical volume label. The maximum size of the Label variable is 127 characters.
-n NewLogicalVolume Changes the name of the logical volume to that specified by the NewLogicalVolume variable. Logical volume names must be unique system wide and can range from 1 to 15 characters.
-p Permission Sets the access permission to read-write or read-only. The Permission variable is represented by one of the following:

w
Sets the access permission to read-write.

r
Sets the access permission to read-only.
-P Modes Specifies permissions (file modes) for the logical volume special file.
-r Relocate Sets the reorganization flag to allow or prevent the relocation of the logical volume during reorganization. The Relocate variable is represented by one of the following:

y
Allows the logical volume to be relocated during reorganization. If the logical volume is striped, the chlv command will not let you change the relocation flag to y.

n
Prevents the logical volume from being relocated during reorganization.
-s Strict Determines the strict allocation policy. Copies of a logical partition can be allocated to share or not to share the same physical volume. The Strict variable is represented by one of the following:

y
Sets a strict allocation policy, so copies of a logical partition cannot share the same physical volume.

n
Does not set a strict allocation policy, so copies of a logical partition can share the same physical volume.

s
Sets a super strict allocation policy, so that the partitions allocated for one mirror cannot share a physical volume with the partitions from another mirror

Note: When changing a non superstrict logical volume to a superstrict logical volume you must use the -u flag.
-t Type Sets the logical volume type. The maximum size is 31 characters. If the logical volume is striped, you cannot change Type to boot.
-U Userid Specifies user ID for the logical volume special file.
-u Upperbound Sets the maximum number of physical volumes for new allocation. The value of the Upperbound variable should be between one and the total number of physical volumes. When using striped logical volumes or super strictness the upper bound indicates the maximum number of physical volumes allowed for each mirror copy.
-v Verify Sets the write-verify state for the logical volume. Causes all writes to the logical volume either to be verified with a follow-up read or not to be verified with a follow-up read. The Verify variable is represented by one of the following:

y
Causes all writes to the logical volume to be verified with a follow-up read.

n
Causes all writes to the logical volume not to be verified with a follow-up read.
-w MirrorWriteConsistency

yor a
Turns on active mirror write consistency which ensures data consistency among mirrored copies of a logical volume during normal I/O processing.

p
Turns on passive mirror write consistency which ensures data consistency among mirrored copies during volume group synchronization after a system interruption.

Note: This functionality is only available on Big Volume Groups.

n
No mirror write consistency. See the -f flag of the syncvg command.

-x Maximum Sets the maximum number of logical partitions that can be allocated to the logical volume. The maximum number of logical partitions per logical volume is 32,512.

Examples

  1. To change the interphysical volume allocation policy of logical volume lv01, enter:
    chlv -e m
    lv01

    The interphysical volume allocation policy is set to minimum.
  2. To change the type of logical volume lv03, enter:
    chlv -t copy lv03
  3. To change the permission of logical volume lv03 to read-only, enter:
    chlv -p r lv03
    Logical volume lv03 now has read-only permission.
  4. To change the type to paging and the maximum number of physical volumes for logical volume lv03, enter:
    chlv -t paging -u 10 lv03
    The change in the type of logical volume takes effect immediately, but the change in the maximum number of physical volumes does not take effect until a new allocation is made.
  5. To change the allocation characteristics of logical volume lv07, enter:
    chlv -a e -e x -r y -s n -u 5 lv07

Files


/usr/sbin Directory where chlv command resides.

Related Information

The chfs command, extendlv command, lslv command, mklv command, mklvcopy command, reorgvg command, rmlvcopy command, syncvg command.

The Logical Volume Storage Overview in AIX 5L Version 5.1 System Management Concepts: Operating System and Devices explains the Logical Volume Manager, physical volumes, logical volumes, volume groups, organization, ensuring data integrity, and allocation characteristics.

The System Management Interface Tool (SMIT): Overview in AIX 5L Version 5.1 System Management Concepts: Operating System and Devices explains the structure, main menus, and tasks that are done with SMIT.

For information on installing the Web-based System Manager, see Chapter 2: Installation and System Requirements in AIX 5L Version 5.1 Web-based System Manager Administration Guide.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]