go-nbd
Infrastructure
network block device library
SHOW HN2023
How HN took it
4 positive, 7 neutral or asking, 0 mixed, 2 critical, out of 13 comments about the project. Thread score +0.17.
Idea: 4 for, 0 againstDocs: 0 for, 2 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
NBD is a simple, useful protocol
From 3 comments
NBD is a simple protocol, I used it to recover a RAID5 hardware array that lost parity [0] [1], in just a few lines of C. [0]…
rkeene2 on HNNBD is fairly simple. I wrote a minimal server in Python[0]. It is just a few lines. 0. https://github.com/rvalles/pyamigadebug/blob/master/NBDServer.py
rvalles on HNI use NBD for my single-user NAS. You can use FDE (full disk encryption, luks) client-side. The system managing the physical block devices never sees unencrypted data. Such a…
coppsilgold on HN
Objections
Acronym NBD not spelled out in the repo docs
From 2 comments
Did nobody else learn to spell out an acronym the first time it's used? I had heard of it, but I had to read "NBD" far too many times in that repo before I saw what it stood for.
alias_neo on HNI've always thought of it as common courtesy. It's super frustrating when you're reading something and thinking "great, but wtf are you actually going on about?"
LouisSayers on HN
Error handling in NBD scenarios may be weak
From 1 comment
Very cool! I'm curious if you've explored testing error cases yet? Years ago I fooled around with nbdkit and developed a "bad sectors" and "bad disk" plugin and found that the…
cellularmitosis on HN
Requests
Use defer for mutex unlock and avoid naked returns
From 2 comments
You should probably defer mutex unlock() and not use naked returns: https://github.com/pojntfx/go-nbd/blob/main/pkg/backend/file.go#L17 Defering overhead is very small nowdays.
Thaxll on HNwhat about during a panic?
philosopher1234 on HN
Consider gnet for better networking performance
From 2 comments
Since this heavily involves networking, take a look into using gnet [0]. You might find some interesting performance improvements by using that over just net.Conn. [0]…
latchkey on HNYou might be right. Different workloads will definitely have different effects. That said, implementing the gnet api is pretty easy and doesn't require a huge context switch. It…
latchkey on HN
Questions
How does NBD compare to iSCSI?
From 1 comment
how does nbd compare to, say, iSCSI ? beyond likely being simpler to understand/manage, i mean.
znpy on HN
How is NBD used over unreliable networks and how easy is it to corrupt data?
From 2 comments
Thanks so much for the insights! > While at home things are fine, when not at home things can get bad What does "bad" mean exactly? Unrecoverable errors / faulty writes? It might…
codethief on HNNBD uses TCP. And I had no unrecoverable (journal) corruption happen. Imagine you had a physical drive which had unreliable reads and writes but that would always go through…
coppsilgold on HN
Alternatives named
nbdkit
From 1 comment
Very cool! I'm curious if you've explored testing error cases yet? Years ago I fooled around with nbdkit and developed a "bad sectors" and "bad disk" plugin and found that the…
cellularmitosis on HN
nbd-server and nbd-client
From 1 comment
I just use nbd-server, nbd-client (kernel module nbd). While at home things are fine, when not at home things can get bad unless you use something like UDPspeeder…
coppsilgold on HN
iSCSI
From 2 comments
how does nbd compare to, say, iSCSI ? beyond likely being simpler to understand/manage, i mean.
znpy on HNIt's much, much simpler than iSCSI, which is an advantage. It's possibly more idiomatically Linux. But the Linux iSCSI initiator might (last I checked?) do a better job of…
tptacek on HN