차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

다음 판
이전 판
iscsi_target [2015/04/10 06:23] – 만듦 zzungiscsi_target [2015/06/18 15:49] (현재) – 바깥 편집 127.0.0.1
줄 1: 줄 1:
-====== iSCSI Target ======+====== iSCSI Target_RHEL6 ======
  
 테스트환경 \\ 테스트환경 \\
줄 25: 줄 25:
 [root@iscsi ~]# chkconfig tgtd on [root@iscsi ~]# chkconfig tgtd on
 </code> </code>
-=== Step.3 iSCSI Target 서비스 실행 ===+=== Step.3 iSCSI Target 생성 === 
 + 
 +* 디스크 생성 및 LVM 구성은 이곳에서 따로 보여주지 않는다.  
 +* tgt-setup-lun 스크립트 명령어로 아래와 같이 생성해 준다. 
 +<code vim> 
 +[root@iscsi ~]# tgt-setup-lun -d /dev/mapper/VG_DISK1-LV_Disk1 -n iSCSI_Target1 
 +[root@iscsi ~]# tgt-setup-lun -d /dev/mapper/VG_DISK2-LV_Disk2 -n iSCSI_Target2 
 +[root@iscsi ~]# tgt-setup-lun -d /dev/mapper/VG_DISK3-LV_Disk3 -n iSCSI_Target3 
 +[root@iscsi ~]# tgt-setup-lun -d /dev/mapper/VG_DISK4-LV_Disk4 -n iSCSI_Target4 
 +</code> 
 + 
 +* 생성된 파일을 targets.conf 파일에 입력하기 
 +<code vim> 
 +[root@iscsi ~]#tgt-admin --dump | grep -v default-driver > target.conf 
 +[root@iscsi ~]#vim target.conf 
 +<target iqn.2001-04.com.iscsi-iSCSI_Target3>  // iqn 이름을 현재 날짜 또는 원하는 이름으로 변경한다. 
 + backing-store /dev/mapper/VG_DISK3-LV_Disk3 
 +</target> 
 + 
 +<target iqn.2001-04.com.iscsi-iSCSI_Target1> 
 + backing-store /dev/mapper/VG_DISK1-LV_Disk1 
 +</target> 
 + 
 +<target iqn.2001-04.com.iscsi-iSCSI_Target4> 
 + backing-store /dev/mapper/VG_DISK4-LV_Disk4 
 +</target> 
 + 
 +<target iqn.2001-04.com.iscsi-iSCSI_Target2> 
 + backing-store /dev/mapper/VG_DISK2-LV_Disk2 
 +</target> 
 + 
 +[root@iscsi ~]# 
 + 
 +</code> 
 + 
 +* tgtd 데몬 재 시작 
 +<code vim> 
 + 
 +[root@iscsi ~]# service tgtd restart 
 + 
 +</code> 
 + 
 +* Target 확인 
 +<code vim> 
 + 
 +[root@iscsi ~]# tgt-admin -s 
 + 
 +</code> 
 + 
 +<code vim> 
 +Target 1: iqn.2015-04.com.iscsi-iSCSI_Target1 
 +    System information: 
 +        Driver: iscsi 
 +        State: ready 
 +    I_T nexus information: 
 +    LUN information: 
 +        LUN: 0 
 +            Type: controller 
 +            SCSI ID: IET     00010000 
 +            SCSI SN: beaf10 
 +            Size: 0 MB, Block size: 1 
 +            Online: Yes 
 +            Removable media: No 
 +            Prevent removal: No 
 +            Readonly: No 
 +            Backing store type: null 
 +            Backing store path: None 
 +            Backing store flags:  
 +        LUN: 1 
 +            Type: disk 
 +            SCSI ID: IET     00010001 
 +            SCSI SN: beaf11 
 +            Size: 32216 MB, Block size: 512 
 +            Online: Yes 
 +            Removable media: No 
 +            Prevent removal: No 
 +            Readonly: No 
 +            Backing store type: rdwr 
 +            Backing store path: /dev/mapper/VG_DISK1-LV_Disk1 
 +            Backing store flags:  
 +    Account information: 
 +    ACL information: 
 +        ALL 
 +Target 2: iqn.2015-04.com.iscsi-iSCSI_Target2 
 +    System information: 
 +        Driver: iscsi 
 +        State: ready 
 +    I_T nexus information: 
 +    LUN information: 
 +        LUN: 0 
 +            Type: controller 
 +            SCSI ID: IET     00020000 
 +            SCSI SN: beaf20 
 +            Size: 0 MB, Block size: 1 
 +            Online: Yes 
 +            Removable media: No 
 +            Prevent removal: No 
 +            Readonly: No 
 +            Backing store type: null 
 +            Backing store path: None 
 +            Backing store flags:  
 +        LUN: 1 
 +            Type: disk 
 +            SCSI ID: IET     00020001 
 +            SCSI SN: beaf21 
 +            Size: 10737 MB, Block size: 512 
 +            Online: Yes 
 +            Removable media: No 
 +            Prevent removal: No 
 +            Readonly: No 
 +            Backing store type: rdwr 
 +            Backing store path: /dev/mapper/VG_DISK2-LV_Disk2 
 +            Backing store flags:  
 +    Account information: 
 +    ACL information: 
 +        ALL 
 +Target 3: iqn.2015-04.com.iscsi-iSCSI_Target3 
 +    System information: 
 +        Driver: iscsi 
 +        State: ready 
 +    I_T nexus information: 
 +    LUN information: 
 +        LUN: 0 
 +            Type: controller 
 +            SCSI ID: IET     00030000 
 +            SCSI SN: beaf30 
 +            Size: 0 MB, Block size: 1 
 +            Online: Yes 
 +            Removable media: No 
 +            Prevent removal: No 
 +            Readonly: No 
 +            Backing store type: null 
 +            Backing store path: None 
 +            Backing store flags:  
 +        LUN: 1 
 +            Type: disk 
 +            SCSI ID: IET     00030001 
 +            SCSI SN: beaf31 
 +            Size: 5377 MB, Block size: 512 
 +            Online: Yes 
 +            Removable media: No 
 +            Prevent removal: No 
 +            Readonly: No 
 +            Backing store type: rdwr 
 +            Backing store path: /dev/mapper/VG_DISK3-LV_Disk3 
 +            Backing store flags:  
 +    Account information: 
 +    ACL information: 
 +        ALL 
 +Target 4: iqn.2015-04.com.iscsi-iSCSI_Target4 
 +    System information: 
 +        Driver: iscsi 
 +        State: ready 
 +    I_T nexus information: 
 +    LUN information: 
 +        LUN: 0 
 +            Type: controller 
 +            SCSI ID: IET     00040000 
 +            SCSI SN: beaf40 
 +            Size: 0 MB, Block size: 1 
 +            Online: Yes 
 +            Removable media: No 
 +            Prevent removal: No 
 +            Readonly: No 
 +            Backing store type: null 
 +            Backing store path: None 
 +            Backing store flags:  
 +        LUN: 1 
 +            Type: disk 
 +            SCSI ID: IET     00040001 
 +            SCSI SN: beaf41 
 +            Size: 5344 MB, Block size: 512 
 +            Online: Yes 
 +            Removable media: No 
 +            Prevent removal: No 
 +            Readonly: No 
 +            Backing store type: rdwr 
 +            Backing store path: /dev/mapper/VG_DISK4-LV_Disk4 
 +            Backing store flags:  
 +    Account information: 
 +    ACL information: 
 +        ALL 
 + 
 +</code> 
 + 
 +* target 제거 
 +<code vim> 
 + 
 +tgt-admin --delete ALL // 모든 타겟을 지운다. 
 +tgt-admin --delete tid=4 // 타겟4번을 지운다. 
 +tgt-admin --delete iqn.2015-04.com   // 해당 iqn.2015-04.com 타겟을 지운다. 
 + 
 + 
 +</code>
  • iscsi_target.1428647006.txt.gz
  • 마지막으로 수정됨: 2015/06/18 15:49
  • (바깥 편집)