All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [uml-devel] Partitioning scheme for ubd's
@ 2003-11-04 18:21 BlaisorBlade
  2003-11-04 19:52 ` Matt Zimmerman
  0 siblings, 1 reply; 7+ messages in thread
From: BlaisorBlade @ 2003-11-04 18:21 UTC (permalink / raw)
  To: user-mode-linux-devel

This should have gone to the list, but I sent it to Matt only. Sorry for this.

Alle 23:46, sabato 1 novembre 2003, Matt Zimmerman ha scritto:
> On Sat, Nov 01, 2003 at 11:59:11AM +0100, BlaisorBlade wrote:
> > But there is a problem here:
> > 1) device names are not consistent: if you want to use ubd[a-z], decide
> > so and start the change(for 2.6 there's a lot more changes anyway, so it
> > is a good occasion...)
>
> Are you talking about /proc/partitions or something else?

No, about the command line and the device file names.

> > 2) if I do an install, I can partition the ubd's; but then, I won't be
> > able to loop mount the file on the host(and if I'm in trouble, this
> > ability is worth a lot). In fact, I've never partitioned the ubd's, but
> > this meant a lot of trouble even to run Slackware install.
>
> Of course you can; use losetup -o (or mount -o loop,offset=).  But I don't
> see what this has to do with partition support for ubd.  You can use
> partitions or not, depending on what you prefer, just as with a real block
> device.

This was meant as intro for the 3). But there is losetup -o, so it's useless.
Sorry for not knowing it. Maybe it could be added inside UML docs.

> > 3) so, I thought this: since partitioning schemes are pluggable, it would
> > be possible to fool it and turn the ubd's into partitions of a single
> > disk. I.e. if I setup udb0, ubd1 and so on, they would be seen as three
> > partitions of a single disk. But they are still different files,
> > loop-mountable on host.
> >
> > Would you ever accept this?
>
> I can't think of any instance where I'd want this mixed solution, instead
> of the existing options with partitions and multiple ubd devices.

Ok. You're just right.

> > The other possible solution(which would be
> > cleaner) would be to teach, if possible, to the host kernel Device
> > Manager to read a file as a bunch of partition with its table(I've heard
> > of DM about COW files these days), and then to mount the partitions, but
> > I don't know if it's possible.

Would instead this one(or another way to do this) be interesting? So that the
kernel could guess by itself the offsets of partitions, rather than requiring
the user do more passages(i.e. use fdisk to read partition table) to handle
this.
Bye and sorry for my big mistake.
--
cat <<EOSIGN
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.21/2.6.0-test on an i686; Linux registered user n. 292729
EOSIGN


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* Re: [uml-devel] Partitioning scheme for ubd's
  2003-11-04 18:21 [uml-devel] Partitioning scheme for ubd's BlaisorBlade
@ 2003-11-04 19:52 ` Matt Zimmerman
  2003-11-04 20:38   ` BlaisorBlade
  0 siblings, 1 reply; 7+ messages in thread
From: Matt Zimmerman @ 2003-11-04 19:52 UTC (permalink / raw)
  To: user-mode-linux-devel

On Tue, Nov 04, 2003 at 07:21:09PM +0100, BlaisorBlade wrote:

> Alle 23:46, sabato 1 novembre 2003, Matt Zimmerman ha scritto:
> > On Sat, Nov 01, 2003 at 11:59:11AM +0100, BlaisorBlade wrote:
> > > But there is a problem here:
> > > 1) device names are not consistent: if you want to use ubd[a-z], decide
> > > so and start the change(for 2.6 there's a lot more changes anyway, so it
> > > is a good occasion...)
> >
> > Are you talking about /proc/partitions or something else?
> 
> No, about the command line and the device file names.

The command line, I think, accepts both for backward compatibility.  The
device file names, of course, are a userland concern.  Current versions of
makedev, at least in Debian, use the new scheme.

> > > The other possible solution(which would be
> > > cleaner) would be to teach, if possible, to the host kernel Device
> > > Manager to read a file as a bunch of partition with its table(I've heard
> > > of DM about COW files these days), and then to mount the partitions, but
> > > I don't know if it's possible.
> 
> Would instead this one(or another way to do this) be interesting? So that the
> kernel could guess by itself the offsets of partitions, rather than requiring
> the user do more passages(i.e. use fdisk to read partition table) to handle
> this.

I suppose the solution to this would be partition support on loop devices.
Is this any easier in 2.6?

-- 
 - mdz


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* Re: [uml-devel] Partitioning scheme for ubd's
  2003-11-04 19:52 ` Matt Zimmerman
@ 2003-11-04 20:38   ` BlaisorBlade
  0 siblings, 0 replies; 7+ messages in thread
From: BlaisorBlade @ 2003-11-04 20:38 UTC (permalink / raw)
  To: user-mode-linux-devel

Alle 20:52, martedì 4 novembre 2003, Matt Zimmerman ha scritto:

> The command line, I think, accepts both for backward compatibility.
Backward compatibility is ok. If CLI accepts both, we are ok. Only docs don't 
seem up-to-date.
> The
> device file names, of course, are a userland concern.  Current versions of
> makedev, at least in Debian, use the new scheme.
>
> > > > The other possible solution(which would be
> > > > cleaner) would be to teach, if possible, to the host kernel Device
> > > > Manager to read a file as a bunch of partition with its table(I've
> > > > heard of DM about COW files these days), and then to mount the
> > > > partitions, but I don't know if it's possible.
> >
> > Would instead this one(or another way to do this) be interesting? So that
> > the kernel could guess by itself the offsets of partitions, rather than
> > requiring the user do more passages(i.e. use fdisk to read partition
> > table) to handle this.
>
> I suppose the solution to this would be partition support on loop devices.
> Is this any easier in 2.6?
I've not yet looked at the code, but anyway 2.6 is just cooler, and with 
better Makefiles... so if I **ever** do this, I'll do it in 2.6.

About 2.6, are you still interested in the mconsole_exec patch? I could port 
it to 2.6, and in that case, probably I could even add the managing of 
stdin/out/err to a console/serial line. in 2.4 exec_usermodehelper closes all 
open files(I didn't want to duplicate it, the patch was not meant as a toy), 
in 2.6 it's probably simpler.
-- 
cat <<EOSIGN
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.21/2.6.0-test on an i686; Linux registered user n. 292729
EOSIGN



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* Re: [uml-devel] Partitioning scheme for ubd's
  2003-11-01 10:59 BlaisorBlade
  2003-11-01 22:46 ` Matt Zimmerman
@ 2003-11-03 11:23 ` Henrik Nordstrom
  1 sibling, 0 replies; 7+ messages in thread
From: Henrik Nordstrom @ 2003-11-03 11:23 UTC (permalink / raw)
  To: BlaisorBlade; +Cc: user-mode-linux-devel

On Sat, 1 Nov 2003, BlaisorBlade wrote:

> 2) if I do an install, I can partition the ubd's; but then, I won't be able to 
> loop mount the file on the host

There is no problem to mount partitions of a larger device file on the
host. All you need to do is to note the start sector of the partition (and
size if you should want to newfs the partition). The easies way to read
the partition table from the host is to use sfdisk
   sfdisk -d /path/to/backingfile.img
then multiply the sector by 512 to get the starting offset of the 
partition for the loopback mount.

Regards
Henrik



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* Re: [uml-devel] Partitioning scheme for ubd's
  2003-11-02 19:15 James W McMechan
@ 2003-11-03  2:41 ` Jeff Dike
  0 siblings, 0 replies; 7+ messages in thread
From: Jeff Dike @ 2003-11-03  2:41 UTC (permalink / raw)
  To: James W McMechan; +Cc: blaisorblade_spam, user-mode-linux-devel

mcmechanjw@juno.com said:
> 1) well the device names are at least internally consistent. and there
> are some devices like blah0p1 already. also the proposed scheme for
> dealing with devices above 26 is currently a mess, hdaa hdaaa, since
> with the last patch set I was using I had 400 disks mounted...
> mounting /dev/ubdpa1 ick... we only need one disk controller for a
> effectively unlimited of disk drives which could be called c0dXpY if
> desired...

I think everything understands ubd[a-h][0-9], and that's the way normal people
should refer to them.  I just haven't updated the docs to reflect that.

