Setting up iSCSI

From Alpine Linux
Revision as of 22:07, 6 November 2007 by Dwilliam (talk | contribs)

Introduction

iSCSI consists of two pieces: A target and an initiator. A target is a large pool of disk space that can be accessed over IP by the initiators. Initiators use the disk space, formatting it and mounting it the same as local disk.


iSCSI Target

The iscsitarget-X.X.apk package provides the target functionality. It includes the iscsi_trgt module and the ietd service (ietd is the iSCSI Enterprise Target Daemon). Once the package is installed, you can set up a target by editing two conf files.

In /etc/ietd.conf, add the following information:

       Target iqn.2006-01.com.openfiler:disk2.bpbx-vm-1
              Lun 0 Path=/dev/sda1, Type=fileio

The "Target" line above is an example. This line really just needs to be unique. /dev/sdx refers to the disk and partition that will be presented to the initiator.

In the /etc/initiators.allow file, add the following line:

    iqn.2006-01.com.openfiler:disk2.bpbx-vm-1 10.1.194.111

The IP address in the line above will be the initiator's ip address. Now only this ip address is allowed to access this specific target.


iSCSI Initiator