NetBSD-Users archive

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

Re: iscsi-targets: device file for an extent?



2009/8/29 Louis Guillaume <lguillaume%berklee.edu@localhost>:
> 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

I've been having this for the last couple of years:

# extent        file or device          start           length
extent0         /dev/wd0d       0               78533MB
extent1         /dev/wd1d       0               78533MB
# target        flags   storage         netmask
target0         rw      extent0         0.0.0.0/0
target1         rw      extent1         0.0.0.0/0

(# ls -ld /dev/wd[01]d
brw-r-----  1 root  operator  0,  3 Aug 29 03:15 /dev/wd0d
brw-r-----  1 root  operator  0, 11 Aug 29 03:15 /dev/wd1d)

Obviously serving two whole disks (to a Windows server). That happen
to be one of my ways of recycling old machines in the office.


>
>
>
> Any help would be great,
>
> Thanks!
>
> Louis
>
>
>


Chavdar Ivanov
-- 
----
Marie von Ebner-Eschenbach  - "Even a stopped clock is right twice a
day." - 
http://www.brainyquote.com/quotes/authors/m/marie_von_ebnereschenbac.html


Home | Main Index | Thread Index | Old Index