pvscsi broken
Hi,
On both 3.3.1 and unstable if I try to use pvscsi as per the examples in the config file I get a error when I try to start the domain:
xm dry-run xptest.cfg
Using config file "./xptest.cfg"./sbin/scsi_id: invalid option -- 's'
/sbin/scsi_id comes from udev and I have version 124 installed.
This is from xmexample.hvm
#-----------------------------------------------------------------------------
# Configure PVSCSI devices:
#
#vscsi=[ 'PDEV, VDEV' ]
#
# PDEV gives physical SCSI device to be attached to specified guest # domain by one of the following identifier format. # - XX:XX:XX:XX (4-tuples with decimal notation which shows # "host:channel:target:lun") # - /dev/sdxx or sdx # - /dev/stxx or stx # - /dev/sgxx or sgx # - result of 'scsi_id -gu -s'.
# ex. # scsi_id -gu -s /block/sdb
# 36000b5d0006a0000006a0257004c0000
#
# VDEV gives virtual SCSI device by 4-tuples (XX:XX:XX:XX) as
# which the specified guest domain recognize.
#
The command scsi_id -gu -s /block/sdb in the example produces the same error:
scsi_id -gu -s /block/sdbscsi_id: invalid option -- 's'
I guess the scripts need to be updated for the newer scsi_id & udev.
Andy
Quoted 9 lines
Hi,
On both 3.3.1 and unstable if I try to use pvscsi as per the examples in the config file I get a error when I try to start the domain:
xm dry-run xptest.cfg
Using config file "./xptest.cfg"./sbin/scsi_id: invalid option -- 's'
I was sure that I had this working previously, but on my 3.3.1 system it's even worse:
xm scsi-attach w2k8test32 /dev/st0 0:0:0:0
sh: /sbin/scsi_id: No such file or directory
sh: /sbin/scsi_id: No such file or directory
sh: /sbin/scsi_id: No such file or directory
sh: /sbin/scsi_id: No such file or directory
sh: /sbin/scsi_id: No such file or directory
Mine is Debian Lenny, and scsi_id is in /lib/udev, not /sbin, and doesn't seem to support the right options either...
James
Quoted 20 lines · James Harper
Quoted 9 lines
Hi,
On both 3.3.1 and unstable if I try to use pvscsi as per the examples in the config file I get a error when I try to start the domain:
xm dry-run xptest.cfg
Using config file "./xptest.cfg"./sbin/scsi_id: invalid option -- 's'I was sure that I had this working previously, but on my 3.3.1 system it's even worse:
xm scsi-attach w2k8test32
/dev/st00:0:0:0
sh:/sbin/scsi_id: No such file or directory
sh:/sbin/scsi_id: No such file or directory
sh:/sbin/scsi_id: No such file or directory
sh:/sbin/scsi_id: No such file or directory
sh:/sbin/scsi_id: No such file or directory
Quoted 5 lines
Mine is Debian Lenny, and
scsi_idis in/lib/udev, not /sbin, and doesn't seem to support the right options either...James
scsi_id from udev 114 accepts that syntax but does not output anything at all, I guess its not compatible with the newer udev.
Quoted 23 lines
Quoted 20 lines · James Harper
Quoted 9 lines
Hi,
On both 3.3.1 and unstable if I try to use pvscsi as per the examples in the config file I get a error when I try to start the domain:
xm dry-run xptest.cfg
Using config file "./xptest.cfg"./sbin/scsi_id: invalid option -- 's'I was sure that I had this working previously, but on my 3.3.1 system it's even worse:
xm scsi-attach w2k8test32
/dev/st00:0:0:0
sh:/sbin/scsi_id: No such file or directory
sh:/sbin/scsi_id: No such file or directory
sh:/sbin/scsi_id: No such file or directory
sh:/sbin/scsi_id: No such file or directory
sh:/sbin/scsi_id: No such file or directory
Quoted 8 lines
Quoted 5 lines
Mine is Debian Lenny, and
scsi_idis in/lib/udev, not /sbin, and doesn't seem to support the right options either...James
scsi_idfrom udev 114 accepts that syntax but does not output anything at all, I guess its not compatible with the newer udev.
I can get scsi-attach to work by replacing the call to scsi_id in python/xen/util/vscsi_util.py with:
'/lib/udev/scsi_id --whitelisted --replace-whitespace --page=0x80 /dev/' + sg
That gives the same output as the previous syntax. Possibly we could omit the --page=0x80 bit, which would instead just give a hex string instead of a vendor_model_serial string.
The change is then incompatible with the old version of scsi_id though...
James
Hi Andrew and James,
I'm not sure about scsi_id and udev.
How about these patches? Could you try them?
Best regards,
Kan
Quoted 41 lines · James Harper
Quoted 23 lines
Quoted 20 lines · James Harper
Quoted 9 lines
Hi,
On both 3.3.1 and unstable if I try to use pvscsi as per the examples in the config file I get a error when I try to start the domain:
�xm dry-run xptest.cfg
Using config file "./xptest.cfg"./sbin/scsi_id: invalid option -- 's'I was sure that I had this working previously, but on my 3.3.1 system it's even worse:
xm scsi-attach w2k8test32
/dev/st00:0:0:0
sh:/sbin/scsi_id: No such file or directory
sh:/sbin/scsi_id: No such file or directory
sh:/sbin/scsi_id: No such file or directory
sh:/sbin/scsi_id: No such file or directory
sh:/sbin/scsi_id: No such file or directoryQuoted 8 lines
Quoted 5 lines
Mine is Debian Lenny, and
scsi_idis in/lib/udev, not /sbin, and doesn't seem to support the right options either...James
scsi_idfrom udev 114 accepts that syntax but does not output anything at all, I guess its not compatible with the newer udev.I can get scsi-attach to work by replacing the call to
scsi_idin python/xen/util/vscsi_util.pywith:'
/lib/udev/scsi_id--whitelisted --replace-whitespace --page=0x80/dev/' + sgThat gives the same output as the previous syntax. Possibly we could omit the --page=0x80 bit, which would instead just give a hex string instead of a
vendor_model_serialstring.
Quoted 8 lines
The change is then incompatible with the old version of
scsi_idthough...James
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
tools/python/xen/util/vscsi_util.py +9 -3
@@ -35,6 +35,11 @@ SYSFS_SCSI_DEV_TYPEID_PATH = '/type' SYSFS_SCSI_DEV_TYPEID_PATH = '/type' SYSFS_SCSI_DEV_REVISION_PATH = '/rev' SYSFS_SCSI_DEV_SCSILEVEL_PATH = '/scsi_level' + +SCSI_ID_COMMANDS = [ + "/lib/udev/scsi_id -gu --sg-version 3 -d /dev/%s 2>/dev/null", + "/sbin/scsi_id -gu -s /class/scsi_generic/%s 2>/dev/null" +] def _vscsi_get_devname_by(name, scsi_devices): """A device name is gotten by the HCTL.
@@ -79,9 +84,10 @@ def _vscsi_get_hctl_by(phyname, scsi_dev def _vscsi_get_scsiid(sg): - scsi_id = os.popen('/sbin/scsi_id -gu -s /class/scsi_generic/' + sg).read().split() - if len(scsi_id): - return scsi_id[0] + for scsi_id_command in SCSI_ID_COMMANDS: + scsi_id = os.popen(scsi_id_command % sg).read().split() + if len(scsi_id): + return scsi_id[0] return None
tools/python/xen/util/vscsi_util.py +11 -5
@@ -26,6 +26,11 @@ import sys import sys import re import string + +SCSI_ID_COMMANDS = [ + "/lib/udev/scsi_id -gu --sg-version 3 -d /dev/%s 2>/dev/null", + "/sbin/scsi_id -gu -s /class/scsi_generic/%s 2>/dev/null" +] def _vscsi_hctl_block(name, scsi_devices): """ block-device name is convert into hctl. (e.g., '/dev/sda',
@@ -108,11 +113,12 @@ def vscsi_get_scsidevices(): if re.match('^scsi_generic', f): os.chdir(os.path.join(paths, f)) sg = os.path.basename(os.getcwd()) - lines = os.popen('/sbin/scsi_id -gu -s /class/scsi_generic/' + sg).read().split() - if len(lines) == 0: - scsi_id = '-' - else: - scsi_id = lines[0] + scsi_id = '-' + for scsi_id_command in SCSI_ID_COMMANDS: + lines = os.popen(scsi_id_command % sg).read().split() + if len(lines): + scsi_id = lines[0] + break devices.append([hctl, block, sg, scsi_id])
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
2009/3/17 Masaki Kanno <[email protected]>:
Quoted 7 lines
Hi Andrew and James,
I'm not sure about
scsi_idand udev.
How about these patches? Could you try them?Best regards,
Kan
I have tried the patch for unstable and it seems to work, I don't get any errors and xm scsi-list <dom> shows the device is assigned, unfortunately the gplpv driver in windows fails to load but I'm not sure if the problem is the driver or Xen.
I will setup a linux domU and try pvscsi with that.
Andy
Hi Andrew,
Thanks for your testing.
I'm not sure about the gplpv driver in windows. But I believe that the problem has nothing to do with my patch. Maybe...
Best regards,
Kan
Quoted 23 lines · Andrew Lyon
2009/3/17 Masaki Kanno <[email protected]>:
Quoted 7 lines
Hi Andrew and James,
I'm not sure about
scsi_idand udev.
How about these patches? �Could you try them?Best regards,
�KanI have tried the patch for unstable and it seems to work, I don't get any errors and xm scsi-list <dom> shows the device is assigned, unfortunately the gplpv driver in windows fails to load but I'm not sure if the problem is the driver or Xen.
I will setup a linux domU and try pvscsi with that.
Andy
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
2009/3/25 Masaki Kanno <[email protected]>:
Quoted 36 lines
Hi Andrew,
Thanks for your testing.
I'm not sure about the gplpv driver in windows. But I believe that the problem has nothing to do with my patch. Maybe...Best regards,
KanQuoted 23 lines · Andrew Lyon
2009/3/17 Masaki Kanno <[email protected]>:
Quoted 7 lines
Hi Andrew and James,
I'm not sure about
scsi_idand udev.
How about these patches? (I (BCould you try them?Best regards,
(I (BKanI have tried the patch for unstable and it seems to work, I don't get any errors and xm scsi-list <dom> shows the device is assigned, unfortunately the gplpv driver in windows fails to load but I'm not sure if the problem is the driver or Xen.
I will setup a linux domU and try pvscsi with that.
Andy
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Hi,
I tested pvscsi with a pv domU and had the same problem I did in windows, the scsi device is detected but all tape operations fail and if I run quantum xTalk tape diagnostics it reports a interconnect error:
SCSI Interconnect Test
Sense: CC: 05 ASC: 20 ASCQ: 00 = "Invalid command operation code
The Operation Code in the command was not a valid Operation Code."
Andy
Hi Andrew-san,
Which assignment mode, LUN mode or Host mode, do you use? If you used the LUN mode, only mandatory SCSI commands can work and almost all tape related commands will fail.
Could you try the Host mode? Please see "http://lists.xensource.com/archives/html/xen-devel/2009-02/msg00505.html" for usage of the Host mode.
Best regards,
Quoted 49 lines · On Mon, 30 Mar 2009 10:24:53 +0100 Andrew Lyon <[email protected]> wrote:
2009/3/25 Masaki Kanno <[email protected]>:
Quoted 36 lines
Hi Andrew,
Thanks for your testing.
I'm not sure about the gplpv driver in windows. But I believe that the problem has nothing to do with my patch. Maybe...Best regards,
KanQuoted 23 lines · Andrew Lyon
2009/3/17 Masaki Kanno <[email protected]>:
Quoted 7 lines
Hi Andrew and James,
I'm not sure about
scsi_idand udev.
How about these patches? (I (BCould you try them?Best regards,
(I (BKanI have tried the patch for unstable and it seems to work, I don't get any errors and xm scsi-list <dom> shows the device is assigned, unfortunately the gplpv driver in windows fails to load but I'm not sure if the problem is the driver or Xen.
I will setup a linux domU and try pvscsi with that.
Andy
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-develHi,
I tested pvscsi with a pv domU and had the same problem I did in windows, the scsi device is detected but all tape operations fail and if I run quantum xTalk tape diagnostics it reports a interconnect error:
SCSI Interconnect Test
Sense: CC: 05 ASC: 20 ASCQ: 00 = "Invalid command operation code
The Operation Code in the command was not a valid Operation Code."
Quoted 6 lines
Andy
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
-----
Jun Kamada
[email protected]
Quoted 6 lines · Jun Kamada
Hi Andrew-san,
Which assignment mode, LUN mode or Host mode, do you use? If you used the LUN mode, only mandatory SCSI commands can work and almost all tape related commands will fail.
Quoted 7 lines
Could you try the Host mode? Please see "http://lists.xensource.com/archives/html/xen-devel/2009-02/msg00505.html" for usage of the Host mode.
Best regards,
I used a config setting like this: #vscsi=['/dev/st0, 0:0:0:0'] which I guess must be LUN mode, I removed the setting and used a "xm attach <dom> 8:0:5:0 host" which was successful and "xm scsi-list" shows the device is attached, but nothing was detected in windows, perhaps it needs to be there as soon as windows is booted, what is the syntax to specify host mode in the config file?
Andy
Quoted 66 lines
Quoted 49 lines · On Mon, 30 Mar 2009 10:24:53 +0100 Andrew Lyon <[email protected]> wrote:
2009/3/25 Masaki Kanno <[email protected]>:
Quoted 36 lines
Hi Andrew,
Thanks for your testing.
I'm not sure about the gplpv driver in windows. But I believe that the problem has nothing to do with my patch. Maybe...Best regards,
KanQuoted 23 lines · Andrew Lyon
2009/3/17 Masaki Kanno <[email protected]>:
Quoted 7 lines
Hi Andrew and James,
I'm not sure about
scsi_idand udev.
How about these patches? (I (BCould you try them?Best regards,
(I (BKanI have tried the patch for unstable and it seems to work, I don't get any errors and xm scsi-list <dom> shows the device is assigned, unfortunately the gplpv driver in windows fails to load but I'm not sure if the problem is the driver or Xen.
I will setup a linux domU and try pvscsi with that.
Andy
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-develHi,
I tested pvscsi with a pv domU and had the same problem I did in windows, the scsi device is detected but all tape operations fail and if I run quantum xTalk tape diagnostics it reports a interconnect error:
SCSI Interconnect Test
Sense: CC: 05 ASC: 20 ASCQ: 00 = "Invalid command operation code The Operation Code in the command was not a valid Operation Code."Quoted 6 lines
Andy
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel-----
Jun Kamada
[email protected]
Hi,
Quoted 16 lines · On Mon, 30 Mar 2009 10:49:57 +0100 Andrew Lyon <[email protected]> wrote:
Quoted 6 lines · Jun Kamada
Hi Andrew-san,
Which assignment mode, LUN mode or Host mode, do you use? If you used the LUN mode, only mandatory SCSI commands can work and almost all tape related commands will fail.
Quoted 7 lines
Could you try the Host mode? Please see "http://lists.xensource.com/archives/html/xen-devel/2009-02/msg00505.html" for usage of the Host mode.
Best regards,
Quoted 6 lines
I used a config setting like this: #vscsi=['/dev/st0, 0:0:0:0'] which I guess must be LUN mode, I removed the setting and used a "xm attach <dom> 8:0:5:0 host" which was successful and "xm scsi-list" shows the device is attached, but nothing was detected in windows, perhaps it needs to be there as soon as windows is booted, what is the syntax to specify host mode in the config file?
Syntax is as same as in case of "xm scsi-attach". Please replace "0:0:0:0" with keyword "host".
BTW, I suppose the problem you are facing is caused by inconsistency between backend driver and xend. (The xend support host mode but the driver does not support it, maybe.) I reccomend you to use xen unstable to avoid such a problem.
Best regards,
-----
Jun Kamada
[email protected]
Quoted 31 lines · Jun Kamada
Hi,
Quoted 16 lines · On Mon, 30 Mar 2009 10:49:57 +0100 Andrew Lyon <[email protected]> wrote:
Quoted 6 lines · Jun Kamada
Hi Andrew-san,
Which assignment mode, LUN mode or Host mode, do you use? If you used the LUN mode, only mandatory SCSI commands can work and almost all tape related commands will fail.
Quoted 7 lines
Could you try the Host mode? Please see "http://lists.xensource.com/archives/html/xen-devel/2009-02/msg00505.html" for usage of the Host mode.
Best regards,
Quoted 6 lines
I used a config setting like this: #vscsi=['/dev/st0, 0:0:0:0'] which I guess must be LUN mode, I removed the setting and used a "xm attach <dom> 8:0:5:0 host" which was successful and "xm scsi-list" shows the device is attached, but nothing was detected in windows, perhaps it needs to be there as soon as windows is booted, what is the syntax to specify host mode in the config file?
Syntax is as same as in case of "xm scsi-attach". Please replace "0:0:0:0" with keyword "host".
Quoted 6 lines
BTW, I suppose the problem you are facing is caused by inconsistency between backend driver and xend. (The xend support host mode but the driver does not support it, maybe.) I reccomend you to use xen unstable to avoid such a problem.
Best regards,
I am running unstable, up to date as of 9am GMT today.
Andy
Quoted 28 lines · Jun Kamada
Hi,
Quoted 16 lines · On Mon, 30 Mar 2009 10:49:57 +0100 Andrew Lyon <[email protected]> wrote:
Quoted 6 lines · Jun Kamada
Hi Andrew-san,
Which assignment mode, LUN mode or Host mode, do you use? If you used the LUN mode, only mandatory SCSI commands can work and almost all tape related commands will fail.
Quoted 7 lines
Could you try the Host mode? Please see "http://lists.xensource.com/archives/html/xen-devel/2009-02/msg00505.html" for usage of the Host mode.
Best regards,
Quoted 6 lines
I used a config setting like this: #vscsi=['/dev/st0, 0:0:0:0'] which I guess must be LUN mode, I removed the setting and used a "xm attach <dom> 8:0:5:0 host" which was successful and "xm scsi-list" shows the device is attached, but nothing was detected in windows, perhaps it needs to be there as soon as windows is booted, what is the syntax to specify host mode in the config file?
Quoted 2 lines
Syntax is as same as in case of "xm scsi-attach". Please replace "0:0:0:0" with keyword "host".
That does not work:
xm scsi-attach 1 /dev/st0 host = ok
But if I use the syntax you described: vscsi=['/dev/st0, host]
# xm create 2008_32_snap.cfg
Using config file "./2008_32_snap.cfg".
Error: Errors were found at line 32 while processing ./2008_32_snap.cfg:
vscsi=['/dev/st0, host]Or did I misunderstand the syntax?
Andy
Quoted 14 lines
BTW, I suppose the problem you are facing is caused by inconsistency between backend driver and xend. (The xend support host mode but the driver does not support it, maybe.) I reccomend you to use xen unstable to avoid such a problem.
Best regards,
-----
Jun Kamada
[email protected]
Quoted 5 lines
Quoted 2 lines
Syntax is as same as in case of "xm scsi-attach". Please replace "0:0:0:0" with keyword "host".
That does not work:
Quoted 7 lines
xm scsi-attach 1
/dev/st0host = okBut if I use the syntax you described: vscsi=['/dev/st0, host]
# xm create 2008_32_snap.cfg Using config file "./2008_32_snap.cfg". Error: Errors were found at line 32 while processing
./2008_32_snap.cfg:
Quoted 4 lines
vscsi=['/dev/st0, host]Or did I misunderstand the syntax?
Missing single quote on the end?
James
Quoted 13 lines · James Harper
Quoted 5 lines
Quoted 2 lines
Syntax is as same as in case of "xm scsi-attach". Please replace "0:0:0:0" with keyword "host".
That does not work:
Quoted 7 lines
xm scsi-attach 1
/dev/st0host = okBut if I use the syntax you described: vscsi=['/dev/st0, host]
# xm create 2008_32_snap.cfg Using config file "./2008_32_snap.cfg". Error: Errors were found at line 32 while processing./2008_32_snap.cfg:
Quoted 9 lines
Quoted 4 lines
vscsi=['/dev/st0, host]
Or did I misunderstand the syntax?
Missing single quote on the end?
James
Yes but adding a closing quote didnt work either:
vscsi=['/dev/st0, host']
Using config file "./xptest.cfg".
Error: vscsi syntax error " host"
Andy
Quoted 6 lines
vscsi=['/dev/st0, host']
Using config file "./xptest.cfg".
Error: vscsi syntax error " host"
FWIW, same here.
James
Hi,
Please remove space character before keyword "host" like below.
vscsi=['/dev/st0,host']
Best regards,
Quoted 10 lines · On Wed, 1 Apr 2009 19:46:06 +1100 "James Harper"…
Quoted 6 lines
vscsi=['/dev/st0, host']
Using config file "./xptest.cfg".
Error: vscsi syntax error " host"FWIW, same here.
James
-----
Jun Kamada
[email protected]
Quoted 8 lines · Jun Kamada
Hi,
Please remove space character before keyword "host" like below.
vscsi=['/dev/st0,host']
Best regards,
That works :), how do I specify multiple devices? i.e. two tape drives.
Andy
Quoted 22 lines
Quoted 10 lines · On Wed, 1 Apr 2009 19:46:06 +1100 "James Harper"…
Quoted 6 lines
vscsi=['/dev/st0, host']
Using config file "./xptest.cfg".
Error: vscsi syntax error " host"FWIW, same here.
James
-----
Jun Kamada
[email protected]
Hi Andy,
It's as follows.
vscsi=['/dev/st0,host', '/dev/st1,host']
Best regards,
Kan
Quoted 36 lines · Andrew Lyon
Quoted 8 lines · Jun Kamada
Hi,
Please remove space character before keyword "host" like below.
vscsi=['/dev/st0,host']
Best regards,
That works :), how do I specify multiple devices? i.e. two tape drives.
Andy
Quoted 22 lines
Quoted 10 lines · On Wed, 1 Apr 2009 19:46:06 +1100 "James Harper"…
Quoted 6 lines
vscsi=['/dev/st0, host']
Using config file "./xptest.cfg".
Error: vscsi syntax error " host"FWIW, same here.
James
-----
Jun Kamada
[email protected]
Quoted 16 lines · Andrew Lyon
Quoted 6 lines · Jun Kamada
Hi Andrew-san,
Which assignment mode, LUN mode or Host mode, do you use? If you used the LUN mode, only mandatory SCSI commands can work and almost all tape related commands will fail.
Quoted 7 lines
Could you try the Host mode? Please see "http://lists.xensource.com/archives/html/xen-devel/2009-02/msg00505.html" for usage of the Host mode.
Best regards,
Quoted 8 lines
I used a config setting like this: #vscsi=['/dev/st0, 0:0:0:0'] which I guess must be LUN mode, I removed the setting and used a "xm attach <dom> 8:0:5:0 host" which was successful and "xm scsi-list" shows the device is attached, but nothing was detected in windows, perhaps it needs to be there as soon as windows is booted, what is the syntax to specify host mode in the config file?
Andy
Host mode works!, I have tested both a pv linux domain and hvm windows with gplpv drivers loaded, provided I start the domain paused and attach the device before unpausing it and allowing it to boot up, then it seems to work perfectly.
:)
Andy