명령어/Linux

[RHEL] mpathconf 멀티패스 설정 관리

jykim23 2026. 8. 5. 23:41
반응형

부제: multipath.conf를 손으로 편집하지 않고 명령으로 설정한다

mpathconf                     # 인자 없이 실행하면 현재 상태 조회
mpathconf --enable            # multipath.conf 생성 + 기능 켜기
mpathconf --user_friendly_names y   # /dev/mapper/mpathX 별칭 사용
multipath is enabled
find_multipaths is on
user_friendly_names is enabled
recheck_wwid is disabled
default property blacklist is disabled
enable_foreign is not set (no foreign multipath devices will be shown)
dm_multipath module is not loaded
multipathd is not running

mpathconf/etc/multipath.conf를 안전하게 만들고 고치는 헬퍼다. 인자 없이 실행하면 지금 설정 상태를 위처럼 요약해 보여준다. --enable은 설정 파일 생성, dm_multipath 모듈 로드, 데몬 활성화를 한 번에 처리한다. 파일을 직접 편집하다 문법을 깨뜨리는 실수를 줄여준다. 위 출력은 컨테이너라 모듈 미로드/데몬 미실행 상태로 나온다.

이렇게도 쓴다

멀티패스 기능을 끈다.

mpathconf --disable

 

find_multipaths 정책을 smart로 바꾼다.

mpathconf --find_multipaths smart

 

WWID 재확인을 켠다.

mpathconf --recheck_wwid y

 

defaults 섹션에 개별 옵션을 추가한다.

mpathconf --option path_grouping_policy:multibus

 

설정 후 파일 내용을 확인한다. (cat 조합)

mpathconf --enable && cat /etc/multipath.conf
반응형