linux iscsiadm_iscsi发起程序怎么用

linux iscsiadm_iscsi发起程序怎么用ISCSIADMNAMEiscsiadm-open-iscsiadministrationutility  SYNOPSISiscsiadm -mdiscovery[-hV][-ddebug_level][-Pprintlevel][-Iiface-ttype-pip:port[-l]]|[-oope

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

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

 ISCSIADM

NAME

iscsiadm – open-iscsi administration utility  

SYNOPSIS

iscsiadm -m discovery [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -I iface -t type -p ip:port [ -l ] ] | [ -o operation ] [ -n name ] [ -v value ]


iscsiadm -m node [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -L all,manual,automatic ] [ -U all,manual,automatic ] [ -S ] [ [ -T targetname -p ip:port -I iface ] [ -l | -u | -R | -s] ] [ [ -o operation ] [ -n name ] [ -v value ] [ -p ip:port ] ]


iscsiadm -m session [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -r sessionid | sysfsdir [ -R ] [ -u | -s ] ]


iscsiadm -m iface [ -hV ] [ -d debug_level ] [ -P printlevel ] [ -I ifacename ] [ [ -o operation ] [ -n name ] [ -v value ] ]


iscsiadm -m fw [-l]


iscsiadm -m host [ -P printlevel ] [ -H hostno ]


iscsiadm -k priority

 

DESCRIPTION

The iscsiadm utility is a command-line tool allowing discovery and login to iSCSI targets, as well as access and management of the open-iscsi database.

Open-iscsi does not use the term node as defined by the iSCSI RFC, where a node is a single iSCSI initiator or target. Open-iscsi uses the term node to refer to a portal on a target.

For session mode, a session id (sid) is used. The sid of a session can be found by running iscsiadm -m session -P 1. The session id and sysfs path are not currently persistent and is partially determined by when the session is setup.

Note that many of the node and discovery operations require that the iSCSI daemon (iscsid) be running.

 

OPTIONS

-d
–debug=
debug_level

print debugging information. Valid values for debug_level are 0 to 8.

-h
–help

display help text and exit

-I
–interface
[iface]

The interface argument specifies the iSCSI interface to use for the operation. iSCSI interfaces (iface) are defined in /etc/iscsi/ifaces. For hardware iSCSI (qla4xxx) the iface config must have the hardware address (iface.hwaddress = port’s MAC address) and the driver/transport_name (iface.transport_name). The iface’s name is then the filename of the iface config. For software iSCSI, the iface config must have either the hardware address (iface.hwaddress), or the network layer’s interface name (iface.net_ifacename), and it must have the driver/transport_name

The available drivers/iscsi_transports are tcp (software iSCSI over TCP/IP), iser (software iSCSI over infinniband), or qla4xxx (Qlogic 4XXXX HBAs). The hwaddress is the MAC address or for software iSCSI it may be the special value “default” which directs the initiator to not bind the session to a specific hardware resource and instead allow the network or infinniband layer to decide what to do. There is no need to create a iface config with the default behavior. If you do not specify a iface, then the default behavior is used.

As mentioned above there is a special iface name default. There are three others — cxgb3i, bnx2i and iser, which does not bind the session to a specific card, but will bind the session to the cxgb3i, bnx2i or iser transport. These are experimental and the use is not supported as a stable interface yet.

In discovery mode multiple interfaces can be specific by passing in multiple -I/–interface instances. For example,

“iscsiadm -m discovery -t st -p mytarget -I iface0 -I iface2”

Will direct iscsiadm to setup the node db to create records which will create sessions though the two intefaces passed in.

In node mode, only a single interface is supported in each call to iscsiadm.

This option is valid for discovery, node and iface mode.

-k
–killiscsid=
[priority]

Currently priority must be zero. This will immediately stop all iscsid operations and shutdown iscsid. It does not logout any sessions. Running this command is the same as doing “killall iscsid”. Neither should normally not be used, because if iscsid is doing error recovery or if there is an error while iscsid is not running, the system may not be able to recover. This command and iscsid’s SIGTERM handling are experimental.

-l
–login

For node and fw mode, login to a specified record. For discovery mode, login to all discovered targets.
This option is only valid for discovery and node modes.

-L
–loginall==
[all|manual|automatic]

For node mode, login all sessions with the node or conn startup values passed in or all running sesssion, except ones marked onboot, if all is passed in.
This option is only valid for node mode (it is valid but not functional for session mode).

-m, –mode 
op

specify the mode. 
op must be one of 
discovery
node
fw
host iface or 
session.
If no other options are specified: for 
discovery and 
node, all of their respective records are displayed; for 
session, all active sessions and connections are displayed; for 
fw, all boot firmware values are displayed; for 
host, all iSCSI hosts are displayed; and for 
iface, all ifaces setup in /etc/iscsi/ifaces are displayed.

-n
–name=
name

Specify a field 
name in a record. For use with the 
update operator.

-o
–op=
op

Specifies a database operator 
op
op must be one of 
new
delete
update or 
show.
This option is valid for all modes except fw. Delete should not be used on a running session. If it is iscsiadm will stop the session and then delete the record.
new creates a new database record for a given 
portal (IP address and port number). In discovery mode, iscsiadm will create new records for portals returned by the target.
delete deletes a specified 
recid. In discovery node, if iscsiadm is performing discovery it will delete records for portals that are no longer returned.
update will update the 
recid with 
name to the specified 
value. In discovery node, if iscsiadm is performing discovery the 
recid
name and 
value arguments are not needed. The update operation will operate on the portals returned by the target, and will update the node records with info from the config file and command line.
show is the default behaviour for node, discovery and iface mode. It is also used when there are no commands passed into session mode and a running sid is passed in. 
nameand 
value are currently ignored when used with 
show.

-p
–portal=
ip[:port]

Use target portal with ip-address 
ip and 
port, the default 
port value is 3260.
This option is only valid for discovery, or for node operations with the 
new operator.
This should be used along with –target in node mode, to specify what the open-iscsi docs refer to as a node or node record. Note: open-iscsi’s use of the word node, does not match the iSCSI RFC’s iSCSI Node term.

-P
–print=
printlevel

If in node mode print nodes in tree format. If in session mode print sessions in tree format. If in discovery mode print the nodes in tree format.

-T
–targetname=
targetname

Use target 
targetname.
This should be used along with –portal in node mode, to specify what the open-iscsi docs refer to as a node or node record. Note: open-iscsi’s use of the word node, does not match the iSCSI RFC’s iSCSI Node term.

-r
–sid=
sid | sysfsdir

Use session ID 
sid. The sid of a session can be found from running iscsiadm in session mode with the –info argument.

Instead of sid, a sysfs path containing the session can be used. For example using one of the following: /sys/devices/platform/hostH/sessionS/targetH:B:I/H:B:I:L, /sys/devices/platform/hostH/sessionS/targetH:B:I, or /sys/devices/platform/hostH/sessionS, for the sysfsdir argument would result in the session with sid S to be used.

sid | sysfsdir is only required for session mode.

-R
–rescan

In session mode, if sid is also passed in rescan the session. If no sid has been passed in rescan all running sessions.

In node mode, rescan a session running through the target, portal, iface tuple passed in.

-s
–stats

Display session statistics.

-S
–show

When displaying records, do not hide masked values, such as the CHAP secret (password).
This option is only valid for node and session mode.

-t
–type=
type

type must be 
sendtargets (or abbreviated as 
st), 
slp
isns or 
fw. Currently only sendtargets, fw, and iSNS is supported, see the DISCOVERY TYPES section.
This option is only valid for discovery mode.

-u
–logout

logout for a specified record.
This option is only valid for node and session mode.

-U
–logoutall==
[all,manual,automatic]

logout all sessions with the node or conn startup values passed in or all running sesssion, except ones marked onboot, if all is passed in.
This option is only valid for node mode (it is valid but not functional for session mode).

-v
–value=
value

Specify a 
value for use with the 
update operator.
This option is only valid for node mode.

-V
–version

display version and exit

 

DISCOVERY TYPES

iSCSI defines 3 discovery types: SendTargets, SLP, and iSNS.

SendTargets

A native iSCSI protocol which allows each iSCSI target to send a list of available targets to the initiator.

SLP

Optionally an iSCSI target can use the Service Location Protocol (SLP) to announce the available targets. The initiator can either implement SLP queries directly or can use a separate tool to acquire the information about available targets.

iSNS

iSNS (Internet Storage Name Service) records information about storage volumes within a larger network. To utilize iSNS, the address of the iSNS server must be set in iscsid.conf using the “isns.address” value, and iscsiadm must be run in discovery mode with the “isns” discovery type.

iSNS support in open-iscsi is experimental. The iscsid.conf settings, iscsiadm syntax and node DB layout may change.

fw

Several NICs and systems contain a mini iSCSI initiator which can be used for boot. To get the values used for boot the fw option can be used. Doing fw discovery, does not store persistent records in the node or discovery DB, because the values are stored in the system’s or NIC’s resource.

Performing fw discovery will print the portals, like with other discovery methods. To see other settings like CHAP values and initiator settings, like you would in node mode, run “iscsiadm -m fw”.

fw support in open-iscsi is experimental. The settings and iscsiadm syntax and output format may change.

iscsiadm supports the iSNS (isns) or SendTargets (st) discovery type. An SLP implementation is under development.

 

EXAMPLES

Discover targets at a given IP address:

        iscsiadm --mode discovery --type sendtargets --portal 192.168.1.10

Login, must use a node record id found by the discovery:

        iscsiadm --mode node --targetname iqn.2001-05.com.doe:test --portal 192.168.1.1:3260 --login

Logout:

        iscsiadm --mode node --targetname iqn.2001-05.com.doe:test --portal 192.168.1.1:3260 --logout

List node records:

        iscsiadm --mode node


Display all data for a given node record:

        iscsiadm --mode node --targetname iqn.2001-05.com.doe:test --portal 192.168.1.1:3260

 

FILES

/etc/iscsi/iscsid.conf

The configuration file read by 
iscsid and 
iscsiadm on startup.

/etc/iscsi/initiatorname.iscsi

The file containing the iSCSI InitiatorName and InitiatorAlias read by 
iscsid and 
iscsiadm on startup.

/etc/iscsi/nodes/

This directory contains the nodes with their targets.

/etc/iscsi/send_targets

This directory contains the portals.

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

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

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


相关推荐

  • python学生管理系统代码_用python写学生管理系统

    python学生管理系统代码_用python写学生管理系统这几天开始接触了python语言,这语言相对c语言简洁了不少,语言真是一通百通,学起来还是比较轻松,在熟悉了基本语法,列表(序列),元组以及字典之后写了一个最基础简单的的学生管理系统能完成的功能有:学生管理系统 v1.0 1.添加学生的信息 2.删除学生的信息 3.修改学生的信息 4.查询学生的信息 5.遍历所有学生的信息 6.退出系统学生信息中,

    2022年9月20日
    0
  • Java 最常见的 200+ 面试题:面试必备「建议收藏」

    这份面试清单是从我2015年做了TeamLeader之后开始收集的,一方面是给公司招聘用,另一方面是想用它来挖掘在Java技术栈中,还有那些知识点是我不知道的,我想找到这些技术盲点,然后修复它,以此来提高自己的技术水平。虽然我是从2009年就开始参加编程工作了,但我依旧觉得自己现在要学的东西很多,并且学习这些知识,让我很有成就感和满足感,那所以何乐而不为呢?说回面试的事,这份面试…

    2022年4月1日
    32
  • 少年群侠传服务器维护时间,少年群侠传————【维护】7月6日更新维护公告…

    少年群侠传服务器维护时间,少年群侠传————【维护】7月6日更新维护公告…亲爱的玩家:大家好!为了更新游戏内容,提升游戏体验,7k7k《少年群侠传》将于7月6日7:00-10:00对所有服务器进行更新维护,维护期间无法登陆游戏,维护时间预计3小时。如果在维护期间无法完成维护相关事宜,开机时间将继续顺延,如果提前解决问题,也将提前开放服务器。请各位玩家相互转告,并留意游戏开放时间。对于停机期间给您带来的不便,敬请见谅。7k7k《少年群侠传》运营团队感谢所有玩家的支持和配合…

    2022年5月12日
    33
  • java BigDecimal :注意,这是你可能会踩到的坑[通俗易懂]

    java BigDecimal :注意,这是你可能会踩到的坑[通俗易懂]在BigDecimal应用的过程中,有两个坑是我们比较容易遇到的,使用不当会出现莫名其妙的错误。1.构造函数的坑先看下面这段代码:publicvoidconstructTest(){BigDecimalvalue1=newBigDecimal(10.511);System.out.println(“value1:”+value1);BigDecimalva

    2022年5月31日
    28
  • 粒子群算法(PSO)的Python实现(求解多元函数的极值)

    粒子群算法(PSO)的Python实现(求解多元函数的极值)PSO是寻优算法中比较简单的一种,本文用Python简单实现了PSO算法,用来求解一个五元函数的最大值,并与MATLAB的fmincon函数的运行结果做比较。

    2022年4月29日
    180
  • pycharm安装程序包_Python不可以安装的软件包

    pycharm安装程序包_Python不可以安装的软件包(1)命令行安装pipinstallXXX或者condainstallXXXXXX为包的名称,命令输入的位置如下图所示(两个均可使用,如果一个安装失败则使用另一个)(2)操作界面安装(i)依次点击file——settings,出现如下界面(2)点击图中+,出现如下界面,在搜索框中输入相应的包的名称,选中后点击installPackage(3)直接根据提示安装打开一个python源程序,在下面画有红色波浪线的均为未安装的包,将光标移动至红色波浪线处,会出现installp

    2022年8月29日
    3

发表回复

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

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