[AIX 운영 체제와 장치 관리 36] 논리 볼륨 저장소 구성 — VG·rootvg 미러링과 해제, 원시 논리 볼륨, 시스템을 켠 채 디스크 제거, 논리 볼륨 제거, RAID VG 크기 조정, 볼륨 그룹 전략
https://archive.horanglab.com/posts/aix-osdev-36
핵심 정리
- rootvg 미러링은
bootinfo -B(1이면 부팅 가능) →extendvg rootvg hdisk11(공간이 모자라면chvg -t) →mirrorvg -m(쿼럼 꺼짐, hd5 연속 파티션 보장) →bosboot -a→bootlist -m normal순서입니다. 해제는 unmirrorvg → reducevg → bosboot → bootlist입니다. - 원시 논리 볼륨은 파일 시스템을 거치지 않아 데이터베이스 성능에 유리하지만 첫 블록 LVCB가 보호되지 않습니다. 목록에 jfs 형으로 보여도 레이블일 뿐입니다.
- 핫 제거로 데이터가 든 디스크를 빼려면 디스크가 rootvg가 아닌 별도 VG여야 하며 umountfs → varyoffvg → exportvg → rmvdsk 뒤 노란 LED가 꺼졌는지 보고 뺍니다.
- RAID 환경에서는
chvg -g로 디스크 증가를 감지해 PP를 더하고 필요하면 big VG로 바꿉니다. 동시 모드, rootvg, 활성 페이징 공간이 있는 VG에서는 쓸 수 없습니다. - 별도 VG는 유지 보수, PP 크기 차이, 쿼럼 특성 차이, 보안, 시스템 간 디스크 전환에 씁니다. 디스크 고장 대비에는 쿼럼 VG면 미러 디스크 셋, 비쿼럼이면 둘이 필요하며, 어댑터·전원 고장 대비에는 어댑터 둘에 교차 미러링을 합니다.
| 항목 | 내용 |
|---|---|
| 버전 | AIX 6.1 (5.3판과 거의 같음) |
| 원문 | Operating system and device management — 5.3판 3847쪽, 6.1판 382393쪽 |
| 관련 명령어 | smit mirrorvg, bootinfo -B, extendvg, chvg -t, mirrorvg -m, bosboot -a, bootlist, mklv, unmirrorvg, reducevg, smit rmvdsk, smit rmfs, smit rmlv, chvg -g |
| 관련 파일 | /etc/filesystems |
논리 볼륨 저장소로 볼륨 그룹을 미러링하고, 논리 볼륨을 정의하고, 시스템을 실행한 채 디스크를 뺄 수 있습니다.
볼륨 그룹 미러링
다음 시나리오는 일반 볼륨 그룹을 미러링하는 방법입니다.
다음 지침은 SMIT로 볼륨 그룹(원문은 루트 볼륨 그룹)을 미러링하는 방법입니다. Web-based System Manager(Volumes 컨테이너에서 볼륨 그룹을 고르고 Selected 메뉴에서 Mirror 선택)도 쓸 수 있습니다. 숙련된 관리자는 mirrorvg 명령을 쓸 수 있습니다.
- root 권한으로 다음 SMIT 빠른 경로를 써서 볼륨 그룹에 디스크를 더합니다.
smit extendvg
- 다음 SMIT 빠른 경로를 입력해 볼륨 그룹을 새 디스크에 미러링합니다.
smit mirrorvg
- 첫 화면에서 미러링할 볼륨 그룹을 고릅니다.
- 둘째 화면에서 미러링 옵션을 정하거나 기본값을 받아들입니다. 필요하면 온라인 도움말을 쓸 수 있습니다.
참고: SMIT 화면을 마치고 OK를 누르거나 끝내면 실제 명령이 끝나기까지 시간이 꽤 걸릴 수 있습니다. 시간은 오류 검사, 볼륨 그룹 안 논리 볼륨의 크기와 수, 새로 미러링한 논리 볼륨을 동기화하는 시간에 영향을 받습니다.
이제 논리 볼륨에 대한 모든 변경이 SMIT 화면에서 지정한 대로 미러링됩니다.
관련 작업
- 루트 볼륨 그룹 미러링
루트 볼륨 그룹 미러링
다음 시나리오는 루트 볼륨 그룹(rootvg)을 미러링하는 방법입니다.
참고: 루트 볼륨 그룹 미러링에는 숙련된 시스템 관리 경험이 필요합니다. 잘못하면 시스템이 부팅하지 못할 수 있습니다.
다음 시나리오에서 rootvg는 hdisk01에 있고 hdisk11이라는 디스크에 미러를 만듭니다.
hdisk11이 AIX 부트 장치로 지원되는지 확인합니다.
bootinfo -B hdisk11
이 명령이 1을 돌려주면 AIX가 고른 디스크로 부팅할 수 있습니다. 다른 값이면 hdisk11은 rootvg 미러링 후보가 아닙니다.
2. 다음 명령으로 rootvg에 hdisk11을 넣습니다.
extendvg rootvg hdisk11
다음 오류 메시지가 나오거나
0516-050 Not enough descriptor space left in this volume group, Either try
adding a smaller PV or use another volume group.
다음과 비슷한 메시지가 나오면
0516-1162 extendvg: Warning, The Physical Partition size of 16 requires the
creation of 1084 partitions for hdisk11. The limitation for volume group
rootvg is 1016 physical partitions per physical volume. Use chvg command with
the -t option to attempt to change the maximum physical partitions per Physical
Volume for this volume group.
다음 방법이 있습니다.
- rootvg에 이미 속한 빈 디스크로 rootvg를 미러링합니다.
- 더 작은 디스크를 씁니다.
- 다음 절차로 rootvg가 지원하는 최대 파티션 수를 바꿉니다. a. 메시지에서 대상 디스크에 필요한 물리 파티션 수와 rootvg가 지금 지원하는 최대 수를 확인합니다. b.
chvg -t명령으로 rootvg에서 지금 허용하는 최대 파티션 수(위 예에서 1016)에 곱해 대상 디스크에 필요한 물리 파티션 수(위 예에서 1084)보다 큰 수가 되게 합니다. 예:
chvg -t 2 rootvg
- 2단계 처음의 extendvg 명령을 다시 실행합니다.
- 다음 명령처럼 정확한 대응 옵션으로 rootvg를 미러링합니다.
mirrorvg -m rootvg hdisk11
볼륨 그룹이 rootvg이면 이 명령은 쿼럼을 끕니다. 정확한 대응 옵션을 쓰지 않으면 부트 논리 볼륨 hd5의 새 사본이 연속 파티션으로 이루어졌는지 확인해야 합니다. 4. 다음 명령으로 모든 부트 레코드와 장치를 초기화합니다.
bosboot -a
- 다음 명령으로 부트 목록을 초기화합니다.
bootlist -m normal hdisk01 hdisk11
참고
- bootlist 명령이 hdisk11을 대체 부트 디스크로 지정해도,
hdisk01이 고장 났을 때 시스템이hdisk11을 부트 장치로 쓴다고 보장할 수는 없습니다. 그런 경우 제품 매체로 부팅해 유지 보수를 고르고, 고장 난 디스크를 빼고 bootlist 명령을 다시 실행해야 할 수 있습니다. - 하드웨어 모델이 bootlist 명령을 지원하지 않아도 rootvg를 미러링할 수는 있지만, 원래 디스크를 쓸 수 없을 때 대체 부트 디스크를 직접 골라야 합니다.
관련 작업
- 볼륨 그룹 미러링
응용 프로그램용 원시 논리 볼륨 정의
원시 논리 볼륨은 운영 체제나 파일 시스템이 아니라 데이터베이스나 파티션 같은 응용 프로그램이 직접 제어하는 물리·논리 디스크 공간입니다.
파일 시스템을 거치지 않으면 제어하는 응용 프로그램, 특히 데이터베이스 응용 프로그램의 성능이 좋아질 수 있습니다. 그러나 개선 정도는 데이터베이스 크기나 응용 프로그램 드라이버 같은 요인에 달려 있습니다.
참고: 응용 프로그램에 새 원시 논리 볼륨의 문자나 블록 특수 장치 파일을 알맞게 알려 줘야 합니다. 응용 프로그램은 열기, 읽기, 쓰기 등을 할 때 이 장치 파일에 연결합니다.
주의: 각 논리 볼륨의 첫 블록에는 논리 볼륨 제어 블록(LVCB)이 있습니다. LVCB 크기는 볼륨 그룹 안 물리 볼륨의 블록 크기입니다. 데이터는 둘째 블록부터 시작합니다. 원시 논리 볼륨에서는 LVCB가 보호되지 않습니다. 응용 프로그램이 LVCB를 덮어쓰면 보통 LVCB를 갱신하는 명령이 실패하고 메시지를 냅니다. 논리 볼륨이 계속 올바르게 동작하고 덮어쓰기가 허용될 수도 있지만, LVCB를 덮어쓰는 것은 권하지 않습니다.
다음 지침은 SMIT와 명령행으로 원시 논리 볼륨을 정의합니다. Web-based System Manager의 Create a new logical volume 마법사(Volumes → Overview and Tasks → Create a new logical volume)도 쓸 수 있습니다. 마법사에서 원시 논리 볼륨을 정의하려면 첫 선택 화면에서 applications and data를 고릅니다. 필요하면 온라인 도움말을 쓸 수 있습니다.
이 시나리오의 정보는 특정 AIX 버전으로 시험했습니다. AIX 버전과 수준에 따라 결과가 크게 다를 수 있습니다.
- root 권한으로 다음 SMIT 빠른 경로를 입력해 원시 논리 볼륨을 만들 수 있는 빈 물리 파티션을 찾습니다.
smit lspv
- 디스크를 고릅니다.
- 둘째 대화 상자(상태)에서 기본값을 받아들이고 OK를 누릅니다.
- FREE PPs 필드 값에 PP SIZE 필드 값을 곱해 고른 디스크에서 원시 논리 볼륨에 쓸 수 있는 총 메가바이트를 구합니다. 빈 공간이 모자라면 충분한 디스크를 찾을 때까지 다른 디스크를 고릅니다.
- SMIT를 끝냅니다.
- mklv 명령으로 원시 논리 볼륨을 만듭니다. 다음 명령은
db2vg볼륨 그룹에 4MB 물리 파티션38개로lvdb2003이라는 원시 논리 볼륨을 만듭니다.
mklv -y lvdb2003 db2vg 38
시스템이 만든 이름 대신 논리 볼륨 이름을 주려면 -y 플래그를 씁니다.
이제 원시 논리 볼륨이 만들어졌습니다. 볼륨 그룹 내용을 나열하면 원시 논리 볼륨은 기본 형인 jfs로 나옵니다. 이 형 항목은 레이블일 뿐이며 원시 논리 볼륨에 파일 시스템이 마운트됐다는 뜻이 아닙니다.
/dev/rawLVname을 여는 방법과 이 원시 공간을 쓰는 방법은 응용 프로그램 지침을 봅니다.
관련 개념
- 논리 볼륨 관리자 구성
관련 참조
- LVM 유지 보수 명령과 빠른 경로
관련 정보
- mklv 명령, Logical Volume Manager from A to Z: Introduction and Concepts, Storage Management
루트 볼륨 그룹 미러링 해제
루트 볼륨 그룹의 미러링을 해제할 수 있습니다.
주의: 루트 볼륨 그룹 미러링 해제에는 숙련된 시스템 관리 경험이 필요합니다. 잘못하면 시스템이 부팅하지 못할 수 있습니다.
다음 시나리오에서 루트 볼륨 그룹은 hdisk01에 있고 hdisk11에 미러링돼 있습니다. 이 예는 hdisk11의 미러를 지웁니다. 마지막으로 어느 디스크로 부팅했든 절차는 같습니다.
- 다음 명령으로 hdisk11의 루트 볼륨 그룹 미러링을 해제합니다.
unmirrorvg rootvg hdisk11
unmirrorvg 명령은 루트 볼륨 그룹의 쿼럼을 다시 켭니다. 2. 다음 명령으로 루트 볼륨 그룹에서 디스크를 뺍니다.
reducevg rootvg hdisk11
- 다음 명령으로 남은 디스크의 부트 레코드를 다시 초기화합니다.
bosboot -a -d /dev/hdisk01
- 다음 명령으로 부트 목록에서 미러링을 해제한 디스크를 뺍니다.
bootlist -m normal hdisk01
디스크 미러링이 해제됐습니다.
시스템을 켠 채 디스크 제거
다음 절차는 시스템을 끄지 않고 디스크를 뺄 수 있는 핫 제거 기능으로 디스크를 빼는 방법입니다. 이 기능은 일부 시스템에서만 쓸 수 있습니다.
핫 제거는 다음 경우에 쓸모 있습니다.
- 보안이나 유지 보수를 위해 rootvg가 아닌 별도 볼륨 그룹의 데이터가 든 디스크를 뺄 때
- 볼륨 그룹에서 디스크를 영구히 뺄 때
- 디스크 고장을 바로잡을 때
데이터가 든 디스크 제거
이 절차로 시스템을 끄지 않고 데이터가 든 디스크를 뺍니다.
빼는 디스크는 rootvg가 아닌 별도 볼륨 그룹에 있어야 합니다. 디스크를 다른 시스템으로 옮길 때 이 절차를 씁니다.
- 빼려는 디스크와 연결된 볼륨 그룹을 나열하려면 다음을 입력합니다.
smit lspv
출력은 다음과 비슷합니다.
PHYSICAL VOLUME: hdisk2 VOLUME GROUP: imagesvg
PV IDENTIFIER: 00083772caa7896e VG IDENTIFIER 0004234500004c00000000e9b5cac262
PV STATE: active
STALE PARTITIONS: 0 ALLOCATABLE: yes
PP SIZE: 16 megabyte(s) LOGICAL VOLUMES: 5
TOTAL PPs: 542 (8672 megabytes) VG DESCRIPTORS: 2
FREE PPs: 19 (304 megabytes) HOT SPARE: no
USED PPs: 523 (8368 megabytes)
FREE DISTRIBUTION: 00..00..00..00..19
USED DISTRIBUTION: 109..108..108..108..90
볼륨 그룹 이름은 VOLUME GROUP 필드에 나옵니다. 이 예에서 볼륨 그룹은 imagesvg입니다.
2. 디스크가 rootvg가 아닌 별도 볼륨 그룹에 있는지 확인하려면 다음을 입력합니다.
smit lsvg
그런 다음 디스크와 연결된 볼륨 그룹(이 예에서는 imagesvg)을 고릅니다. 출력은 다음과 비슷합니다.
VOLUME GROUP: imagesvg VG IDENTIFIER: 0004234500004c00000000e9b5cac262
VG STATE: active PP SIZE: 16 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 542 (8672 megabytes)
MAX LVs: 256 FREE PPs: 19 (304 megabytes)
LVs: 5 USED PPs: 523 (8368 megabytes)
OPEN LVs: 4 QUORUM: 2
TOTAL PVs: 1 VG DESCRIPTORS: 2
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 1 AUTO ON: yes
MAX PPs per PV: 1016 MAX PVs: 32
LTG size: 128 kilobyte(s) AUTO SYNC: no
HOT SPARE: no
이 예에서 TOTAL PVs 필드는 imagesvg에 물리 볼륨이 하나뿐이라는 뜻입니다. 이 볼륨 그룹의 모든 데이터가 hdisk2에 있으므로 이 절차로 hdisk2를 뺄 수 있습니다. 3. 디스크의 논리 볼륨에 있는 파일 시스템을 마운트 해제하려면 다음을 입력합니다.
smit umountfs
- 볼륨 그룹을 비활성화하려면 다음을 입력합니다.
smit varyoffvg
- 볼륨 그룹을 내보내려면 다음을 입력합니다.
smit exportvg
- 디스크를 빼려면 다음을 입력합니다.
smit rmvdsk
- 빼려는 디스크의 LED 표시를 봅니다. 노란 LED가 꺼져 있는지(켜지지 않았는지) 확인합니다.
- 디스크를 물리적으로 뺍니다. 제거 절차는 기계의 서비스 안내서를 봅니다.
이제 디스크가 물리적·논리적으로 시스템에서 빠졌습니다. 디스크를 영구히 빼는 것이면 절차가 끝납니다.
관련 작업
- 볼륨 그룹 가져오기·내보내기, 시스템을 켠 채 디스크 더하기
데이터가 없는 디스크 제거
다음 절차는 데이터가 없거나 남길 데이터가 없는 디스크를 빼는 방법입니다.
주의: 다음 절차는 디스크의 모든 데이터를 지웁니다.
- 디스크의 논리 볼륨에 있는 파일 시스템을 마운트 해제하려면 다음을 입력합니다.
smit umountfs
- 볼륨 그룹을 비활성화하려면 다음을 입력합니다.
smit varyoffvg
- 볼륨 그룹을 내보내려면 다음을 입력합니다.
smit exportvg
- 디스크를 빼려면 다음을 입력합니다.
smit rmvdsk
- 빼려는 디스크의 LED 표시를 봅니다. 노란 LED가 꺼져 있는지 확인합니다.
- 디스크를 물리적으로 뺍니다. 제거 절차는 기계의 서비스 안내서를 봅니다.
이제 디스크가 물리적·논리적으로 시스템에서 빠졌습니다. 디스크를 영구히 빼는 것이면 절차가 끝납니다.
관련 작업
- 시스템을 켠 채 디스크 더하기
파일 시스템을 지워 논리 볼륨 제거
다음 절차는 JFS나 JFS2 파일 시스템, 연결된 논리 볼륨, /etc/filesystems 파일의 연결된 스탠자, 그리고 선택적으로 파일 시스템이 마운트된 마운트 지점(디렉터리)을 지우는 방법입니다.
주의: 파일 시스템을 지우면 지정한 파일 시스템과 논리 볼륨의 모든 데이터가 파괴됩니다.
다른 종류의 파일 시스템이 마운트된 논리 볼륨이나 파일 시스템이 없는 논리 볼륨을 지우려면 "논리 볼륨만 제거"를 씁니다.
Web-based System Manager로 저널 파일 시스템을 지우려면 다음 절차를 씁니다.
- Web-based System Manager가 실행 중이 아니면 root 권한으로 명령행에서
wsm을 입력합니다. - 호스트 이름을 고릅니다.
- File Systems 컨테이너를 고릅니다.
- Journaled File Systems 컨테이너를 고릅니다.
- 지울 파일 시스템을 고릅니다.
- Selected 메뉴에서 Unmount를 고릅니다.
- Selected 메뉴에서 Delete를 고릅니다.
SMIT로 저널 파일 시스템을 지우려면 다음 절차를 씁니다.
- 다음 예와 비슷한 명령으로 논리 볼륨에 있는 파일 시스템을 마운트 해제합니다.
umount /adam/usr/local
참고: 사용 중인 장치에는 umount 명령을 쓸 수 없습니다. 어떤 이유로든 파일이 열려 있거나 사용자의 현재 디렉터리가 그 장치에 있으면 사용 중입니다. 2. 파일 시스템을 지우려면 다음 빠른 경로를 입력합니다.
smit rmfs
- 지울 파일 시스템 이름을 고릅니다.
- Remove Mount Point 필드로 가서 원하는 대로 바꿉니다. yes를 고르면 실제 명령이 파일 시스템이 마운트된 마운트 지점(디렉터리)도 (비어 있으면) 지웁니다.
- Enter를 눌러 파일 시스템을 지웁니다. SMIT가 정말 지울지 확인을 묻습니다.
- 지울 것을 확인합니다. 파일 시스템이 지워지면 SMIT가 메시지를 보여 줍니다.
이제 파일 시스템, 그 데이터, 연결된 논리 볼륨이 시스템에서 완전히 지워졌습니다.
관련 작업
- 논리 볼륨만 제거
논리 볼륨만 제거
다른 종류의 파일 시스템이 마운트된 논리 볼륨이나 파일 시스템이 없는 논리 볼륨을 지울 때 이 절차를 씁니다.
주의: 논리 볼륨을 지우면 지정한 파일 시스템과 논리 볼륨의 모든 데이터가 파괴됩니다.
다음 절차는 논리 볼륨과 연결된 파일 시스템을 지우는 방법입니다. JFS가 아닌 파일 시스템이나 파일 시스템이 없는 논리 볼륨을 지울 때 씁니다. 논리 볼륨을 지우는 방법을 설명한 뒤 /etc/filesystems 파일에서 JFS가 아닌 파일 시스템의 스탠자를 지우는 방법을 설명합니다.
Web-based System Manager로 논리 볼륨을 지우려면 다음 절차를 씁니다.
- Web-based System Manager가 실행 중이 아니면 root 권한으로 명령행에서
wsm을 입력합니다. - 호스트 이름을 고릅니다.
- 논리 볼륨에 파일 시스템이 없으면 10단계로 건너뜁니다.
- File Systems 컨테이너를 고릅니다.
- 해당 파일 시스템 형의 컨테이너를 고릅니다.
- 마운트 해제할 파일 시스템을 고릅니다.
- Selected 메뉴에서 Unmount를 고릅니다.
- 탐색 영역에서 해당 파일 시스템 컨테이너를 골라 파일 시스템을 나열합니다.
- 지울 시스템의 논리 볼륨 이름을 적어 둡니다.
- Volumes 컨테이너를 고릅니다.
- Logical Volumes 컨테이너를 고릅니다.
- 지울 논리 볼륨을 고릅니다.
- Selected 메뉴에서 Delete를 고릅니다.
SMIT로 논리 볼륨을 지우려면 다음 절차를 씁니다.
- 논리 볼륨에 파일 시스템이 없으면 4단계로 건너뜁니다.
- 다음을 입력해 논리 볼륨과 연결된 모든 파일 시스템을 마운트 해제합니다.
unmount /FSname
/FSname은 파일 시스템의 전체 경로 이름입니다.
참고
- 마운트 해제하려는 파일 시스템을 지금 쓰고 있으면 unmount 명령은 실패합니다. 파일이 하나도 열려 있지 않고 어떤 사용자의 현재 디렉터리도 그 장치에 없을 때만 실행됩니다.
- unmount 명령의 다른 이름은 umount입니다. 두 이름은 바꿔 쓸 수 있습니다.
- 파일 시스템에 관해 알아야 할 정보를 나열하려면 다음 빠른 경로를 입력합니다.
smit lsfs
다음은 목록 일부입니다.
Name Nodename Mount Pt ...
/dev/hd3 -- /tmp ...
/dev/locallv -- /adam/usr/local ...
둘째 항목이 표준 명명 규칙을 따른다고 하면 파일 시스템 이름은 /adam/usr/local, 논리 볼륨은 locallv입니다. 확인하려면 다음 빠른 경로를 입력합니다.
smit lslv2
다음은 목록 일부입니다.
imagesvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd3 jfs 4 4 1 open/syncd /tmp
locallv mine 4 4 1 closed/syncd /adam/usr/local
- 논리 볼륨을 지우려면 명령행에서 다음 빠른 경로를 입력합니다.
smit rmlv
- 지울 논리 볼륨 이름을 고릅니다.
- Remove Mount Point 필드로 가서 원하는 대로 바꿉니다. yes를 고르면 실제 명령이 (있고 비어 있으면) 마운트 지점(디렉터리)도 지웁니다.
- Enter를 눌러 논리 볼륨을 지웁니다. SMIT가 정말 지울지 확인을 묻습니다.
- 지울 것을 확인합니다. 논리 볼륨이 지워지면 SMIT가 메시지를 보여 줍니다.
- 논리 볼륨에 JFS가 아닌 파일 시스템이 마운트돼 있었으면 다음 예처럼 파일 시스템과
/etc/filesystems파일의 연결된 스탠자를 지웁니다.
rmfs /adam/usr/local
또는 다음처럼 파일 시스템 이름(장치 이름)을 쓸 수 있습니다.
rmfs /dev/locallv
이제 논리 볼륨이 지워졌습니다. 논리 볼륨에 JFS가 아닌 파일 시스템이 있었으면 그 스탠자도 /etc/filesystems 파일에서 지워졌습니다.
관련 작업
- 파일 시스템을 지워 논리 볼륨 제거
RAID 볼륨 그룹 크기 조정
RAID(redundant array of independent disks)를 쓰는 시스템에서는 chvg와 chpv 명령 옵션으로 RAID 그룹에 디스크를 더하고 LVM이 쓰는 물리 볼륨 크기를 시스템 사용이나 가용성 중단 없이 키울 수 있습니다.
참고
- 볼륨 그룹이 전통적이거나 향상된 동시 모드로 활성화돼 있으면 이 기능을 쓸 수 없습니다.
- rootvg 볼륨 그룹은 다음 절차로 크기를 바꿀 수 없습니다.
- 활성 페이징 공간이 있는 볼륨 그룹은 다음 절차로 크기를 바꿀 수 없습니다.
볼륨 그룹을 활성화(varyon)할 때 볼륨 그룹의 모든 디스크 크기를 자동으로 살핍니다. 커진 것이 감지되면 시스템은 정보 메시지를 냅니다.
다음 절차는 RAID 환경에서 디스크를 키우는 방법입니다.
- 디스크 증가를 확인하고 필요하면 크기를 바꾸려면 다음 명령을 입력합니다.
chvg -g VGname
VGname은 볼륨 그룹 이름입니다. 이 명령은 볼륨 그룹의 모든 디스크를 살핍니다. 커진 디스크가 있으면 물리 볼륨에 물리 파티션을 더하려고 합니다. 필요하면 알맞은 1016 한도 배수를 정해 볼륨 그룹을 big 볼륨 그룹으로 바꿉니다. 2. 볼륨 그룹의 LVM 불량 블록 재배치를 끄려면 다음 명령을 입력합니다.
chvg -b ny VGname
VGname은 볼륨 그룹 이름입니다.
영어 원문
Configuring Logical Volume Storage
With Logical Volume Storage you can mirror volume groups, define a logical volume, and remove a disk with the system running.
Mirroring a volume group
These scenarios explain how to mirror a normal volume group.
The following instructions show you how to mirror a root volume group using the System Management Interface Tool (SMIT). You can also use Web-based System Manager
(select a volume group in the Volumes container, then choose Mirror from the Selected menu). Experienced administrators can use the mirrorvg command.
- With root authority, add a disk to the volume group using the following SMIT fast path:
smit extendvg
- Mirror the volume group onto the new disk by typing the following SMIT fast path:
smit mirrorvg
In the first panel, select a volume group for mirroring.
In the second panel, you can define mirroring options or accept defaults. Online help is available if you need it.
Note: When you complete the SMIT panels and click OK or exit, the underlying command can take a significant amount of time to complete. The length of time is affected by error checking, the size and number of logical volumes in the volume group, and the time it takes to synchronize the newly mirrored logical volumes.
At this point, all changes to the logical volumes will be mirrored as you specified in the SMIT panels.
Related tasks
“Mirroring the root volume group” The following scenario explains how to mirror the root volume group (rootvg).
Mirroring the root volume group
The following scenario explains how to mirror the root volume group (rootvg).
Note: Mirroring the root volume group requires advanced system administration experience. If not done correctly, you can cause your system to be unbootable.
In the following scenario, the rootvg is contained on hdisk01, and the mirror is being made to a disk called hdisk11:
- Check that
hdisk11is supported by AIX as a boot device:
bootinfo -B hdisk11
If this command returns a value of 1, the selected disk is bootable by AIX. Any other value indicates that hdisk11 is not a candidate for rootvg mirroring.
- Extend rootvg to include
hdisk11, using the following command:
extendvg rootvg hdisk11
If you receive the following error messages:
0516-050 Not enough descriptor space left in this volume group, Either try
adding a smaller PV or use another volume group.
or a message similar to:
0516-1162 extendvg: Warning, The Physical Partition size of 16 requires the
creation of 1084 partitions for hdisk11. The limitation for volume group
rootvg is 1016 physical partitions per physical volume. Use chvg command with
the -t option to attempt to change the maximum physical partitions per Physical
Volume for this volume group.
You have the following options:
Mirror the rootvg to an empty disk that already belongs to the rootvg.
Use a smaller disk.
Change the maximum number of partitions supported by the rootvg, using the following procedure: a. Check the message for the number of physical partitions needed for the destination disk and the maximum number currently supported by rootvg. b. Use the chvg -t command to multiply the maximum number of partitions currently allowed in rootvg (in the above example, 1016) to a number that is larger than the physical partitions needed for the destination disk (in the above example, 1084). For example:
chvg -t 2 rootvg
- Reissue the extendvg command at the beginning of step 2.
- Mirror the rootvg, using the exact mapping option, as shown in the following command:
mirrorvg -m rootvg hdisk11
This command will turn off quorum when the volume group is rootvg. If you do not use the exact mapping option, you must verify that the new copy of the boot logical volume, hd5, is made of contiguous partitions.
- Initialize all boot records and devices, using the following command:
bosboot -a
- Initialize the boot list with the following command:
bootlist -m normal hdisk01 hdisk11
Note
- Even though the bootlist command identifies hdisk11 as an alternate boot disk, it cannot guarantee the system will use
hdisk11as the boot device ifhdisk01fails. In such case, you might have to boot from the product media, select maintenance, and reissue the bootlist command without naming the failed disk. b. If your hardware model does not support the bootlist command, you can still mirror the rootvg, but you must actively select the alternate boot disk when the original disk is unavailable.
Related tasks
Mirroring a volume group These scenarios explain how to mirror a normal volume group.
Defining a raw logical volume for an application
A raw logical volume is an area of physical and logical disk space that is under the direct control of an application, such as a database or a partition, rather than under the direct control of the operating system or a file system.
Bypassing the file system can yield better performance from the controlling application, especially from database applications. The amount of improvement, however, depends on factors such as the size of a database or the application's driver.
Note: You will need to provide the application with the character or block special device file for the new raw logical volume, as appropriate. The application will link to this device file when it attempts opens, reads, writes, and so on.
Attention: Each logical volume has a logical volume control block (LVCB) located in the first block. The size of LVCB is the block size of the physical volumes within the volume group. Data begins in the second block. In a raw logical volume, the LVCB is not protected. If an application overwrites the LVCB, commands that normally update the LVCB will fail and generate a message. Although the logical volume might continue to operate correctly and the overwrite can be an allowable event, overwriting the LVCB is not recommended.
The following instructions use SMIT and the command line interface to define a raw logical volume. You can also use the Create a new logical volume wizard in Web-based System Manager (select Volumes → Overview and Tasks →Create a new logical volume). To define a raw logical volume within the wizard, select applications and data from the first selection screen. Online help is available if you need it.
The information in this how-to scenario was tested using specific versions of AIX. The results you obtain might vary significantly depending on your version and level of AIX.
- With root authority, find the free physical partitions on which you can create the raw logical volume by typing the following SMIT fast path:
smit lspv
Select a disk.
Accept the default in the second dialog (status) and click OK.
Multiply the value in the FREE PPs field by the value in the PP SIZE field to get the total number of megabytes available for a raw logical volume on the selected disk. If the amount of free space is not adequate, select a different disk until you find one that has enough available free space.
Exit SMIT.
Use the mklv command to create the raw logical volume. The following command creates a raw logical volume named
lvdb2003in thedb2vgvolume group using384-MB physical partitions:
mklv -y lvdb2003 db2vg 38
Use the -y flag to provide a name for the logical volume instead of using a system-generated name.
At this point, the raw logical volume is created. If you list the contents of your volume group, a raw logical volume is shown with the default type, which is jfs. This type entry for a logical volume is simply a label. It does not indicate a file system is mounted for your raw logical volume.
Consult your application's instructions on how to open /dev/rawLVname and how to use this raw space.
Related concepts
Configuring Logical Volume Manager The Logical Volume Manager (LVM) is installed with the base operating system and needs no further configuration. However, disks must be configured and defined as a physical volume before the LVM can use them.
Related reference
LVM maintenance commands and fastpaths The simplest tasks you might need when maintaining the entities that LVM controls (physical and logical volumes, volume groups, and file systems) are grouped within the following table.
Related information
mklv command Logical Volume Manager from A to Z: Introduction and Concepts Storage Management
Unmirroring the root volume group
You can unmirror the root volume group.
Attention: Unmirroring the root volume group requires advanced system administration experience. If not done correctly, your system can become unbootable.
In the following scenario, the root volume group is on hdisk01 and mirrored onto hdisk11. This example removes the mirror on hdisk11. The procedure is the same, regardless of which disk you booted to last.
- Use the following command to unmirror the root volume group on hdisk11:
unmirrorvg rootvg hdisk11
The unmirrorvg command turns quorum back on for the root volume group.
- Use the following command to reduce the disk out of the root volume group:
reducevg rootvg hdisk11
- Use the following command to reinitialize the boot record of the remaining disk:
bosboot -a -d /dev/hdisk01
- Use the following command to modify the boot list in order to remove the unmirrored disk from the list:
bootlist -m normal hdisk01
The disk is unmirrored.
Removing a disk while the system remains available
The following procedure describes how to remove a disk using the hot-removability feature, which lets you remove the disk without turning the system off. This feature is only available on certain systems.
Hot removability is useful when you want to:
Remove a disk that contains data in a separate non-rootvg volume group for security or maintenance purposes.
Permanently remove a disk from a volume group.
Correct a disk failure.
Removing a disk with data:
Use this procedure to remove a disk that contains data without turning the system off.
The disk you are removing must be in a separate non-rootvg volume group. Use this procedure when you want to move a disk to another system.
- To list the volume group associated with the disk you want to remove, type:
smit lspv
Your output looks similar to the following:
PHYSICAL VOLUME: hdisk2 VOLUME GROUP: imagesvg
PV IDENTIFIER: 00083772caa7896e VG IDENTIFIER 0004234500004c00000000e9b5cac262
PV STATE: active
STALE PARTITIONS: 0 ALLOCATABLE: yes
PP SIZE: 16 megabyte(s) LOGICAL VOLUMES: 5
TOTAL PPs: 542 (8672 megabytes) VG DESCRIPTORS: 2
FREE PPs: 19 (304 megabytes) HOT SPARE: no
USED PPs: 523 (8368 megabytes)
FREE DISTRIBUTION: 00..00..00..00..19
USED DISTRIBUTION: 109..108..108..108..90
The name of the volume group is listed in the VOLUME GROUP field. In this example, the volume group is imagesvg.
- To verify that the disk is in a separate non-rootvg volume group, type:
smit lsvg
Then select the volume group associated with your disk (in this example, imagesvg). Your output looks similar to the following:
VOLUME GROUP: imagesvg VG IDENTIFIER: 0004234500004c00000000e9b5cac262
VG STATE: active PP SIZE: 16 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 542 (8672 megabytes)
MAX LVs: 256 FREE PPs: 19 (304 megabytes)
LVs: 5 USED PPs: 523 (8368 megabytes)
OPEN LVs: 4 QUORUM: 2
TOTAL PVs: 1 VG DESCRIPTORS: 2
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 1 AUTO ON: yes
MAX PPs per PV: 1016 MAX PVs: 32
LTG size: 128 kilobyte(s) AUTO SYNC: no
HOT SPARE: no
In this example, the TOTAL PVs field indicates there is only one physical volume associated with imagesvg. Because all data in this volume group is contained on hdisk2, hdisk2 can be removed using this procedure.
- To unmount any file systems on the logical volumes on the disk, type:
smit umountfs
- To deactivate the volume group, type:
smit varyoffvg
- To export the volume group, type:
smit exportvg
- To remove the disk, type:
smit rmvdsk
Look at the LED display for the disk you want to remove. Ensure the yellow LED is off (not lit).
Physically remove the disk. For more information about the removal procedure, see the service guide for your machine.
At this point, the disk is physically and logically removed from your system. If you are permanently removing this disk, this procedure is completed.
Related tasks
Importing or exporting a volume group The following table explains how to use import and export to move a user-defined volume group from one system to another. (The rootvg volume group cannot be exported or imported.) Adding disks while the system remains available The following procedure describes how to turn on and configure a disk using the hot-removability feature, which lets you add disks without powering off the system.
Removing a disk without data:
The following procedure describes how to remove a disk that contains either no data or no data that you want to keep.
Attention: The following procedure erases any data that resides on the disk.
- To unmount any file systems on the logical volumes on the disk, type:
smit umountfs
- To deactivate the volume group, type:
smit varyoffvg
- To export the volume group, type:
smit exportvg
- To remove the disk, type:
smit rmvdsk
Look at the LED display for the disk you want to remove. Ensure the yellow LED is off (not lit).
Physically remove the disk. For more information about the removal procedure, see the service guide for your machine.
At this point, the disk is physically and logically removed from your system. If you are permanently removing this disk, this procedure is completed.
Related tasks
Adding disks while the system remains available The following procedure describes how to turn on and configure a disk using the hot-removability feature, which lets you add disks without powering off the system.
Removing a logical volume by removing the file system:
The following procedure explains how to remove a JFS or JFS2 file system, its associated logical volume, its associated stanza in the /etc/filesystems file, and, optionally, the mount point (directory) where the file system is mounted.
Attention: When you remove a file system, you destroy all data in the specified file systems and logical volume.
If you want to remove a logical volume with a different type of file system mounted on it or a logical volume that does not contain a file system you can remove the logical volume only.
To remove a journaled file system through Web-based System Manager, use the following procedure:
If Web-based System Manager is not already running, with root authority type
wsmon the command line.Select a host name.
Select the File Systems container.
Select the Journaled File Systems container.
Select the file system you want to remove.
From the Selected menu, select Unmount.
From the Selected menu, select Delete.
To remove a journaled file system through SMIT, use the following procedure:
- Unmount the file system that resides on the logical volume with a command similar to the following example:
umount /adam/usr/local
Note: You cannot use the umount command on a device in use. A device is in use if any file is open for any reason or if a user's current directory is on that device.
- To remove the file system, type the following fast path:
smit rmfs
Select the name of the file system you want to remove.
Go to the Remove Mount Point field and toggle to your preference. If you select yes, the underlying command will also remove the mount point (directory) where the file system is mounted (if the directory is empty).
Press Enter to remove the file system. SMIT prompts you to confirm whether you want to remove the file system.
Confirm you want to remove the file system. SMIT displays a message when the file system has been removed successfully.
At this point, the file system, its data, and its associated logical volume are completely removed from your system.
Related tasks
“Removing a logical volume only” Use this procedure to remove a logical volume with a different type of file system mounted on it or a logical volume that does not contain a file system.
Removing a logical volume only:
Use this procedure to remove a logical volume with a different type of file system mounted on it or a logical volume that does not contain a file system.
Attention: Removing a logical volume destroys all data in the specified file systems and logical volume.
The following procedures explain how to remove a logical volume and any associated file system. You can use this procedure to remove a non-JFS file system or a logical volume that does not contain a file system. After the following procedures describe how to remove a logical volume, they describe how to remove any non-JFS file system's stanza in the /etc/filesystems file.
To remove a logical volume through Web-based System Manager, use the following procedure:
If Web-based System Manager is not already running, with root authority, type
wsmon the command line.Select a host name.
If the logical volume does not contain a file system, skip to step 10.
Select the File Systems container.
Select the container for the appropriate file system type.
Select the file system you want to unmount.
From the Selected menu, select Unmount.
Select the appropriate file system container in the navigation area to list its file systems.
Note the logical volume name of the system you want to remove.
Select the Volumes container.
Select the Logical Volumes container.
Select the logical volume you want to remove.
From the Selected menu, select Delete.
To remove a logical volume through SMIT, use the following procedure:
If the logical volume does not contain a file system, skip to step 4.
Unmount all file systems associated with the logical volume by typing:
unmount /FSname
Where /FSname is the full path name of a file system.
Note
- The unmount command fails if the file system you are trying to unmount is currently being used. The unmount command executes only if none of the file system's files are open and no user's current directory is on that device. b. Another name for the unmount command is umount. The names are interchangeable.
- To list information you need to know about your file systems, type the following fast path:
smit lsfs
The following is a partial listing:
Name Nodename Mount Pt ...
/dev/hd3 -- /tmp ...
/dev/locallv -- /adam/usr/local ...
Assuming standard naming conventions for the second listed item, the file system is named /adam/usr/local and the logical volume is locallv. To verify this, type the following fast path:
smit lslv2
The following is a partial listing:
imagesvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd3 jfs 4 4 1 open/syncd /tmp
locallv mine 4 4 1 closed/syncd /adam/usr/local
- To remove the logical volume, type the following fast path on the command line:
smit rmlv
Select the name of the logical volume you want to remove.
Go to the Remove Mount Point field and toggle to your preference. If you select yes, the underlying command will also remove the mount point (directory) where the file system is mounted (if any, and if that directory is empty).
Press Enter to remove the logical volume. SMIT prompts you to confirm whether you want to remove the logical volume.
Confirm you want to remove the logical volume. SMIT displays a message when the logical volume has been removed successfully.
If the logical volume had a non-JFS file system mounted on it, remove the file system and its associated stanza in the
/etc/filesystemsfile, as shown in the following example:
rmfs /adam/usr/local
Or, you can use the file system name as follows:
rmfs /dev/locallv
At this point, the logical volume is removed. If the logical volume contained a non-JFS file system, that system's stanza has also been removed from the /etc/filesystems file.
Related tasks
Removing a logical volume by removing the file system The following procedure explains how to remove a JFS or JFS2 file system, its associated logical volume, its associated stanza in the /etc/filesystems file, and, optionally, the mount point (directory) where the file system is mounted.
Resizing a RAID volume group:
On systems that use a redundant array of independent disks (RAID), chvg and chpv command options provide the ability to add a disk to the RAID group and grow the size of the physical volume that LVM uses without interruptions to the use or availability of the system.
Note
This feature is not available while the volume group is activated in classic or in enhanced concurrent mode.
The rootvg volume group cannot be resized using the following procedure.
A volume group with an active paging space cannot be resized using the following procedure.
The size of all disks in a volume group is automatically examined when the volume group is activated (varyon). If growth is detected, the system generates an informational message.
The following procedure describes how to grow disks in a RAID environment:
- To check for disk growth and resize if needed, type the following command:
chvg -g VGname
Where VGname is the name of your volume group. This command examines all disks in the volume group. If any have grown in size, it attempts to add physical partitions to the physical volume. If necessary, it will determine the appropriate 1016 limit multiplier and convert the volume group to a big volume group.
- To turn off LVM bad block relocation for the volume group, type the following command:
chvg -b ny VGname
Where VGname is the name of your volume group.
볼륨 그룹 전략
디스크 고장은 저장 시스템에서 가장 흔한 하드웨어 고장이며 다음으로 어댑터와 전원 공급 장치 고장이 흔합니다. 디스크 고장 대비는 주로 논리 볼륨 구성으로 합니다.
어댑터와 전원 공급 장치 고장에 대비하려면 특정 볼륨 그룹에 특수 하드웨어 구성을 고려합니다. 이런 구성에는 어댑터 둘, 어댑터마다 디스크 적어도 하나, 어댑터 사이 미러링, 비쿼럼 볼륨 그룹 구성이 들어갑니다. 이 구성의 추가 비용은 모든 사이트나 시스템에 알맞지는 않습니다. (마지막 1초까지의) 고가용성이 우선인 곳에서만 권합니다. 구성에 따라 고가용성은 가장 최근 백업과 현재 데이터 입력 사이에 일어난 하드웨어 고장을 감당할 수 있습니다. 고가용성은 실수로 지운 파일에는 해당하지 않습니다.
관련 개념
- 논리 볼륨 전략 — 사이트에 알맞은 가용성, 성능, 비용 조합을 지향하는 논리 볼륨 사용 전략을 세우는 정책입니다.
별도 볼륨 그룹을 만들 때
물리 볼륨을 rootvg와 다른 볼륨 그룹으로 묶고 싶은 이유는 여러 가지입니다.
- 더 안전하고 쉬운 유지 보수를 위해
- 사용자 파일 시스템을 운영 체제와 분리하면 운영 체제 갱신, 재설치, 크래시 복구 때 사용자 파일이 위험해지지 않아 더 안전합니다.
- 사용자 데이터를 복원하지 않고 운영 체제를 갱신하거나 재설치할 수 있어 유지 보수가 쉽습니다. 예를 들어 갱신하기 전에 사용자 정의 볼륨 그룹의 파일 시스템을 마운트 해제하고, varyoffvg 명령으로 비활성화하고, exportvg 명령으로 그룹을 내보내 시스템에서 뺄 수 있습니다. 시스템 소프트웨어를 갱신한 뒤 importvg 명령으로 사용자 정의 볼륨 그룹을 다시 들이고 파일 시스템을 다시 마운트합니다.
- 물리 파티션 크기가 다를 때. 같은 볼륨 그룹 안의 모든 물리 볼륨은 물리 파티션 크기가 같아야 합니다. 물리 파티션 크기가 다른 물리 볼륨을 두려면 크기마다 별도 볼륨 그룹에 둡니다.
- 쿼럼 특성이 달라야 할 때. 비쿼럼 볼륨 그룹을 만들고 싶은 파일 시스템이 있으면 그 데이터용으로 별도 볼륨 그룹을 둡니다. 다른 모든 파일 시스템은 쿼럼 아래 동작하는 볼륨 그룹에 남아야 합니다.
- 보안을 위해. 예를 들어 밤에는 볼륨 그룹을 빼 두고 싶을 수 있습니다.
- 시스템 사이에서 물리 볼륨을 바꿀 때. 여러 시스템이 접근할 수 있는 어댑터에서 시스템마다 별도 볼륨 그룹을 만들면, 어느 쪽의 정상 운영도 중단하지 않고 그 어댑터로 접근할 수 있는 시스템 사이에서 물리 볼륨을 바꿀 수 있습니다(varyoffvg, exportvg, importvg, varyonvg 명령 참고).
디스크 고장 대비 고가용성
디스크 고장을 막는 주된 방법은 미러링 같은 논리 볼륨 구성 설정입니다.
볼륨 그룹 고려 사항은 부차적이지만 볼륨 그룹당 물리 볼륨 수가 걸려 있어 경제적으로 중요합니다.
- 기본값인 쿼럼 구성은 디스크의 쿼럼(51%)이 있는 한 볼륨 그룹을 활성(vary-on) 상태로 유지합니다. 대부분 디스크 고장에 대비하려면 볼륨 그룹에 미러 사본이 있는 디스크가 적어도 셋 필요합니다.
- 비쿼럼 구성은 디스크에 VGDA가 하나라도 있으면 볼륨 그룹을 활성 상태로 유지합니다. 이 구성에서는 디스크 고장에 대비하려면 볼륨 그룹에 미러 사본이 있는 디스크가 둘만 있으면 됩니다.
볼륨 그룹마다 디스크 수를 정할 때는 데이터를 미러링할 공간도 계획해야 합니다. 같은 볼륨 그룹 안의 디스크 사이에서만 데이터를 미러링하고 옮길 수 있다는 점을 기억합니다. 사이트가 큰 파일 시스템을 쓰면 나중에 미러링할 디스크 공간을 찾기 어려워질 수 있습니다. 논리 볼륨 사본의 디스크 간 설정과 논리 볼륨의 디스크 내 할당이 가용성에 주는 영향을 알아 둡니다.
관련 개념
- vary-on 과정, 볼륨 그룹을 비쿼럼 상태로 전환, 논리 볼륨 사본의 디스크 간 설정, 각 논리 볼륨의 디스크 내 할당 정책
어댑터나 전원 공급 장치 고장 대비 고가용성
어댑터나 전원 공급 장치 고장에 대비하려면 요구 사항에 따라 다음 가운데 하나 이상을 합니다.
- 같거나 다른 섀시에 어댑터 둘을 씁니다. 어댑터를 다른 섀시에 두면 한 섀시의 전원 공급 장치가 고장 나도 두 어댑터를 모두 잃지 않습니다.
- 어댑터 둘을 쓰고 어댑터마다 디스크를 적어도 하나 붙입니다. 디스크 A(어댑터 A)의 논리 볼륨과 디스크 B(어댑터 B)의 논리 볼륨 사이에 교차 미러링(논리 파티션의 사본이 같은 물리 볼륨을 공유할 수 없음)을 한다고 하면, 어느 한 어댑터(어댑터가 다른 캐비닛에 있으면 전원 공급 장치)가 고장 나도 볼륨 그룹의 쿼럼을 유지해 대비할 수 있습니다. 곧 어댑터 A에 붙은 디스크의 논리 볼륨을 어댑터 B의 디스크로 복사하고, 어댑터 B에 붙은 디스크의 논리 볼륨도 어댑터 A의 디스크로 복사합니다.
- 두 어댑터의 모든 디스크를 같은 볼륨 그룹으로 구성합니다. 그러면 어댑터가 고장 나거나, 캐비닛이 나뉘어 있으면 전원 공급 장치가 고장 나도 논리 볼륨 사본이 적어도 하나 온전히 남습니다.
- 볼륨 그룹을 비쿼럼 볼륨 그룹으로 만듭니다. 그러면 볼륨 그룹의 어느 디스크에서든 VGDA 하나에 접근할 수 있는 한 볼륨 그룹이 활성으로 남습니다.
- 볼륨 그룹에 디스크가 둘이면 어댑터 사이에 교차 미러링을 구현합니다. 어댑터마다 디스크가 둘 이상이면 이중 미러링을 구현합니다. 이때 같은 어댑터를 쓰는 디스크에 미러 사본 하나, 다른 어댑터를 쓰는 디스크에 하나를 만듭니다.
관련 개념
- 볼륨 그룹을 비쿼럼 상태로 전환
영어 원문
Volume group strategy
Disk failure is the most common hardware failure in the storage system, followed by failure of adapters and power supplies. Protection against disk failure primarily involves the configuration of the logical volumes.
To protect against adapter and power supply failure, consider a special hardware configuration for any specific volume group. Such a configuration includes two adapters and at least one disk per adapter, with mirroring across adapters, and a nonquorum volume group configuration. The additional expense of this configuration is not appropriate for all sites or systems. It is recommended only where high (up-to-the-last second) availability is a priority. Depending on the configuration, high availability can cover hardware failures that occur between the most recent backup and the current data entry. High availability does not apply to files deleted by accident.
Related concepts
Logical volume strategy The policies described here help you set a strategy for logical volume use that is oriented toward a combination of availability, performance, and cost that is appropriate for your site.
When to create separate volume groups
There are several reasons why you might want to organize physical volumes into volume groups separate from rootvg.
For safer and easier maintenance. – Operating system updates, reinstallations, and crash recoveries are safer because you can separate user file systems from the operating system so that user files are not jeopardized during these operations. – Maintenance is easier because you can update or reinstall the operating system without having to restore user data. For example, before updating, you can remove a user-defined volume group from the system by unmounting its file systems. Deactivate it using the varyoffvg command, then export the group using the exportvg command. After updating the system software, you can reintroduce the user-defined volume group using the importvg command, then remount its file systems.
For different physical-partition sizes. All physical volumes within the same volume group must have the same physical partition size. To have physical volumes with different physical partition sizes, place each size in a separate volume group.
When different quorum characteristics are required. If you have a file system for which you want to create a nonquorum volume group, maintain a separate volume group for that data; all of the other file systems should remain in volume groups operating under a quorum.
For security. For example, you might want to remove a volume group at night.
To switch physical volumes between systems. If you create a separate volume group for each system on an adapter that is accessible from more than one system, you can switch the physical volumes between the systems that are accessible on that adapter without interrupting the normal operation of either (see the varyoffvg, exportvg, importvg, and varyonvg commands).
High availability in case of disk failure
The primary methods used to protect against disk failure involve logical volume configuration settings, such as mirroring.
While the volume group considerations are secondary, they have significant economic implications because they involve the number of physical volumes per volume group:
The quorum configuration, which is the default, keeps the volume group active (varied on) as long as a quorum (51%) of the disks is present. In most cases, you need at least three disks with mirrored copies in the volume group to protect against disk failure.
The nonquorum configuration keeps the volume group active (varied on) as long as one VGDA is available on a disk. With this configuration, you need only two disks with mirrored copies in the volume group to protect against disk failure.
When deciding on the number of disks in each volume group, you must also plan for room to mirror the data. Keep in mind that you can only mirror and move data between disks that are in the same volume group. If the site uses large file systems, finding disk space on which to mirror could become a problem at a later time. Be aware of the implications on availability of inter-disk settings for logical volume copies and intra-disk allocation for a logical volume.
Related concepts
Vary-on process The vary-on process is one of the mechanisms that the LVM uses to ensure that a volume group is ready to use and contains the most up-to-date data. Conversion of a volume group to nonquorum status You can change a volume group to nonquorum status to have data continuously available even when there is no quorum. Inter-disk settings for logical volume copies The allocation of a single copy of a logical volume on disk is fairly straightforward. Intra-disk allocation policies for each logical volume The intra-disk allocation policy choices are based on the five regions of a disk where physical partitions can be located.
High availability in case of adapter or power supply failure:
To protect against adapter or power supply failure, depending on your requirements, do one or more of the following.
Use two adapters, located in the same or different chassis. Locating the adapters in different chassis protects against losing both adapters if there is a power supply failure in one chassis.
Use two adapters, attaching at least one disk to each adapter. This protects against a failure at either adapter (or power supply if adapters are in separate cabinets) by still maintaining a quorum in the volume group, assuming cross-mirroring (copies for a logical partition cannot share the same physical volume) between the logical volumes on disk A (adapter A) and the logical volumes on disk B (adapter B). This means that you copy the logical volumes that reside on the disks attached to adapter A to the disks that reside on adapter B and also that you copy the logical volumes that reside on the disks attached to adapter B to the disks that reside on adapter A as well.
Configure all disks from both adapters into the same volume group. This ensures that at least one logical volume copy remains intact in case an adapter fails, or, if cabinets are separate, in case a power supply fails.
Make the volume group a nonquorum volume group. This allows the volume group to remain active as long as one Volume Group Descriptor Area (VGDA) is accessible on any disk in the volume group.
If there are two disks in the volume group, implement cross-mirroring between the adapters. If more than one disk is available on each adapter, implement double-mirroring. In that case, you create a mirrored copy on a disk that uses the same adapter and one on a disk using a different adapter.
Related concepts
Conversion of a volume group to nonquorum status You can change a volume group to nonquorum status to have data continuously available even when there is no quorum.