lspv 명령어 (AIX 5.3·6.1)

핵심 정리

  • 인수 없이 lspv를 실행하면 모든 디스크의 이름, PVID, 속한 볼륨 그룹, 상태(active, concurrent)를 한 줄씩 보여 줍니다. 볼륨 그룹이 None이면 빈 디스크입니다.
  • lspv hdisk1은 그 디스크의 상태, 볼륨 그룹, PP 크기, 전체·여유·사용 PP 수, 영역별 분포를 보여 줍니다.
  • -l은 디스크에 있는 논리 볼륨 목록, -p는 PP 범위별 상태(free/used/stale), -M은 PP마다 어느 LV의 몇 번째 LP인지 보여 줍니다.
  • 디스크를 교체하거나 reducevg하기 전에 lspv -l hdiskN으로 남은 LV가 있는지 확인합니다.
  • PVID가 none이면 chdev -l hdiskN -a pv=yes로 줍니다.
항목 내용
버전 AIX 5.3, AIX 6.1 (6.1에서 -P, -u, lkdev 잠금 상태, Mirror Pool, GPFS 참고가 더해짐)
원문 IBM Commands Reference — 5.3 Volume 3, 6.1 Volume 3
파일 /usr/sbin/lspv
관련 명령어 lsvg, lslv, chpv, mkvg, lsdev, lkdev

목적

볼륨 그룹 안 물리 볼륨의 정보를 보여 줍니다.

영어 원문

Displays information about a physical volume within a volume group.

구문

text
lspv
lspv [ -L ] [ -P ] [ -l | -p | -M ] [ -n DescriptorPhysicalVolume ] [ -v VolumeGroupID ] PhysicalVolume

설명

lspv 명령은 물리 볼륨 이름을 주면 그 물리 볼륨의 정보를 보여 줍니다. 플래그 없이 실행하면 쓸 수 있는 물리 볼륨을 모두 다음 정보와 함께 보여 줍니다.

  • 물리 디스크 이름
  • 물리 볼륨 식별자(PVID)
  • 속한 볼륨 그룹(있으면), 또는 (6.1) lkdev 명령으로 잠근 레이블(있으면)
  • 볼륨 그룹의 상태: active(varyon됨), concurrent(동시 모드로 varyon됨), (6.1) locked(lkdev로 잠김)

참고: 장치 구성 데이터베이스에서 어떤 필드의 정보를 찾지 못하면 값 자리에 물음표(?)를 넣습니다. 예를 들어 PP RANGE 정보가 없으면 PP RANGE: ?로 나올 수 있습니다.

참고(6.1): 플래그 없는 lspv는 디스크에 있는 GPFS(General Parallel File System) 볼륨 그룹도 보여 줄 수 있습니다. 다만 GPFS 노드에 물을 권한이 필요하므로 처음에는 root로 실행해야 합니다. GPFS 볼륨 그룹 이름이 로컬에 캐시된 뒤에는 root가 아닌 사용자도 볼 수 있습니다.

논리 볼륨 식별자를 주면 기술 영역(descriptor area)에서 가능한 한 많은 정보를 얻으려 합니다.

물리 볼륨을 주면 다음 특성을 보여 줍니다.

필드 설명
Physical volume 물리 볼륨 이름
Volume group 볼륨 그룹 이름. 시스템 전체에서 고유하며 1~15자입니다.
PV Identifier 이 디스크의 물리 볼륨 식별자
VG Identifier 이 디스크가 속한 볼륨 그룹의 식별자
PVstate 물리 볼륨 상태. varyonvg로 볼륨 그룹을 켰으면 active, missing, removed이고, varyoffvg로 껐으면 varied off입니다.
Allocatable 이 물리 볼륨에 할당할 수 있는지
Logical volumes 이 물리 볼륨을 쓰는 논리 볼륨 수
Stale PPs 최신이 아닌(stale) 물리 파티션 수
VG descriptors 이 물리 볼륨에 있는 볼륨 그룹 기술자(VGDA) 수
PP size 물리 파티션 크기
Total PPs 전체 물리 파티션 수
Free PPs 빈 물리 파티션 수
Used PPs 사용 중인 물리 파티션 수
Max Request 최대 전송 크기
Free distribution 디스크 영역별 빈 파티션 수
Used distribution 디스크 영역별 사용 파티션 수
Mirror Pool (6.1) 물리 볼륨이 속한 미러 풀

Web-based System Manager(wsm)의 Volumes 응용 프로그램이나 SMIT 빠른 경로 smit lspv로도 실행할 수 있습니다.

영어 원문

