From: Juergen Gross <jgross@suse.com>
To: Kristian Hagsted Rasmussen <kristian@hagsted.dk>,
Olaf Hering <olaf@aepfle.de>,
xen-devel@lists.xensource.com
Subject: Re: pvSCSI test
Date: Wed, 04 Feb 2015 05:41:03 +0100 [thread overview]
Message-ID: <54D1A2DF.4020303@suse.com> (raw)
In-Reply-To: <bd907a705c8747b1991a3b7c69fd3b8e@hagsted-cserver.hagsted.dk>
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'`
modprobe configfs
mount -t configfs configfs /sys/kernel/config
modprobe xen-scsiback
modprobe target_core_mod
cd /sys/kernel/config/target
mkdir -p core/pscsi_0/$NAME
echo "$DEV" >core/pscsi_0/$NAME/udev_path
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.
Happy testing,
Juergen
P.S.: If you are feeling adventurous you can try other target backends
than pscsi, e.g. iscsi or fileio.
next parent reply other threads:[~2015-02-04 4:41 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 ` Juergen Gross [this message]
2015-02-06 9:32 ` pvSCSI test Kristian Hagsted Rasmussen
2015-02-06 9:57 ` Juergen Gross
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=54D1A2DF.4020303@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.