All of lore.kernel.org
 help / color / mirror / Atom feed
* fdisk hard drive image
@ 2005-02-11 11:48 Gonéri Le Bouder
  2005-02-11 12:51 ` Luciano Miguel Ferreira Rocha
  2005-02-11 17:04 ` Mark Williamson
  0 siblings, 2 replies; 8+ messages in thread
From: Gonéri Le Bouder @ 2005-02-11 11:48 UTC (permalink / raw)
  To: xen-devel

Hello list,


Currently, i use a partition image to run my XenU (/dev/hda2) and "fdisk 
-l" return nothing and can't open /dev/hda .

I want to use a full hard drive image (not partition image) from my Xen0 
as hda in my XenU. I want to be able to run fdisk on hda in my XenU to 
list and regenerate partitions.


I tried with this (/img is my hard drive image):

disk = ['/img,hda,w']

disk = ['phy:loop3,hda,w'], loop3 is /img attached to /dev/loop3 by 
losetup.

But, both don't work.

Is it possible ?
Can anyone help me ?
Thanks in advance.

Regard,

    Gonéri Le Bouder


-------------------------------------------------------
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] 8+ messages in thread

* Re: fdisk hard drive image
  2005-02-11 11:48 fdisk hard drive image Gonéri Le Bouder
@ 2005-02-11 12:51 ` Luciano Miguel Ferreira Rocha
  2005-02-11 14:06   ` Gonéri Le Bouder
  2005-02-11 17:04 ` Mark Williamson
  1 sibling, 1 reply; 8+ messages in thread
From: Luciano Miguel Ferreira Rocha @ 2005-02-11 12:51 UTC (permalink / raw)
  To: xen-devel

On Fri, Feb 11, 2005 at 12:48:28PM +0100, Gonéri Le Bouder wrote:
> Hello list,
> 
> 
> Currently, i use a partition image to run my XenU (/dev/hda2) and "fdisk 
> -l" return nothing and can't open /dev/hda .
> 
> I want to use a full hard drive image (not partition image) from my Xen0 
> as hda in my XenU. I want to be able to run fdisk on hda in my XenU to 
> list and regenerate partitions.
> 
> 
> I tried with this (/img is my hard drive image):
> 
> disk = ['/img,hda,w']
> 
> disk = ['phy:loop3,hda,w'], loop3 is /img attached to /dev/loop3 by 
> losetup.
> 
> But, both don't work.
> 
> Is it possible ?

THe block device isn't exported as an hard disk. Just as a block device
(like ram*, loop*).

If you want to use several filesystems over a single block device,
you'll have to use lvm.

Regards,
Luciano Rocha


-------------------------------------------------------
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] 8+ messages in thread

* Re: fdisk hard drive image
  2005-02-11 12:51 ` Luciano Miguel Ferreira Rocha
@ 2005-02-11 14:06   ` Gonéri Le Bouder
  2005-02-11 15:41     ` Luciano Miguel Ferreira Rocha
  0 siblings, 1 reply; 8+ messages in thread
From: Gonéri Le Bouder @ 2005-02-11 14:06 UTC (permalink / raw)
  To: Luciano Miguel Ferreira Rocha; +Cc: xen-devel

Luciano Miguel Ferreira Rocha wrote:

>On Fri, Feb 11, 2005 at 12:48:28PM +0100, Gonéri Le Bouder wrote:
>  
>
>>Hello list,
>>
>>
>>Currently, i use a partition image to run my XenU (/dev/hda2) and "fdisk 
>>-l" return nothing and can't open /dev/hda .
>>
>>I want to use a full hard drive image (not partition image) from my Xen0 
>>as hda in my XenU. I want to be able to run fdisk on hda in my XenU to 
>>list and regenerate partitions.
>>
>>
>>I tried with this (/img is my hard drive image):
>>
>>disk = ['/img,hda,w']
>>
>>disk = ['phy:loop3,hda,w'], loop3 is /img attached to /dev/loop3 by 
>>losetup.
>>
>>But, both don't work.
>>
>>Is it possible ?
>>    
>>
>
>THe block device isn't exported as an hard disk. Just as a block device
>(like ram*, loop*).
>
>If you want to use several filesystems over a single block device,
>you'll have to use lvm.
>

