Closed yonchin closed 4 years ago
dmesg log:
XFS (nbd0): device supports 1024 byte sectors (not 512)
Try supplying nbd-client with '-b 512'
@mennozon it's ok, thks!!!
So mount is trying to initialize the device with 1024 byte sectors? Is this something nbdserver should support?
As far as I can tell it's nbd-client that defaults to 1024 while disks are usually 512 or 4096.
Sounds like -b is mandatory then when opening a connection. So there's nothing to do at backy2's side as far as I can see...
We could add -b 512 in the example backy2 shows when starting the service and perhaps add a few lines in the documentation specifying that nbd-clients' default is 1024.
I'll create a pull request if you want, just have to figure out how to create a new one without adding it to my previous request.
The default has also changed to 512
in more recent versions of nbd client:
https://github.com/NetworkBlockDevice/nbd/commit/128fd556286ff5d53c5f2b16c4ae5746b5268a64
If you like, just add a few lines how this could be described here, I'll happily add it to the docs.
As nbd does not work reliably in recent versions of nbdclient (not only because of incompatible block sizes) I got rid of it all together and implemented a fuse mount. This is much more stable, reliable and a lot simpler than the old code.
`backy2 nbd -r 9353a59c-39df-11e9-80a8-525400597931 INFO: $ /usr/bin/backy2 nbd -r 9353a59c-39df-11e9-80a8-525400597931 INFO: Starting to serve nbd on 127.0.0.1:10809 INFO: You may now start INFO: nbd-client -l 127.0.0.1 -p 10809 INFO: and then get the backup via INFO: modprobe nbd INFO: nbd-client -N 127.0.0.1 -p 10809 /dev/nbd0
error log: