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

Re: modprobe nbd question



Hi Wouter,

thanks a lot for your answer!

I would really like to try out the netlink interface, what do I need? Can I apply some patches? How can I use it instead of nbd-client? Or maybe the patches you have mentioned are to nbd-client and the kernel part is already there?

Thanks a lot,

Stefano
________________________________________
From: Wouter Verhelst <w@uter.be>
Sent: Sunday, January 28, 2018 10:47 AM
To: Stefano Panella
Cc: nbd@other.debian.org; Gabor Igloi; Ross Lagerwall
Subject: Re: modprobe nbd question

On Mon, Jan 22, 2018 at 10:39:55AM +0000, Stefano Panella wrote:
> Hi everybody,
>
> I am using nbd-client to connect some disks exported by qemu so I can see the disk as a block device.
> My problem is that I understand I have to decide how many nbd devices I need at modprobe time, using the nbds_max parameter.
> It looks like every device I request al modprobe time is using some memory even if I am never going to use it because I will never need to connect it to a server.

I'm not sure this is actually true; it's more a result of the fact that
the ioctl interface to setting up NBD devices requires the device to
already exist before it is connected.

With the netlink interface, this isn't true (devices are connected
through netlink rather than ioctl, so you don't need them to exist), but
that isn't supported (yet) by any released version of the official
nbd-client.

> Is there a way to modprobe nbd with 0 devices and add/remove them on demand?

Not at the moment, no.

> If there is no way at the moment, how difficult would that be to implement?

I need to finish merging the netlink code, and then most other users
need to implement the netlink interface, too. Once that has happened,
the ioctl() interface can be dropped, and devices can be made on demand.

> Do you think there would be any interest for other users to have this flexibility?

Probably, but I don't think the problem is what you think it is ;-)

--
Could you people please use IRC like normal people?!?

  -- Amaya Rodrigo Sastre, trying to quiet down the buzz in the DebConf 2008
     Hacklab


Reply to: