RHEL 6.x 에서 multipath 설정

2015.07.31 01:32

ischo 조회 수:27203

원문 : http://www.ischo.net -- 조인상 // 시스템 엔지니어

Writer : http://www.ischo.net -- ischo // System Engineer in Replubic Of Korea

+++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

 

 

 

1. 인식된 디스크들의 wwid 를 확인

 

 # fdisk -l

....

의 결과가 /dev/sda, /dev/sdb, /dev/sdc, /dev/sdd, /dev/sde  라면...

 

각각 디스크들의 wwid 를  다음 명령어로 확인한다.

 

 

# scsi_id --whitelisted --device=/dev/sda

3600c0ff0001e0952c9f21a5401000000

 

# scsi_id --whitelisted --device=/dev/sdb

3600c0ff0001e08acd4f21a5401000000

 

# scsi_id --whitelisted --device=/dev/sdc

3600508b1001c2aa5a761d5be0aaa4204

 

# scsi_id --whitelisted --device=/dev/sdd

3600c0ff0001e0952c9f21a5401000000

 

# scsi_id --whitelisted --device=/dev/sde

3600c0ff0001e08acd4f21a5401000000

 

 

 

위의 결과로써 wwid 가 같은 디스크 들끼리 그룹을 지으면

 

sda,sdd

sdb,sde

sdc

가 된다.

 

각 LUN들의 용량을 우리가 알고 있기 때문에 대략 어떤 LUN들이 SAN 디스크 인지 로컬디스크인지 인지할 수 있을 것이다.

 

위의 경우 sdc 는 로컬디스크,   a,d,b,e 는 SAN 디스크 였다.

 

 

( 또는.....

/dev/disk/by-path  에서 ls-l 한 결과로 path 가 같은 값을 가진 디스크들을 그룹지어봐도 위와 같은 결과를 얻을 수 있으며,

/dev/disk/by-id  에서 ls -l 한 결과와 비교해봐도 역시 같은 wwid 를 구할 수 있다. )

 

 

 

2. config 파일 수정

 

위에서 얻은 같은 wwid 끼리 묶어서 한개의 device name으로 구성하기 위해서 다음과 같이 multipath 관련 파일을 수정한다.

 

- /etc/multipath.conf 수정

## Use user friendly names, instead of using WWIDs as names.
defaults {
        user_friendly_names yes
}

 

 

 

- /etc/multipath/wwids 수정
# Multipath wwids, Version : 1.0
# NOTE: This file is automatically maintained by multipath and multipathd.
# You should not need to edit this file in normal circumstances.
#
# Valid WWIDs:
/3600c0ff0001e0952c9f21a5401000000/
/3600c0ff0001e08acd4f21a5401000000/

 



- /etc/multipath/bindings 수정
# Multipath bindings, Version : 1.0
# NOTE: this file is automatically maintained by the multipath program.
# You should not need to edit this file in normal circumstances.
#
# Format:
# alias wwid
#
mpatha 3600c0ff0001e0952c9f21a5401000000
mpathb 3600c0ff0001e08acd4f21a5401000000

 

 

 

 

3. start multipathd 

# systemctl start multipathd

# systemctl enable multipathd

 

 

4. check the multipath status

# multipath -ll
mpatha (3600c0ff0001e0952c9f21a5401000000) dm-1 LIO-ORG ,lun0
size=300G features='0' hwhandler='0' wp=rw
|-+- policy='service-time 0' prio=0 status=active
| `- 1:0:0:0 sda 8:16 active active running
`-+- policy='service-time 0' prio=0 status=enabled
  `- 2:0:0:0 sdd 8:32 active active running

 

 

번호 제목 글쓴이 날짜 조회 수
공지 [공지] 게시자료 열람자유. 불펌금지입니다. 조인상 2010.12.07 30768
84 원격지에서 FTP이용 백업 조인상 2010.05.09 8691
83 새로운 디스크를 ext3로 파일시스템 생성하기 조인상 2010.05.12 8757
82 NAT로 서비스 받는 컴퓨터에서 MSN 파일 전송기능사용하기 조인상 2010.05.12 8906
81 리눅스에서 플로피 사용하기 조인상 2010.05.12 8949
80 HOW TO SELinux file ischo 2010.11.17 9351
79 NAT환경에서 넷미팅 사용하기 조인상 2010.05.12 9540
78 Linux Performance and Tuning Guidelines - IBM file ischo 2010.11.17 9792
77 copy 시 I/O error 발생한 파일을 dd로 복사하기 ischo 2015.07.27 9885
76 read/write test of Storage Filesystem ischo 2015.12.16 10197
75 RHEL/CentOS 7 환경에서 자동업데이트 disable 시키기 ischo 2016.07.02 10222
74 ksh에서 자동완성기능 사용하기 조인상 2010.05.12 10326
73 내가 즐겨사용하는 프롬프트 변수(PS1) 설정치 조인상 2010.05.12 10352
72 HP DL/ML 시리즈용 SmartArray CLI 유틸리티 사용 설명서 ischo 2015.02.11 10606
71 NTP 서버 설정 ischo 2016.03.03 10799
70 tar 를 이용한 테잎 백업스크립트 예 조인상 2010.05.12 10980
69 웹서버 포트 무응답시 메일 보내주는 스크립트 file ischo 2011.11.30 11018
68 파일로 스왑추가 방법 조인상 2010.05.12 11097
67 putty Connection Manager file ischo 2014.02.26 11202
66 DNS 기초에서 보안까지 조인상 2012.07.26 11423
65 TCP/IP Flow file ischo 2011.10.19 11584
서버에 요청 중입니다. 잠시만 기다려 주십시오...