[ale] nbd-client blocking when reading the device

Chris Fowler cfowler at outpostsentinel.com
Fri Apr 30 16:36:46 EDT 2021

I need to add some temporary storage at my office but am running into issues with nbd-client blocking when accessing the device.  I have very little equiment in that building so I have no real option of upgrading anything.

Client and server are running the same 2.6.38 kernel and same nbd 3.13.

Server config:
[root at localhost]# cat /etc/nbd-server/config
# If you want to run everything as root rather than the nbd user, you
# may either say "root" in the two following lines, or remove them
# altogether. Do not remove the [generic] section, however.
  user = root
  group = root

# What follows are export definitions. You may create as much of them as
# you want, but the section header has to be unique.
  exportname = /mnt/nvdata/nbd/nbd001.nbd
  readonly = false

On the client:
[root at localhost]# nbd-client -N "nbd001" /dev/nbd0 -p
Negotiation: ..size = 2048MB
bs=1024, sz=2147483648 bytes
[root at localhost]# strace -e trace=file dd if=/dev/nbd0 of=/dev/null bs=1024 count=10
open("/dev/nbd0", O_RDONLY|O_LARGEFILE  <---- Blocks forever here

tcpdump shows the occasional packet, but no real stream of data.

I do this at home all the time with the server running kernel 4.15.0 and nbd 3.16.2.   The client at home is the same 2.6.38 with nbd 3.13.
I've already addressed the issue of max partitions being set to 0 on the clients by hard coding the value in the kernel driver.  The 2.6.38 client is running nbd in the kernel and not a module.

I have a CentOS 5.2 machine there and tried to run it as a server too.  Same result.

I've had a lot of success with nbd at home even on a Pi Zero W.  I use it to mimic a Sandisk Cruzer on the OTG, but the "storage chip" of, of that Cruzer,  is really /dev/nbd0.  The Zero W loads a config file from my firewall at boot that tells it what nbd image to connect to.  It can be slow at times, but it has eliminated a tack of USB 2.0 sticks I had on my desk.  I can also use dd on my server to create another "stick" instead of running to Wal-Mart when I need one.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.ale.org/pipermail/ale/attachments/20210430/bf19c5a0/attachment.htm>

More information about the Ale mailing list