Having said that, I like the current naming for huge numbers of disks.

				Jeff



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* Re: [uml-devel] Partitioning scheme for ubd's
  2003-11-01 10:59 BlaisorBlade
@ 2003-11-01 22:46 ` Matt Zimmerman
  2003-11-03 11:23 ` Henrik Nordstrom
  1 sibling, 0 replies; 7+ messages in thread
From: Matt Zimmerman @ 2003-11-01 22:46 UTC (permalink / raw)
  To: user-mode-linux-devel

On Sat, Nov 01, 2003 at 11:59:11AM +0100, BlaisorBlade wrote:

> But there is a problem here:
> 1) device names are not consistent: if you want to use ubd[a-z], decide so
> and start the change(for 2.6 there's a lot more changes anyway, so it is a
> good occasion...)

Are you talking about /proc/partitions or something else?

> 2) if I do an install, I can partition the ubd's; but then, I won't be
> able to loop mount the file on the host(and if I'm in trouble, this
> ability is worth a lot). In fact, I've never partitioned the ubd's, but
> this meant a lot of trouble even to run Slackware install.

Of course you can; use losetup -o (or mount -o loop,offset=).  But I don't
see what this has to do with partition support for ubd.  You can use
partitions or not, depending on what you prefer, just as with a real block
device.

> 3) so, I thought this: since partitioning schemes are pluggable, it would be 
> possible to fool it and turn the ubd's into partitions of a single disk. I.e. 
> if I setup udb0, ubd1 and so on, they would be seen as three partitions of a 
> single disk. But they are still different files, loop-mountable on host.
> 
> Would you ever accept this? The other possible solution(which would be 
> cleaner) would be to teach, if possible, to the host kernel Device Manager to 
> read a file as a bunch of partition with its table(I've heard of DM about COW 
> files these days), and then to mount the partitions, but I don't know if it's 
> possible.

I can't think of any instance where I'd want this mixed solution, instead of
the existing options with partitions and multiple ubd devices.

-- 
 - mdz


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

* [uml-devel] Partitioning scheme for ubd's
@ 2003-11-01 10:59 BlaisorBlade
  2003-11-01 22:46 ` Matt Zimmerman
  2003-11-03 11:23 ` Henrik Nordstrom
  0 siblings, 2 replies; 7+ messages in thread
From: BlaisorBlade @ 2003-11-01 10:59 UTC (permalink / raw)
  To: user-mode-linux-devel

Since some time, we can get nice messages as ubda: unknown partition table on 
boot if we use ubd's normally, and even install UML on partitions for 
installs.

But there is a problem here:
1) device names are not consistent: if you want to use ubd[a-z], decide so and 
start the change(for 2.6 there's a lot more changes anyway, so it is a good 
occasion...)

2) if I do an install, I can partition the ubd's; but then, I won't be able to 
loop mount the file on the host(and if I'm in trouble, this ability is worth 
a lot). In fact, I've never partitioned the ubd's, but this meant a lot of 
trouble even to run Slackware install.

3) so, I thought this: since partitioning schemes are pluggable, it would be 
possible to fool it and turn the ubd's into partitions of a single disk. I.e. 
if I setup udb0, ubd1 and so on, they would be seen as three partitions of a 
single disk. But they are still different files, loop-mountable on host.

Would you ever accept this? The other possible solution(which would be 
cleaner) would be to teach, if possible, to the host kernel Device Manager to 
read a file as a bunch of partition with its table(I've heard of DM about COW 
files these days), and then to mount the partitions, but I don't know if it's 
possible.

-- 
cat <<EOSIGN
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.21/2.6.0-test on an i686; Linux registered user n. 292729
EOSIGN



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

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

end of thread, other threads:[~2003-11-04 20:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-04 18:21 [uml-devel] Partitioning scheme for ubd's BlaisorBlade
2003-11-04 19:52 ` Matt Zimmerman
2003-11-04 20:38   ` BlaisorBlade
  -- strict thread matches above, loose matches on Subject: below --
2003-11-02 19:15 James W McMechan
2003-11-03  2:41 ` [uml-devel] " Jeff Dike
2003-11-01 10:59 BlaisorBlade
2003-11-01 22:46 ` Matt Zimmerman
2003-11-03 11:23 ` Henrik Nordstrom

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.