The lspv command displays the information about the physical volume if the specific physical volume name is specified. If you do not add flags to the lspv command, by default all the available physical volumes are printed along with the following information:

  • Physical disk name.

  • Physical volume identifiers (PVIDs).

  • The volume group, if any, that the physical volume belongs to or the label, if any, locked with the lkdev command.

  • The state of the volume group.

Active When the volume group is varied on.

Concurrent When the volume group is varied on in the concurrent mode.

Locked When the physical volume is locked with the lkdev command.

Note: If the lspv command cannot find the 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 PP RANGE field, the following value might be displayed: PP RANGE: ?

Note: The lspv command, without any flags, can display the General Parallel File System (GPFS) volume groups that are located on the disks. However, the lspv command must initially be run with a root authority so that the command has permissions to query the GPFS nodes for information. After the GPFS volume group names are cached locally, non-root users running the lspv command can see the GPFS volume group names.

The lspv command attempts to obtain as much information as possible from the description area when it is given a logical volume identifier.

When the physicalvolume parameter is used, the following characteristics of the specified physical volume are displayed:

  • Physical volume — The name of the physical volume.
  • Volume group — The name of volume group. Volume group names must be unique systemwide names and can be from 1 to 15 characters long.
  • PV Identifier — The physical volume identifier for this physical disk.
  • VG Identifier — The volume group identifier of which this physical disk is a member.
  • PVstate — The state of the physical volume. If the volume group that contains the physical volume is varied on with the varyonvg command, the state is active, missing, or removed. If the physical volume is varied off with the varyoffvg command, the state is varied off.
  • Allocatable — The allocation permission for this physical volume.
  • Logical volumes — The number of logical volumes using the physical volume.
  • Stale PPs — The number of physical partitions on the physical volume that are not current.
  • VG descriptors — The number of volume group descriptors on the physical volume.
  • PP size — The size of physical partitions on the volume.
  • Total PPs — The total number of physical partitions on the physical volume.
  • Free PPs — The number of free physical partitions on the physical volume.
  • Used PPs — The number of used physical partitions on the physical volume.
  • Max Request — The max transfer size of the physical volume.
  • Free distribution — The number of free partitions available in each intra-physical volume section.
  • Used distribution — The number of used partitions in each intra-physical volume section.
  • Mirror Pool — The mirror pool that the physical volume has been assigned to.

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

플래그

플래그 설명
-L 볼륨 그룹 잠금을 기다리지 않습니다. 볼륨 그룹이 바뀌는 중이면 결과를 믿을 수 없습니다.
-l 물리 볼륨에 있는 논리 볼륨마다 다음을 보여 줍니다. LVname(PP가 할당된 LV), LPs(이 PV에 있는 그 LV의 LP 수), PPs(이 PV에 있는 그 LV의 PP 수), Distribution(바깥 가장자리, 바깥 중간, 가운데, 안쪽 중간, 안쪽 가장자리 영역별 PP 수), Mount Point(있으면 파일 시스템 마운트 지점).
-M PVname:PPnum [LVname: LPnum [:Copynum] [PPstate]] 형식으로 PP마다 보여 줍니다. PVname은 물리 볼륨, PPnum은 PP 번호, LVname은 LV 이름(시스템 전체에서 고유, 164자), LPnum은 LP 번호(164,000), Copynum은 미러 번호, PPstate는 최신이 아닌 PP만 stale로 보여 줍니다.
-n DescriptorPhysicalVolume 지정한 물리 볼륨의 기술 영역에서 정보를 읽습니다. 논리 볼륨에 대해 검증되지 않은 정보라 최신이 아닐 수 있습니다. 쓰지 않으면 검증된 정보를 가진 기술 영역을 읽으므로 최신입니다. 볼륨 그룹이 활성 상태가 아니어도 됩니다.
-p PP 범위마다 다음을 보여 줍니다. Range(한 영역 안의 연속 PP 범위), State(free, used, stale, vgda), Region(디스크 안 영역), LVname, Type(LV 유형), Mount point. big VG 형식으로 바꾸면 일부 데이터 파티션을 VGDA로 써야 할 수 있으며 vgda로 표시됩니다.
-P (6.1) 물리 볼륨마다 속한 미러 풀을 보여 줍니다.
-u (6.1) 시스템의 모든 물리 볼륨을 디스크 이름, PVID, 볼륨 그룹이나 lkdev 레이블, 상태(active, concurrent, locked), 고유 장치 식별자(UDID), UUID와 함께 보여 줍니다.
-v VolumeGroupID 볼륨 그룹 식별자로 정보를 읽습니다. 장치 구성 데이터베이스 정보가 틀려 lspv가 동작하지 않을 때만 씁니다. 식별자는 mkvg가 만든 16진수 값입니다.
영어 원문
  • -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 logical volume on the physical volume: LVname Name of the logical volume to which the physical partitions are allocated. LPs The number of logical partitions within the logical volume that are contained on this physical volume. PPs The number of physical partitions within the logical volume that are contained on this physical volume. Distribution The number of physical partitions, belonging to the logical volume, that are allocated within each of the following sections of the physical volume: outer edge, outer middle, center, inner middle and inner edge of the physical volume. Mount Point File system mount point for the logical volume, if applicable.
  • -M — Lists the following fields for each logical volume on the physical volume: PVname:PPnum [LVname: LPnum [:Copynum] [PPstate]] Where: PVname Name of the physical volume as specified by the system. PPnum Physical partition number. LVname Name of the logical volume to which the physical partitions are allocated. Logical volume names must be system-wide unique names, and can range from 1 to 64 characters. LPnum Logical partition number. Logical partition numbers can range from 1 to 64,000. Copynum Mirror number. PPstate Only the physical partitions on the physical volume that are not current are shown as stale.
  • -n descriptorphysicalvolume — Accesses information from the variable descriptor area specified by the descriptorphysicalvolume 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 displayed is current. The volume group need not be active when you use this flag.
  • -p — Lists the following fields for each physical partition on the physical volume: Range A range of consecutive physical partitions contained on a single region of the physical volume. State The current state of the physical partitions: free, used, stale, or vgda. Note: If a volume group is converted to a big vg format, it may be necessary to use some data partitions for volume group descriptor area. These partitions will be marked vgda. Region The intra-physical volume region in which the partitions are located. LVname The name of the logical volume to which the physical partitions are allocated. Type The type of the logical volume to which the partitions are allocated. Mount point File system mount point for the logical volume, if applicable.
  • -P — Lists the mirror pool that each physical volume belongs to.
  • -u — Lists all the physical volumes in the system along with the following information: • Physical disk name. • Physical volume identifiers (PVIDs). • The volume group (if any), or label (if any), that the physical volume belongs to and that is locked with the lkdev command. • The state of the volume group. Active When the volume group is varied on. Concurrent When the volume group is varied on in the concurrent mode. Locked When the physical volume is locked with the lkdev command. • Unique device identifier (UDID). • Universally Unique Identifier (UUID).
  • -v volumegroupid — Accesses information based on the volumegroupid variable. This flag is needed only when the lspv command does not function due to incorrect information in the Device Configuration Database. The volumegroupid variable is the hexadecimal representation of the volume group identifier, which is generated by the mkvg command.

