服务器iscsi存储挂载_redis查询命令

服务器iscsi存储挂载_redis查询命令当前包含磁盘[root@xifenfei~]#fdisk-lDisk/dev/sda:21.4GB,21474836480bytes255heads,63sectors/track,2610cylindersUnits=cylindersof16065*512=8225280bytesDeviceBootStartEnd…

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

当前包含磁盘

[root@xifenfei ~]# fdisk -l

Disk /dev/sda: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sda1 * 1 2355 18916506 83 Linux

/dev/sda2 2356 2610 2048287+ 82 Linux swap / Solaris

Disk /dev/sdb: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sdb1 1 2610 20964793+ 83 Linux

Disk /dev/sdc: 2147 MB, 2147483648 bytes

255 heads, 63 sectors/track, 261 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn’t contain a valid partition table

Disk /dev/sdd: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sdd1 1 100 803218+ 83 Linux

/dev/sdd2 101 1000 7229250 83 Linux

查看iscsi运行情况

[root@xifenfei ~]# rpm -aq|grep iscsi

iscsi-initiator-utils-6.2.0.872-10.0.1.el5

[root@xifenfei ~]# chkconfig –list |grep iscsi

iscsi 0:off 1:off 2:on 3:on 4:on 5:on 6:off

iscsid 0:off 1:off 2:off 3:on 4:on 5:on 6:off

[root@xifenfei ~]# ps -ef|grep iscs

root 2753 2 0 Jun21 ? 00:00:00 [iscsi_eh]

root 15793 1 0 09:08 ? 00:00:00 brcm_iscsiuio

root 15800 1 0 09:08 ? 00:00:00 iscsid

root 15802 1 0 09:08 ? 00:00:00 iscsid

root 19533 15269 0 10:11 pts/1 00:00:00 grep iscs

配置iscsi存储

[root@xifenfei ~]# iscsiadm -m discovery -t sendtargets -p 192.168.1.254:3260

192.168.1.254:3260,1 iqn.2006-01.com.openfiler:tsn.32b32087937b

[root@xifenfei ~]# iscsiadm -m node –T iqn.2006-01.com.openfiler:tsn.32b32087937b -p 192.168.1.254:3260 -l

Logging in to [iface: default, target: iqn.2006-01.com.openfiler:tsn.32b32087937b, portal: 192.168.1.254,3260]

Login to [iface: default, target: iqn.2006-01.com.openfiler:tsn.32b32087937b, portal: 192.168.1.254,3260] successful.

[root@xifenfei ~]# iscsiadm -m node –T iqn.2006-01.com.openfiler:tsn.32b32087937b -p 192.168.1.254:3260

>–op update -n node.startup -v automatic

当前包含磁盘

[root@xifenfei ~]# fdisk -l

Disk /dev/sda: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sda1 * 1 2355 18916506 83 Linux

/dev/sda2 2356 2610 2048287+ 82 Linux swap / Solaris

Disk /dev/sdb: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sdb1 1 2610 20964793+ 83 Linux

Disk /dev/sdc: 2147 MB, 2147483648 bytes

255 heads, 63 sectors/track, 261 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn’t contain a valid partition table

Disk /dev/sdd: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sdd1 1 100 803218+ 83 Linux

/dev/sdd2 101 1000 7229250 83 Linux

Disk /dev/sde: 1073 MB, 1073741824 bytes

34 heads, 61 sectors/track, 1011 cylinders

Units = cylinders of 2074 * 512 = 1061888 bytes

Disk /dev/sde doesn’t contain a valid partition table

Disk /dev/sdf: 1073 MB, 1073741824 bytes

34 heads, 61 sectors/track, 1011 cylinders

Units = cylinders of 2074 * 512 = 1061888 bytes

Disk /dev/sdf doesn’t contain a valid partition table

Disk /dev/sdg: 1073 MB, 1073741824 bytes

34 heads, 61 sectors/track, 1011 cylinders

Units = cylinders of 2074 * 512 = 1061888 bytes

Disk /dev/sdg doesn’t contain a valid partition table

卸载iscsi存储

[root@xifenfei ~]# iscsiadm -m node –logoutall=all

Logging out of session [sid: 3, target: iqn.2006-01.com.openfiler:tsn.32b32087937b, portal: 192.168.1.254,3260]

Logout of [sid: 3, target: iqn.2006-01.com.openfiler:tsn.32b32087937b, portal: 192.168.1.254,3260] successful.

[root@xifenfei ~]# iscsiadm -m node –op delete –targetname iqn.2006-01.com.openfiler:tsn.32b32087937b

当前包含磁盘

[root@xifenfei ~]# fdisk -l

Disk /dev/sda: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sda1 * 1 2355 18916506 83 Linux

/dev/sda2 2356 2610 2048287+ 82 Linux swap / Solaris

Disk /dev/sdb: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sdb1 1 2610 20964793+ 83 Linux

Disk /dev/sdc: 2147 MB, 2147483648 bytes

255 heads, 63 sectors/track, 261 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn’t contain a valid partition table

Disk /dev/sdd: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sdd1 1 100 803218+ 83 Linux

/dev/sdd2 101 1000 7229250 83 Linux

iscsi操作总结

增加iscsi存储

(1)发现iscsi存储:iscsiadm -m discovery -t st -p ISCSI_IP

(2)查看iscsi发现记录:iscsiadm -m node

(3)登录iscsi存储:iscsiadm -m node -T LUN_NAME -p ISCSI_IP -l

(4)开机自动: iscsiadm -m node –T LUN_NAME -p ISCSI_IP –op update -n node.startup -v automatic

删除iscsi存储

(1)登出iscsi存储 iscsiadm -m node -T LUN_NAME -p ISCSI_IP -u

(2)对出iscsi所有登录 iscsiadm -m node –logoutall=all

(3)删除iscsi发现记录:iscsiadm -m node -o delete -T LUN_NAME -p ISCSI_IP

登入需验证码的节点

(1)开启认证

iscsiadm -m node -T LUN_NAME -o update –name node.session.auth.authmethod –value=CHAP

*.使用-o同–op

(2)添加用户

iscsiadm -m node -T LUN_NAME –op update –name node.session.auth.username –value=[用户名]

(3)添加密码

iscsiadm –m node –T LUN_NAME –op update –name node.session.auth.password –value=[密码]

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/172214.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 使用javascript下载网络图片「建议收藏」

    使用javascript下载网络图片「建议收藏」**因为某些原因需要使用js下载网站上的图片,查了万恶的某度,结果解决方案都是一样的,试了试,果然不行。于是乎,上stackoverflow一查,答案就出来了。直接上代码,很简单,答案使用jquery,改成原生js也不难的**functiondownloadImage(src){vara=$("<a></a>").attr("href",…

    2022年6月2日
    37
  • strlen和sizeof的差别

    strlen和sizeof的差别

    2021年11月24日
    43
  • 计算机复试面试问题(计算机面试常见问题)

    面试问题之编程语言1。C++的特点是什么?封装,继承,多态。支持面向对象和面向过程的开发。2.C++的异常处理机制?抛出异常和捕捉异常进行处理。(实际开发)3.c和c++,java的区别?c是纯过程,c++是对象加过程,java是纯面向对象的4.纯虚函数?被virtual修饰的成员函数,再基类不能实现,而他的实现放到派生类中实现。5.什么是内存泄漏?没有de…

    2022年4月15日
    53
  • js数组删除元素的方法_指甲都是小坑缺什么元素

    js数组删除元素的方法_指甲都是小坑缺什么元素JavaScript数组元素删除

    2022年9月30日
    0
  • Head First Java 中文版 (第 2 版) PDF 下载

    Head First Java 中文版 (第 2 版) PDF 下载微信公众号:一个优秀的废人如有问题或建议,请后台留言,我会尽力解决你的问题。简介《HeadFirstJava》是一本完整地面向对象(object-oriented,OO)程序设计和Java的学习指导用书,根据学习理论所设计,你可以从程序语言的基础开始,到线程、网络与分布式程序等项目。重要的是,你可以学会如何像一个面向对象开发者一样去思考,而且不只是读死书。  在这里,你可以会玩游戏、拼…

    2022年7月8日
    27
  • docker部署jenkins安装使用教程_docker搭建python开发环境

    docker部署jenkins安装使用教程_docker搭建python开发环境前言使用docker安装jenkins环境,jenkins构建的workspace目录默认是在容器里面构建的,如果我们想执行python3的代码,需进容器内部安装python3的环境。进jenki

    2022年7月31日
    3

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号