FreeBSD iSCSI Initiator Installation and Configuration

ww‮ttual.w‬uri.com
FreeBSD iSCSI Initiator Installation and Configuration

To install and configure an iSCSI initiator on a FreeBSD system, you will need to do the following:

  1. Install the iscsi-initiator-utils package using the pkg package manager:
# pkg install iscsi-initiator-utils

This will install the iSCSI initiator utilities on your FreeBSD system.

  1. Edit the /etc/rc.conf file and add the following line to enable the iSCSI initiator service at boot:
iscsid_enable="YES"
  1. Edit the /etc/iscsi/iscsid.conf file and set the node.startup option to automatic to enable automatic discovery and login to iSCSI targets:
node.startup = automatic
  1. Start the iSCSI initiator service by running the following command:
# service iscsid start

This will start the iSCSI initiator service on your FreeBSD system.

  1. Use the iscsictl command to discover and login to iSCSI targets.

For example, to discover iSCSI targets on the 192.168.1.100 server, you can run the following command:

# iscsictl -A -p 192.168.1.100

This will display a list of available iSCSI targets on the 192.168.1.100 server.

To login to a specific iSCSI target, you can use the iscsictl command with the -l option.

For example, to login to the iqn.2017-09.com.example:disk1 iSCSI target on the 192.168.1.100 server, you can run the following command:

# iscsictl -l -t iqn.2017-09.com.example:disk1 -p 192.168.1.100

This will login to the specified iSCSI target and create a block device for the iSCSI disk.

For more information about using and configuring the iSCSI initiator on a FreeBSD system, you can refer to the FreeBSD documentation and the iscsictl man page by running man iscsictl on the command line.

Created Time:2017-10-28 20:40:37  Author:lautturi