예제

명령 하는 일
lspv hdisk3 hdisk3의 상태와 특성
lspv -p hdisk5 hdisk5의 상태와 특성을 PP 번호별로

출력 예:

text
$ lspv
hdisk0          00c8a1b2d4e5f601                    rootvg          active
hdisk1          00c8a1b2d4e5f702                    datavg          active
hdisk2          none                                None
$ lspv -l hdisk1
hdisk1:
LV NAME               LPs     PPs     DISTRIBUTION          MOUNT POINT
datalv                160     160     32..32..32..32..32    /data
loglv00               1       1       01..00..00..00..00    N/A
영어 원문
  1. To display the status and characteristics of physical volume hdisk3, enter the following command:
lspv hdisk3
  1. To display the status and characteristics of physical volume hdisk5 by physical partition number, enter the following command:
lspv -p hdisk5

파일

파일 설명
/usr/sbin lspv 명령이 있는 디렉터리
영어 원문
  • /usr/sbin — Contains the lspv command.

Related reference:

  • lslv Command

Related information:

  • mkvg command
  • varyonvg command
  • varyoffvg command
  • Logical volume storage

리눅스(GNU)와 다른 점

리눅스 LVM2도 물리 볼륨(PV), 볼륨 그룹(VG), 논리 볼륨(LV) 구조가 같지만 명령 이름이 다릅니다. AIX lspv·lsvg·lslv는 pvs/pvdisplay, vgs/vgdisplay, lvs/lvdisplay에, mkvg·extendvg·reducevg는 vgcreate·vgextend·vgreduce에, mklv·extendlv·rmlv는 lvcreate·lvextend·lvremove에, varyonvg·varyoffvg는 vgchange -ay/-an에, importvg·exportvg는 vgimport·vgexport에, migratepv는 pvmove에 해당합니다. AIX의 물리 파티션(PP)은 리눅스의 물리 익스텐트(PE)이고, 미러는 lvcreate --type raid1이나 lvconvert -m1로 만듭니다. 리눅스는 디스크마다 PVID 대신 PV UUID를 쓰며, 파일 시스템은 따로 mkfs로 만듭니다. lspv에 해당하는 것은 pvs(목록), pvdisplay -m /dev/sdb(PE 배치)입니다.