Re: [Nbd] [RFC] NBD protocol improvement
- To: Paul Clements <paul.clements@...124...>
- Cc: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] [RFC] NBD protocol improvement
- From: Laurent Vivier <Laurent.Vivier@...154...>
- Date: Thu, 11 Sep 2008 21:17:54 +0200
- Message-id: <1221160674.4124.6.camel@...156...>
- In-reply-to: <48C94529.40307@...124...>
- References: <1221119881.4145.13.camel@...156...> <48C94529.40307@...124...>
Le jeudi 11 septembre 2008 à 12:19 -0400, Paul Clements a écrit :
> Laurent Vivier wrote:
> > I use the NBD protocol to connect a virtual machine to a disk image.
> >
> > I'd like to allow the client to specify the file to use.
> >
> > Here is what I propose, all your comments are welcome:
> >
> > * NBD server side:
> >
> > - put all the disk images in a directory, for instance:
> >
> > # ls /ISO
> > ubuntu-6.06-desktop-amd64.iso
> > ubuntu-7.10-desktop-amd64.iso
> > ubuntu-8.04-desktop-i386.iso
> >
> > - run the NBD server with a new parameter to specify the directory
> > instead of the filename
> >
> > # nbd-server 1024 --read-only --directory /ISO
> >
> > * NBD client side
> >
> > nbd-client isoserver 1024 /dev/nbd0 ubuntu-8.04-desktop-i386.iso
> >
> > * protocol changes:
> >
> > - when used with "--directory", nbd-server sends a disk size of 0 in the
> > negotiate operation.
> > - when nbd-client receive a disk size of zero, it sends a filename
> > (first bytes is the size of the filename, following bytes are the
> > filename).
> > - nbd-server receives the filename, opens the file (to avoid security
> > issues, we use "basename(filename)"), and re-sends a negotiate packet
> > with the good size.
> > - next is as ususal.
>
> Hi Laurent,
>
> so do you have a patch? Is this a patch to standard nbd-client/server?
I have a patch for qemu-nbd.
But if you agree with the concept, I think I can do a patch for
nbd-client/server (if I want this becomes an official NBD feature I
think I have to do it... ;-) )
> Are their any kernel components (I assume not)?
I didn't dig in, but I don't think so.
> Thanks,
> Paul
Regards,
Laurent
--
----------------- Laurent.Vivier@...154... ------------------
"La perfection est atteinte non quand il ne reste rien à
ajouter mais quand il ne reste rien à enlever." Saint Exupéry
Reply to: