Sponsored Content
Operating Systems Linux Red Hat Iscsiadm command returns error 'no records found' Post 303035684 by Tech87 on Thursday 30th of May 2019 04:21:24 PM
Old 05-30-2019
Iscsiadm command returns error 'no records found'

Hi there, I'm currently working on an exercise to connect to a Windows iscsi target via a Red Hat initiator machine. I'm using Windows Server 2012 and Red Hat Enterprise Linux v7.1

I have created the target on the Windows Server box and the two devices can communicate with each other. Verified through ping. My instructions from the Red Hat machine are as follows;

Open a terminal window and enter the following command;
iscsiadm --mode discovery --type sendtargets --portal 192.168.1.200
[I first did this and the command returned nothing. I then invoked the sudo command and was able to get the target iqn, which is "iqn-1991-05.com.microsoft:srv2012-1-localservers-target"]

My next steps are to enter the following;
iscsiadm --mode node --targetname the_target_iqn --portal 192.168.1.200 --login
[Unfortunately this just returns 'no records found']

I'm not exactly sure what I'm doing wrong. I have followed the instructions and made sure to check all the spacing and syntax. Although, it appears something isn't right.

Does anybody have any ideas?

Thanks

Last edited by jim mcnamara; 05-30-2019 at 08:56 PM..
 

10 More Discussions You Might Find Interesting

1. Red Hat

Command Not Found Error?

Hi, I am beginer to Linux. I have installed Redhat Linux AS 4.0 on my System.Later I created a User Oracle10g for Installing Oracle.Then I logged onto Oracle10g user and crated a Bash Profile and when I run that profile there was an error in that Profile. from then If I type any of Linux Command... (2 Replies)
Discussion started by: praswer
2 Replies

2. Shell Programming and Scripting

Command not found error!

Hello everyone, I am using Linux and tcsh shell. I am trying to run a free open source program( which is in the form of a binary file), but every time I run it it gives me an error saying: newhtsg_v1.0:Command not found. I have set permission also for the same. What else can I do to make... (4 Replies)
Discussion started by: ad23
4 Replies

3. IP Networking

If 'host' returns not found...

$ host 80.159.xx.xxx Host 222.79.xxx.xxx.in-addr.arpa not found: 3(NXDOMAIN) What does this mean? The person currently using the IP address in IRC is chatting right now, but how come if he's online it doesn't return any information? (1 Reply)
Discussion started by: guitarscn
1 Replies

4. Shell Programming and Scripting

echo x - returns: x: command not found

I have been experiencing this problem intermittantly, I thought the problem was '/bin/sh -> /bin/dash' but I changed that to bash and the problem persists. I am writing functions to be included in user's '.bash_profile' through source or '.' filename a quick example of the problem is illustrated... (3 Replies)
Discussion started by: bsquared
3 Replies

5. UNIX for Dummies Questions & Answers

Command not found error

I have a program called abc installed in /usr/local/bin. My path is as follows: # echo $PATH /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin However, when entering the abc command, the following error appears: # abc abc: Command not found When... (7 Replies)
Discussion started by: figaro
7 Replies

6. Linux

command not found error

I installed in VM the Mandriva Linux. But when I fire the make command it gives me command not found error. Seems make is not installed. I also checked in Mandriva control center and no development package is seen there. Will pls let me know how to proceed and get make and other development... (2 Replies)
Discussion started by: rupeshkp728
2 Replies

7. Shell Programming and Scripting

Source command returns error when it strikes conditional statement "ifeq"

Hello All, I am running source command on my project configuration file app.cfg which has conditional statements with make file systax E.g ifeq ($(APP_CMP_DIR),trunk). When I source this file it throws error: syntax error near unexpected token... (1 Reply)
Discussion started by: anand.shah
1 Replies

8. UNIX for Dummies Questions & Answers

Command not found error

$ cat nu who | wc -l $ ls -l nu -rwxr-x--- 1 _ _ 11 Jul 30 12:37 nu //the nu is displayed in green color $ nu bash: nu: command not found I am using a book from 1986 on Unix System V, Release 3, and the Unix system I am connecting to is from my college. Below is the notes from the book:... (4 Replies)
Discussion started by: chip
4 Replies

9. Shell Programming and Scripting

Command not found error 'then'

Could you let me know if my path is having bourne bash echo $PATH /u01/app/oracle/product/10.2.0/db_1/bin:/usr/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/oracle/bin $ which bash /bin/bash $ which ls alias ls='ls --color=tty' /bin/ls Below is... (3 Replies)
Discussion started by: csguna6
3 Replies

10. IP Networking

Dig only returns MX records in +trace mode