Thanks for the answer,


In this case, if i use lvm, i still have to create my partitions from 
Dom0. Is there a way to create partitions from XenU with fdisk.

    Gonéri


-------------------------------------------------------
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] 8+ messages in thread

* Re: fdisk hard drive image
  2005-02-11 14:06   ` Gonéri Le Bouder
@ 2005-02-11 15:41     ` Luciano Miguel Ferreira Rocha
  0 siblings, 0 replies; 8+ messages in thread
From: Luciano Miguel Ferreira Rocha @ 2005-02-11 15:41 UTC (permalink / raw)
  To: xen-devel

On Fri, Feb 11, 2005 at 03:06:36PM +0100, Gonéri Le Bouder wrote:
> Luciano Miguel Ferreira Rocha wrote:
> 
> >On Fri, Feb 11, 2005 at 12:48:28PM +0100, Gonéri Le Bouder wrote:
> > 
> >
> >>Hello list,
> >>
> >>
> >>Currently, i use a partition image to run my XenU (/dev/hda2) and "fdisk 
> >>-l" return nothing and can't open /dev/hda .
> >>
> >>I want to use a full hard drive image (not partition image) from my Xen0 
> >>as hda in my XenU. I want to be able to run fdisk on hda in my XenU to 
> >>list and regenerate partitions.
> >>
> >>
> >>I tried with this (/img is my hard drive image):
> >>
> >>disk = ['/img,hda,w']
> >>
> >>disk = ['phy:loop3,hda,w'], loop3 is /img attached to /dev/loop3 by 
> >>losetup.
> >>
> >>But, both don't work.
> >>
> >>Is it possible ?
> >>   
> >>
> >
> >THe block device isn't exported as an hard disk. Just as a block device
> >(like ram*, loop*).
> >
> >If you want to use several filesystems over a single block device,
> >you'll have to use lvm.
> >
> 
> Thanks for the answer,
> 
> 
> In this case, if i use lvm, i still have to create my partitions from 
> Dom0. Is there a way to create partitions from XenU with fdisk.

Not that I know of. (You may run it, but you may have to specify
cilinders and heads by hand.)

You can create a single partition on dom0, or use the whole disk for lvm
under xenU.

Regards,
Luciano Rocha


-------------------------------------------------------
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] 8+ messages in thread

* Re: fdisk hard drive image
  2005-02-11 11:48 fdisk hard drive image Gonéri Le Bouder
  2005-02-11 12:51 ` Luciano Miguel Ferreira Rocha
@ 2005-02-11 17:04 ` Mark Williamson
  2005-02-12 18:18   ` Gonéri Le Bouder
  1 sibling, 1 reply; 8+ messages in thread
From: Mark Williamson @ 2005-02-11 17:04 UTC (permalink / raw)
  To: xen-devel; +Cc: Gonéri Le Bouder

> Currently, i use a partition image to run my XenU (/dev/hda2) and "fdisk
> -l" return nothing and can't open /dev/hda .

So your config file looks like:
disk = ['file:/path/to/file,hda2,w']

Then in the guest you run:
# fdisk -l /dev/hda

And get "can't open /dev/hda"?

That's to be expected, since you're using a Xen "virtual" partition and there 
isn't a real hda behind it.

> I want to use a full hard drive image (not partition image) from my Xen0
> as hda in my XenU. I want to be able to run fdisk on hda in my XenU to
> list and regenerate partitions.

Should work as far as I know.

> I tried with this (/img is my hard drive image):
>
> disk = ['/img,hda,w']

This should be:
disk = ['file:/img,hda,w']

otherwise the tools don't know what kind of backing you want for the VBD.

> disk = ['phy:loop3,hda,w'], loop3 is /img attached to /dev/loop3 by
> losetup.

That should just work if the setup of /dev/loop3 worked OK.  Can you 
mount /dev/loop3 in dom0 OK?

Can you please post what errors you're getting from these attempts?

Cheers,
Mark

> Is it possible ?
> Can anyone help me ?
> Thanks in advance.
>
> Regard,
>
>     Gonéri Le Bouder
>
>
> -------------------------------------------------------
> 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
> _______________________________________________
> 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_ide95&alloc_id\x14396&op=click

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

* Re: fdisk hard drive image
  2005-02-12 18:18   ` Gonéri Le Bouder
