iSCSI Service-Side IP192.168.254.172
Client 1 192.168.254.46
Client 2 192.168.254.158
Service-side configuration
1, the service side installs the Scsi-target-utils
[Root@localhost ~]# Yum Install scsi-target-utils-y
2, if there is a separate partition, you can use a separate partition, if there is no suitable partition can be dd a large file as a shared disk
[Root@localhost/]# dd If=/dev/zero of=/disk1 bs=1m count=3000
3000+0 Records in
3000+0 Records out
3145728000 bytes (3.1 GB) copied, 11.618 seconds, 271 MB/s
3, modify the iSCSI main configuration file
[Root@localhost ~]# vi/etc/tgt/targets.conf
<target iqn.2013-12.com.make:ws.httpd>
Backing-store/disk1
</target>
4. Start TGTD Service
[Root@localhost ~]#/ETC/INIT.D/TGTD Restart
Stopping SCSI target daemon:stopping target Framework Daemon
[OK]
Starting SCSI target daemon:starting Target Framework Daemon
Second, the client configuration
1, install the client
[Root@zabbix-client1 ~]# Yum Install iscsi-initiator-utils-y
2, start the client
[Root@zabbix-client1 ~]# iscsiadm-m discovery-t sendtargets-p 192.168.254.172
Starting iscsid:[OK]
192.168.254.172:3260,1 iqn.2013-12.com.make:ws.httpd
192.168.254.172:3260,1 Iqn.2013-12.com.make:ws.mysqld
3. Use client to find Mount storage
[Root@zabbix-client1 ~]# iscsiadm-m node-t iqn.2013-12.com.make:ws.httpd-l
Logging in to [Iface:default, TARGET:IQN.2013-12.COM.MAKE:WS.HTTPD, portal:192.168.254.172,3260] (multiple)
Login to [Iface:default, TARGET:IQN.2013-12.COM.MAKE:WS.HTTPD, portal:192.168.254.172,3260] successful.
4. Partition the two disks mounted on the client and format them into EXT4 format file system