Page 3 of 8
Re: Optical Drive not being found
Posted: Mon Jan 22, 2018 1:28 pm
by saarg
mike admin wrote:Ok, looks like permissions issue. Please post one more output of
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
Re: Optical Drive not being found
Posted: Mon Jan 22, 2018 2:48 pm
by spl147
saarg wrote:mike admin wrote:Ok, looks like permissions issue. Please post one more output of
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
im running MakeMKV in a docker on unRAID, i left the device as /dev/sr0, and just toggled ON privileged and it works again!
Re: Optical Drive not being found
Posted: Mon Jan 22, 2018 3:00 pm
by Djoss
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.
Re: Optical Drive not being found
Posted: Mon Jan 22, 2018 3:01 pm
by spl147
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?
Re: Optical Drive not being found
Posted: Mon Jan 22, 2018 3:06 pm
by Wild Penguin
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?
Re: Optical Drive not being found
Posted: Mon Jan 22, 2018 4:26 pm
by Djoss
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).
Re: Optical Drive not being found
Posted: Mon Jan 22, 2018 4:31 pm
by Djoss
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.
Re: Optical Drive not being found
Posted: Mon Jan 22, 2018 4:40 pm
by saarg
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.
Re: Optical Drive not being found
Posted: Mon Jan 22, 2018 4:46 pm
by spl147
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
Re: Optical Drive not being found
Posted: Mon Jan 22, 2018 5:08 pm
by saarg
spl147 wrote:
my docker will not load the Webui without both sr0 and sg1
Then you are using the wrong container
Re: Optical Drive not being found
Posted: Mon Jan 22, 2018 5:11 pm
by spl147
saarg wrote:spl147 wrote:
my docker will not load the Webui without both sr0 and sg1
Then you are using the wrong container
LOL, using the jlesage/MakeMKV container
Re: Optical Drive not being found
Posted: Mon Jan 22, 2018 9:27 pm
by mike admin
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.
Re: Optical Drive not being found
Posted: Mon Jan 22, 2018 10:25 pm
by saarg
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.
Re: Optical Drive not being found
Posted: Mon Jan 22, 2018 11:28 pm
by Djoss
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!
Re: Optical Drive not being found
Posted: Tue Jan 23, 2018 4:36 am
by JohnJasonJordan
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?