@ 2005-02-12 17:32     ` Mark Williamson
  2005-02-14 11:06       ` Gonéri Le Bouder
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Williamson @ 2005-02-12 17:32 UTC (permalink / raw)
  To: Gonéri Le Bouder; +Cc: xen-devel, Mark.Williamson

> It's what i did. Sorry, i did a typo in my first post.

OK, cool.

> > Can you please post what errors you're getting from these attempts?
>
> In both case i get the same result,
> no error. But, i can't open /dev/hda with fdisk.

Hrrrm, that's rather strange.  Can you try exporting as sda instead of hda?

We did have problems with whole disk VBDs a while back but I thought it'd been 
sorted...  Does anyone else remember better?

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] 8+ messages in thread

* Re: fdisk hard drive image
  2005-02-11 17:04 ` Mark Williamson
@ 2005-02-12 18:18   ` Gonéri Le Bouder
  2005-02-12 17:32     ` Mark Williamson
  0 siblings, 1 reply; 8+ messages in thread
From: Gonéri Le Bouder @ 2005-02-12 18:18 UTC (permalink / raw)
  To: xen-devel; +Cc: maw48

>>I tried with this (/img is my hard drive image):
>>
>>disk = ['/img,hda,w']
> 
> 
> This should be:
> disk = ['file:/img,hda,w']
It's what i did. Sorry, i did a typo in my first post.

> otherwise the tools don't know what kind of backing you want for the VBD.
> 
> 
>>disk = ['phy:loop3,hda,w'], loop3 is /img attached to /dev/loop3 by
>>losetup.
> 
> 
> That should just work if the setup of /dev/loop3 worked OK.  Can you 
> mount /dev/loop3 in dom0 OK?
> 
> Can you please post what errors you're getting from these attempts?


In both case i get the same result,
no error. But, i can't open /dev/hda with fdisk.
I've juste one partition in /proc/partitions called /dev/hda0.

Regards,

	Gonéri



-------------------------------------------------------
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] 8+ messages in thread

* Re: Re: fdisk hard drive image
  2005-02-12 17:32     ` Mark Williamson
@ 2005-02-14 11:06       ` Gonéri Le Bouder
  0 siblings, 0 replies; 8+ messages in thread
From: Gonéri Le Bouder @ 2005-02-14 11:06 UTC (permalink / raw)
  To: xen-devel; +Cc: Mark Williamson


>
>  
>
>>>Can you please post what errors you're getting from these attempts?
>>>      
>>>
>>In both case i get the same result,
>>no error. But, i can't open /dev/hda with fdisk.
>>    
>>
>
>Hrrrm, that's rather strange.  Can you try exporting as sda instead of hda?
>  
>
disk = ['file:/home/xendisk,sda,w']



linuxrc# sfdisk -l
linuxrc# cat /proc/partitions
major minor  #blocks  name

   8     0    2097153 sda0


I get the same result. fdisk return nothing and i've just one partitions 
called /dev/sda0.

Regards,

    Gonéri


-------------------------------------------------------
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] 8+ messages in thread

end of thread, other threads:[~2005-02-14 11:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-11 11:48 fdisk hard drive image Gonéri Le Bouder
2005-02-11 12:51 ` Luciano Miguel Ferreira Rocha
2005-02-11 14:06   ` Gonéri Le Bouder
2005-02-11 15:41     ` Luciano Miguel Ferreira Rocha
2005-02-11 17:04 ` Mark Williamson
2005-02-12 18:18   ` Gonéri Le Bouder
2005-02-12 17:32     ` Mark Williamson
2005-02-14 11:06       ` Gonéri Le Bouder

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.