All of lore.kernel.org
 help / color / mirror / Atom feed
* dynamically allocating loopback devices?
@ 2005-03-11 21:28 Kip Macy
  0 siblings, 0 replies; 9+ messages in thread
From: Kip Macy @ 2005-03-11 21:28 UTC (permalink / raw)
  To: xen-devel

My users' VM disks are all loopback files. Right now they have to run
losetup on each of their files before starting their VMs. This means
we have to statically allocate loopback devices. And if they want to
change the disks used they have to remember to run "losetup -d". Is
there any way, without my writing extra glue logic, for a user to say
in his config file "these are my loopback files, I don't care what
loopback devices they get bound to, just bind them for me and then
start my VM"?

Thanks.

                             -Kip


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: dynamically allocating loopback devices?
@ 2005-03-11 21:55 Ian Pratt
  2005-03-11 22:05 ` Kip Macy
  0 siblings, 1 reply; 9+ messages in thread
From: Ian Pratt @ 2005-03-11 21:55 UTC (permalink / raw)
  To: Kip Macy, xen-devel; +Cc: ian.pratt

 
> My users' VM disks are all loopback files. Right now they have to run
> losetup on each of their files before starting their VMs. This means
> we have to statically allocate loopback devices. And if they want to
> change the disks used they have to remember to run "losetup -d". Is
> there any way, without my writing extra glue logic, for a user to say
> in his config file "these are my loopback files, I don't care what
> loopback devices they get bound to, just bind them for me and then
> start my VM"?

Check out the 'file:' syntax for specifying vbd's.

Ian


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: dynamically allocating loopback devices?
  2005-03-11 21:55 Ian Pratt
@ 2005-03-11 22:05 ` Kip Macy
  0 siblings, 0 replies; 9+ messages in thread
From: Kip Macy @ 2005-03-11 22:05 UTC (permalink / raw)
  To: Ian Pratt; +Cc: xen-devel, ian.pratt

That allows me to bypass the losetup, but what about device
allocation? - the examples I see all look like
disk = [ 'file:/u/kmacy/mdroot-5.3,loop7,w' ]

What I'd really like is to be able to drop the second parameter, or 
do something like

disk = [ 'file:/u/kmacy/mdroot-5.3,*,w' ]

-Kip

On Fri, 11 Mar 2005 21:55:39 -0000, Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk> wrote:
> 
> > My users' VM disks are all loopback files. Right now they have to run
> > losetup on each of their files before starting their VMs. This means
> > we have to statically allocate loopback devices. And if they want to
> > change the disks used they have to remember to run "losetup -d". Is
> > there any way, without my writing extra glue logic, for a user to say
> > in his config file "these are my loopback files, I don't care what
> > loopback devices they get bound to, just bind them for me and then
> > start my VM"?
> 
> Check out the 'file:' syntax for specifying vbd's.
> 
> Ian
>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: dynamically allocating loopback devices?
@ 2005-03-11 22:09 Ian Pratt
  2005-03-11 22:18 ` Kip Macy
  0 siblings, 1 reply; 9+ messages in thread
From: Ian Pratt @ 2005-03-11 22:09 UTC (permalink / raw)
  To: Kip Macy; +Cc: xen-devel, ian.pratt

 > That allows me to bypass the losetup, but what about device
> allocation? - the examples I see all look like
> disk = [ 'file:/u/kmacy/mdroot-5.3,loop7,w' ]

file: does do the loop device allocation. The second parameter is the
device you want the vbd to appear in the guest as, i.e. usually sda1 or
hda1.

Ian


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: dynamically allocating loopback devices?
  2005-03-11 22:09 dynamically allocating loopback devices? Ian Pratt
@ 2005-03-11 22:18 ` Kip Macy
  2005-03-12  1:04   ` Mark Williamson
  0 siblings, 1 reply; 9+ messages in thread
From: Kip Macy @ 2005-03-11 22:18 UTC (permalink / raw)
  To: Ian Pratt; +Cc: xen-devel, ian.pratt

I was confused by the fact that xm insists on it being present in DOM0.

disk = [ 'file:/u/kmacy/mdroot-5.3,xbd0,w' ]

kmacy@shemp sh -x ~/xentmp/xenargs.shemp
+ xm create -f /u/kmacy/xentmp/freebsd.shemp -c
name=xen-vm2.lab.netapp.com vmid=10 kernel=/u/kmacy/kernel
Using config file "/u/kmacy/xentmp/freebsd.shemp".
Error: Error creating domain: vbd: Device not found: xbd0

Thanks.

          -Kip

On Fri, 11 Mar 2005 22:09:04 -0000, Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk> wrote:
> > That allows me to bypass the losetup, but what about device
> > allocation? - the examples I see all look like
> > disk = [ 'file:/u/kmacy/mdroot-5.3,loop7,w' ]
> 
> file: does do the loop device allocation. The second parameter is the
> device you want the vbd to appear in the guest as, i.e. usually sda1 or
> hda1.
> 
> Ian
>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: dynamically allocating loopback devices?
  2005-03-11 22:18 ` Kip Macy
