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. HTTP用户认证、追加协议以及相关技术简单学习

    1. 用户身份认证 BASIC认证(基本认证): DIGEST(摘要认证): SSL客户端认证: FormBase认证(表单认证)常用: session和cookie 2. 基于HTTP的追加协议 A ...

  2. git太慢用码云

    克隆完之后,我们要对这个仓库进行下修改,将仓库地址修改为git的那个 git remote set-url origin xxxx.git 经过以上操作,这个仓库就和从github上克隆下来的一模一样

  3. selenium模块基础用法详解

    目录 selenium模块 官方文档 介绍 安装 有界面浏览器 无界浏览器 selenium+谷歌浏览器headless模式 基本使用 选择器 基本用法 xpath 获取标签属性 等待元素被加载 隐式 ...

  4. pb菜单详解和MDI

    菜单条-MenuBar.菜单项-MenuItem.级联菜单(子菜单)-SubMenu 菜单项(MenuItem)是菜单中最基本的元素,只要有文字内容的就是菜单项.菜单条(MenuBar)是菜单中级别最 ...

  5. Asp.net core 学习笔记 ef core Surrogate Key, Natural Key, Alternate Keys

    更新: 2019-12-23 foreignkey 并不一样要配上 alternate key,其实只要是 unique 就可以了. 和 sql server 是一样的, 经常有一种错觉 primar ...

  6. Spring IOC Container

    All the notes are from Spring Framework 5 Doc. 一.Introduction to the Spring IOC Container and Beans ...

  7. hdu 6045 多校签到题目

    http://acm.hdu.edu.cn/showproblem.php?pid=6045 题解:遍历一遍,求出两个人答案中相同的个数,用wa表示.然后我从大的数入手,当wa的数都尽可能在两个人答案 ...

  8. H5的本地存储(localStorage)和cookie比较

    HTML5 的 web Storage 存储方式有两种:localStorage 和 sessionStorage. sessionStorage就像是会话级别的cookie,数据会随着浏览器关闭而清 ...

  9. springboot-异步、发送邮件(一)

    pom.xml <!--邮件javax.mail--> <dependency> <groupId>org.springframework.boot</gro ...

  10. 使ffmpeg支持HDR10bit 环境为ubuntu16.04

    1. 编译X265,生成静态库, 安装到默认目录 修改CMakeLists.txt 使   HIGH_BIT_DEPTH  设置为ON cmake -G "Unix Makefiles&qu ...