iSCSI Backing store

Steve Burton steve at sliderule.demon.co.uk
Thu Feb 20 23:27:42 UTC 2014


On 20/02/2014 23:05, Dan Nelson wrote:
> In the last episode (Feb 20), Steve Burton said:
>> On 20/02/2014 20:45, Dan Nelson wrote:
>>> In the last episode (Feb 20), Steve Burton said:
>>>> I'm trying to familiarize myself with the iSCSI implementation in
>>>> FreeBSD 10 REL.  I have made a target containing two LUNs which are
>>>> backed by two files on my test server (redundant PC).  This all worked
>>>> well though it took ages to make the files using dd.
>>>>
>>>> My second question relates to making iSCSI LUNs using a disk volume.  I
>>>> have a second (empty) hard drive.  Is it possible to just use the disk
>>>> as backing store for iSCSI?
>>>
>>> I don't see why not.
>>
>> I didn't see why not either but so far I can't see how :)
>
> You haven't said what error message you are getting when you specify a raw
> device, though...  "path /dev/ada1", for example.
>

Dan,

good point.

I added

         lun 2 {
                 path /dev/ada1
         }

to the portal group and started ctld. The following was in /var/log/messages

Feb 20 23:13:01 files kernel: cfiscsi_ioctl_handoff: new connection from 
iqn.1991-05.com.microsoft:titan (192.168.254.1) to 
iqn.2012-06.com.example:target0
Feb 20 23:13:01 files kernel: (0:2:0:0): MODE SENSE(6). CDB: 1a 00 1c 00 
c0 00
Feb 20 23:13:01 files kernel: (0:2:0:0): Tag: 0xcc621100, Type: 1
Feb 20 23:13:01 files kernel: (0:2:0:0): CTL Status: SCSI Error
Feb 20 23:13:01 files kernel: (0:2:0:0): SCSI Status: Check Condition
Feb 20 23:13:01 files kernel: (0:2:0:0): SCSI sense: ILLEGAL REQUEST 
asc:24,0 (Invalid field in CDB)
Feb 20 23:13:01 files kernel: (0:2:0:0): Command byte 2 bit 5 is invalid
Feb 20 23:13:01 files kernel: (0:2:0:1): MODE SENSE(6). CDB: 1a 00 1c 00 
c0 00
Feb 20 23:13:01 files kernel: (0:2:0:1): Tag: 0xdc621100, Type: 1
Feb 20 23:13:01 files kernel: (0:2:0:1): CTL Status: SCSI Error
Feb 20 23:13:01 files kernel: (0:2:0:1): SCSI Status: Check Condition
Feb 20 23:13:01 files kernel: (0:2:0:1): SCSI sense: ILLEGAL REQUEST 
asc:24,0 (Invalid field in CDB)
Feb 20 23:13:01 files kernel: (0:2:0:1): Command byte 2 bit 5 is invalid

I googled the line 'files kernel: (0:2:0:0): Command byte 2 bit 5 is 
invalid' and found a recommendation in a FreeNAS forum that I should run 
'camcontrol rescan all'
so I did and it sprang into life.

Problem solved!

thanks for your help.

Steve.



More information about the freebsd-questions mailing list