ISCSI共享存储
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共享存储的更多相关文章
- 实验:iscsi共享存储
实验名称: iscsi共享存储 实验环境: 我们需要准备一个磁盘,对于这个磁盘我们需要使用,将这个磁盘空间共享给iscsi客户端: 实验需求: 我们这里使用两台服务器来实现iscsi共享存储: 1.指 ...
- Linux下搭建iSCSI共享存储详细步骤(服务器模拟IPSAN存储)
一.简介 iSCSI(internet SCSI)技术由IBM公司研究开发,是一个供硬件设备使用的.可以在IP协议的上层运行的SCSI指令集,这种指令集合可以实现在IP网络上运行SCSI协议,使其能够 ...
- Linux下搭建iSCSI共享存储的方法 Linux-IO Target 方式CentOS7-1810下实现
iSCSI(internet SCSI)技术由IBM公司研究开发,是一个供硬件设备使用的.可以在IP协议的上层运行的SCSI指令集,这种指令集合可以实现在IP网络上运行SCSI协议,使其能够在诸如高速 ...
- Linux下搭建iSCSI共享存储的方法 TGT 方式 CentOS6.9系统下
iSCSI(internet SCSI)技术由IBM公司研究开发,是一个供硬件设备使用的.可以在IP协议的上层运行的SCSI指令集,这种指令集合可以实现在IP网络上运行SCSI协议,使其能够在诸如高速 ...
- Linux下搭建iSCSI共享存储的方法 Linux-IO Target 方式 Debian9.5下实现
iSCSI(internet SCSI)技术由IBM公司研究开发,是一个供硬件设备使用的.可以在IP协议的上层运行的SCSI指令集,这种指令集合可以实现在IP网络上运行SCSI协议,使其能够在诸如高速 ...
- Linux下搭建iSCSI共享存储的方法 TGT 方式 Debian9.5系统下
iSCSI(internet SCSI)技术由IBM公司研究开发,是一个供硬件设备使用的.可以在IP协议的上层运行的SCSI指令集,这种指令集合可以实现在IP网络上运行SCSI协议,使其能够在诸如高速 ...
- Linux下搭建iSCSI共享存储
转至:https://www.linuxidc.com/Linux/2016-09/135655.htm Linux下搭建iSCSI共享存储 拓扑: 实验步骤: ------------------- ...
- iscsi共享存储的简单配置和应用
1.环境介绍 SCSI(Small Computer System Interface)是块数据传输协议,在存储行业广泛应用,是存储设备最基本的标准协议.从根本上说,iSCSI协议是一种利用IP网络来 ...
- iSCSI 共享存储
iSCSI(Internet Small Computer System Interface,发音为/ˈаɪskʌzi/),Internet小型计算机系统接口,又称为IP-SAN,是一种基于 ...
随机推荐
- 使用kubeadm进行单master(single master)和高可用(HA)kubernetes集群部署
kubeadm部署k8s 使用kubeadm进行k8s的部署主要分为以下几个步骤: 环境预装: 主要安装docker.kubeadm等相关工具. 集群部署: 集群部署分为single master(单 ...
- Win7 Eclipse 搭建spark java1.8编译环境,JavaRDD的helloworld例子
[学习笔记] Win7 Eclipse 搭建spark java1.8编译环境,JavaRDD的helloworld例子: 在eclipse oxygen上创建一个普通的java项目,然后把spark ...
- 剪花布条 HDU - 2087(kmp,求不重叠匹配个数)
Problem Description 一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案.对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input 输入 ...
- Let's Code
Let's Code Happy Coding, Happy OI #include <bits/stdc++.h> using namespace std; int main() { c ...
- centos8自定义目录安装php7.3
1.目录结构 源码目录:/home/werben/pkgsrc/php-7.3.11 安装目录:/home/werben/application/php7.3.11 2.下载php源码 # 官网地址: ...
- tensorflow lite 之生成 tflite 模型文件
下载最新的的tensorflow源码. 1.配置 tflite 文件转换所需环境 安装 bazel 编译工具 https://docs.bazel.build/versions/master/inst ...
- 针对Web的信息搜集
信息收集(Information Gathering),信息收集是指通过各种方式获取所需要的信息,在整个渗透测试环节中,信息搜集是整个渗透过程中最为重要的一环,信息搜集可占据整个渗透测试80%左右的工 ...
- codeforce E - Minimal Labels+hdu 4857
两个题目的意思差不多 都是希望得出的拓扑序如果有多种 要求输出字典序小的情况 这里引用一个大佬的博客 关于为什么不能直接建图然后用小根堆解决这个问题(http://blog.csdn.net/rgno ...
- VBA学习资料分享-2
想利用VBA自动创建/发送OUTLOOK邮件,可以借助MailItem的Body属性或HTMLBody属性,代码模板如下: Dim objOutlook As Outlook.Application ...
- js之数据类型(对象类型——单体内置对象——JSON)
JSON(Java Script Object Notation)使用JavaScript语法,是用于存储和传输数据的格式,通常用于服务端向网页传递数据.JSON格式仅仅是一个文本,文本可以被任何编程 ...