iscsi target配置for CentOS6

             iscsi target配置for CentOS6

1、共享源scsi-target安装配置

1.1 安装iscsi-target

  yum install scsi-target-utils -y

1.2 把/dev/sdb共享出去

<target iqn.2008-09.localdomain.localhost:sdb>

    backing-store /dev/sdb      # Becomes LUN 1

    write-cache off

</target>

 

1.2 启动iscsi target服务

 chkconfig tgtd on

 /etc/tgtd restart

1.3 查看共享是否成功

#tgtadm --mode target --op show 

Target 1: iqn.2008-09.localdomain.localhost:sdb

    System information:

        Driver: iscsi

        State: ready

    I_T nexus information:

        I_T nexus: 1

            Initiator: iqn.1994-05.com.redhat:987cac4681e

            Connection: 0

                IP Address: 192.168.8.101

    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: 1074 MB, Block size: 512

            Online: Yes

            Removable media: No

            Prevent removal: No

            Readonly: No

            Backing store type: rdwr

            Backing store path: /dev/sdb

            Backing store flags: 

    Account information:

    ACL information:

        ALL

 

2、iscsi客户端

2.1 iscsi-initiator-utils安装

 yum -y install iscsi-initiator-utils

 

2.2 发现共享源的设备

#iscsiadm -m discovery -t sendtargets -p 192.168.8.101  #共享源服务器为192.168.8.101 

192.168.8.101:3260,1 iqn.2008-09.localdomain.localhost:sdb

 

2.3 查看分区

 cat /proc/partitions 

 

2.4 分区管理

#fdisk -l

Disk /dev/sdc: 1073 MB, 1073741824 bytes

34 heads, 61 sectors/track, 1011 cylinders

Units = cylinders of 2074 * 512 = 1061888 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

#共享过来的设备盘符在本地盘符基础上自增。

 

2.5客户端自启动

chkconfig iscsid on

chkconfig iscsi on 

 

 

 

本文出自 “风云的博客” 博客,转载请与作者联系!

你可能感兴趣的:(target,iSCSI,iSCSI)