属于iscsi使用的命令_tempadm

属于iscsi使用的命令_tempadm[root@xifenfei~]#fdisk-lDisk/dev/sda:21.4GB,21474836480bytes255heads,63sectors/track,2610cylindersUnits=cylindersof16065*512=8225280bytesDeviceBootStartEndB…


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/172198.html原文链接:https://javaforall.net

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

相关推荐

  • 建立任务,OSTaskCreate()源码解析

    建立任务,OSTaskCreate()源码解析想让uC/OS-Ⅱ管理用户的任务,用户必须要先建立任务。用户可以通过传递任务地址和其它参数到以下两个函数之一来建立任务:OSTaskCreate()或OSTaskCreateExt()。OSTas

    2022年7月3日
  • js unit8array和java变量之间的关系

    js unit8array和java变量之间的关系unit8array如何同java进行交互最近一个项目遇到了一个二维码转换的问题,厂家给的demo只有js的转换方式,其中用到了Unit8,由于实际应用场景,转换应该由后端java代码进行实现,这里记录一下实现方式。JS对字符串操作的时候,有时候我们会用到UNIT8ARRAY,例如varbinary_string=window.atob(str);vararray=new…

    2022年9月17日
  • Mybatis二级缓存_redis二级缓存

    Mybatis二级缓存_redis二级缓存MyBatis深入了解二级缓存

    2022年9月21日
  • (转载)正向代理与反向代理的区别

    (转载)正向代理与反向代理的区别

    2021年9月2日
  • 如何激活成功教程pycharm专业版_pycharm2021专业版永久激活

    如何激活成功教程pycharm专业版_pycharm2021专业版永久激活1.下载pycharm的profession版本:http://www.jetbrains.com/pycharm/download/2.下载到本地后解压提取文件然后用命令进入到/pycharm-professional-2018.3.2/pycharm-2018.3.2/bin下:3.到http://idea.lanyus.com/网址下下载激活成功教程补丁,直接下载补丁文件http://ide…

    2022年8月29日
  • 微信聊天记录数据分析「建议收藏」

    目录一、项目背景二、数据准备三、数据预处理及描述性统计四、数据分析1.聊天时间分布图2.高频词汇统计3.词云图展示五、其它探索性分析一、项目背景2021年2月20日我和我女朋友第一次见面,之后开启了我们两个人的故事,时隔一年我想将我们的聊天记录提取出来进行简单的数据分析一下。微信里面有2021年4月20日至2022年2月20日的聊天记录,一共十个月的数据。二、数据准备在网上有许多文章关于可以找到关于…

    2022年4月12日

发表回复

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

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