Quick Page Index
iSCSI Service Configuration
Enabling the integrated iSCSI Service
Viewing iSCSI Configuration with nexfscli
Viewing the active iSCSI system with nexfscli
Viewing the active iSCSI environment with tgtadm
Updating, creating and removing iSCSI configurations
iSCSI Initiator and LUN Statistics
iSCSI Management
Nexfs includes a full feature integrated iSCSI server (target) with direct access to the storage pool which can offer higher performance than using an external iSCSI server.
iSCSI Service Management
Enabling the Integrated iSCSI server
The integrated Nexfs iSCSI server must first be enabled by setting ISCSIENABLED to 1 (enabled), to disable the iSCSI server set ISCSIENABLED to 0
Example of using nexfscli to enable the iSCSI service on Nexfs start:
# nexfscli configfile set ISCSIENABLED 1
Updated Configuration file
If Nexfs is already running, you can enable iSCSI without requiring a restart with:
# nexfscli liveconfig set ISCSIENABLED 1
Updated Live Configuration
By default Nexfs will manage up to 16 iSCSI LUNs, this is a soft limit that can be increased through the ISCSIMAXLUNS setting to a maximum of 256 LUNs
More information on managing Nexfs using nexfscli can be found here
Configuring iSCSI
The integrated iSCSI service is managed through a standard JSON formatted configuration file, the easiest way to view and modify the iSCSI server is by using the nexfscli management command.
Viewing iSCSI configuration with nexfscli
You can view or make a copy of the current loaded iSCSI LUN configuration using nexfscli, to view the export configuration run:
# nexfscli iscsi getconf
To save a copy of the LUNs configuration to a file, include a filename at the end of the getconf command, for example, to save a copy to a file in /tmp called nexfsiscsiluns, run:
# nexfscli iscsi getconf /tmp/nexfsiscsiluns
Viewing the active iSCSI system with nexfscli
For a list of all active Targets and LUNs run:
# nexfscli iscsi show targets
For a list of all active LUNs attached to Target 1 (Change 1 in the command to the Target ID you want a list of LUNs for) run:
# nexfscli iscsi show target 1
To list Nexfs iSCSI Configured Interfaces
# nexfscli iscsi show interfaces
To list Nexfs iSCSI Configured Users
# nexfscli iscsi show accounts
To list all active connections
# nexfscli iscsi show sessions
To list all active connections attached to target id 1
# nexfscli iscsi show targetsessions 1
Using tgtadm with Nexfs
Nexfs allows its live configuration and stats to be viewed with tgtadm, tgtadm is part of the tgt package not installed by default with nexfs and must be installed manually.
Note: it is not possible to make Nexfs iSCSI configurable changes with tgtadm.
View the Nexfs iSCSI system with tgtadm
For a list of configured Nexfs iSCSI LUNs using tgtadm run:
# tgtadm --lld iscsi --op show --mode target
Note: Nexfs and tgt use different terms, for example when viewing configuration, portals are called interfaces in Nexfs, and tgt ACLs are called "CHAP Authentication Accounts". You continue to use the tgt term when requesting a configuration type from Nexfs using tgtadm, Nexfs knows how to correctly map the tgt term to the Nexfs term.
To list Nexfs iSCSI Configured Interfaces
# tgtadm --lld iscsi --op show --mode portal
To list Nexfs iSCSI Configured Users
# tgtadm --lld iscsi --op show --mode account
To list all active connections attached to target id 1
# tgtadm --lld iscsi --op show --mode conn --tid 1
Updating, creating and removing iSCSI Configurations
You can add, remove and update existing iSCSI LUNs using nexfscli, first create a correctly formatted JSON file that contains the configuration changes
# nexfscli iscsi putconf /tmp/nexfsiscsiluns
Where /tmp/nexfsiscsiluns is the location of the JSON file which contains the new configuration.
Once loaded check that the configuration has been accepted by viewing the active iSCSI Luns as detailed above, check the nexfs logfile (defaults to syslog) for details if any formatting errors were encountered loading the new configuration file.
Configuration changes are persisted between Nexfs restarts, there is no requirement to reload the iSCSI JSON configuration each time Nexfs is started.
You only need to include changes that are being made to the iSCSI configuration, there is no requirement to reupload the entire iSCSI configuration
Configuration changes can be passed to nexfscli using standard-in by leaving off the filename when using the putconf option.
iSCSI Viewing Statistics
Initiator Session Statistics
The integrated Nexfs iSCSI server collects per connection stats, these can be queried by Target, by Session and by Connection, the stats made available are:
rxdata: Data Received in 8-byte Octets
txdata: Data Transmitted in 8-byte Octets
datain pdus: Protocol Data Unit Messages containing data requested by SCSI read operations
dataout pdus: Write operation data that did not fit within the Protocol Data Unit of the SCSI command
cmd pdus: SCSI-level command descriptor blocks
rsp pdus: SCSI response messages
logins: Number of login attempts received from initiators
logouts: Number of logouts received from initiators
errors: Number of errors reported to initiators
digest err: Data Digest Errors (checksum failed)
timeout err: Timeouts
Session Stats can be viewed using nexfscli:
# nexfscli iscsi stat targets - View stats for all target
# nexfscli iiscsi stat target [targetid] - View stats for all connections attached to target id
# nexfscli iiscsi stat sessions - View stats for all sessions
# nexfscli iiscsi stat session [sessionid] - View stats for all connections attached to session id
# nexfscli iiscsi stat connections - View stats for all connections
# nexfscli iiscsi stat connection [connectid] - View stats for a single connection id
LUN Statistics
The integrated Nexfs iSCSI server collects per LUN stats, these can be queried by Target, by specific LUN, or all, the stats made available are:
Bytes Requested/Read: Number of Bytes requested by the client initators/the number of Bytes sent
Received Bytes/Write: Number of Bytes received by the client initiators/the number of Bytes written to storage
Avg Bytes Read/Write: The Average Read/Byte data request size
Read Reqs/Completed: Number of read requests received/the number successfully completed
Write Reqs/Completed: Number of write requests received/the number successfully completed
Bidir Reqs/Completed: Number of Bidirectional requests received/the number successfully completed
Errors: Number of errors encountered
LUN Stats can be viewed using nexfscli:
# nexfscli iscsi stat luns - View stats for all LUNS
# nexfscli iiscsi stat targetluns [targetid] - View stats for all LUNs attached to target id
# nexfscli iiscsi stat lun [targeted] [lunid] - View stats for the specific LUN lunid that is attached to targeted