广告
返回顶部
首页 > 资讯 > 精选 >Centos7怎么安装iscsi
  • 376
分享到

Centos7怎么安装iscsi

2023-06-05 21:06:32 376人浏览 八月长安
摘要

这篇文章主要讲解了“Centos7怎么安装iscsi”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Centos7怎么安装iscsi”吧!搭建数据库RAC环境,使用ISCSI服务模拟存储服务器

这篇文章主要讲解了“Centos7怎么安装iscsi”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Centos7怎么安装iscsi”吧!

搭建数据库RAC环境,使用ISCSI服务模拟存储服务器,之前使用的是linux 6系列所以发现7不同,特此记录:

服务器安装targetcli

# yum -y install targetcli

启动target服务

# systemctl start target

设置开机启动服务

# systemctl enable target

开始创建

进入targetcli

#targetcli

步骤1:建立一个块存储

注意:server1.disk(名称server1可自定义),/dev/sdb1为上面新建的分区名称。

/backstores/fileio> /backstores/block create disk_ocr1 /dev/sdb

Created block storage object disk_ocr1 using /dev/sdb.

/backstores/fileio> /backstores/block create disk_ocr2 /dev/sdc

Created block storage object disk_ocr2 using /dev/sdc.

/backstores/fileio> /backstores/block create disk_ocr3 /dev/sdd

Created block storage object disk_ocr3 using /dev/sde.

/backstores/fileio> /backstores/block create disk_data1 /dev/sde

Created block storage object disk_data1 using /dev/sde.

/backstores/fileio> /backstores/block create disk_data2 /dev/sdf

Created block storage object disk_data2 using /dev/sdf.

/backstores/fileio> /backstores/block create disk_data3 /dev/sdg

Created block storage object disk_data3 using /dev/sdg.

/backstores/fileio> /backstores/block create disk_data4 /dev/sdh

Created block storage object disk_data4 using /dev/sdh.

步骤2:配置ISCSITarget命名

注意:命名在同一子网内确保是唯一的,命名格式为:iqn.yyyy-mm.<主机名反写>:自定义名称(自定义名称内不能有下划线)

/backstores/fileio> /iscsi create iqn.2019-04.com.rac18cc:server

Created target iqn.2019-04.com.rac18cc:server.

Created TPG 1.

Global pref auto_add_default_portal=true

Created default portal listening on all IPs (0.0.0.0), port 3260.

步骤3:创建ACL允许ISCSI客户机连接

注意:iqn.2019-04.com.rac18cc:server:client1为客户机ISCSI名称。

/backstores/fileio> /iscsi/iqn.2019-04.com.rac18cc:server/tpg1/acls create iqn.2019-04.com.rac18cc:beijing

Created node ACL for iqn.2019-04.com.rac18cc:beijing

步骤4:创建lun(target块设备的逻辑单元)

/backstores/fileio> /iscsi/iqn.2019-04.com.rac18cc:server/tpg1/luns create/backstores/block/disk_ocr1

Created LUN 0.

Created LUN 0->0 mapping in node ACL iqn.2019-04.com.rac18cc:beijing

/backstores/fileio> /iscsi/iqn.2019-04.com.rac18cc:server/tpg1/luns create/backstores/block/disk_ocr2

Created LUN 1.

Created LUN 1->1 mapping in node ACL iqn.2019-04.com.rac18cc:beijing

/backstores/fileio> /iscsi/iqn.2019-04.com.rac18cc:server/tpg1/luns create/backstores/block/disk_ocr3

Created LUN 2.

Created LUN 2->2 mapping in node ACL iqn.2019-04.com.rac18cc:beijing

/backstores/fileio> /iscsi/iqn.2019-04.com.rac18cc:server/tpg1/luns create/backstores/block/disk_data1

Created LUN 3.

Created LUN 3->3 mapping in node ACL iqn.2019-04.com.rac18cc:beijing

/backstores/fileio> /iscsi/iqn.2019-04.com.rac18cc:server/tpg1/luns create/backstores/block/disk_data2

Created LUN 4.

Created LUN 4->4 mapping in node ACL iqn.2019-04.com.rac18cc:beijing

/backstores/fileio> /iscsi/iqn.2019-04.com.rac18cc:server/tpg1/luns create/backstores/block/disk_data3

Created LUN 5.

Created LUN 5->5 mapping in node ACL iqn.2019-04.com.rac18cc:beijing

/backstores/fileio> /iscsi/iqn.2019-04.com.rac18cc:server/tpg1/luns create/backstores/block/disk_data4

Created LUN 6.

Created LUN 6->6 mapping in node ACL iqn.2019-04.com.rac18cc:beijing

步骤5:创建ip与端口

/> /iscsi/iqn.2019-04.com.rac18cc:server/tpg1/portals create 192.168.8.88

/>cd /iscsi/iqn.2019-04.com.rac18cc:server/tpg1/portals

/>create 192.168.8.88:3260

注:192.168.8.88为服务器IP;不指定端口默认为3260

步骤6:配置验证用户名和密码(这里可以省略)

/>cd

/iscsi/iqn.2017-05.com.mwdserver:iscsimwd1/tpg1/acls/iqn.2017-05.com.mwdinit:initmwd1

/>set auth userid=test

/>set auth passWord=test

步骤7:配置完成后查看配置信息,并退出。

/>cd /

/>ls

/>exit

客户端:

安装:

# yum -y install iscsi-initiator-utils

注:ubuntu下比较方便好用的initiator是open iscsi:

apt-get install -y open-iscsi

启动iscsi服务:

# systemctl start iscsi

设置为开机自启动服务:

# systemctl enable iscsi

配置ISCSIInitiator名称(此处InitiatorName须与服务端配置的ACL允许ISCSI客户机连接的名称一致):

# vi /etc/iscsi/initiatorname.iscsi

InitiatorName=iqn.1994-05.com.redhat:d36e6c6eb661

修改为:

InitiatorName=iqn.2019-04.com.rac18cc:beijing

此处定义的Initiator名字要和在存储节点中定义ACL时使用的主机名字一致。

#vi /etc/iscsi/iscsid.conf

# line 57: 取消注释

node.session.auth.authmethod = CHAP

# line 61,62: 取消注释 and specify the username and password you set on the iSCSI target server

node.session.auth.username = username

node.session.auth.password = password

# 发现target

[root@rac18c1 ~]# iscsiadm -m discovery -t sendtargets -p 192.168.8.88

192.168.8.88:3260,1 iqn.2019-04.com.rac18cc:server

[root@rac18c1 ~]# iscsiadm -m node -o show

# BEGIN RECORD 6.2.0.874-10

node.name = iqn.2019-04.com.rac18cc:server

node.tpgt = 1

node.startup = automatic

node.leading_login = No

iface.hwaddress = <empty>

iface.ipaddress = <empty>

iface.iscsi_ifacename = default

iface.net_ifacename = <empty>

iface.gateway = <empty>

iface.subnet_mask = <empty>

iface.transport_name = tcp

iface.initiatorname = <empty>

iface.state = <empty>

iface.vlan_id = 0

iface.vlan_priority = 0

iface.vlan_state = <empty>

iface.iface_num = 0

iface.mtu = 0

iface.port = 0

iface.bootproto = <empty>

iface.dhcp_alt_client_id_state = <empty>

iface.dhcp_alt_client_id = <empty>

iface.dhcp_dns = <empty>

iface.dhcp_learn_iqn = <empty>

iface.dhcp_req_vendor_id_state = <empty>

iface.dhcp_vendor_id_state = <empty>

iface.dhcp_vendor_id = <empty>

iface.dhcp_slp_da = <empty>

iface.fragmentation = <empty>

iface.gratuitous_arp = <empty>

iface.incoming_forwarding = <empty>

iface.tos_state = <empty>

iface.tos = 0

iface.ttl = 0

iface.delayed_ack = <empty>

iface.tcp_nagle = <empty>

iface.tcp_wsf_state = <empty>

iface.tcp_wsf = 0

iface.tcp_timer_scale = 0

iface.tcp_timestamp = <empty>

iface.redirect = <empty>

iface.def_task_mgmt_timeout = 0

iface.header_digest = <empty>

iface.data_digest = <empty>

iface.immediate_data = <empty>

iface.initial_r2t = <empty>

iface.data_seq_inorder = <empty>

iface.data_pdu_inorder = <empty>

iface.erl = 0

iface.max_receive_data_len = 0

iface.first_burst_len = 0

iface.max_outstanding_r2t = 0

iface.max_burst_len = 0

iface.chap_auth = <empty>

iface.bidi_chap = <empty>

iface.strict_login_compliance = <empty>

iface.discovery_auth = <empty>

iface.discovery_loGout = <empty>

node.discovery_address = 192.168.8.88

node.discovery_port = 3260

node.discovery_type = send_targets

node.session.initial_cmdsn = 0

node.session.initial_login_retry_max = 8

node.session.xmit_thread_priority = -20

node.session.cmds_max = 128

node.session.queue_depth = 32

node.session.nr_sessions = 1

node.session.auth.authmethod = CHAP

node.session.auth.username = <empty>

node.session.auth.password = <empty>

node.session.auth.username_in = <empty>

node.session.auth.password_in = <empty>

node.session.timeo.replacement_timeout = 120

node.session.err_timeo.abort_timeout = 15

node.session.err_timeo.lu_reset_timeout = 30

node.session.err_timeo.tgt_reset_timeout = 30

node.session.err_timeo.host_reset_timeout = 60

node.session.iscsi.FastAbort = Yes

node.session.iscsi.InitialR2T = No

node.session.iscsi.ImmediateData = Yes

node.session.iscsi.FirstBurstLength = 262144

node.session.iscsi.MaxBurstLength = 16776192

node.session.iscsi.DefaultTime2Retain = 0

node.session.iscsi.DefaultTime2Wait = 2

node.session.iscsi.MaxConnections = 1

node.session.iscsi.MaxOutstandingR2T = 1

node.session.iscsi.ERL = 0

node.session.scan = auto

node.conn[0].address = 192.168.8.88

node.conn[0].port = 3260

node.conn[0].startup = manual

node.conn[0].tcp.window_size = 524288

node.conn[0].tcp.type_of_service = 0

node.conn[0].timeo.logout_timeout = 15

node.conn[0].timeo.login_timeout = 15

node.conn[0].timeo.auth_timeout = 45

node.conn[0].timeo.noop_out_interval = 5

node.conn[0].timeo.noop_out_timeout = 5

node.conn[0].iscsi.MaxXmitDataSegmentLength = 0

node.conn[0].iscsi.MaxRecvDataSegmentLength = 262144

node.conn[0].iscsi.HeaderDigest = None

node.conn[0].iscsi.IFMarker = No

node.conn[0].iscsi.OFMarker = No

# END RECORD

连接ISCSI设备:

 iscsiadm -m node --login

 # cat /proc/partitions 

# iscsiadm --mode node --targetname iqn.2019-04.com.rac18cc:server --portal 192.168.8.88 --login

感谢各位的阅读,以上就是“Centos7怎么安装iscsi”的内容了,经过本文的学习后,相信大家对Centos7怎么安装iscsi这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是编程网,小编将为大家推送更多相关知识点的文章,欢迎关注!

--结束END--

本文标题: Centos7怎么安装iscsi

本文链接: https://www.lsjlt.com/news/244751.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • Centos7怎么安装iscsi
    这篇文章主要讲解了“Centos7怎么安装iscsi”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Centos7怎么安装iscsi”吧!搭建数据库RAC环境,使用ISCSI服务模拟存储服务器...
    99+
    2023-06-05
  • CentOS7怎么安装WordPress
    本篇内容主要讲解“CentOS7怎么安装WordPress”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“CentOS7怎么安装WordPress”吧!WordPress是一种使用PHP语言开发的...
    99+
    2023-06-27
  • CentOS7怎么安装PHP7.1
    本篇内容主要讲解“CentOS7怎么安装PHP7.1”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“CentOS7怎么安装PHP7.1”吧!1.首先安装依赖包:yum install&n...
    99+
    2023-06-28
  • centos7怎么安装rabbitMq
    本篇内容介绍了“centos7怎么安装rabbitMq”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!安装erlang 1.Erlang安装配...
    99+
    2023-06-10
  • CentOS7怎么安装Splunk
    这篇文章主要介绍“CentOS7怎么安装Splunk”,在日常操作中,相信很多人在CentOS7怎么安装Splunk问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”CentOS7怎么安装Splunk”的疑惑有所...
    99+
    2023-06-27
  • Centos7怎么安装Docker
    本篇内容介绍了“Centos7怎么安装Docker”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!Centos 7 install docke...
    99+
    2023-06-04
  • CentOS7怎么安装Kafka
    这篇文章主要介绍CentOS7怎么安装Kafka,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!简介 Kafka 是一种高吞吐的分布式发布订阅消息系统,能够替代传统的消息队列用于解耦合数据处理,缓存未处理消息等,同时具...
    99+
    2023-06-10
  • centos7该怎么安装
    centos7该怎么安装 ,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。CentOS 7.0 已经正式发布,网侠小编第一时间为大家提供了centos 7安装的一些技巧,如果你不...
    99+
    2023-06-10
  • centos7怎么安装zabbix5.0
    本篇内容介绍了“centos7怎么安装zabbix5.0”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!安装前配置为了方便,关防火墙:syst...
    99+
    2023-07-05
  • CentOS7怎么下安装Kippo
    这篇文章主要介绍“CentOS7怎么下安装Kippo”的相关知识,小编通过实际案例向大家展示操作过程,操作方法简单快捷,实用性强,希望这篇“CentOS7怎么下安装Kippo”文章能帮助大家解决问题。Kippo是一款强大的SSH蜜罐工具,它...
    99+
    2023-06-28
  • centos7怎么安装php-pdo
    本文操作环境:centos7系统、php5.4.16&&mariadb5.5.52版、Dell G3电脑。centos7怎么安装php-pdocentos7 php(mariadb)安装pdo在centos7环境下安装PDO...
    99+
    2017-04-22
    centos7 php-pdo
  • Centos7下怎么安装Zimbra
    这篇文章主要介绍“Centos7下怎么安装Zimbra”的相关知识,小编通过实际案例向大家展示操作过程,操作方法简单快捷,实用性强,希望这篇“Centos7下怎么安装Zimbra”文章能帮助大家解决问题。Zimbra提供一套开源协同办公套件...
    99+
    2023-06-27
  • CentOS7下怎么安装RabbitMQ
    这篇“CentOS7下怎么安装RabbitMQ”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“CentOS7下怎么安装Rabb...
    99+
    2023-06-27
  • CentOS7中怎么安装Weblogic
    这篇文章主要介绍“CentOS7中怎么安装Weblogic”,在日常操作中,相信很多人在CentOS7中怎么安装Weblogic问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”CentOS7中怎么安装Weblo...
    99+
    2023-06-27
  • CentOS7怎么中安装Snapd
    本篇内容介绍了“CentOS7怎么中安装Snapd”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!首先安装COPR插件和EPEL,通过添加ep...
    99+
    2023-06-27
  • CentOS7中怎么安装postgreSQL11
    今天小编给大家分享一下CentOS7中怎么安装postgreSQL11的相关知识点,内容详细,逻辑清晰,相信大部分人都还太了解这方面的知识,所以分享这篇文章给大家参考一下,希望大家阅读完这篇文章后有所收获,下面我们一起来了解一下吧。Post...
    99+
    2023-06-27
  • CentOS7中怎么安装clickhouse
    本篇文章为大家展示了CentOS7中怎么安装clickhouse,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。Debian/Ubuntu 用户新建/etc/apt/sources.list.d/cl...
    99+
    2023-06-15
  • centos7下怎么安装xrdp
    这篇文章给大家分享的是有关centos7下怎么安装xrdp的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。1 安装xrdp(请查看自己系统的位数,命令行输入arch, 如果是32位使用则选择i386,如果是64位,...
    99+
    2023-06-10
  • 怎么在CentOS系统上安装部署iSCSI客户端
    这篇文章主要讲解了“怎么在CentOS系统上安装部署iSCSI客户端”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“怎么在CentOS系统上安装部署iSCSI客户端”吧!什么是iSCSIiSC...
    99+
    2023-06-10
  • 怎么在Centos7中安装 Mysql8
    这篇文章给大家介绍怎么在Centos7中安装 Mysql8,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。Mysql8新特性:Mysql从5.x版本直接跳跃到8.x,我个人是这么看的:MySQL 5.5 -> My...
    99+
    2023-06-07
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作