How to install nbd on CentOS

Posted:   |   More posts about sysadmin tip

There is no packages (client or server) for CentOS yet but you can use an rpm for Fedora you can get here.

Grab one not too new. I used the one for Fedora 15 for a CentOS 6.2. After that to use nbd-client you need the nbd kernel module. Unfortunatly there is no kernel module in this rpm. If you are lucky try as root:

# modprobe nbd

but if you are not you need to find nbd.ko somewhere else (for example inside a kernel' rpm) or decide to compile it by youself.

After you got the module:

# insmod nbd.ko

Now you can use nbd-server and nbd-client.