WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Using diskOnKey as additional disk - is it possible with

To: "Mark Williamson" <mark.williamson@xxxxxxxxxxxx>
Subject: Re: [Xen-users] Using diskOnKey as additional disk - is it possible with default configuration?
From: "Ian Brown" <ianbrn@xxxxxxxxx>
Date: Wed, 4 Apr 2007 15:24:02 +0300
Cc: "Petersson, Mats" <Mats.Petersson@xxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 04 Apr 2007 05:23:00 -0700
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=D0MDroRhynOH3jqdFBNGE36NzcdX/DidZVyRNyqhn9aF7vhHJVvofevQPFbKqPBjVAa574gNZIsAs6EiwwiUVS9Cecp+r1fSdRw276OnMvkHO9kq0Q1DMee/f3dCtlIp0eJKQ/FSQvHmhowaUxQyYzqN7Tuf8s0VA1cpD75YWpg=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=tWdJ8QowEjY3cAM+ZTH8TMd76cuLDp434wJd6lsitLcHgZ1NY5b3KM3rEcF26UoOU557UdYnyJ0jUE4Ku/hmfurDSincELEBc/MqqgbJFUhALyX7RJgg36Q9THcMvZaojrOESyCsfU3bGijdqVoRf29KhQIlX8XQeGrDMPxPCQ4=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200704021654.54213.mark.williamson@xxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <907625E08839C4409CE5768403633E0B018E1B72@xxxxxxxxxxxxxxxxx> <200704021654.54213.mark.williamson@xxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Mark,
 Sorry but your suggestion **DOES NOT** change the results.

However, I tried the other suggestion, by Luke S. Crawford; it **DOES** work !
namely , after setting:
disk = [ 'tap:aio:/var/lib/xen/images/guest10/guest10File,xvda,w',
      'phy:/dev/sdb,xvdb,w' ]
and booting domU I fet with fdisk -l:

fdisk -l

Disk /dev/xvda: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/xvda1   *           1          13      104391   83  Linux
/dev/xvda2              14         446     3478072+  83  Linux
/dev/xvda3             447         515      554242+  82  Linux swap / Solaris
/dev/xvda4             516         522       56227+   5  Extended
/dev/xvda5             516         522       56196   8e  Linux LVM

Disk /dev/xvdb: 65 MB, 65470464 bytes
255 heads, 63 sectors/track, 7 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/xvdb doesn't contain a valid partition table


Regards,
Ian

On 4/2/07, Mark Williamson <mark.williamson@xxxxxxxxxxxx> wrote:
>
> Hmm. So you're trying to see a disk as a partition?
>
> 'phy:/dev/sdb,sda6,w'
>
> (sdb -> sda6: sdb is a disk, sda6 is "partition six of device sda").
>

This also stuck out to me - it seems like a slightly strange thing to do, but
I can't actually see why it wouldn't work.

However if you're actually hoping to get any data off this you may have less
luck, since the guest definitely won't expect to find a partition table (the
USB disk's partition table) inside a partition (the sda6 you are exporting
as).  What are you trying to achieve?  Why not export the whole USB stick,
eg.

'phy:sdb,sda,w'

Cheers,
Mark

> I'm not saying this is what's wrong, but as far as I know, the Xen-guest
> will not have any clue what type of device it is (hence we can use a
> file as a guest-image). So it shouldn't matter if it's a USB-stick,
> SCSI-disk or whatever else you can imagine as a "hard-disk". It's most
> likely some details, rather than the overall concept, that is causing it
> to not work. But there's a whole lot of different permutations, so it
> may take a while to figure it out.
>
> --
> Mats
>
> > Regards,
> > Ian
> >
> > On 4/2/07, Petersson, Mats <Mats.Petersson@xxxxxxx> wrote:
> > > > -----Original Message-----
> > > > From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
> > > > [mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf
> >
> > Of Ian Brown
> >
> > > > Sent: 02 April 2007 10:57
> > > > To: xen-users@xxxxxxxxxxxxxxxxxxx
> > > > Subject: [Xen-users] Using diskOnKey as additional disk - is
> > > > it possible with default configuration?
> > > >
> > > > Hello,
> > > >  I try the following:
> > > > I have in the configDomU file the following:
> > > >
> > > > disk = [ 'tap:aio:/var/lib/xen/images/guest10/guest10File]
> > > >
> > > > which works OK; I can start domU by "xm create -c configDomU.
> > > >
> > > >
> > > > Now, my question is: can I add an additional USB DiskOnKey as a
> > > > physical device ?
> > > > What I tried is:
> > > > First I added mknod /dev/sda6 b 8 6 in domU.
> > > > Then I added to the configDomU file:
> > > > disk = [ 'tap:aio:/var/lib/xen/images/guest10/guest10File,xvda,w'
> > > > ,'phy:/dev/sdb,sda6,w' ]
> > > >
> > > > /dev/sdb is the device of teh USB DiskOnKey and **it is
> >
> > unmounted**.
> >
> > > > and start domU.
> > > > "fdisk -l" does not show any new device. (I expected to see
> > > > /dev/sda6).
> > > >   (Of course that the /dev/xvda for guest10File exists)
> > > >
> > > > When I try to do the following:
> > > >
> > > >       disk = [
> > > > 'tap:aio:/var/lib/xen/images/guest10/guest10File,xvda,w'
> > > > ,'phy:/dev/sda7,sda6,w' ]
> > > >
> > > > where /dev/sda7 is an unmounted partition in dom0, than after
> > > > starting domU I am **able** to see with
> > > >
> > > > "fdisk -l " the /dev/sda6 device.
> > > >
> > > > Is it something to do with that it can't add additional disk
> > > > if it is a USB ?
> > > >
> > > > Regards,
> > > > Ian
> > >
> > > I'm by no means an expert on this, but is it by any chance that you
> > > shouldn't use "sda" but rather "hda" for the export name?
> >
> > Bear in mind
> >
> > > that the guest doesn't actually know (or cares) what
> >
> > PHYSICAL device it
> >
> > > is talking to, but it has to hook onto it in some way, and I seem to
> > > remember something similar before. Worth a try, I should think.
> > >
> > > --
> > > Mats
>
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users

--
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users