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

Re: Netlink configuration and predefined export names



Hey Wouter,

Sorry I saw the original email and then got distracted.  I actually made it so you could create with a minor number and it would work after the fact because it seemed useful and there wasn’t a reason to disallow it.  I added it in e6a76272d0fb50cb3cc773f4fc6f67c14fb4b157, so a few months ago and should be in recent kernels.  Thanks,

Josef

On 10/28/17, 2:50 AM, "w@uter.be" <w@uter.be> wrote:



Ping?


-------- Oorspronkelijk bericht --------
Onderwerp: Netlink configuration and predefined export names
Van: Wouter Verhelst 
Aan: jbacik@fb.com
Cc: nbd@other.debian.org



Hi Josef,

I've been looking at merging your patches to nbd-client so that I can
use netlink rather than ioctl() in nbd-client. However, I've run into a
bit of a snag.

In order to properly support systemd, I updated nbd-client a while back
so that you could add a configuration file (${SYSCONFDIR}/nbdtab by
default), configure NBD devices there by device name, and then run
"nbd-client nbd0". That way, and with a bit of systemd glue, you can now
say "systemctl start nbd@nbd0", and things will just work.

With the netlink interface, however, you can't force a particular device
minor number to be used. That's a good thing (I'm not suggesting we
bring it back), but it does mean that managing such devices through
systemd isn't possible with the current setup.

How hard would it be to modify the netlink interface to add a device
name? That way, I can tell users to use a symbolic name in nbdtab (e.g.,
by doing something like "nbd-client -L home"), which would then create a
device name symlink '/dev/nbd/home' or some such, rather than /dev/nbdX.
The systemd tooling can then be modified so that it uses the
/dev/nbd/ name rather than /dev/nbdX. If userspace doesn't provide
such a name, it could default to the same nbdX name.

Thanks,

-- 
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: