[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Revisiting partman-nbd



On Mon, Dec 29, 2008 at 11:23:49PM +0100, Frans Pop wrote:
> On Monday 29 December 2008, Jérémy Bobbio wrote:
> > > Unable to determine geometry of file/device /dev/nbd0. You should not
> > > use Parted unless you REALLY know what you're doing!
> >
> > This message comme straight from libparted.  From a quick look at
> > parted sources, it looks like it has no understanding of NBD right now.
> > As these devices seem special enough, I think it could be worthwhile to
> > add the necessary bits there instead of adding work arounds in partman.

It's really just the fact that the device has a size of zero. Once
they're connected, parted has no problems understanding what they are
like.

> I had the same thought when reading the message. It sounds to me that this 
> should be fixed in libparted, not worked around in partman.
> 
> The reason init.d/30parted already skips some classes of devices is rather 
> different from what you are seeing. Basically it is because we don't want 
> such devices to be visible at all, not because we need to do some dirty 
> manipulation to get them working.

Well, I don't want unconnected devices to be visible in the main menu,
either. Only once they have a connection to a remote server does it make
sense for them to show up. It's pretty stupid for an unconnected NBD
device to show up in a menu of partitionable devices, because it
isn't -- yet.

I'm not convinced that parted should consider unconnected NBD devices to
be nonexistent; I think this will cause confusion when the user tries to
run regular parted on an unconnected device ("what do you mean, no such
device? The device file is /right there/!"). I will take that up with
the parted maintainers, however.

In any case, my partman-nbd udeb will add a menu option to manage NBD
devices, allowing the user to connect and/or disconnect them. This menu
option can then call restart_partman (in fact, it already does),
allowing the devices to show up.

Given all of the above, I don't think skipping an unconnected device
really /is/ a workaround, as opposed to the correct way forward; but I'm
willing to be convinced otherwise :-)

One more thing: if the user chooses to install / to an NBD device, they
have to add some boot parameters; also, currently, there are some things
that are not supported (like having an NBD device be part of an LVM or
MD device that needs to be set up at boot time). For the latter, I'll
make sure to check for such a setup when the user chooses the "finish"
option in the main menu, and issue an appropriate error message when the
setup won't work; but how do I do the former?

-- 
<Lo-lan-do> Home is where you have to wash the dishes.
  -- #debian-devel, Freenode, 2004-09-22

Attachment: signature.asc
Description: Digital signature


Reply to: