属于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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • C++获取当前系统时间_罗兰C系统

    C++获取当前系统时间_罗兰C系统C库中与系统时间相关的函数定义在头文件中,C++定义在头文件中。获取系统时间的方法都在time头文件里面定义。

    2022年9月1日
    4
  • spdlog学习笔记

    spdlog学习笔记说明:所有内容翻译自spdlog的wiki,受英语水平所限,有所错误或失真在所难免,如果您有更好的建议,请在博文下留言。线程安全spdlog::命名空间下的是线程安全的,当loggers在不同的线程同时执行时,下述函数不应该被调用:spdlog::set_error_handler(log_err_handler);//orlogger->set_error_handler(…

    2022年6月23日
    22
  • 让王老吉崛起的三大营销战役「建议收藏」

    让王老吉崛起的三大营销战役「建议收藏」一个存在了百年的区域市场老品牌,在短短5年时间内崛起,迅速成长为具有全国影响力的饮料销售冠军,而且博得了良好的社会美誉,这其中有什么不为人知的营销实践?又有着怎样的成长秘诀?梳理王老吉的发展史,我们注意到,有三大营销战役决定了这个品牌的崛起。撷取这三次营销个案,不但可以让我们知道王老吉的崛起密码,还可以了解到网络营销、品牌定位、产品延伸等营销前沿思想的现实实践。一个“网络营销”的经典案例?如

    2025年7月27日
    4
  • linux驱动ioctl函数,Linux中与驱动相关的ioctl函数

    linux驱动ioctl函数,Linux中与驱动相关的ioctl函数一:ioctl函数的作用ioctl用于向设备发控制和配置命令,有些命令也需要读写一些数据,但这些数据是不能用read/write读写的,称为Out-of-band数据。也就是说,read/write读写的数据是in-band数据,是I/O操作的主体,而ioctl命令传送的是控制信息,其中的数据是辅助的数据。ioctl是设备驱动程序中对设备的I/O通道进行管理的函数,所谓对I/O通道进行管理…

    2022年10月17日
    1
  • DrawerLayout侧滑栏

    DrawerLayout侧滑栏1.DrawerLayout是一个侧滑的布局控件2.以及可以拖拽的一个布局资源3.首先要现在布局文件里面设置好布局,在进行编写代码;第一步:这是最基本的一个布局文件,里面有主界面布局,下面是包含一个button的按钮;<android.support.v4.widget.DrawerLayoutxmlns:android="http://schemas.android.c…

    2022年6月25日
    23
  • java用什么编译器_Java用Java编译「建议收藏」

    java用什么编译器_Java用Java编译「建议收藏」java用什么编译器在上一篇文章中,我写了关于如何在运行时生成代理的内容,我们已经了解到生成Java源代码的程度。但是,要使用该类,必须对其进行编译,并将生成的字节码加载到内存中。那是“编译”时间。幸运的是,从Java1.6开始,我们可以在运行时访问Java编译器,因此可以将编译时与运行时混淆。尽管在这种非常特殊的情况下,这可能会导致过多的麻烦事情,通常导致无法维护的自我修改代码,…

    2022年5月6日
    42

发表回复

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

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