hpacucli 명령어 (HP Array Configuration Utility CLI)
Array Configuration Utility (이하 ACU) CLI
1. hpacucli 패키지 설치 방법
1) OS에 해당하는 ACU CLI RPM 파일을 hp.com에서 download하여 서버에 UPLOAD합니다.
hpacucli 다운로드
[root]# ls
hpacucli-8.61-1.0.noarch.rpm
2) RPM 설치를 합니다.
[root]# rpm -ivh hpacucli-8.61-1.0.noarch.rpm
준비 중... ########################################### [100%]
1:hpacucli ########################################### [100%]
3) 설치후 기본 실행파일의 위치입니다.
[root]# find / -name hpacucli -print
/opt/hp/hpacucli
/opt/hp/hpacucli/bld/hpacucli
/usr/sbin/hpacucli
4) RPM Package의 설치 위치입니다.
[root]# pwd
/opt/hp/hpacucli/bld
[root]# ls
hpacucli hpacucli-8.61-1.0.noarch.txt hpacucli.license hpacuscripting libcpqimgr.so mklocks.sh
2. hp 기본 사용 방법
1) 명령을 실행하는 두 가지 방법
# hpacucli
HP Array Configuration Utility CLI 9.20.9.0
Detecting Controllers...Done.
Type "help" for a list of supported commands.
Type "exit" to close the console.
hpacucli>
또는 hpacucli 프롬프트를 표시하지 않으려면 Linux 프롬프트에서 직접 다음을 입력하면됩니다. 다음은 위와 동일합니다.
# hpacucli 명령어 옵션
2) 컨트롤러 명령
hpacucli> ctrl all show config
## 컨트롤러의 세부 정보 표시
hpacucli> ctrl all show config detail
hpacucli> ctrl all show status
## 컨트롤러의 상태 표시
hpacucli> ctrl slot=0 modify dwc=disable
## 캐시 활성화 또는 비활성화
hpacucli> ctrl slot=0 modify dwc=enable
hpacucli> rescan
## 마지막 재검사 후 새로 추가된 장치 탐지
3) 물리적 드라이브 명령
hpacucli> ctrl slot=0 pd all show
## 물리적 드라이브의 세부 정보 표시 hpacucli> ctrl slot=0 pd 2:3 show detail
hpacucli> ctrl slot=0 pd all show status
## 특정 물리적 드라이브의 상태 표시 hpacucli> ctrl slot=0 pd 2:3 show status
hpacucli> ctrl slot=0 pd 2:3 modify erase
## 물리적 드라이브 삭제
hpacucli> ctrl slot=0 pd 2:3 modify led=on
## LED 활성화 또는 비활성화 hpacucli> ctrl slot=0 pd 2:3 modify led=off
4) 논리 드라이브 명령
hpacucli> ctrl slot=0 ld all show
## 논리 드라이브의 세부 정보 표시 hpacucli> ctrl slot=0 ld 4 show
hpacucli> ctrl slot=0 ld all show status
## 논리 드라이브의 상태 표시 hpacucli> ctrl slot=0 ld 4 show status
hpacucli> ctrl slot=0 ld 4 modify reenable forced
## 장애 드라이브를 다시 활성화
5) RAID 레벨 구성하기
1개의 드라이브를 사용하여 RAID 0으로 논리 드라이브를 만듭니다.
hpacucli> ctrl slot=0 create type=ld drives=1:12 raid=0
2개의 드라이브를 사용하여 RAID 1로 논리 드라이브를 만듭니다.
hpacucli> ctrl slot=0 create type=ld drives=1:13,1:14 size=300 raid=1
5개의 드라이브를 사용하여 RAID 5로 논리 드라이브를 만듭니다.
hpacucli> ctrl slot=0 create type=ld drives=1:13,1:14,1:15,1:16,1:17 raid=5
기존 RAID에서 논리 드라이브를 확장, 추가, 삭제합니다.
hpacucli> ctrl slot=0 ld 4 delete
## 논리 드라이브 삭제
hpacucli> ctrl slot=0 ld 4 add drives=2:3
## 드라이브를 추가하여 논리 드라이브 확장(expand)
hpacucli> ctrl slot=0 ld 4 modify size=500 forced
## 논리 드라이브 확장(extend)
hpacucli> ctrl slot=0 array all add spares=1:5,1:7
## 2개의 예비용 디스크 추가
3. 컨트롤러 및 디스크 상태 표시
컨트롤러의 자세한 상태 및 디스크 상태를 표시하려면 다음 명령을 실행하십시오.
# hpacucli
=> ctrl all show config
Smart Array P410i in Slot 0 (Embedded) (sn: 50014380101D61C0)
array A (SAS, Unused Space: 0 MB)
logicaldrive 1 (136.7 GB, RAID 1, OK)
3. hpacucli 명령어 요약
1) 컨트롤러 상태 보기
컨트롤러의 상태 만 표시하려면 다음을 수행하십시오. 이 예에서 컨트롤러는 문제없이 완벽하게 작동합니다.
> ctrl all show status
Smart Array P410i in Slot 0 (Embedded)
Controller Status: OK
Cache Status: OK
2) 드라이브 상태 보기
> ctrl slot=0 pd all show status
3) 개별 드라이브 상태 보기
> ctrl slot=0 pd 2I:1:6 show detail
4) 모든 논리 드라이브 보기
> ctrl slot=0 ld all show
5) 새 RAID 0 논리 드라이브 만들기
> ctrl slot=0 create type=ld drives=1I:1:3 raid=0
6) 새 RAID 1 논리 드라이브 만들기
> ctrl slot=0 create type=ld drives=1I:1:3,1I:1:4 raid=1
7) 새 RAID 5 논리 드라이브 만들기
> ctrl slot=0 create type=ld drives=1I:1:3,1I:1:4,2I:1:6,2I:1:7,2I:1:8 raid=5
8) 새 장치 재검색
> rescan
9) 자세한 논리 드라이브 상태보기
> ctrl slot=0 ld 2 show
10) 논리 드라이브 삭제
> ctrl slot=0 ld 2 delete
Warning: Deleting an array can cause other array letters to become renamed.
E.g. Deleting array A from arrays A,B,C will result in two remaining
arrays A,B ... not B,C
Warning: Deleting the specified device(s) will result in data being lost.
Continue? (y/n) y
11) 논리 볼륨에 새 물리 드라이브 추가
> ctrl slot=0 ld 2 add drives=2I:1:6,2I:1:7
12) 예비 디스크 추가
> ctrl slot=0 array all add spares=2I:1:6,2I:1:7
13) 캐시 사용 또는 사용 안 함
> ctrl slot=0 modify dwc=disable ( 비활성화 )
> ctrl slot=0 modify dwc=enable ( 활성화 )
14) 물리 드라이브 지우기
슬롯 0의 어레이 B에있는 물리 드라이브를 지우려면 다음 명령을 실행하십시오.
> ctrl slot=0 pd 2I:1:6 modify erase
15) 물리적 디스크 LED 깜박임
> ctrl slot=0 ld 2 modify led=on
> ctrl slot=0 ld 2 modify led=off
4. 디스크 증설(추가)
HP 서버 disk 증설 (hpacucli 사용)
# hpacucli ctrl slot=0 pd all show
## 현재 물리적 디스크 상세 정보
Smart Array P410i in Slot 0 (Embedded)
array A
physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 300 GB, OK)
physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 300 GB, OK)
array B
physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 300 GB, OK)
physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 300 GB, OK)
physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SAS, 300 GB, OK)
physicaldrive 2I:1:6 (port 2I:box 1:bay 6, SAS, 300 GB, OK)
현재 두개의 Logical볼륨이 생성 되어있음
서버에 disk 를 꽂은 후에 다시 정보 확인 ( 146G 디스크 2개 꽂음 )
# hpacucli ctrl slot=0 pd all show
Smart Array P410i in Slot 0 (Embedded)
array A
physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 300 GB, OK)
physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 300 GB, OK)
array B
physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 300 GB, OK)
physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 300 GB, OK)
physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SAS, 300 GB, OK)
physicaldrive 2I:1:6 (port 2I:box 1:bay 6, SAS, 300 GB, OK)
unassigned
physicaldrive 2I:1:7 (port 2I:box 1:bay 7, SAS, 146 GB, OK)
physicaldrive 2I:1:8 (port 2I:box 1:bay 8, SAS, 146 GB, OK)
# hpacucli ctrl slot=0 create type=ld drives=2I:1:7,2I:1:8 raid=1
위 커맨드로 디스크 두개를 raid 1 로 구성 [컨트롤러 슬롯번호 / 디스크 베이 번호 를 확인하여 맞춰줄것]
구성 후 다시 정보 확인
# hpacucli ctrl slot=0 pd all show
Smart Array P410i in Slot 0 (Embedded)
array A
physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 300 GB, OK)
physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 300 GB, OK)
array B
physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 300 GB, OK)
physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 300 GB, OK)
physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SAS, 300 GB, OK)
physicaldrive 2I:1:6 (port 2I:box 1:bay 6, SAS, 300 GB, OK)
array C
physicaldrive 2I:1:7 (port 2I:box 1:bay 7, SAS, 146 GB, OK)
physicaldrive 2I:1:8 (port 2I:box 1:bay 8, SAS, 146 GB, OK)
구성 된 것 확인 후 fdisk 를 사용 하여 포멧 및 파일시스템 설정 후 마운트
디스크 교체 후 리빌딩 상태 확인
HP관리툴로 OS디스크 미러링정보 및 로컬디스크교체 후 상태확인 ----
# hpacucli ctrl all show config
Smart Array P410i in Slot 0 (Embedded) (sn: 5001438019149D10)
array A (SAS, Unused Space: 0 MB)
logicaldrive 1 (419.2 GB, RAID 1, OK) <-- OS로컬 미러링되어 있음
physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 450 GB, OK)
physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 450 GB, OK)
SEP (Vendor ID PMCSIERA, Model SRC 8x6G) 250 (WWID: 5001438019149D1F)
# hpssacli ctrl all show config detail <-- 미러링된 로컬디스크 1개 교체 후 리빌딩상태확인
~~~
Logical Drive: 1
Size: 279.4 GB
Fault Tolerance: 1
Heads: 255
Sectors Per Track: 32
Cylinders: 65535
Strip Size: 256 KB
Full Stripe Size: 256 KB
Status: Recovering, 21% complete
Caching: Enabled
Unique Identifier: 600508B1001
Disk Name: /dev/sda
Mount Points: /boot/efi 200 MB Partition Number 2, /boot 500 MB Partition Number 3
OS Status: LOCKED
Logical Drive Label: 0062BCCDPDNLH
Mirror Group 1:
physicaldrive 1I:3:2 (port 1I:box 3:bay 2, SAS, 300 GB, Rebuilding)
Mirror Group 2:
physicaldrive 1I:3:1 (port 1I:box 3:bay 1, SAS, 300 GB, OK)
[출처] Linux용 Hpacucli 유틸리티|작성자 지금 이 순간