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

[Nbd] Server immediately closes connection



Hey everybody,

Some background first. I got myself one of those Western Digital MyBooks to make some backups on. The thing runs on an AMR processor (nothing fast), has a disk, and has ethernet on it. It runs a custom-built 2.6.17 kernel (uname reports 2.6.17.14 #1 PREEMPT Mon Mar 26 12:36:33 BST 2007 armv5tejl GN).

Now I wanted to export its main shared partition (empty by default, and I removed it from fstab and it's unmounted) by nbd, so I can use LUKS from my main box through nbd and make secure encrypted backups on the disk, without the disk having to know anything about encryption (keys) and such.

I compiled nbd 2.9.9 on the MyBook succesfully, and tried starting a server in the following settings:
- standalone for a temp file.
- standalone for a block device (/dev/md4)
- through inetd for a temp file.
- through inetd for a block device (/dev/md4).

My main box is a gentoo box, and I'm currently running 2.6.22 on it (gentoo build). I loaded the nbd module, compiled nbd 2.9.9 as well, and tried connecting to the MyBook.

Everytime I do that, in each of the settings above, I get the following:

# /usr/local/sbin/nbd-client 192.168.1.164 99 /dev/nbd0
Negotiation: Error: Server closed connection

It is the correct port and IP (I get connection refused if I shut down nbd-server on the MyBook or inetd), but it always gives this message.
I also tried connecting to the nbd-server with nc, but it also immediately returns, so I don't think it's a problem with the client setup. The daemon on the MyBook keeps running.

If anyone has any thoughts on how to solve this I would greatly appreciate it (or any other ideas of accomplishing what I'm trying to do).

Thanks in advance,
Greets,
Robin

Reply to: