[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v8 5/5] Scripts to create and delete xen-scsiback nodes in Linux target framework
On 12/02/16 19:36, Olaf Hering wrote: > On Fri, Feb 12, Wei Liu wrote: > >> On Thu, Feb 11, 2016 at 03:43:31PM +0000, Olaf Hering wrote: >>> Just to make them public, not meant for merging: >> >> I might be mistaken, but if you don't provide a hotplug script or some >> sort for Xen how do you expect user to make use vscsi? > > The xenlinux backend uses existing SCSI devices. The pvops backend uses > devices provided by xen-scsiback which in turn is a frontend in the SCSI > target framework. This has to be configured manually before usage. I > have to document all this in the wiki. > > JÃrgen suggested to check if libxl could do the configuration in > configfs, as a replacement for targetcli. Not sure if thats doable. It > would require yet another syntax in vscsi=[]. I will look at this later. Hmm, I don't see why this would require another syntax. When adding e.g. /dev/sr0 to a domain via targetcli I need to call: targetcli /xen-pvscsi create naa.3ccc1c11088e4086 targetcli /backstores/pscsi create "dev=/dev/sr0" ps_0 targetcli /xen-pvscsi/naa.3ccc1c11088e4086/tpg1/luns create "/backstores/pscsi/ps_0" 0 targetcli /xen-pvscsi/naa.3ccc1c11088e4086/tpg1 set parameter alias=2:0:0 The WWN (naa.3ccc1c11088e4086) is just generated via /dev/random. The alias for xen-pvscsi (2:0:0) is taken from lsscsi by omitting the LUN: # lsscsi [0:0:0:0] disk ATA WDC WD5000AAKX-7 1H19 /dev/sda [2:0:0:0] cd/dvd HL-DT-ST DVD+-RW GHB0N A100 /dev/sr0 The pscsi backstore name (ps_0) is just a name which can be chosen. The need to use this kind of configuration is a feature of the current system which can be easily detected by trying to create the xen-pvscsi directory in configfs: if it succeeds you need to do it. So all information for deciding to do the configfs related configuration and all the data needed for doing it are already present. As this is specific to Linux I'd add a system specific function which will be a nop for non-Linux systems and could do the check and possibly the configfs work on Linux. Juergen _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |