Set up an ISCSI server on CentOS
ISCSI server, install target software
yum install scsi-target-utils -y
Modify the configuration file/etc/tgt/targets. conf and add the content to the last line.
& Lt; target iqn.2014-09.com. example: target1> # target custom backing-store/dev/sdb # scsi specifies the disk or partition initiator-address 10.0.0.0/24 # write-cache off # disable write cache incoming test 123.com # create the account test password 123.com</target>
Restart the service
Service tgtd restart chkconfig tgtd on tgt-admin-show # view the current scsi Configuration
Install the initiator software on the ISCSI client.
yum -y install iscsi-initiator-utilsservice iscsid force-startchkconfig iscsid on
The remote iqn is found and the lun is connected.
iscsiadm --mode discovery --type sendtargets --portal 10.0.0.202iscsiadm -m node -T iqn.2014-09.com.example:target1 -p 10.0.0.202 -l
Fdisk-l can be viewed