From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: vscsi and /dev/tape/by-path Date: Tue, 11 Jan 2011 12:37:24 -0500 Message-ID: <20110111173724.GC14017@dumpdata.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: James Harper Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Tue, Jan 11, 2011 at 01:41:29PM +1100, James Harper wrote: > I use vscsi fairly extensively (under Windows mainly for testing > baremetal restores from tape), and have a problem that's been bugging me > for ages. If I use "/dev/st4" it works fine, but obviously that's > hopeless unreliable as it relies on device enumeration order at boot. I > want to use something like " > /dev/tape/by-path/pci-0000:01:08.0-scsi-0:0:3:0-st" so that I am > guaranteed of getting the right drive, but vscsi doesn't appear to > support it. > > Digging into it, I see function vscsi_get_hctl_and_devname_by that > attempts to figure out the sg device that corresponds to whatever I > specified in the config file. If I could modify that function to simply > follow the symlinks until I get to a real device that would probably be > sufficient, but is that the right way to do it? Yup. Thought I would think that using the /dev/by-uuid/ would be a better way of doing it in case you want to passthrough a SCSI disk for example? Thought what if you want to pass in a SCSI scanner? Would that work?