IPStor
在linux操作系统上
进入linux后使用ifconfig -a查看ip地址
#ifconfig -a
eno16777736:flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.188.11 netmask 255.255.255.0 broadcast 192.168.188.255
inet6 fe80::20c:29ff:fe1c:334d prefixlen 64 scopeid0x20<link>
ether 00:0c:29:1c:33:4d txqueuelen 1000 (Ethernet)
RX packets 84 bytes 10471 (10.2KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 99 bytes 18149 (17.7KiB)
TX errors 0 dropped 0 overruns0 carrier 0 collisions 0
lo:flags=73<UP,LOOPBACK,RUNNING> mtu65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 524 bytes 45652 (44.5KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 524 bytes 45652 (44.5KiB)
TX errors 0 dropped 0 overruns0 carrier 0 collisions 0
在linux下安装initiator
#mkdir -p /mnt/cdrom
#mount /dev/cdrom /mnt/cdrom/
mount: /dev/sr0 is write-protected,mounting read-only
# cd/mnt/cdrom/Packages/
# lsiscsi*
iscsi-initiator-utils-6.2.0.873-21.el7.x86_64.rpm
iscsi-initiator-utils-iscsiuio-6.2.0.873-21.el7.x86_64.rpm
#rpm-Uvh iscsi-initiator-utils-6.2.0.873-21.el7.x86_64.rpmiscsi-initiator-utils-iscsiuio-6.2.0.873-21.el7.x86_64.rpm
warning: iscsi-initiator-utils-6.2.0.873-21.el7.x86_64.rpm:Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:iscsi-initiator-utils-iscsiuio-6.################################# [50%]
2:iscsi-initiator-utils-6.2.0.873-2#################################[100%]
设置iscsi 服务为自动启动
#service iscsi start
Redirecting to /bin/systemctl start iscsi.service
查看帮助
#iscsiadm -h
向192.168.188.129这个服务器发送请求识别 会提示找不到客户端
#iscsiadm -m discovery -t sendtargets -p 192.168.188.129
iscsiadm: No portals found
连接控制器服务器
选择服务器ip
下一步然后勾选linux操作系统本机的ip192.168.188.11
选绿色的,绿色的代表为分配任何客户端
然后会看到客户端名称
一直下一步
进入linux、客户端
最后再重试这个命令,就可以
#iscsiadm -m discovery -t sendtargets -p 192.168.188.129
192.168.188.129:3260,0iqn.2000-03.com.falconstor.FalconStor-CDPVA.linux-0
服务器检测到linux的设备名字为
iqn.2000-03.com.falconstor.FalconStor-CDPVA.linux-0
查看设备信息
#iscsiadm-m node -T iqn.2000-03.com.falconstor-ipstor.FalconStor-CDPVA.linux-0 -p192.168.188.129
连接服务器
# iscsiadm-m node -T iqn.2000-03.com.falconstor-ipstor.FalconStor-CDPVA.linux-0 -p192.168.188.129 -l
Logging in to [iface: default, target:iqn.2000-03.com.falconstor-ipstor.FalconStor-CDPVA.linux-0, portal:192.168.188.129,3260] (multiple)
Login to [iface: default, target:iqn.2000-03.com.falconstor-ipstor.FalconStor-CDPVA.linux-0, portal:192.168.188.129,3260] successful.
#fdisk -l
Disk /dev/sdd:21.5GB,21474836480 bytes
64 heads, 32 sectors/track, 20480 cylinders
Units = cylinders of 2048 * 512 = 1048576bytes
Sector size (logical/physical): 512 bytes /512 bytes
I/O size (minimum/optimal): 512 bytes / 512bytes
Disk identifier: 0x00000000
就能看到服务器给自己分配的20GB磁盘
原文:http://superman0.blog.51cto.com/9273312/1541319