2 :wiki: https://en.wikipedia.org/wiki/Network_block_device
4 This project includes mount helpers for `nbd` and `nbdfuse` entries in
5 `/etc/fstab`. The helpers are `bash` scripts that should be installed
6 in `/sbin` to be ued by `mount` to handle the virtual filesystem types
7 `nbd` or `nbdfuse`. (Or installed in `/usr/sbin` for some versions of
14 link:https://en.wikipedia.org/wiki/Network_block_device[Network Block Device]
18 On Linux, network block device (NBD) is a network protocol that can be
19 used to forward a block device (typically a hard disk or partition)
20 from one machine to a second machine. As an example, a local machine
21 can access a hard disk drive that is attached to another computer.
23 To do so, a remote machine, say `nbdhost.example.com` is set up as
24 `NBD server` with one or more export names, say including `part000`,
25 that on the server side maps to a partition image file.
27 With a mount helper the client side would include an entry in its
28 `/etc/fstab` for instance like the following:
30 nbd://nbdhost.example.com/part000 /nbd/1 nbd noauto,noatime 0 2
32 That would declare a mounting of that exported NBD partition onto the
33 (alread existsing) pathname `/mnt/1` on the local machine. With the
34 __type__ field of the `fstab` entry being `nbd`, the mount program
35 will use `/sbin/mount.nbd` as helper for handling that entry.
37 The helper script `/sbin/mount.nbd` provided here uses the
38 `nbd-client` program to handle the service connection as device node
39 such as `/dev/nbd0` and then mount that onto `/mnt/1`. The script will
40 further spawn a monitor daemon to terminate the service connection
41 upon unmounting. This script needs `inotify`, `nbd-client` and the
42 `nbd` kernel module or built-in to function.
44 The helper script `/sbin/mount.nbdfuse` provided here is similar but
45 will rely on `nbdfuse` for service connection. The `fstab` entry would
46 then have `nbdfuse` as __type__ indicator. This script needs
47 `inotify`, `nbdfuse` and the `fuse` and `loop` kernel modules or