One of our email recipients has 17 mx records, and our emailing program postfix on linux does not retrieve these records. When using dig, the same thing happens. This command returns no mx records >dig mx fnb.co.za But when using +trace, the records get returned >dig mx fnb.co.za +trace ... (4 Replies)
Discussion started by: Joop Kaashoek
4 Replies
iscsiadm(1M)															      iscsiadm(1M)

NAME
iscsiadm - enable management of iSCSI initiators SYNOPSIS
iscsiadm subcommand direct-object [options] [operand] The iscsiadm command enables management of the iSCSI (Internet SCSI) initiator on a host. iscsiadm is implemented as a set of subcommands, many with their own options, which are described in the section for that subcommand. Options not associated with a particular subcommand are described under . The iscsiadm command supports the following subcommands, which are described in detail in subsections that follow: add Adds element(s) to an object. list Lists element(s) of an object. modify Modifies attributes of an object. remove Removes an element from an object. The iscsiadm subcommands operate on a direct-object. These are described in the section for each subcommand. add Subcommand The syntax for the add subcommand is: # iscsiadm add direct_object [operands...] The add subcommand adds the following direct_objects: discovery-address discovery-address [...] Adds a target to a list of discovery addresses. A discovery address (as in the syntax shown below) is an IP address:port combination used in a SendTargets discovery session. Using this discovery approach, a target device can inform an initiator of the target address and target name of each target exposed by that device. Connection to a target is not attempted unless the SendTargets method of discov- ery has been enabled on the host. You enable this method with the modify subcommand. The discovery-address parameter is formatted as: <IP address>:[port] If port is not specified, the default of 3260 will be used. static-config static_target [...] Adds a target to the list of statically configured targets. A connection to the target will not be attempted unless the static configu- ration method of discovery has been enabled. The static_target parameter is formatted as: <target-name>,<target address>[:port-number][,tpgt] <target-name> can be up to 223 characters. list Subcommand The syntax for the list subcommand is: # iscsiadm list direct-object [options] The list subcommand displays data for the following direct-objects: discovery Lists the discovery methods and their current activation state, enabled or disabled. Discovery methods are: o Static o SendTargets initiator-node Lists information for the initiator node on the host. The iSCSI initiator node represents a logical HBA and is a logical host connec- tion point for iSCSI targets. The parameter values listed in the response are default parameter settings for the initiator. Each con- nected target for an initiator can have parameter values that differ from the parameter values on the initiator node. static-config [static_target[, ...]] Lists the target name and address for specified targets or, if no static targets are specified, all statically discovered targets. target [-S] [-v] [target[, ...]] Lists a target's current parameters, connection state, and which method was used for the target's discovery. Reports information for specified targets or, if no targets are specified, all targets that have been discovered or have had parameters modified by the modify target subcommand. When used with the -S option for a specified target, this subcommand returns: o target name o logical unit number o vendor ID o product ID o OS device name (for example, /dev/rdsk/c0t2d0s0) The -v options gives more details, such as the current login parameters, the detailed connection information, and the discovery method used to discover the target. A return of NA is for the discovery method parameter indicates that the target was created with a iscsiadm modify target-param command and does not exist as a discovered object. To remove such targets, use iscsiadm remove target-param. target-param [-v] target [...] Lists a target's default and user-defined parameters. discovery-address [-v] discovery-address[, ...]] Lists the discovery-address objects that have been added using the iscsiadm add discovery-address subcommand. When used with the -v option, lists all known targets at a specified discovery-address. The -v option returns one or more target names along with zero or more target addresses and associated target portal group tags (TPGT), if applicable. modify Subcommand The syntax for the modify subcommand is: # iscsiadm modify direct_object [options] The modify subcommand supports the following direct_objects: discovery [options] Enabling a discovery method initiates a discovery using that method. Disabling a discovery method that is currently enabled does not affect connections to any targets that have already been discovered by that method. Options for modify discovery are as follows: -s, --static enable | disable Enable or disable static discovery. -t, --sendtargets enable | disable Enable or disable SendTargets discovery. initiator-node [options] Modifies an initiator's properties. If a target is currently connected, this operation can succeed. However, the modified set of param- eters will not be in effect for that target until an existing connection session no longer exists and a new connection has been estab- lished. The options -C and --CHAP-secret require a CHAP secret entry in response to a prompt. Options for modify initiator are as follows: -A, --node-alias <initiator node alias> Modifies the initiator node alias. Maximum length of 223 characters. -C, --CHAP-secret Sets the CHAP secret value. There is no default value. Minimum required length is 16 characters. -N, --node-name <initiator node name> Modifies the initiator node name. Maximum of 223 characters. Note - During Solaris installation, the initiator node name is set to a globally unique value. Changing this value can adversely affect operation within the iSCSI network. -R, --radius-access enable | disable Sets whether a RADIUS server will be used. -P, --radius-shared-secret (exclusive) Sets the RADIUS shared secret. -H, --CHAP-name CHAP name Specifies a CHAP username. If you do not use this option, upon initialization, the CHAP name is set to the initiator node name. When the authentication method is set to CHAP (see -a/--authentication option, above), the CHAP username is displayed with the com- mand iscsiadm list initiator-node. -a, --authentication chap | none Sets the authentication mode. -d, --datadigest none | CRC32 Sets whether CRC32 is enabled to check SCSI data transfers. -h, --headerdigest none | CRC32 Sets whether CRC32 is enabled to check SCSI packet headers. -r, --radius-server <IP address>[:<port>] Sets the IP address and port of the radius server to be used. target-param [options] target Modifies a target's parameters. If a target is currently connected, the modify operation will succeed, although the modified settings might not take effect for a few seconds. To confirm that these settings are active, use iscsiadm list target -v. If a specified target is not associated with any discovery method, a target object is created with the specified parameters. After using this command to mod- ify a target's parameters, the new parameters will persist until they are modified or removed with a iscsiadm remove target-param com- mand on that target. The options -C and --CHAP-secret require a CHAP secret entry in response to a prompt. Options for modify target-param are as follows: -d, --datadigest none | CRC32 Sets whether CRC32 is enabled or disabled for the data. -h, --headerdigest none | CRC32 Sets whether CRC32 is enabled or disabled for the header. -p, --login-param Specify one or more login parameter settings. Note - These values should only be modified by an administrator with a good working knowledge of the parameter's impact within the iSCSI network. The login parameters are derived from iSCSI proposed standard RFC 3720. Valid values are: dataseqinorder yes or no defaulttime2retain 0-3600 defaulttime2wait 0-3600 firstburstlength 512 to 2**24-1 immediatedata yes or no initialr2t yes or no maxburstlength 512 to 2**24-1 datapduinorder yes or no maxoutstandingr2t 1 to 65535 maxrecvdataseglen 512 to 2**24-1 -B, --bi-directional-authentication enable | disable Sets the bidirectional option. If set to enable, the initiator performs bidirectional authentication for the specified target. -C, --CHAP-secret Sets the target's CHAP secret value. There is no default value. remove Subcommand The syntax for the remove subcommand is: # iscsiadm remove direct_object The remove subcommand supports the following direct_objects: static-config static_target, ... Removes a target from the list of statically discovered targets. If the target being removed is currently connected, the remove opera- tion will succeed, however, the connection to the target will persist until a reboot or the target connection is lost. static_target must be formatted as: <target-name>,<target-address>[:port-number][,tpgt] There are no options associated with this direct object. discovery-address discovery-address, ... Removes a target device from the list of discovery addresses. A discovery address (as in the syntax shown below) is an IP address-port combination used in a SendTargets discovery session. Using this discovery approach, a target device can inform an initiator of the tar- get address and target name of each target exposed by that device. If any target exposed by the discovery address is currently con- nected, the remove discovery-address operation will succeed, however, the connection to the target will persist until a reboot or until the target connection is lost. discovery-address must be formatted as: <IP address>[:<port>] There are no options associated with this direct object. target-param target-name Removes target specified by target-name. The target name is formatted as: <target-name> Proper Use of Discovery Methods Do not configure a target to be discovered by both static and dynamic discovery methods. The consequence of using redundant discovery meth- ods might be slow performance when communicating with the iSCSI target device. The following generic options are supported: -V, --version Displays version information. Stops interpretation of subsequent arguments. -?, --help Displays help information. Can be used following an iscsiadm command with no arguments, following a subcommand, or following a subcom- mand-direct object combination. Responds with help information appropriate for your entry. For example, if you enter: # iscsiadm modify initiator-node --help ...iscsiadm responds with a display of the options available for that combination of subcommand and direct object. Example 1: Adding a Discovery Address The following command uses the add subcommand to add a discovery address. # iscsiadm add discovery-address 10.0.0.1:3260 10.0.0.2:3260 Example 2: Adding a Static Target The following command uses the add subcommand to add a static target. # iscsiadm add static-config iqn.1999-08.com.array:sn.01234567,10.0.0.1:3260 Example 3: Listing Current Discovery Settings The following command uses the list subcommand to list current discovery settings. # iscsiadm list discovery Discovery: Static: enabled Send Targets: disabled Example 4: Obtaining Verbose Discovery Output The following commands uses the -v option (one with, one without) with the list subcommand to obtain verbose output. # iscsiadm list discovery-address Discovery Address: 10.0.0.1:3260 Discovery Address: 10.0.0.2:3260 # iscsiadm list discovery-address -v 10.0.0.1:3260 Discovery Address: 10.0.0.1:3260 Target name: eui.210000203787d1f7 Target address: 10.0.0.1:3260 Target name: eui.210000203787a693 Target address: 10.0.0.1:3260 Example 5: Displaying Information on the Initiator The following command uses the list subcommand to display information on the initiator. iscsiadm list initiator-node Initiator node name: iqn.1986-03.com.company.central.interopv20-1 Initiator node alias: interopv20-1 Login Parameters (Default/Configured): Header Digest: NONE/NONE Data Digest: NONE/NONE Authentication Type: CHAP CHAP Name: iqn.1986-03.com.company.central.interopv20-1 RADIUS Server: NONE RADIUS access: disabled Example 6: Displaying Static Configuration Information The following command uses the list subcommand to display information about static configurations. # iscsiadm list static-config Static target: eui.210000203787a693,10.0.0.1:3260 Example 7: Displaying Target Information The following commands show the use of the list subcommand with various options to display information about targets. # iscsiadm list target Target: iqn.2004-05.com.abcStorage:Tgt-1 Target Portal Group Tag: 1 Connections: 1 Target: iqn.2004-05.com.abcStorage:Tgt-1 Target Portal Group Tag: 1 Connections: 1 #iscsiadm list target -v iqn.2004-05.com.abcStorage:Tgt-1 Target: iqn.2004-05.com.abcStorage:Tgt-1 Target Portal Group Tag: 1 Connections: 1 CID: 0 IP address (Local): 10.4.52.158:32803 IP address (Peer): 10.4.49.70:3260 Discovery Method: SendTargets Login Parameters (Negotiated): Data Sequence In Order: yes Data PDU In Order: yes Default Time To Retain: 20 Default Time To Wait: 2 Error Recovery Level: 0 First Burst Length: 65536 Immediate Data: yes Initial Ready To Transfer (R2T): yes Max Burst Length: 262144 Max Outstanding R2T: 1 Max Receive Data Segment Length: 65536 Max Connections: 1 Header Digest: NONE Data Digest: NONE # iscsiadm list target -S iqn.2004-05.com.abcStorage:Tgt-1 Target: iqn.2004-05.com.abcStorage:Tgt-1 Target Portal Group Tag: 1 Connections: 1 LUN: 6 Vendor: ABCStorage Product: iSCSI Target OS Device Name: /dev/rdsk/c3t1d0s2 LUN: 5 Vendor: ABCStorage Product: iSCSI Target OS Device Name: /dev/rdsk/c3t0d0s2 Example 8: Displaying Target Parameter Information The following command uses the list subcommand to display target information for a specific target. # iscsiadm list target-param -v iqn.2004-05.com.abcStorage:Tgt-1 Target: iqn.2004-05.com.abcStorage:Tgt-1 Alias: - Bi-directional Authentication: disabled Authentication Type: NONE Login Parameters (Default/Configured): Data Sequence In Order: yes/- Data PDU In Order: yes/- Default Time To Retain: 20/- Default Time To Wait: 2/- Error Recovery Level: 0/- First Burst Length: 65536/- Immediate Data: yes/- Initial Ready To Transfer (R2T): yes/- Max Burst Length: 262144/- Max Outstanding R2T: 1/- Max Receive Data Segment Length: 65536/- Max Connections: 1/- Header Digest: NONE/- Data Digest: NONE/- Example 9: Enabling Static Discovery Method The following command uses the modify subcommand to enable the static discovery method. # iscsiadm modify discovery --static enable Example 10: Setting the IP Address for the Radius Server The following command uses the modify subcommand to set the IP address for the radius server, which will be used for CHAP authentication. # iscsiadm modify initiator --radius-server 10.0.0.1 Example 11: Setting the Node Name for Initiator The following command uses the modify subcommand to set the node name for the initiator node. # iscsiadm modify initiator-node -N iqn.2004-10.com.SUN.host-1 Example 12: Changing Target Parameters The following command uses the modify subcommand to change the target parameters for a specified target. # iscsiadm modify target-param -d none -h none eui.210000203787a693 Example 13: Removing a Discovery Address The following command uses the remove subcommand to remove a discovery address. # iscsiadm remove discovery-address 10.0.0.1:3260 Example 14: Removing Target Parameters The following command uses the remove subcommand to remove a set of target parameters. # iscsiadm remove target-param eui.210000203787a693 See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWiscsiu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ attributes(5) 3 Aug 2005 iscsiadm(1M)
All times are GMT -4. The time now is 12:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy