Share optical drive (CD/DVD) on the network

  • Please bump me to the correct forum if this if OT here.

    I'd like to share a DVD optical drive on my network (OMV 5.6.13-1 on an odroidn2/ARM with Debian Buster, kernel 5.10.43-meson64). I've checked the following threads

    CD/DVD Share

    Share Optical drive in OMV to all network computers?

    as well as google, but can't get it to work. Basically I'm seeing the same issues as in

    RE: CD/DVD Share

    The disk is recognized under Storage -> Disks (/dev/sr0), the filesystem is mounted with files accessible (I tried both a data DVD/iso9660 and video DVD/udf), the shared folder is created, and the user privileges are set correctly. I tried SMB/CIFS (preferred), NFS, FTPS, and FTP shares, none would let the remote machine access the share. E.g. the SMB/CIFS share mount gives me

    mount.cifs -o username=xxx,password=yyy //XXX.XXX.X.XXX/dvd /mnt/dvd/

    mount error(2): No such file or directory

    In the system log I can see

    Jul 31 14:51:30 odroidn2 smbd[25692]: [2021/07/31 14:51:30.847698, 0] ../source3/smbd/service.c:782(make_connection_snum)

    Jul 31 14:51:30 odroidn2 smbd[25692]: make_connection_snum: canonicalize_connect_path failed for service dvd, path /srv/dev-disk-by-uuid-2013-03-05-18-34-01-00/dvd

    and here I'm not sure why '/dvd' is appended to the mount point.

    The fstab entry is

    /dev/disk/by-uuid/2013-03-05-18-34-01-00 /srv/dev-disk-by-uuid-2013-03-05-18-34-01-00 iso9660 ro,nofail 0 2

    and mount gives

    /dev/sr0 on /srv/dev-disk-by-uuid-2013-03-05-18-34-01-00 type iso9660 (ro,relatime,nojoliet,check=s,map=n,blocksize=2048)

    What would be the preferred way to share optical drives in OMV 5? I know I still have to work around the fact that changing the disc will require setting up a new share, but first I need to make it work at all.

    The threads mentioned above concern OMV 2.x and 3.x, so maybe in 5.x things have changed?

    Thanks much for any suggestions.

  • I figured this out, it was an incorrect path in the shared folder definition. OMV/WebGUI suggests the "Name" of the shared folder as "Path" by default, which I didn't change to "./". So the SMB/CIFS shares also contained a wrong path in /etc/samba/smb.conf and /etc/apparmor.d/samba/smbd-shares.

    Since I can share the optical drive now, can someone tell me how to force mounting a device based on "dev-disk-by-id-xxx" in OMV 5.x?

  • Thanks for your suggestion, but I don't think this would work. The mount point is obviously based on uuid and hence different for every CD/DVD.

    Basically what I need is a setup where the "Device" of a shared folder does not change regardless of the media that has been inserted. /dev/sr0 would be fine, but it seems that OMV defaults to using the disc label. Is there a concept in OMV to share by block device name?

    Thanks again.

  • My install has the below commented out remnant line in /etc/fstab left over from the original install of OMV 2.x ages ago. I never had an optical drive in the machine.

    #/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0

    I believe you could add such a line outside the >>> [openmediavault] stanza to fstab, create the mount point directory /media/cdrom0 (or similar) in the rootfs and use the openmediavault-sharerootfs plugin to create a share for it.

    Give that a try.

    Google is your friend and Bob's your uncle!

    OMV AMD64 5.x on Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 16GB ECC RAM.

  • I added a respective entry in fstab and the mount point (/mnt/dvd in this case). The way I understand how the plugin's supposed to work is that one should be able to access the file system when creating shares and specify the respective directory/mount point. Unfortunately, the dropdown menu "Device" in "Add shared folder" only offers the block devices from "File systems" as before. Probably I don't understand this plugin correctly and how it's supposed to work.

  • Did you run sudo mount -a in the shell after creating the mountpoint directory in the shell?

    When you create the sharedfolder in OMV select your boot drive from the drop down list. It will be there if you installed the sharerootfs plugin.

    Then select the path to the mountpoint using the file browser and save and apply changes.

    Google is your friend and Bob's your uncle!

    OMV AMD64 5.x on Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 16GB ECC RAM.

  • Well, the fstab entry you suggested was marked 'noauto', so I didn't expect "mount -a" to do much (and it doesn't). I mounted /dev/sr0 manually, but when trying to create a shared folder, there still is no boot drive in the dropdown list, so I can't proceed to select the respective path. The plugin is definitely installed.

    I appreciate all your help, but I guess OMV is just not ready for this out of the box. I think I will try to go without OMV and set armbian up manually to fit my needs.

    Thanks again!

  • If you can't see the boot drive in the dropdown list and the sharerootfs plugin is installed, then something is wrong. I suggest you verify the installation status of the plugin:

    sudo apt-cache policy openmediavault-sharerootfs

    And perhaps remove, purge, and install it again:

    sudo apt-get remove --purge openmediavault-sharerootfs
    sudo apt-get install openmediavault-sharerootfs

    Google is your friend and Bob's your uncle!

    OMV AMD64 5.x on Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 16GB ECC RAM.

  • You were right, the installation in the WebGUI was somehow faulty. Re-installing the plugin with apt-get fixed this and I can now see the root fs in the dropdown list. However, I guess this will require some more tweaking, probably outside the WebGUI config, for consistently updating the share contents when swapping discs.

    I'll report back when/if I get it working.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!