Is it possible to export a block device such as a DVD or CDROM and make it so that it's mountable on another computer as a block device?NOTE: I'm not interested in doing this using NFS or Samba, I actually want the optical drive to show up as a optical drive on a remote computer.
How can I mount a block device from one computer to another via the network as a block device?
linux;mount;block device;dvd;data cd
I think you might be able to accomplish what you want using network block devices (NBD). Looking at the wikipedia page on the subject there is mention of a tool called nbd. It's comprised of a client and server component.ExampleIn this scenario I'm setting up a CDROM on my Fedora 19 laptop (server) and I'm sharing it out to an Ubuntu 12.10 system (client).installing$ apt-cache search ^nbd-nbd-client - Network Block Device protocol - clientnbd-server - Network Block Device protocol - server$ sudo apt-get install nbd-server nbd-clientsharing a CDNow back on the server (Fedodra 19) I do a similar thing using its package manager YUM. Once complete I pop a CD in and run this command to share it out as a block device:$ sudo nbd-server 2000 /dev/sr0** (process:29516): WARNING **: Specifying an export on the command line is deprecated.** (process:29516): WARNING **: Please use a configuration file instead.$A quick check to see if it's running:$ ps -eaf | grep nbdroot     29517     1  0 12:02 ?        00:00:00 nbd-server 2000 /dev/sr0root     29519 29071  0 12:02 pts/6    00:00:00 grep --color=auto nbdMounting the CDNow back on the Ubuntu client we need to connect to the nbd-server using nbd-client like so.  NOTE: the name of the nbd-server is greeneggs in this example.$ sudo nbd-client greeneggs 2000 /dev/nbd0Negotiation: ..size = 643MBbs=1024, sz=674983936 bytes(On some systems - e.g. Fedora - one has to modprobe nbd first.)We can confirm that there's now a block device on the Ubuntu system using lsblk:$ sudo lsblk -lNAME                 MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTsda                    8:0    0 465.8G  0 disk sda1                   8:1    0   243M  0 part /bootsda2                   8:2    0     1K  0 part sda5                   8:5    0 465.5G  0 part ubuntu-root (dm-0)   252:0    0 461.7G  0 lvm  /ubuntu-swap_1 (dm-1) 252:1    0   3.8G  0 lvm  [SWAP]sr0                   11:0    1 654.8M  0 rom  nbd0                  43:0    0   643M  1 disk nbd0p1                43:1    0   643M  1 part And now we mount it:$ sudo mount /dev/nbd0p1 /mnt/mount: block device /dev/nbd0p1 is write-protected, mounting read-only$did it work?The suspense is killing me, and we have liftoff:$ sudo ls /mnt/EFI  GPL  isolinux  LiveOSThere's the contents of a LiveCD of CentOS that I mounted in the Fedora 19 laptop and was able to mount it as a block device of the network on Ubuntu.