===========================================================================
initiator端
[root@localhost bin]# ./iscsi_manage init restore host=$HBA
/proc/scsi/iscsi_initiator/0: No such file or directory
[root@localhost bin]# ./iscsi_manage init restore host=0
/proc/scsi/iscsi_initiator/0: No such file or directory
[root@localhost bin]# ./iscsi_manage init restore host=1
[root@localhost bin]# ./iscsi_manage init set TargetName='cdc' host=1
[root@localhost bin]# ./iscsi_manage init set InitiatorName='netstore' host=1
[root@localhost bin]# ./iscsi_manage init set MaxConnections=1 host=1
[root@localhost bin]# ./iscsi_config down ip=202.118.181.31 host=1
/proc/scsi/iscsi_initiator/1: No such device
[root@localhost bin]# ./iscsi_config up ip=202.118.181.31 port=3260 target=0 host=1
[root@localhost bin]# fdisk -l
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83
Linux/dev/sda2 14 996 7895947+ 83 Linux
/dev/sda3 997 1044 385560 82 Linux swap
Disk /dev/sdb: 2147 MB, 2147483648 bytes
67 heads, 62 sectors/track, 1009 cylinders
Units = cylinders of 4154 * 512 = 2126848 bytes
Disk /dev/sdb doesn't contain a valid partition table
Disk /dev/sdc: 2147 MB, 2147483648 bytes
67 heads, 62 sectors/track, 1009 cylinders
Units = cylinders of 4154 * 512 = 2126848 bytes
Disk /dev/sdc doesn't contain a valid partition table
Disk /dev/sdd: 2147 MB, 2147483648 bytes
67 heads, 62 sectors/track, 1009 cylinders
Units = cylinders of 4154 * 512 = 2126848 bytes
Disk /dev/sdd doesn't contain a valid partition table
Disk /dev/sde: 2147 MB, 2147483648 bytes
67 heads, 62 sectors/track, 1009 cylinders
Units = cylinders of 4154 * 512 = 2126848 bytes
Disk /dev/sde doesn't contain a valid partition table
===================================================================================
[root@localhost root]# lsmod
该命令将会列出内核的所有模块
===================================================================================
unh_iscsi中host指什么? ******************重要**********************
Host=number是用来指出initiator端由kernel分配的scsi 适配器号,设置时可在客户端的相应文件路径/proc/scsi/iscsi_initiator下找到相应的説明,实际上儅机器上没有scsi设备时,host/target number会被指定为0,否则为1。
另外只有在insmod unh_iscsi_initiator命令之后,/proc/scsi/目录后才会出现iscsi_initiator文件夹以及它后面的表示host的数字。这正说明了Host=number是用来指出initiator端由kernel分配的scsi 适配器号,也就是
硬盘分区号。