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

partman-nbd



Hi,

I'd been planning to do a partman-nbd for quite a while (hence the
nbd-client-udeb that's been making my nbd-related life harder without a
purpose for the time being ;-)). Yesterday, I finally made some time to
look into this in some more detail, and I've come up with an initial
partman-nbd which is now in /people/wouter. It builds, but I still need
to run some tests to verify whether it actually works, too; and there's
quite a bit of work still left to be done.

The purpose of such a partman-nbd would be so that people could use NBD
devices to install on systems with low or no disk space (this is
precedented; the LTSP people already have a similar setup, though their
system does not use d-i). Of course, before root-on-NBD is even going to
be feasible, I'll need to have initramfs support within the nbd-client
package, but I'm working on that as well.

In addition, partman-nbd could allow for a failover clustering setup
where you have a software RAID1 setup of which one device is a local
hard disk or partition, and the other an NBD device. I'm sure there are
other use cases, but these are the ones I've come up with for now.

Before going on, however, it wanted to check with you guys whether I'm
doing the right thing here.

Anyone familiar with the partman code will probably notice that I've had
a good look at partman-lvm before creating this setup; I thought this
made sense, since both need to do some setup of a block device before
it's useful. However, the difference between both is that due to some
implementational details[1], NBD devices are always visible, even if
they're inactive; the only way to detect whether they're connected is
that they have a "pid" file in /sys (see the do_option script for the
exact path) containing the PID of the nbd-client userspace process that
was used to set up the connection.  Hence, detecting whether devices are
available will be different between LVM and NBD setups. I still have to
arrive at that point, though.

I'd appreciate it if some people could have a look at the code that I've
written, and see whether they think the general direction that I'm
taking with the code right now is okayish; any suggestions would be
welcome.

Thanks,

[1] nbd-client needs to open the device, and then run a few ioctl()s, to
    enable it. A better way would probably have been to have some kind
    of master device node, as LVM does, but it's way too late to change
    this now (and this is a change that needs to be done upstream,
    anyway).

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


Reply to: