참고글 및 문제해결/관련, 참고글

리눅스 iscsi target설정하기(client쪽)

에몽이ㅋ 2012. 5. 7. 13:36
환경 : OEL5 

# uname -r
 (
2.6.18-238.el5)


리눅스 iscsi 사용설정

1. iscsi 패키지가 설치되어있나 확인
(iscsi-initiator-utils-6.2.0.872-6.0.2.el5.i386)
# rpm -qa | grep iscsi 


2. 명령어실행
# iscsiadm -m discovery -t sendtargets -p 192.168.0.30 

위 명령어의 결과를 토대로
# iscsiadm -m node -T iqn.2006-01.com.openfiler:tsn.2895a9bebb3e -p 192.168.0.30:3260 -l
# iscsiadm -m node -T iqn.2006-01.com.openfiler:tsn.3233d584c02c -p 192.168.0.30:3260 -l
# iscsiadm -m node -T iqn.2006-01.com.openfiler:tsn.7070c7326e80 -p 192.168.0.30:3260 -l
# iscsiadm -m node -T iqn.2006-01.com.openfiler:tsn.ed05fc32dc45 -p 192.168.0.30:3260 -l




실행예제
# iscsiadm -m discovery -t sendtargets -p 192.168.0.30
192.168.0.30:3260,1 iqn.2006-01.com.openfiler:tsn.2895a9bebb3e
192.168.0.30:3260,1 iqn.2006-01.com.openfiler:tsn.3233d584c02c
192.168.0.30:3260,1 iqn.2006-01.com.openfiler:tsn.7070c7326e80
192.168.0.30:3260,1 iqn.2006-01.com.openfiler:tsn.ed05fc32dc45

# iscsiadm -m node -T iqn.2006-01.com.openfiler:tsn.2895a9bebb3e -p 192.168.0.30:3260 -l
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:tsn.2895a9bebb3e, port                                               al: 192.168.0.30,3260]
Login to [iface: default, target: iqn.2006-01.com.openfiler:tsn.2895a9bebb3e, portal: 1                                               92.168.0.30,3260] successful.

# iscsiadm -m node -T iqn.2006-01.com.openfiler:tsn.3233d584c02c -p 192.168.0.30:3260 -l
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:tsn.3233d584c02c, portal: 192.168.0.30,3260]
Login to [iface: default, target: iqn.2006-01.com.openfiler:tsn.3233d584c02c, portal: 192.168.0.30,3260] successful.

# iscsiadm -m node -T iqn.2006-01.com.openfiler:tsn.7070c7326e80 -p 192.168.0.30:3260 -l
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:tsn.7070c7326e80, portal: 192.168.0.30,3260]
Login to [iface: default, target: iqn.2006-01.com.openfiler:tsn.7070c7326e80, portal: 192.168.0.30,3260] successful.

# iscsiadm -m node -T iqn.2006-01.com.openfiler:tsn.ed05fc32dc45 -p 192.168.0.30:3260 -l
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:tsn.ed05fc32dc45, portal: 192.168.0.30,3260]
Login to [iface: default, target: iqn.2006-01.com.openfiler:tsn.ed05fc32dc45, portal: 192.168.0.30,3260] successful.


부팅때마다 설정하고 싶으면 /etc/rc.local 파일에 위 명령어들을 추가

서버설정은
http://gyh214.tistory.com/210 
http://gyh214.tistory.com/211  참조하세요