linux - How to access a CD/DVD drive over the network? - Super User
Looks like i found a way to do it with linux. would this cause any errors with the SMB that OMV uses or already has set up?
Jeff Ward -
I feel like a Samba / NFS setup is kind of a big hammer for this little nail. I found a blog post on this topic which shows the use of a tool called nbd -- network block device. To use it, setup the server and client.
(The tutorial is written for Ubuntu with a CD device at /dev/cdrom
, so you may need to adjust for your setup.)
On the server side (with the CDROM):
sudo apt-get install nbd-server
sudo adduser nbd cdrom
(You may get a warning about no configured exports - ignore it, we'll set one up below.)
Edit the /etc/nbd-server/config
file:
[generic] group = cdrom allowlist = true
[cdrom] exportname = /dev/cdrom readonly = true
Then: sudo /etc/init.d/nbd-server restart
On the client side (access the server's CDROM):
sudo apt-get install nbd-client
Now map the block device (where 192.168.1.100
is the ip address of the server):
sudo nbd-client 192.168.1.100 -name cdrom /dev/nbd0
Now you can mount /dev/nbd0
as if it was a CDROM on the client:
sudo mkdir /mnt/cdrom # if it doesn't already exist
sudo mount -t iso9660 /dev/nbd0 /mnt/cdrom
Or grab an ISO:
sudo dd if=/dev/nbd0 of=~/disc.iso