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

Re: Revisiting partman-nbd

On Sat, Dec 27, 2008 at 02:27:14PM +0100, Wouter Verhelst wrote:
> Unfortunately, this now seems to confuse partman; we apparently can't be
> right for everyone. When loading the NBD kernel module before
> /lib/partman/init.d/30parted is run, we will get the following error
> message:
> 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.

> […] 
> When checking the code, I do see that partman does check for a few
> things, such as whether a particular device node is part of a multipath
> or SATA-RAID setup, and skips them in those cases. While I could of
> course suggest a change be made to partman so that similar checks would
> be performed for NBD, I can't help but think that it would be much more
> efficient if there were a way for a partman module to signal that a
> particular device node should be skipped; perhaps by creating the device
> directory and creating a file "skip" in that directory, or something
> similar. init.d/30parted could then contain a line like this:
> test -f /var/lib/partman/devices/$dirname/skip && continue
> it could then be the responsibility of partman-dmraid, partman-nbd, and
> so on, to mark the devices that need to be skipped before 30partman is
> ran.
> Thoughts?

Might be a good refactoring idea, but I thinking looking at parted could
be better for NBD support specifically.

Jérémy Bobbio                        .''`. 
lunar@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 

Attachment: signature.asc
Description: Digital signature

Reply to: