From: Juergen Gross <jgross@suse.com>
To: Kristian Hagsted Rasmussen <kristian@hagsted.dk>,
Olaf Hering <olaf@aepfle.de>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: pvSCSI test
Date: Fri, 06 Feb 2015 10:57:26 +0100 [thread overview]
Message-ID: <54D49006.60300@suse.com> (raw)
In-Reply-To: <d77e5fa007e84f74987bb983b74f20ab@hagsted-cserver.hagsted.dk>
On 02/06/2015 10:32 AM, Kristian Hagsted Rasmussen wrote:
> On Wednesday, February 4, 2015 05:41, Juergen Gross <jgross@suse.com> wrote:
>> To: Kristian Hagsted Rasmussen; Olaf Hering; xen-devel@lists.xensource.com
>> Subject: Re: pvSCSI test
>>
>> On 02/03/2015 07:16 PM, Kristian Hagsted Rasmussen wrote:
>>>
>>> Hi Olaf and Juergen
>>>
>>>
>>> I am interested in testing pvSCSI as I have a system were it would be ideal.
>>> I have tried to apply this patch "http://marc.info/?l=xen-devel&m=139885599019457&w=2" called "libbxl: add support for pvscsi, iteration 1", to my xen-4.5 tree.
>>> I am using kernel 3.18.4 compiled with xen-scsiback and xen-scsifront compiled into the kernel, for both Dom0 and DomU.
>>>
>>> My Ubuntu domU is running fine, however the scsi disk I want to pass through does not appear.
>>>
>>> in my config I have added the line:
>>> vscsi= ['3:0:0:0,0:0:0:0']
>>> I have also tried with:
>>> vscsi= ['/dev/sdb,0:0:0:0']
>>>
>>> but no matter which syntax I use I get the following error in dmesg log:
>>> xen-pvscsi: 3:0:0:0 doesn't exist
>>>
>>> I have no errors in the log files for the domU.
>>>
>>> Am I missing something in my configuration, perhaps some device hiding like for pci pass through?
>>
>> The upstream pvscsi backend is using the target infrastructure. Until
>> the tools are aware of this you'll have to configure the device to
>> pass to a domain in Dom0 e.g. via a script:
>>
>> #!/bin/bash
>> # usage:
>> # mkpvscsi device
>> # e.g. mkpvscsi /dev/sr0
>>
>> DEV=$1
>>
>> gen_uuid()
>> {
>> cat /proc/sys/kernel/random/uuid | \
>> awk '{print "naa.6001405" substr($1,1,8) substr($1,10,1);}'
>> }
>>
>> TARG=`gen_uuid`
>> INIT=`gen_uuid`
>>
>> NODE=`lsscsi | awk '$(NF) == "'$DEV'"
>> { print substr($1,2,length($1)-4); }'`
>> NAME=`echo $NODE | sed 's/:/_/g'`
>>
>
> I used targetcli to create the pscsi target, so
> skipped from here
>
>> modprobe configfs
>> mount -t configfs configfs /sys/kernel/config
>> modprobe xen-scsiback
>> modprobe target_core_mod
>
> to here
>
>> cd /sys/kernel/config/target
>>
>
> and here to
>
>> mkdir -p core/pscsi_0/$NAME
>> echo "$DEV" >core/pscsi_0/$NAME/udev_path
>>
> to here
>
>> mkdir -p xen-pvscsi/$TARG/tpgt_0
>> echo "$NODE" >xen-pvscsi/$TARG/tpgt_0/param/alias
>> echo $INIT >xen-pvscsi/$TARG/tpgt_0/nexus
>> mkdir xen-pvscsi/$TARG/tpgt_0/lun/lun_0
>>
>> cd xen-pvscsi/$TARG/tpgt_0/lun/lun_0
>> ln -s ../../../../../../target/core/pscsi_0/$NAME xen-pvscsi_port
>>
>>
>>
>> -------------
>>
>> After doing this you can use the xen tools to give the device to a domU.
>> Please note: this script is untested, I've used a simpler one which
>> fitted my needs (using targetcli, which isn't available everywhere).
>> I have tested all single steps of the script above, though.
>
> Thanks for the script, I had some problems with the symlinking when
> running the script, so tried to make the pscsi in targetcli, and then
> shortening the script to skip all script lines concerning the core dir.
> This made the script working for me, however I still get:
> xen-pvscsi: 3:0:0:0 doesn't exist
> error in dmesg log.
>
> Are you using another patch for the xen-tree than the one I listed above?
I've used xm to get the drivers working, not xl. I wanted to have only
one changed component during tests in order to know which component is
failing. :-)
What are the contents of
/sys/kernel/config/target/xen-pvscsi/$TARG/tpgt_0/param/alias
($TARG replaced by the UUID generated above, of course)?
This should be "3:0:0:0" in your case. That's where the backend is
looking for the match from xenstore.
And the final symlink in the script is required. $NAME can be anything,
but has to match the pscsi name, of course.
Juergen
next prev parent reply other threads:[~2015-02-06 9:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bd907a705c8747b1991a3b7c69fd3b8e@hagsted-cserver.hagsted.dk>
2015-02-04 4:41 ` pvSCSI test Juergen Gross
2015-02-06 9:32 ` Kristian Hagsted Rasmussen
2015-02-06 9:57 ` Juergen Gross [this message]
2015-02-06 14:02 ` Kristian Hagsted Rasmussen
2015-02-06 14:25 ` Juergen Gross
2015-02-06 20:33 ` Kristian Hagsted Rasmussen
2015-02-09 6:02 ` Juergen Gross
2015-02-12 16:43 ` Kristian Hagsted Rasmussen
2015-02-16 6:32 ` Juergen Gross
2015-02-16 19:45 ` Kristian Hagsted Rasmussen
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=54D49006.60300@suse.com \
--to=jgross@suse.com \
--cc=kristian@hagsted.dk \
--cc=olaf@aepfle.de \
--cc=xen-devel@lists.xensource.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.