CAFE

filesystem/disk

왜 iscsi target를 찾지 못할까?

작성자이누기|작성시간09.10.19|조회수3,777 목록 댓글 0

왜 iscsi target를 찾지 못할까?

서버의 iscsi target에서는 잘 동작하지만 왜 클라이언트에서 붙지 못할까?

이러한 경우 몇가지 경우가 있다. 우선 방화벽 iptables, selinux , 등부터 점검해라.

 


RHEL 5.3
[설정 현황]

 

>>>서버

ip: 192.168.0.14  

chkconfig tgtd on

cat /etc/rc.local
touch /var/lock/subsys/local
tgtadm --lld iscsi --op new --mode target --tid=1 --targetname iqn.2009-06.com.example:storage.disk1.amiens.sys1.xyz
tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /dev/xvdb
tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL


>>>클라이언트

chkconfig iscsi on

[root@VM1 ~]# cat /etc/iscsi/iscsid.conf
DiscoveryAddress=192.168.0.14
OutgoingUsername=gfs
OutgoingPassword=gfs123
LoginTimeout=15

 

[Problem]
client에서 iscsi를 restart 하면 iscsi target를 찾지 못하는 현상
또한 만들때 사용했던 이름으로 client로 아래의 명령처럼 로그인하려해도 record를 찾지 못하는 현상


클라이언트에서의 결과

[root@VM1 ~]# iscsiadm -m node -T iqn.2009-06.com.example:storage.disk1.amiens.sys1.xyz  -p 192.168.0.14 -l
iscsiadm: no records found!


서버에서의 결과
서버 자신에서는 아래와 같이 정보를 가져온다.

[root@VM4 ~]# tgtadm --lld iscsi --op show --mode target
Target 1: iqn.2009-06.com.example:storage.disk1.amiens.sys1.xyz
    System information:
        Driver: iscsi
        State: ready
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: deadbeaf1:0
            SCSI SN: beaf10
            Size: 0 MB
            Online: Yes
            Removable media: No
            Backing store: No backing store
        LUN: 1
            Type: disk
            SCSI ID: deadbeaf1:1
            SCSI SN: beaf11
            Size: 10737 MB
            Online: Yes
            Removable media: No
            Backing store: /dev/xvdb
    Account information:
    ACL information:
        ALL

 

[Solution]
먼저 클라이언트에서 discovery 해야한다.

[root@VM1 ~]# iscsiadm -m discovery -t sendtargets -p 192.168.0.14
iscsiadm: config file line 9 has not '=' sepa
iscsiadm: config file line 10 has not '=' sepa
192.168.0.14:3260,1 iqn.2009-06.com.example:storage.disk1.amiens.sys1.xyz


위에서 나타난 결과 iqn.2009-06.com.example:storage.disk1.amiens.sys1.xyz 를 가지고 아래와 같이 클라이언트에서 다시 로그인 한다.

[root@VM2 ~]# iscsiadm -m node -T iqn.2009-06.com.example:storage.disk1.amiens.sys1.xyz  -p 192.168.0.14 -l
Logging in to [iface: default, target: iqn.2009-06.com.example:storage.disk1.amiens.sys1.xyz, portal: 192.168.0.14,3260]
Login to [iface: default, target: iqn.2009-06.com.example:storage.disk1.amiens.sys1.xyz, portal: 192.168.0.14,3260]: successful


성공

[root@VM2 ~]# fdisk -l

Disk /dev/xvdd: 70 MB, 70875136 bytes
255 heads, 63 sectors/track, 8 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/xvdd doesn't contain a valid partition table

Disk /dev/xvda: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot      Start         End      Blocks   Id  System
/dev/xvda1   *           1          13      104391   83  Linux
/dev/xvda2              14       26108   209608087+  8e  Linux LVM

Disk /dev/sda: 10.7 GB, 10737418240 bytes
64 heads, 32 sectors/track, 10240 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

Disk /dev/sda doesn't contain a valid partition table


 

다음검색
현재 게시글 추가 기능 열기

댓글

댓글 리스트
맨위로

카페 검색

카페 검색어 입력폼