It already works. But only once. Help Appreciated
- Once I get this working, I want to publish this as a guide. Already written in that style.
- Setup steps 1-5 already work correctly,
- Only remaining problem, see the red headline below:
Problem 1: This is a "one hit" wonder for now, no automatic mounting when inserting a new disc later - The newest related article is Share optical drive (CD/DVD) on the network but it does not address that.
- Max data rate of a DVD Video: 9.8 Mbit/s (MPEG-2 Part 2) or 1.8 Mbit/s MPEG-1 Part 2, most WiFi networks achieve that effortless
How to share an optical drive (CD ROM or DVD ROM) to the network
0) Motivation
- DVDs in general are passe, no doubt.
- I ripped most of my DVD collection and added it to Plex anyways.
- But still these two use cases exist:
- Playback of DVD via network. Sometimes my kids rent a DVD from the public library (they still offer this). Being able to use a contemporary laptop/tablet and access the DVD via network would be handy.
- Doing a new DVD rip directly on the NAS. Spare myself the procedure to hook up power and data cables, perform ripping on laptop, then transfer the video file up to the NAS.
How it looks in action
1) Connect Optical Drive then insert disc then see: Storage > Disks
Menu > Storage > Disks: Now shows this additional entry:
Device: /dev/sr0 Model: DVD RW AD-7173A Vendor Optiarc showed up with capacity 7.82 GiB
Let's see how this is reflected in the CLI:
$ ls -l /dev/sr0
brw-rw---- 1 root cdrom 11, 0 Jul 21 17:34 /dev/sr0 👈 That's the optical drive.
2) Mount Optical Drive via: Menu > Storage > File Systems
- Go to: Menu > Storage > File Systems
- Click "Create/Mount"
- This opens a dialog:
- Click dropdown "File system"
- This is noticible slower than otherwise, which likely is because optical devices are quite laggy/slow.
- Choose "/dev/sr0"
- Usage warning treshhold warning
- I leave this as is (85%) and hope this causes no false errors, as optical disks may always be full or quite full.
- Click SAVE
- Click dropdown "File system"
- The optical drive is now listed under the File System as:
- Device: /dev/sr0
- Label: DVDVolume
- Type: UDF
- Total: 7.82 GiB
- Mounted: √
- Mount Point: /srv/dev-disk-by-uuid-bf5ae4c620202020
- Referenced: Not yet, we just created it.
- Status: Online
Let's check the command line shortly
$ ls -l /srv/dev*
dr-xr-xr-x 4 nobody nogroup 136 Feb 7 2036 dev-disk-by-uuid-bf5ae4c620202020 👈 That's the optical drive.
drwxr-sr-x 7 root users 4096 Jul 21 17:57 dev-disk-by-uuid-f0233da3-473e-450d-9a18-b2ae254fc439
Summary: /dev/sr0
gets mounted at dev-disk-by-uuid-bf5ae4c620202020
OMV6 status note: Mounting a DVD drive was possible without any extras. In earlier systems (which ones?), this alone required some extra installations (which ones?). (Hints appreciated, would then update this hint).
3) Create share "DVD" (or similarly named)
- Go to: Menu > Storage > Shared Folders
- Click "Create"
- This opens a dialog:
- Name: Name it "DVD" or similar
- File system: /dev/sr0
- Relative Path: "/" which means share the root of the optical disk. Not a subdirectory of it!
- Permissions:
- I found no permission set with "read only for everebody" which would be most adequate.
- Hence I left the default one "Administrator: read/write, Users: read/write, Others: read-only".
- We will overrule this in the partucilar sharing service.
- Click SAVE
Note on OMV6: Mounting a DVD drive was possible without any extras. In earlier systems, as far as I understood from what I read, this already required a plugin like openmediavault-sharerootfs.
4) Offer the share "DVD" via SMB/CIFS (Samba)
- Go to: Menu > Services > SMB/CIFS > Shares
- Click "Create"
- This opens a dialog:
- Shared Folder: Choose "DVD" (which we created in step 3)
- Leave all values on their defaults, except the following.
- Read Only: Activate this.
- CDROM and DVDROM are read only media, so this is adequate.
- Burning CD-R/RW or DVDs via Samba does not work anyway.
- Even if, not in scope of this tutorial.
- Extra options:
- I choose options which should optimize access to optical media (to my understanding).
- The samba configuration manual explains these options.
5) Access the DVD from a SMB client (Linux, Mac, Windows)
MacOS 11.6.7 Big Sur
- In the Finder: Menu > Go > Network (⇧ ⌘ K)
- Your OMV SMB Server is listed there. → Double click it.
- "DVD" is listed among the available shares. → Double click it.
- Success: The DVD contents get listed: AUDIO_TS/ and VIDEO_TS/
- Now use a video app, capable if DVD playback like
VLC.app
or Apple's ownDVD Player.app
- Do not open an individual file.
- But open the whole folder
VIDEO_TS/
into the playback app. - It worked at the beginning (intro, menu) already with a hickup every 10secs or so.
- When starting playback of the main app, the computer got quite unresponsive.
- Finder started hanging. I force-quit Finder (which normally never happens but which deals badly with unusual timeouts from network shares or cable-attached media).
Problem 1: This is a "one hit" wonder for now, no automatic mounting when inserting a new disc later
- As soon as you eject the DVD, and insert the same or another DVD again:
- Menu > Storage > Filesystems:
- Still lists /dev/sr0
- But "Mounted" has no checkmark and "Total" is "-".
- Being still there I tried the following
- Click "Mount"
- You get to a next screen
- File system: Nothing can be selected here.
- I clicked cancel to get back to the listing.
- It refreshed really looooong (again the DVD response is quite slow I assume)
- After ca 30secs I gt the listing
- I select "/dev/sr0" (DVDVolume) whose status still shows as "Online"
- Problem: The "unmount" button remains inactive.
- So ejected the DVD with the hardware button of the optical drive.
- Its status changed to "Missing"
- I insert a new DVD.
- Its status remains "Missing" for the next 1min or so.
- The UI itsels show the progress bar on top of the table here and then. No change.
- I do some browser refreshes. Nothing.
- When DVDVolume is selected the "Unmount" button remains inactive.
- I eject the DVD with the hardware button.
- Still "Offline" and the "Unmount" button inactive.
- I detach the USB cable which connects NAS and optical drive.
- Unchanged.
- Menu > Storage > Filesystems:
✅ Problem 2: If you are left with an orphan filesystem, you can clean it up this way
You may first try what you can do in the Web UI:
- Menu > Services > SMB/CIFS > Shares
- The "DVD" samba share is active, which references the general "DVD" share.
- Select it, delete it, save and apply.
- Menu > Storage > Shared Folders
- Select the "DVD" item, delete it, save and apply.
- Menu > Storage > Filesystems:
- Shows as missing.
- Select it. Unmount button remains inactive? → You have done everything you could in the Web UI.
You need to fix this in the CLI as root or with sudo commands.:
- Be sure the optical drive is physically disconnected to not complicate/confuse the procedure further.
- In file /etc/fstab within the [openmediavault] container look for a line which has "udf" as in Universal Disk Format as used in DVDs:
- /dev/disk/by-uuid/YOUR-DVD-DRIVE-UID /srv/dev-disk-by-uuid-YOUR-DVD-DRIVE-UID udf ro,nofail 0 2
- Delete it, or at least put it out of that container (as it is managed by the Web UI) and then outcomment it. Save.
- Then just to be sure try:
- mount -a
- Nothing should happen.
- Now check file /etc/openmediavault/config.xml
- First back it up.
- Then search for "YOUR-DVD-DRIVE-UID". Remove the entire XML "mntent" entry in which you found the string.