------------------------------------------------------------
Server: Server Construction
Yum install SCSI-target-utils # package required for Installation
Service tgtd start # Start the tgtd Service
Chkconfig tgtd on # Set automatic start upon startup
Tgtadm -- LLD iSCSI -- op new -- Mode target -- tid1-T iqn.2011-11.Domain:ID# Domain: computer domain name, which cannot be omitted; id, computer name
Tgtadm -- LLD iSCSI -- op new -- Mode logicalunit -- tid1-- Lun 1-B/dev/sdb1
Tgtadm -- LLD iSCSI -- op bind -- Mode target -- tid1-I all
Tgtadm -- LLD iSCSI -- op show -- Mode target
TCP/IP 3260
------------------------------------------------------------
Client: client operations
Yum install iSCSI-initiator-utils
Service iSCSI start
Service iscsid start
Chkconfig iSCSI on
Chkconfig iscsid on
Iscsiadm-M discovery-T sendtargets-P 192.168.1.100 # query the available iSCSI list
Iscsiadm-M node-T iqn.2011-11. Domain: ID-P 192.168.1.100 -- login # Login
Iscsiadm-M node-T iqn.2011-11. Domain: ID-P 192.168.1.100 -- logout # log out
Iscsiadm-M node-O Delete-T iqn.2011-11. Domain: ID # Delete
Fdisk-L # partition the iSCSI disk.
Fdisk/dev/SDB
+/Dev/sdb1
Mkfs. ext4/dev/sdb1 # format
Tune2fs-L/dev/sdb1 # view UUID or use the blkid command
Mkdir/mnt/Data
Vim/etc/fstab
UUID = bef77748-8eae-4c7c-a671-5b8a9f0fe748/mnt/Data ext4_ Netdev0 0 # mount with UUID. Note the parameters.