NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

iscsi-targets: device file for an extent?



Hi,

I'm setting up an iscsi target on a NetBSD-5 (i386) machine. As I understand it, I can use a regular file or a NetBSD device as an extent. The example provided with the system uses a file, which seems like it could end up being more versatile, but I have a few questions:

 o Is there any performance improvement with using a device instead
   of a file. I imagine the type of device used would be a disk
   partition, but that's not clear in the documentation.

 o If using a device, do we use the raw device? or the block device?
   neither of these worked for me (see below).

 o Is there anything special that needs to go into the disklabel
   that prepares the partition for use with iscsi? Like the type.

 o What are the pros/cons of using a file vs. a device node? (if any)

I tried using a partition for this and here are the results:

Here's the partition from the disklabel:

j: 2097152 492830783 unused 0 0 # (Cyl. 30677*- 30807*)

Here's the targets entry:

extent0         /dev/rld0j               0              1GB

Here's the result:


# /etc/rc.d/iscsi_target restart
iscsi_target not running? (check /var/run/iscsi-target.pid).
Starting iscsi_target.
Reading configuration from `/etc/iscsi/targets'
target0:rw:0.0.0.0/0
        extent0:/dev/rld0j:0:1073741824
DISK: 1 logical unit (2097152 blocks, 512 bytes/block), type iscsi fs
DISK: LUN 0: pid 2623:/usr/src/dist/iscsi/src/disk.c:803: ***ERROR*** error opening "/dev/rld0j" pid 2623:/usr/src/dist/iscsi/src/target.c:1554: ***ERROR*** device_init() failed pid 2623:/usr/src/usr.sbin/iscsi/target/../../../dist/iscsi/src/iscsi-target.c:145: ***ERROR*** target_init() failed


... the result is pretty much the same with the block device...

/etc/rc.d/iscsi_target start
Starting iscsi_target.
Reading configuration from `/etc/iscsi/targets'
target0:rw:0.0.0.0/0
        extent0:/dev/ld0j:0:1073741824
DISK: 1 logical unit (2097152 blocks, 512 bytes/block), type iscsi fs
DISK: LUN 0: pid 6769:/usr/src/dist/iscsi/src/disk.c:803: ***ERROR*** error opening "/dev/ld0j" pid 6769:/usr/src/dist/iscsi/src/target.c:1554: ***ERROR*** device_init() failed pid 6769:/usr/src/usr.sbin/iscsi/target/../../../dist/iscsi/src/iscsi-target.c:145: ***ERROR*** target_init() failed



Any help would be great,

Thanks!

Louis


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



Home | Main Index | Thread Index | Old Index