4 This document is intended to tell you how to set up an iSCSI target on
5 a NetBSD host, so that block storage can be presented to the network.
6 It then goes on to show how to connect to that storage using the
7 Microsoft iSCSI initiator (version 1.06, running on Windows XP).
10 1. Configuring the NetBSD iSCSI target
11 ======================================
13 1.1. Decide what storage will be presented
15 The iSCSI target serves up block storage to clients on the network.
16 These clients are called "initiators". Firstly, we must decide how
17 much storage we are going to serve up, and for this document, we
18 will serve up 100 MB. It will be in a file called /tmp/iscsi-target0.
20 So we must first edit /etc/iscsi/targets, so that it contains the
23 # extent file or device start length
24 extent0 /tmp/iscsi-target0 0 100MB
26 # target flags storage netmask
27 target0 rw extent0 0/0
29 The extent definition tells the file which is used as backing
30 store. It is persistent, so that the target can serve up the
31 same storage after reboot. Its length is 100 MB, and there is
32 no offset into the file for the start of the extent. (An offset
33 is useful if you need to skip over MBRs, or disklabels).
35 The extent is mounted read-write by "target0", and is served up
36 to any host (the 0.0.0.0/0 netmask).
38 1.2. Start the iscsi-target
42 # /etc/rc.d/iscsi_target forcestart
44 and you should see the messages from the iscsi-target:
46 Starting iscsi_target.
47 Reading configuration from `/etc/iscsi/targets'
49 extent0:/tmp/iscsi-target0:0:104857600
50 DISK: 1 logical units (204800 blocks, 512 bytes/block), type iscsi fs
51 DISK: LU 0: 100 MB disk storage for "target0"
52 TARGET: TargetName is iqn.1994-04.org.netbsd.iscsi-target
56 Congratulations - your iSCSI target is now up and running and
57 serving blocks to initiators.
61 2. Configuring the Microsoft iSCSI initiator, version 1.06
62 ==========================================================
64 Please see the relevant documentation on setting up iSCSI initiators.
67 Sun Jan 6 10:38:19 GMT 2008