public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Luigi Tarenga <luigi.tarenga@gmail.com>
To: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
Cc: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org
Subject: Re: PR registration on LIO iscsi returns sense key not ready
Date: Thu, 02 Oct 2014 16:31:15 +0200	[thread overview]
Message-ID: <542D61B3.6030500@gmail.com> (raw)
In-Reply-To: <20141002161149.383599e3@grp-cvubrugier>


On 10/02/2014 04:11 PM, Christophe Vu-Brugier wrote:
> Dear Luigi,
>
> On Thu, 02 Oct 2014 12:47:09 +0200, Luigi Tarenga wrote :
>> I have a little problem with LIO iscsi target and SPC-3 persistent
>> reservation.
>> The summary of my setup is:
>> host:
>>     centos 6.5 x86_64 with custom kernel 3.16.3 + scst patches
>>     targetcli (-fb) 2.1.fb37
>>     this host is configured to export a lun0 to the guest via iscsi
>>
>> guest:
>>     centos 7 x64_64 with stock kernel 3.10.0-123.6.3.el7.x86_64
>>     iscsi-initiator-utils-6.2.0.873-21.el7.x86_64
>>     sg3_utils-1.37-5.el7.x86_64
>>
>> [snip]
>>
>> the guest virtualization is done with qemu-2.0.0+kvm, NIC is virt-io and
>> the guest
>> connect to the host via a tap device.
>>
>> The guest can connect to the iSCSI target and i see the device as /dev/sda.
>> I partitioned, formatted and mounted it successfully.
>>
>> My problem that every PR Out command return a sense key not ready
>> even if the command run successfully, see this sequence:
> I think I already experienced these errors. Could you check the
> output of `dmesg` and look for errors like:
>
>    filp_open(/var/target/pr/aptpl_1a4f52f5-1036-498a-a14f-8818d28de1bb) for APTPL metadata failed
>    SPC-3 PR REGISTER: Received res_key: 0x0000000000000000 does not match existing SA REGISTER res_key: 0x000000002e5f2049
>    filp_open(/var/target/pr/aptpl_1a4f52f5-1036-498a-a14f-8818d28de1bb) for APTPL metadata failed
>
> You can fix this issue by creating the /var/target/pr directory.
> You should also create the /var/target/alua directory whih is
> expected by LIO too.
>
> Best regards,
>
Oh yeah! that was the problem! my bad I didn't checked dmesg on host :(
I didn't thought about aptpl because I ask for reservation without aptpl 
bit on
(-Z flag in sg_persist).

I created the 2 directories and now PR works like a charm :)

thank you very much!
Luigi


      reply	other threads:[~2014-10-02 14:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-02 10:47 PR registration on LIO iscsi returns sense key not ready Luigi Tarenga
2014-10-02 14:11 ` Christophe Vu-Brugier
2014-10-02 14:31   ` Luigi Tarenga [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=542D61B3.6030500@gmail.com \
    --to=luigi.tarenga@gmail.com \
    --cc=cvubrugier@fastmail.fm \
    --cc=linux-scsi@vger.kernel.org \
    --cc=target-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox