iscsi target does not work
Looks like the iscsi service is not even starting when the slider is switched to "on".
#1 Updated by nuttervm - over 5 years ago
I think I found the a few causes of this problem...
The issue is when you create an iSCSI Target with type "pass" (passthrough), you get the error messages at console I showed in my first screenshot.
Also, I found that there is an error with the Extent "auto size" option. See second screen shot.
To recap my setup:
Running in VMWare ESXi 4.1
VM Storage has a total of 6 hard drives: (1 x 1GB for OS, 3 x 8GB for ZFS RAID-Z, 1 x ZFS log, 1 x ZFS cache). This is identical to my other test setups used in other posts /tickets.
iSCSI target creation process:
1) Create Extent. Name is "extent", path to extent is /mnt/zfsvol/extent0, extent size is 0
2) Create Authorized Initiator. Use all defaults, allow all.
3) Create Portal. Use all defaults, (listen on 0.0.0.0)
4) Create Target. Name is "target", type is "Disk", Portal group ID is 1, Initiator Group ID is 1, use all other defaults
5) Create Associated Targets. map "target" to "extent".
6) Start/stop the iSCSI service by shifting off/on. Ensure it is left as ON.
I have confirmed that by specifying a size for an extent and NOT using the autosize option (the default) that the iSCSI configuration outlined above works.
#2 Updated by nuttervm - over 5 years ago
OK, two more iSCSI bugs for you:
When I change the Portal Group ID mentioned above to any value other than 1, I get an error at the console (see third screenshot) saying PortalGroup1 not found. If I had to guess maybe your code has PortalGroup1 hard-coded somewhere?
I think I am encountering the problem described here: http://communities.vmware.com/thread/253819 My VMWare ESXi server currently has 2 iSCSI LUNS mounted from a FreeNAS 7.x box. On my freenas 8 rc5 box I am able to create a iSCSI target using the process described earlier EXCEPT I have to specify a extent size (auto size isn't working). After doing that, when I try to mount the target described above, the LUN appears as Active and not Active I/O like I need inside VMware. I believe VMware sees the same SCSI ID in use in two places and thinks that the FreeNAS 7.x and 8.x iSCSI targets are just multipath methods to get to the same backend LUN and sets the newer FreeNAS 8rc5 LUN into Active only mode.
I need the ability to specify my SCSI ID and SCSI SN, to ensure that the two FreeNAS instances don't try and use the same values. This will benefit your users who want to install multiple FreeNAS servers and use a single server initiating connections to multiple targets... without this tweak I don't think it will work.
#3 Updated by Josh Paetzel over 5 years ago
Bug 2) By using auto size what that means is that the istgt will use a file you have already created on disk. Generally this means creating a sparse file at the CLI with dd. Are you creating a file by hand?
Bug 3) The GUI needs to enforce this: You must create portalgroups in sequential order. In order to create portalgroup 3, both 2 and 1 must be created. I think that is the error you are hitting.
Bug 4) This explains a lot, in addition to why vmware can't see multiple LUNs per target either. Unfortunately the maintainer/author of istgt has been MIA since the Japanese earthquake, and the error reporting isn't so hot in istgt, but we'll try to sort it out.
#4 Updated by nuttervm - over 5 years ago
I was not aware that was the intent behind this option. I assumed "auto" meant it automatically grew the extent to consume all the available space on the volume. Recommend you not make this the default option. Also, it would be nice to include a "use all available space" button as the default option.
You are probably right. I had been changing portalgroup1 to portalgroup10 (effectively skipping 9). I had been attempting to resolve the problem described in Bug 4 when I discovered this.
Good deal. I'm eager to test further.
#5 Updated by Mark - over 5 years ago
I spent about 40 minutes trying to get iscsi setup on FreeNAS 8 RC5 and getting my Windows 7 Machine to see the target and I was not able to. Tried to stop and start the service many times on FreeNAS and 1 time it finally worked. I ended up rebooting my FreeNAS and iscsi no longer was working. Tried to stop and start service many more times and delete and recreate iscsi settings a few times, could not get it to work again. Finally figured out how to show console messages. Here is what I get when I enable iscsi in gui.
Apr 22 08:54:01 freenas freenasr1519: Executing: /usr/sbin/service ix-istgt quietstart Apr 22 08:54:01 freenas freenasr1519: Executing: /usr/sbin/service istgt forcestop Apr 22 11:54:01 freenas freenas: istgt not running? (check /var/run/istgt.pid). Apr 22 08:54:01 freenas freenasr1519: Executing: /usr/sbin/service istgt restart Apr 22 11:54:01 freenas freenas: istgt not running? (check /var/run/istgt.pid). Apr 22 11:54:01 freenas freenas: Starting istgt. Apr 22 11:54:01 freenas freenas: istgt version 0.4 (20110223) Apr 22 11:54:01 freenas istgtr16957: istgt version 0.4 (20110223) Apr 22 11:54:01 freenas istgtr16957: traditional mode Apr 22 11:54:01 freenas freenas: traditional mode Apr 22 11:54:01 freenas freenas: istgt_lu_disk.c: 430:istgt_lu_disk_init: ***ERROR*** LU1: LUN0: open error Apr 22 11:54:01 freenas istgtr16957: istgt_lu_disk.c: 430:istgt_lu_disk_init: ***ERROR*** LU1: LUN0: open error Apr 22 11:54:01 freenas istgtr16957: istgt_lu.c:1908:istgt_lu_init: ***ERROR*** LU1: lu_disk_init() failed Apr 22 11:54:01 freenas freenas: istgt_lu.c:1908:istgt_lu_init: ***ERROR*** LU1: lu_disk_init() failed Apr 22 11:54:01 freenas istgtr16957: istgt.c:1665:main: ***ERROR*** istgt_lu_init() failed Apr 22 11:54:01 freenas freenas: istgt.c:1665:main: ***ERROR*** istgt_lu_init() failed Apr 22 11:54:01 freenas freenas: LU1 HDD UNIT Apr 22 11:54:01 freenas freenas: LU1: LUN0 file=/mnt/tank/iscsi, size=20971520000 Apr 22 11:54:01 freenas freenas: LU1: LUN0 40960000 blocks, 512 bytes/block Apr 22 11:54:01 freenas root: /usr/local/etc/rc.d/istgt: WARNING: failed to start istgt Apr 22 11:54:01 freenas freenas: /usr/local/etc/rc.d/istgt: WARNING: failed to start istgt
#6 Updated by Josh Paetzel over 5 years ago
istgt doesn't have very good error reporting. What these log messages are telling you is that "There is something wrong with the config files so I'm bailing out"
Either screenshots of all your iSCSI config screens or the contents of /usr/local/etc/istgt/istgt.conf and /usr/local/etc/istgt/auth.conf could be used to debug the issue.
#10 Updated by Chad - over 4 years ago
Replying to [comment:9 gcooper]:
Closing due to lack of feedback. Please feel free to reopen with more details if you have or haven't been able to get iSCSI to work with you with the latest version of FreeNAS.
Doesn't work for me. From looking at the sample conf files, the target should be listed as 'LUN0 Storage /dev/zvol/RAIDZ/vmfs auto' but no matter what settings I use in the GUI, istgt.conf always changes to 'LUN0 Storage /dev/da1 auto' for the [logical unit].
Is there a workaround for this?