ISCSI网络磁盘    默认端口:3260

服务端:

一.

二.安装软件:targetcli

用命令targetcli进行配置------------------------进入iscsi磁盘配置模式

  1.建立backstore后端存储

    >>>  backstores/block create  name=nsd  dev=/dev/vdb1
    >>>  ls
  2.建立target磁盘组(iqn.yyyy-mm.倒叙域名:自定义标示)

    >>>  iscsi/ create iqn.2018-11.com.example:server0

    >>>  ls

  3.配置lun关联

    >>>  iscsi/iqn.2018-11.com.example:server0/tpg1/luns create /backstores/block/nsd

    >>>  ls

  4.配置访问控制:设置客户端声称的名字

    >>>  iscsi/iqn.2018-11.com.example:server0/tpg1/acls create iqn.2018-11.com.example:desktop0

  5.启用ip地址与端口

    >>>  iscsi/iqn.2018-11.com.example.server0/tpg1/portals create 172.25.0.11

三.重启服务:

  systemctl restart target

  systemctl enable target

yum -y install targetcli
[root@server0 ~]# targetcli
Warning: Could not load preferences file /root/.targetcli/prefs.bin.
targetcli shell version 2.1.fb34
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type 'help'. /> ls
o- / ..................................................................... [...]
o- backstores .......................................................... [...]
| o- block .............................................. [Storage Objects: 0]
| o- fileio ............................................. [Storage Objects: 0]
| o- pscsi .............................................. [Storage Objects: 0]
| o- ramdisk ............................................ [Storage Objects: 0]
o- iscsi ........................................................ [Targets: 0]
o- loopback ..................................................... [Targets: 0]
/> backstores/block create name=nsd dev=/dev/vdb1
Created block storage object nsd using /dev/vdb1.
/> iscsi/ create iqn.2018-11.com.example:server0
Created target iqn.2018-11.com.example:server0.
Created TPG 1.
/> iscsi/iqn.2018-11.com.example:server0/tpg1/luns create /backstores/block/nsd
Created LUN 0.
/> iscsi/iqn.2018-11.com.example:server0/tpg1/acls create iqn.2018-11.com.example:desktop0
Created Node ACL for iqn.2018-11.com.example:desktop0
Created mapped LUN 0.
/> iscsi/iqn.2018-11.com.example:server0/tpg1/portals create 172.25.0.11
Using default IP port 3260
Created network portal 172.25.0.11:3260.
/>
[root@server0 ~]# systemctl restart target
[root@server0 ~]# systemctl enable target

客户端:

1.安装iscsi-initiator-utils,访问共享存储服务

2.配合客户端声称的名字 /etc/iscsi/initiatorname.iscsi

  initiatorName=iqn.2018-11.com.example:desktop0 

  

vim /etc/iscsi/initiatorname.iscsi
InitiatorName=iqn.-.com.example:desktop0

3.重启服务,刷新客户端声称的名字

  systemctl restart iscsid

systemctl restart iscsid

4.运行命令,发现共享存储

iscsiadm --mode discoverydb --type sendtargets --portal 172.25.0.11 --discover

5.重启服务iscsi服务,使用共享存储

  systemctl restart iscsi

  systemctl enable iscsi 

  lsblk

ISCSI共享存储的更多相关文章

  1. 实验:iscsi共享存储

    实验名称: iscsi共享存储 实验环境: 我们需要准备一个磁盘,对于这个磁盘我们需要使用,将这个磁盘空间共享给iscsi客户端: 实验需求: 我们这里使用两台服务器来实现iscsi共享存储: 1.指 ...

  2. Linux下搭建iSCSI共享存储详细步骤(服务器模拟IPSAN存储)

    一.简介 iSCSI(internet SCSI)技术由IBM公司研究开发,是一个供硬件设备使用的.可以在IP协议的上层运行的SCSI指令集,这种指令集合可以实现在IP网络上运行SCSI协议,使其能够 ...

  3. Linux下搭建iSCSI共享存储的方法 Linux-IO Target 方式CentOS7-1810下实现

    iSCSI(internet SCSI)技术由IBM公司研究开发,是一个供硬件设备使用的.可以在IP协议的上层运行的SCSI指令集,这种指令集合可以实现在IP网络上运行SCSI协议,使其能够在诸如高速 ...

  4. Linux下搭建iSCSI共享存储的方法 TGT 方式 CentOS6.9系统下

    iSCSI(internet SCSI)技术由IBM公司研究开发,是一个供硬件设备使用的.可以在IP协议的上层运行的SCSI指令集,这种指令集合可以实现在IP网络上运行SCSI协议,使其能够在诸如高速 ...

  5. Linux下搭建iSCSI共享存储的方法 Linux-IO Target 方式 Debian9.5下实现

    iSCSI(internet SCSI)技术由IBM公司研究开发,是一个供硬件设备使用的.可以在IP协议的上层运行的SCSI指令集,这种指令集合可以实现在IP网络上运行SCSI协议,使其能够在诸如高速 ...

  6. Linux下搭建iSCSI共享存储的方法 TGT 方式 Debian9.5系统下

    iSCSI(internet SCSI)技术由IBM公司研究开发,是一个供硬件设备使用的.可以在IP协议的上层运行的SCSI指令集,这种指令集合可以实现在IP网络上运行SCSI协议,使其能够在诸如高速 ...

  7. Linux下搭建iSCSI共享存储

    转至:https://www.linuxidc.com/Linux/2016-09/135655.htm Linux下搭建iSCSI共享存储 拓扑: 实验步骤: ------------------- ...

  8. iscsi共享存储的简单配置和应用

    1.环境介绍 SCSI(Small Computer System Interface)是块数据传输协议,在存储行业广泛应用,是存储设备最基本的标准协议.从根本上说,iSCSI协议是一种利用IP网络来 ...

  9. iSCSI 共享存储

         iSCSI(Internet Small Computer System Interface,发音为/ˈаɪskʌzi/),Internet小型计算机系统接口,又称为IP-SAN,是一种基于 ...

随机推荐

  1. [转帖]【Oracle】详解Oracle中NLS_LANG变量的使用

    [Oracle]详解Oracle中NLS_LANG变量的使用 https://www.cnblogs.com/HDK2016/p/6880560.html NLS_LANG=LANGUAGE_TERR ...

  2. mysql数据库基础-2019-9-10(随堂笔记)

    mysql数据库基础 在cmd情况下启动mysql数据库:(配置path环境变量后可忽略) 运行mysql1. 进入mysql路径2. 执行:mysql -uroot -p,安装时的密码 1.数据库& ...

  3. PL/SQL developer 11.0注册码

    PL/SQL developer 11.0注册码:product key:lhsw85g33x4p7leqk63hy8q28ffxzzvbxlserial No:193085password:xs37 ...

  4. Hystrix的概念

             Netflix的 Hystrix 是一个帮助解决分布式系统交互时超时处理和容错的类库, 它同样拥有保护系统的能力.       Hystrix的设计原则包括:资源隔离.熔断器.命令模 ...

  5. Windows32位或64位下载安装配置Scala

    [学习笔记] Windows 32位或64位下载安装配置Scala: 1)下载地址:http://www.scala-lang.org/download/,看我的spark那节,要求scala是2.1 ...

  6. Java HttpServletRequest中getAttribute()方法和getParameter()区别

    一.ServletRequest接口 HttpServletRequest接口继承了ServletRequest接口,实现类通常代表一个实际的Http Request. Servlet容器负责创建一个 ...

  7. 怎样理解第三方Cookie

    1. Cookie往往是用来存储用户信息的, 但有些恶意站点设法伪造了带有正确Cookie的HTTP请求, 这时就会产生安全问题( CSRF 攻击 ). 这里恶意网站获取cookie的行为就是第三方c ...

  8. 怎样创建一个独立于当前文档的新的Document对象

    使用: document.implementation. 如下所示, 新创建的Document对象可以正常使用相关属性和方法, 然后将它的根节点与当前文档的根节点做一个替换. var doc = do ...

  9. VisualSVN Server 安装

    1.去官网下载:https://www.visualsvn.com/server/download/ 2.安装: 修改为后:  3.开机自动启动.

  10. linux MD5使用

    # define MD5_LONG unsigned int # define MD5_CBLOCK 64 # define MD5_LBLOCK (MD5_CBLOCK/4) # define MD ...