@ 2005-03-12  1:04   ` Mark Williamson
  2005-03-12  1:25     ` Kip Macy
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Williamson @ 2005-03-12  1:04 UTC (permalink / raw)
  To: xen-devel, Kip Macy; +Cc: Ian Pratt, ian.pratt

> I was confused by the fact that xm insists on it being present in DOM0.
>
> disk = [ 'file:/u/kmacy/mdroot-5.3,xbd0,w' ]
>
> kmacy@shemp sh -x ~/xentmp/xenargs.shemp
> + xm create -f /u/kmacy/xentmp/freebsd.shemp -c
> name=xen-vm2.lab.netapp.com vmid=10 kernel=/u/kmacy/kernel
> Using config file "/u/kmacy/xentmp/freebsd.shemp".
> Error: Error creating domain: vbd: Device not found: xbd0

That's because it used to stat the device node in dom0 so that it would know 
what major / minor to tell the domain to use.  Xend has since been patched to 
not require this, I'm not sure what trees it was checked into, though

Cheers,
Mark

> Thanks.
>
>           -Kip
>
> On Fri, 11 Mar 2005 22:09:04 -0000, Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk> 
wrote:
> > > That allows me to bypass the losetup, but what about device
> > > allocation? - the examples I see all look like
> > > disk = [ 'file:/u/kmacy/mdroot-5.3,loop7,w' ]
> >
> > file: does do the loop device allocation. The second parameter is the
> > device you want the vbd to appear in the guest as, i.e. usually sda1 or
> > hda1.
> >
> > Ian
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xen-devel


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: dynamically allocating loopback devices?
  2005-03-12  1:25     ` Kip Macy
@ 2005-03-12  1:25       ` Mark Williamson
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Williamson @ 2005-03-12  1:25 UTC (permalink / raw)
  To: Kip Macy; +Cc: Mark Williamson, xen-devel, Ian Pratt, ian.pratt

> Ahh - makes sense. It is, however, a rather linux-centric approach.

Yep!  How do you get Xend to tell FreeBSD what disks to expect?

I imagine this'll get fixed in the new tools.  It would be rather 
straightforward to extend the code in Xend to support other numbering 
schemes, so maybe it'll get fixed sooner than that.

Cheers,
Mark


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: dynamically allocating loopback devices?
  2005-03-12  1:04   ` Mark Williamson
@ 2005-03-12  1:25     ` Kip Macy
  2005-03-12  1:25       ` Mark Williamson
  0 siblings, 1 reply; 9+ messages in thread
From: Kip Macy @ 2005-03-12  1:25 UTC (permalink / raw)
  To: Mark Williamson; +Cc: xen-devel, Ian Pratt, ian.pratt

> That's because it used to stat the device node in dom0 so that it would know
> what major / minor to tell the domain to use.  Xend has since been patched to
> not require this, I'm not sure what trees it was checked into, though
> 
> Cheers,
> Mark

Ahh - makes sense. It is, however, a rather linux-centric approach.

     -Kip


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: dynamically allocating loopback devices?
@ 2005-03-12 15:36 Ian Pratt
  0 siblings, 0 replies; 9+ messages in thread
From: Ian Pratt @ 2005-03-12 15:36 UTC (permalink / raw)
  To: Kip Macy, Mark Williamson; +Cc: xen-devel, ian.pratt

> > That's because it used to stat the device node in dom0 so 
> that it would know
> > what major / minor to tell the domain to use.  Xend has 
> since been patched to
> > not require this, I'm not sure what trees it was checked 
> into, though
> 
> Ahh - makes sense. It is, however, a rather linux-centric approach.

It sucks. The obvious thing to do would be to pass a string, that the
guest then looks up, but I seem to recall that doing this at boot time
was rather ugly on linux.

In the meantime, I'll take a patch that adds some well known *BSD
devices to the exception table in xend.

Ian


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-03-12 15:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-11 22:09 dynamically allocating loopback devices? Ian Pratt
2005-03-11 22:18 ` Kip Macy
2005-03-12  1:04   ` Mark Williamson
2005-03-12  1:25     ` Kip Macy
2005-03-12  1:25       ` Mark Williamson
  -- strict thread matches above, loose matches on Subject: below --
2005-03-12 15:36 Ian Pratt
2005-03-11 21:55 Ian Pratt
2005-03-11 22:05 ` Kip Macy
2005-03-11 21:28 Kip Macy

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.