Optical Drive not being found

The place to discuss linux version of MakeMKV
saarg
Posts: 6
Joined: Sat Jan 20, 2018 12:14 pm

Re: Optical Drive not being found

Post by saarg » Mon Jan 22, 2018 1:28 pm

mike admin wrote:Ok, looks like permissions issue. Please post one more output of

Code: Select all

ls -la /dev/sg*

Code: Select all

root@8501bf9102c1:/# ls -la /dev/sg*
ls: cannot access /dev/sg*: No such file or directory
Running this in a docker container, and only pass through /dev/sr*. Checking ls -la /dev/sg* gives this output on the host.

Code: Select all

root@unXeon:~# ls -la /dev/sg*
crw-rw---- 1 root disk  21, 0 Jan 22 08:51 /dev/sg0
crw-rw---- 1 root disk  21, 1 Jan 22 08:51 /dev/sg1
crw-rw---- 1 root disk  21, 2 Jan 22 08:51 /dev/sg2
crw-rw---- 1 root disk  21, 3 Jan 22 08:51 /dev/sg3
crw-rw---- 1 root cdrom 21, 4 Jan 22 08:51 /dev/sg4
Starting the container in privileged mode solves the problem. I guess you have changed the way a drive is accessed/detected since this worked in earlier versions?
I also tested to pass through only /dev/sg4 and that also works. So going forward, it's /dev/sg* MakeMKV looks for when detecting a drive?

Thanks for the help :D

spl147
Posts: 99
Joined: Mon Dec 10, 2012 4:59 pm

Re: Optical Drive not being found

Post by spl147 » Mon Jan 22, 2018 2:48 pm

saarg wrote:
mike admin wrote:Ok, looks like permissions issue. Please post one more output of

Code: Select all

ls -la /dev/sg*

Code: Select all

root@8501bf9102c1:/# ls -la /dev/sg*
ls: cannot access /dev/sg*: No such file or directory
Running this in a docker container, and only pass through /dev/sr*. Checking ls -la /dev/sg* gives this output on the host.

Code: Select all

root@unXeon:~# ls -la /dev/sg*
crw-rw---- 1 root disk  21, 0 Jan 22 08:51 /dev/sg0
crw-rw---- 1 root disk  21, 1 Jan 22 08:51 /dev/sg1
crw-rw---- 1 root disk  21, 2 Jan 22 08:51 /dev/sg2
crw-rw---- 1 root disk  21, 3 Jan 22 08:51 /dev/sg3
crw-rw---- 1 root cdrom 21, 4 Jan 22 08:51 /dev/sg4
Starting the container in privileged mode solves the problem. I guess you have changed the way a drive is accessed/detected since this worked in earlier versions?
I also tested to pass through only /dev/sg4 and that also works. So going forward, it's /dev/sg* MakeMKV looks for when detecting a drive?

Thanks for the help :D
im running MakeMKV in a docker on unRAID, i left the device as /dev/sr0, and just toggled ON privileged and it works again!

Djoss
Posts: 8
Joined: Tue Jun 13, 2017 2:56 pm

Re: Optical Drive not being found

Post by Djoss » Mon Jan 22, 2018 3:00 pm

im running MakeMKV in a docker on unRAID, i left the device as /dev/sr0, and just toggled ON privileged and it works again!
It seem that passing both /dev/sr? and /dev/sg? associated to your drive also works, without the need of the privileged mode.

spl147
Posts: 99
Joined: Mon Dec 10, 2012 4:59 pm

Re: Optical Drive not being found

Post by spl147 » Mon Jan 22, 2018 3:01 pm

Djoss wrote:
im running MakeMKV in a docker on unRAID, i left the device as /dev/sr0, and just toggled ON privileged and it works again!
It seem that passing both /dev/sr? and /dev/sg? associated to your drive also works, without the need of the privileged mode.
how do you pass both?

Wild Penguin
Posts: 3
Joined: Sun Nov 19, 2017 5:25 pm

Re: Optical Drive not being found

Post by Wild Penguin » Mon Jan 22, 2018 3:06 pm

I'm confused, why is it looking for /dev/sgX? No Linux distribution I've used has a CD drive named that way.

Code: Select all

$ LANG=C ls -la /dev/sg* # Because my locale is not english
ls: cannot access '/dev/sg*': No such file or directory
$ ls -la /dev/sr*
brw-rw----+ 1 root optical 11, 0 20. 1. 16:43 /dev/sr0
$ ls -la /dev/cd*
lrwxrwxrwx 1 root root 3 20. 1. 16:43 /dev/cdrom -> sr0
How is this a permission issue?

Djoss
Posts: 8
Joined: Tue Jun 13, 2017 2:56 pm

Re: Optical Drive not being found

Post by Djoss » Mon Jan 22, 2018 4:26 pm

spl147 wrote:
Djoss wrote:
im running MakeMKV in a docker on unRAID, i left the device as /dev/sr0, and just toggled ON privileged and it works again!
It seem that passing both /dev/sr? and /dev/sg? associated to your drive also works, without the need of the privileged mode.
how do you pass both?
Just add another "--device" parameter to the "docker run" command (e.g. --device /dev/sgX).

Djoss
Posts: 8
Joined: Tue Jun 13, 2017 2:56 pm

Re: Optical Drive not being found

Post by Djoss » Mon Jan 22, 2018 4:31 pm

Wild Penguin wrote:I'm confused, why is it looking for /dev/sgX? No Linux distribution I've used has a CD drive named that way.

