lsvg 명령어 (AIX 5.3·6.1)
https://archive.horanglab.com/posts/aix-cmd-lsvg
핵심 정리
lsvg는 정의된 볼륨 그룹 이름을,lsvg -o는 활성(varyon) 볼륨 그룹만 보여 줍니다.lsvg datavg는 상태, PP 크기, 전체·여유(FREE PPs)·할당 PP, 쿼럼, 자동 varyon 같은 특성을 보여 줍니다. 파일 시스템을 늘리기 전에 여유 PP를 여기서 봅니다.lsvg -l datavg는 그 안의 논리 볼륨(유형, LP·PP·PV 수, 상태, 마운트 지점),lsvg -p datavg는 물리 볼륨별 상태와 여유 PP를 보여 줍니다.- LV 상태가
open/stale이면 미러가 동기화되지 않은 것이니syncvg를 실행합니다. - 여러 볼륨 그룹을 한 번에 보려면
lsvg -o | lsvg -il처럼 표준 입력(-i)으로 넘깁니다.
| 항목 | 내용 |
|---|---|
| 버전 | AIX 5.3, AIX 6.1 (6.1에서 -m, -P(미러 풀)와 PV Restriction, Infinite Retry, Critical VG, FS SYNC OPTION 필드가 더해짐) |
| 원문 | IBM Commands Reference — 5.3 Volume 3, 6.1 Volume 3 |
| 파일 | /usr/sbin/lsvg |
| 관련 명령어 | lspv, lslv, chvg, mkvg, varyonvg |
목적
볼륨 그룹의 정보를 보여 줍니다.
영어 원문
Displays information about volume groups.
구문
lsvg [ -L ] [ -o ] | [ -n DescriptorPhysicalVolume ] | [ -i ] [ -l | -M | -p ] [ -m ] [ -P ] VolumeGroup ...
설명
lsvg 명령은 볼륨 그룹의 정보를 보여 줍니다. VolumeGroup 매개변수를 주면 그 볼륨 그룹의 정보만, 주지 않으면 정의된 모든 볼륨 그룹의 이름을 보여 줍니다.
장치 구성 데이터베이스에서 정보를 얻을 수 없으면 일부 필드에 빠진 값 대신 물음표(?)가 나옵니다. 논리 볼륨 식별자를 주면 기술 영역에서 가능한 한 많은 정보를 얻으려 합니다.
참고: 볼륨 그룹의 주 번호(major number)는 ls -al /dev/VGName으로 봅니다. 볼륨 그룹을 나타내는 특수 장치 파일의 주 장치 번호가 볼륨 그룹 주 번호입니다. 예를 들어 ha1vg라면:
$ ls -al /dev/ha1vg
crw-rw---- 1 root system 52, 0 Aug 27 19:57 /dev/ha1vg
여기서 주 번호는 52입니다.
Web-based System Manager(wsm)의 Volumes 응용 프로그램이나 SMIT 빠른 경로 smit lsvg로도 실행할 수 있습니다.
영어 원문
The lsvg command displays information about volume groups. If you use the volumegroup parameter, only the information for that volume group is displayed. If you do not use the volumegroup parameter, a list of the names of all defined volume groups is displayed.
When information from the Device Configuration database is unavailable, some of the fields will contain a question mark (?) in place of the missing data. The lsvg command attempts to obtain as much information as possible from the description area when the command is given a logical volume identifier.
Note: To determine a volume group's major number, use the ls -al /dev/VGName command. This command lists the special device file that represents the volume group. The volume group major number is the same as the major device number of the special device file. For example, for a volume group named ha1vg, enter the following command:
ls -al /dev/ha1vg
This command returns the following:
crw-rw---- 1 root system 52, 0 Aug 27 19:57 /dev/ha1vg
In this example, the volume group major number is 52.
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 lsvg fast path to run this command.
플래그
| 플래그 | 설명 |
|---|---|
-i |
볼륨 그룹 이름을 표준 입력에서 읽습니다. |
-l |
볼륨 그룹 안의 논리 볼륨마다 다음을 보여 줍니다. LV(논리 볼륨), Type(유형), LPs(LP 수), PPs(사용하는 PP 수), PVs(사용하는 PV 수), Logical volume state(Opened/stale은 열려 있지만 최신이 아닌 파티션이 있음, Opened/syncd는 열려 있고 동기화됨, Closed는 열리지 않음), Mount point(있으면 마운트 지점). |
-L |
볼륨 그룹 잠금을 기다리지 않습니다. 볼륨 그룹이 바뀌는 중이면 결과를 믿을 수 없습니다. |
-m |
(6.1) 볼륨 그룹에 있는 논리 볼륨 사본마다 속한 미러 풀을 보여 줍니다. |
-M |
PVname:PPnum [LVname: LPnum [:Copynum] [PPstate]] 형식으로 보여 줍니다. PVname은 물리 볼륨, PPnum은 PP 번호(11016), LVname은 LV 이름(시스템 전체에서 고유, 164자), LPnum은 LP 번호(1~64,000), Copynum은 미러 번호, PPstate는 최신이 아닌 PP만 stale로 보여 줍니다. |
-n DescriptorPhysicalVolume |
지정한 물리 볼륨의 기술 영역에서 정보를 읽습니다. 검증되지 않은 정보라 최신이 아닐 수 있습니다. 쓰지 않으면 가장 많이 검증된 기술 영역을 읽으므로 최신입니다. 볼륨 그룹이 활성 상태가 아니어도 됩니다. |
-o |
활성(varyon된) 볼륨 그룹만 보여 줍니다. 활성 볼륨 그룹은 쓸 수 있는 볼륨 그룹입니다. |
-p |
볼륨 그룹 안의 물리 볼륨마다 Physical volume, PVstate, Total PPs, Free PPs, Distribution(바깥 가장자리, 바깥 중간, 가운데, 안쪽 중간, 안쪽 가장자리 영역별 할당 PP 수)을 보여 줍니다. |
-P |
(6.1) 볼륨 그룹 안의 물리 볼륨마다 속한 미러 풀을 보여 줍니다. |
플래그 없이 볼륨 그룹을 주면 보여 주는 정보:
| 필드 | 설명 |
|---|---|
Volume group |
볼륨 그룹 이름. 시스템 전체에서 고유하며 1~15자 |
Volume group state |
varyonvg로 켰으면 active/complete(모든 PV 활성) 또는 active/partial(일부 PV 비활성) |
Permission |
read-only 또는 read-write |
Max LVs |
볼륨 그룹에 둘 수 있는 최대 LV 수 |
LVs |
지금 있는 LV 수 |
Open LVs |
지금 열려 있는 LV 수 |
Total PVs |
전체 PV 수 |
Active PVs |
활성 PV 수 |
VG identifier |
볼륨 그룹 식별자 |
PP size |
물리 파티션 크기 |
Total PPs |
전체 PP 수 |
Free PPs |
할당되지 않은 PP 수 |
Alloc PPs |
LV에 할당된 PP 수 |
Quorum |
과반에 필요한 PV 수 |
VGDS |
볼륨 그룹 기술 영역(VGDA) 수 |
Auto-on |
IPL 때 자동 활성화(yes, no) |
Concurrent |
Concurrent Capable인지 Non-Concurrent Capable인지 |
Auto-Concurrent |
Concurrent Capable 볼륨 그룹을 자동으로 동시 모드로 켤지. Non-Concurrent Capable이면 기본 Disabled |
VG Mode |
varyon 모드: Concurrent 또는 Non-Concurrent |
Node ID |
동시 모드로 켰을 때 이 노드의 ID |
Active Nodes |
이 볼륨 그룹을 켠 다른 동시 노드의 ID |
Max PPs Per PV |
PV당 최대 PP 수 |
Max PVs |
최대 PV 수. 32·128 PV 볼륨 그룹에만 나옵니다. |
LTG size |
논리 트랙 그룹 크기, 곧 한 I/O 요청으로 디스크에 보낼 수 있는 최대 데이터. 1MB보다 크면 MB, 아니면 KB로 나옵니다. AIX 5.3에서 만든 볼륨 그룹은 디스크 구성에 따라 동적으로 정할 수 있어 Dynamic으로, varyonvg -M으로 끄면 Static으로 나오며, 5.3 이전에 만든 것은 어느 쪽도 아닙니다. |
BB POLICY |
불량 블록 재배치 정책 |
SNAPSHOT VG |
스냅숏 볼륨 그룹이 활성이면 그 이름, 아니면 식별자 |
PRIMARY VG |
스냅숏 볼륨 그룹의 원본 볼륨 그룹이 활성이면 그 이름, 아니면 식별자 |
PV Restriction |
(6.1) PV 유형 제한. none은 제한 없음, SSD는 모든 PV가 SSD여야 함. 다른 값은 없습니다. |
Infinite Retry |
(6.1) 무한 재시도 옵션 |
Critical VG |
(6.1) Critical VG 옵션이 켜졌는지 |
FS SYNC OPTION |
(6.1) JFS2가 마운트되어 있을 때 JFS2가 할당한 블록만 다시 동기화하는지 |
영어 원문
-i— Reads volume group names from standard input.-l— Lists the following information for each logical volume within the group specified by the volumegroup parameter:LVA logical volume within the volume group.TypeLogical volume type.LPsNumber of logical partitions in the logical volume.PPsNumber of physical partitions used by the logical volume.PVsNumber of physical volumes used by the logical volume.Logical volume stateState of the logical volume.Opened/staleindicates the logical volume is open but contains partitions that are not current.Opened/syncdindicates the logical volume is open and synchronized.Closedindicates the logical volume has not been opened.Mount pointFile system mount point for the logical volume, if applicable.-L— Specifies no waiting to obtain a lock on the Volume group. Note : If the volume group is being changed, using the-Lflag gives unreliable data.-m— Lists the mirror pool that each logical volume copy in the volume group belongs to.-M— Lists the following fields for each logical volume on the physical volume:PVname:PPnum [LVname: LPnum [:Copynum] [PPstate]] PVnameName of the physical volume as specified by the system.PPnumPhysical partition number. Physical partition numbers can range from 1 to 1016.LVnameName 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.LPnumLogical partition number. Logical partition numbers can range from 1 to 64,000.CopynumMirror number.PPstateOnly the physical partitions on the physical volume that are not current are shown as stale.-ndescriptorphysicalvolume — Accesses information from the 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 most validated information is accessed, and therefore the information displayed is current. The volume group need not be active when you use this flag.-o— Lists only the active volume groups (those that are varied on). An active volume group is one that is available for use.-p— Lists the following information for each physical volume within the group specified by the volumegroup parameter:Physical volumeA physical volume within the group.PVstateState of the physical volume.Total PPsTotal number of physical partitions on the physical volume.Free PPsNumber of free physical partitions on the physical volume.DistributionThe number of physical partitions allocated within each section of the physical volume: outer edge, outer middle, center, inner middle, and inner edge of the physical volume.-P— Lists the mirror pool that each physical volume in the volume group belongs to.
Information displayed if you do not specify any flags:
Volume group— Name of the volume group. Volume group names must be unique systemwide and can range from 1 to 15 characters.Volume group state— State of the volume group. If the volume group is activated with the varyonvg command, the state is eitheractive/complete(indicating all physical volumes are active) oractive/partial(indicating some physical volumes are not active).Permission— Access permission:read-onlyorread-write.Max LVs— Maximum number of logical volumes allowed in the volume group.LVs— Number of logical volumes currently in the volume group.Open LVs— Number of logical volumes within the volume group that are currently open.Total PVs— Total number of physical volumes within the volume group.Active PVs— Number of physical volumes that are currently active.VG identifier— The volume group identifier.PP size— Size of each physical partition.Total PPs— Total number of physical partitions within the volume group.Free PPs— Number of physical partitions not allocated.Alloc PPs— Number of physical partitions currently allocated to logical volumes.Quorum— Number of physical volumes needed for a majority.VGDS— Number of volume group descriptor areas within the volume group.Auto-on— Automatic activation at IPL (yesorno).Concurrent— States whether the volume group is Concurrent Capable or Non-Concurrent Capable.Auto-Concurrent— States whether you should autovary the Concurrent Capable volume group in concurrent or non-concurrent mode. For volume groups that are Non-Concurrent Capable, this value defaults to Disabled.VG Mode— The vary on mode of the volume group: Concurrent or Non-Concurrent.Node ID— Node id of this node if volume group is varied on in concurrent node.Active Nodes— Node ids of other concurrent nodes that have this volume group varied on.Max PPs Per PV— Maximum number of physical partitions per physical volume allowed for this volume group.Max PVs— Maximum number of physical volumes allowed in this volume group. This information is displayed only for 32 and 128 PV volume groups.LTG size— Logical track group size of the volume group. The maximum amount of data that can be transferred in one I/O request to the disks of the volume group. The LTG size will be displayed in kilobytes unless the LTG size is greater than 1 MB, in which case megabytes will be used. If the volume group was created on AIX 5.3, then it is capable of dynamically determining the LTG size based-on the disk topology and it is listed asDynamic. If that capability is disabled by the user with the varyonvg -M option, then it will be listed asStatic. If the capability does not exist because the volume group was created prior to AIX 5.3, then the VG will not be listed asStaticorDynamic.BB POLICY— Bad block relocation policy of the volume group.SNAPSHOT VG— Snapshot volume group name if the snapshot volume group is active, else snapshot volume group identifier.PRIMARY VG— Original volume group name of a snapshot volume group if the original volume group is active, else original volume group identifier.PV Restriction— Displays the existing PV type restriction on the physical volumes comprising the volume group. A value of none indicates no PV restriction exists for the volume group. A value of SSD indicates the volume group has a PV restriction requiring all PVs to be SSD type PVs. No other values are supported.Infinite Retry— Lists the infinite retry option of the volume group.Critical VG— Lists whether theCritical VGoption is turned on or off for the volume group.FS SYNC OPTION— Lists whether the logical volume manager resynchronizes the blocks allocated only by the Enhanced Journaled File System (JFS2), if JFS2 is mounted.
예제
| 명령 | 하는 일 |
|---|---|
lsvg -o |
활성 볼륨 그룹 이름 |
lsvg |
시스템의 모든 볼륨 그룹 이름 |
lsvg vg02 |
vg02의 논리·물리 파티션 특성과 상태 |
lsvg -l vg02 |
vg02의 모든 논리 볼륨 이름, 특성, 상태 |
출력 예(일부):
$ lsvg -l datavg
datavg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
datalv jfs2 160 320 2 open/syncd /data
loglv00 jfs2log 1 2 2 open/syncd N/A
자주 쓰는 형태:
lsvg datavg | grep -E "FREE PPs|PP SIZE" # 여유 공간
lsvg -o | lsvg -il # 활성 VG의 모든 LV
lsvg -l rootvg | grep stale # 동기화 안 된 LV
영어 원문
- To display the names of all active volume groups, enter the following command:
lsvg -o
To display the names of all volume groups within the system, enter the following command:
lsvgTo display information about volume group
vg02, enter the following command:lsvg vg02
The characteristics and status of both the logical and physical partitions of volume group vg02 are displayed.
- To display the names, characteristics, and status of all the logical volumes in volume group
vg02, enter the following command:
lsvg -l vg02
파일
| 파일 | 설명 |
|---|---|
/usr/sbin |
lsvg 명령이 있는 디렉터리 |
영어 원문
- /usr/sbin — Contains the directory where the lsvg command resides.
Related reference:
- lspv Command
Related information:
- chvg command
- varyonvg 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로 만듭니다. lsvg에 해당하는 것은 vgs(목록·여유), vgdisplay vg(특성), lvs vg(그 안의 LV), pvs -S vg_name=vg(그 안의 PV)입니다.