iSCSI的简单搭建

环境:

Host                                                        Job                     IP address

Test.example.com                     Server                192.168.1.14

KickStart.example.com             Client                 192.168.1.12



Server


Step 1

Create partitions (/dev/sda5  size=500M )

#fdisk /dev/sda

#partx �Ca /dev/sda



Step 2

Install      scsi   software

#yum install �Cy  scsi*



Step 3

Start service and chkconfig on

#service tgtd  restart

#chkconfig tgtd  on



Step 4

Edit  mainconfigurtion file

#vim          /etc/tgt/targets.conf

<target  test>         #test   is  name  

backing-store    /dev/sda5

# initiator-address 192.168.1.100       # Only to the 192.168.1.100 discoveryand connection

</target>


Step 5

Service restart

#service tgtd  stop

#service tgtd  start


Step 6


Test iscsi




Client


Step 1

Install iscsi  client software

#yum install  iscsi-initiator-utils  -y (rhel6.3 default install)


Step 2

Service start and ckconfig

#service iscsi restart

#service iscsid restart

#chkconfig iscsi on

#chkconfig iscsi on


Step 3

Discovery target and login

#iscsiadm �Cm discovery �Ct st �Cp192.168.1.14

192.168.1.14:3260,test

#iscsiadm �Cm node �CT test �Cp 192.168.1.14 �Cl  



Step 4

Check  partition table

#fdisk �Cl

Disk /dev/sdb: 524 MB, 524288000 bytes

17 heads, 59 sectors/track, 1020 cylinders

Units = cylinders of 1003 * 512 = 513536bytes

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

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

Disk identifier: 0x00000000


Finished




你可能感兴趣的:(service,File,software)