Code: Select all

$ LANG=C ls -la /dev/sg* # Because my locale is not english
ls: cannot access '/dev/sg*': No such file or directory
$ ls -la /dev/sr*
brw-rw----+ 1 root optical 11, 0 20. 1. 16:43 /dev/sr0
$ ls -la /dev/cd*
lrwxrwxrwx 1 root root 3 20. 1. 16:43 /dev/cdrom -> sr0
How is this a permission issue?
Not sure why you don't have /dev/sgX device on your system, but in my case, the optical drive can be accessed by both /dev/srX and /dev/sgY, I think they are just 2 different ways to access the drive: /dev/sdX is a block device while /dev/sgY is used to communicate via SCSI commands.

saarg
Posts: 6
Joined: Sat Jan 20, 2018 12:14 pm

Re: Optical Drive not being found

Post by saarg » Mon Jan 22, 2018 4:40 pm

Djoss wrote:
im running MakeMKV in a docker on unRAID, i left the device as /dev/sr0, and just toggled ON privileged and it works again!
It seem that passing both /dev/sr? and /dev/sg? associated to your drive also works, without the need of the privileged mode.
You don't need both, only the /dev/sg* device. You see which device is the DVD/BD-ROM by the ls -la /dev/sg* listing. The one which is in the cdrom group is the drive.

spl147
Posts: 99
Joined: Mon Dec 10, 2012 4:59 pm

Re: Optical Drive not being found

Post by spl147 » Mon Jan 22, 2018 4:46 pm

saarg wrote:
Djoss wrote:
im running MakeMKV in a docker on unRAID, i left the device as /dev/sr0, and just toggled ON privileged and it works again!
It seem that passing both /dev/sr? and /dev/sg? associated to your drive also works, without the need of the privileged mode.
You don't need both, only the /dev/sg* device. You see which device is the DVD/BD-ROM by the ls -la /dev/sg* listing. The one which is in the cdrom group is the drive.
my docker will not load the Webui without both sr0 and sg1

saarg
Posts: 6
Joined: Sat Jan 20, 2018 12:14 pm

Re: Optical Drive not being found

Post by saarg » Mon Jan 22, 2018 5:08 pm

spl147 wrote: my docker will not load the Webui without both sr0 and sg1
Then you are using the wrong container :wink:

spl147
Posts: 99
Joined: Mon Dec 10, 2012 4:59 pm

Re: Optical Drive not being found

Post by spl147 » Mon Jan 22, 2018 5:11 pm

saarg wrote:
spl147 wrote: my docker will not load the Webui without both sr0 and sg1
Then you are using the wrong container :wink:
LOL, using the jlesage/MakeMKV container

mike admin
Posts: 3391
Joined: Wed Nov 26, 2008 2:26 am
Contact:

Re: Optical Drive not being found

Post by mike admin » Mon Jan 22, 2018 9:27 pm

saarg wrote:You don't need both, only the /dev/sg* device. You see which device is the DVD/BD-ROM by the ls -la /dev/sg* listing. The one which is in the cdrom group is the drive.
You DO need both.

Starting from 1.10.8 the /dev/sgX that corresponds to drive is required . MakeMKV will work without access to /dev/srX , but performance will be slow.

MakeMKV figures out device names by analyzing /sys/bus/scsi, same way as lsscsi does.

saarg
Posts: 6
Joined: Sat Jan 20, 2018 12:14 pm

Re: Optical Drive not being found

Post by saarg » Mon Jan 22, 2018 10:25 pm

mike admin wrote:
saarg wrote:You don't need both, only the /dev/sg* device. You see which device is the DVD/BD-ROM by the ls -la /dev/sg* listing. The one which is in the cdrom group is the drive.
You DO need both.

Starting from 1.10.8 the /dev/sgX that corresponds to drive is required . MakeMKV will work without access to /dev/srX , but performance will be slow.

MakeMKV figures out device names by analyzing /sys/bus/scsi, same way as lsscsi does.
I just checked if the drive was found. I didn't notice that the speed was slower though and I have ripped about 6 discs.

Djoss
Posts: 8
Joined: Tue Jun 13, 2017 2:56 pm

Re: Optical Drive not being found

Post by Djoss » Mon Jan 22, 2018 11:28 pm

mike admin wrote: You DO need both.

Starting from 1.10.8 the /dev/sgX that corresponds to drive is required . MakeMKV will work without access to /dev/srX , but performance will be slow.

MakeMKV figures out device names by analyzing /sys/bus/scsi, same way as lsscsi does.
Thanks Mike for confirming and clarifying the new requirements!

JohnJasonJordan
Posts: 10
Joined: Mon Jun 19, 2017 11:47 pm

Re: Optical Drive not being found

Post by JohnJasonJordan » Tue Jan 23, 2018 4:36 am

mike admin wrote: You DO need both.
Starting from 1.10.8 the /dev/sgX that corresponds to drive is required . MakeMKV will work without access to /dev/srX , but performance will be slow.
MakeMKV figures out device names by analyzing /sys/bus/scsi, same way as lsscsi does.
My Ubuntu 14.04.5 computer has a built-in Blu-ray drive and a USB DVD drive. I looked at /sys/bus/scsi and came away shaking my head. I understood nothing of the many folders and sub-sub-sub folders in there.
When all this started I went back to 1.10.8, which works fine. Before I try to reinstall 1.10.10, could we have an idiot's guide for how to tell 1.10.10 where the drives are?

Post Reply