in reply to Re: imitation block device in linux
in thread imitation block device in linux

NBD looks very interesting. How would I use perl to make an NBD server that clients can mount?

Replies are listed 'Best First'.
Re^3: imitation block device in linux
by salva (Canon) on Mar 19, 2011 at 09:04 UTC
    Basically, you write a network server implementing the NBD protocol and then use nbd-client to connect and link it to some nbd device.

    There is little documentation about the NBD protocol, you will have to read the C source code for the nbd-server program. It is a very simple protocol. After some simple handshaking, there are only two kind of messages you have to support: read and write.

    Another option would be to write a custom nbd-client able to fork and run the server through an anonymous socket (think socketpair).