属于iscsi使用的命令_tempadm

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

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新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/172198.html原文链接:https://javaforall.net

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


相关推荐

  • 对红黑树的认识总结

    一、对红黑树的基本理解(一)对红黑树的基本定义理解(二)对红黑树是“近似平衡”的理解1.将红色节点从红黑树中去掉,分析包含黑色节点的红黑树的高度2.把红色节点加回去,分析高度变化(三)红黑树与AVL树的比较:二、实现红黑树的基本思想分析(一)理解左旋(rotateleft)、右旋(rotateright)操作(二)插入操作的平衡调整情况一:如果关注节点是a,它的叔叔节点d是红色情况二:如果关注节点是a,它的叔叔节点d是黑色,关注节点

    2022年4月11日
    45
  • java标识符可以$开头吗_JAVA标识符

    java标识符可以$开头吗_JAVA标识符JAVA标识符JAVA标识符简介Java语言中,对于变量,常量,函数,语句块也有名字,我们统统称之为Java标识符。也就是程序员在定义java程序时,自定义的一些名字,例如helloworld程序里关键字class后跟的Demo,就是我们定义的类名。类名就属于标识符的一种。标识符除了应用在类名上,还可以用在变量、函数名、包名上。(要求同学们先记住,以后会详细见到这些)。标识符命名规则1.标识符由…

    2022年7月26日
    18
  • webstorm2021.7激活码【中文破解版】

    (webstorm2021.7激活码)这是一篇idea技术相关文章,由全栈君为大家提供,主要知识点是关于2021JetBrains全家桶永久激活码的内容IntelliJ2021最新激活注册码,破解教程可免费永久激活,亲测有效,下面是详细链接哦~https://javaforall.net/100143.htmlMLZPB5EL5Q-eyJsa…

    2022年3月21日
    40
  • oracle删除用户及表空间

    oracle删除用户及表空间1 以 sysdba 用户 最高权限 登录 查找需要删除的用户 普通用户没有删除权限 select fromdba users 2 查询需要删除用户对应的表空间 SELECT FROMUser Tablespaces droptablespa MKDB TMPincluding select from

    2025年11月26日
    4
  • java获取数组最大值索引_java数组最大值最小值

    java获取数组最大值索引_java数组最大值最小值简述方法其实有很多种的。我先放一些,之后有再遇到对应代码再放上来。最简单的当然是一个个找进行对比的方法啦~当然还是有一些有趣的操作的实例一:importjava.util.Arrays;publicstaticintMAX(int[]arr){Arrays.sort(arr);returnarr[arr.len…

    2025年10月2日
    4
  • 虚拟机VMware下载与安装教程(详细)

    虚拟机VMware下载与安装教程(详细)文章目录虚拟机VMware的下载虚拟机VMware的安装虚拟机VMware的下载虚拟机VMware的安装1.虚拟机VMware的下载官网地址:https://www.vmware.com/cn.html以下为官网界面选择“产品”—>“个人桌面”—>“WorkstationPro”选择“下载”(这里虽然是“试用Workstation15.5Pro”,但是点击“下载”之后,将会跳转到“Workstation16Pro”的下载界面)根据自己电脑的系统,比如你的电脑是Wi

    2022年6月7日
    40

发表回复

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

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