Title says it all. I'm trying to put a (USB) Blu-Ray/DVD/CD drive on to an LXC container in my Proxmox VE. No matter what I do, it seems I can't mount it, and dmesg is exceptionally unhelpful. I can't really seem to locate even any logs which would indicate what the problem is.
1) Where might I go for some failure logs/analysis? The container says to check dmesg(1) but on an unprivileged container it can't open dmesg (duh) and on a privileged container, dmesg only says "/dev/sr0: Can't open blockdev"
2) What is the proper way to pass a block device into an LXC container; preferably unprivileged, but if one way works and the other doesn't I'll take that. This isn't a high-security environment, it's a home lab. Details follow.
Specifically, I am building a local web service which provides some means to rip discs directly to my media server via a direct attached drive. The tools which do the ripping need direct (low level) access to the block devices, not just for reading, but for operations like eject, load tray, etc. I've tried both the direct passthrough via the UI, ala:
I've also tried a more esoteric configuration, which I got from here, like this:
With both options, /dev/sr0 shows up correctly but any time I try to mount it I get the following error:
and dmesg just says
1) Where might I go for some failure logs/analysis? The container says to check dmesg(1) but on an unprivileged container it can't open dmesg (duh) and on a privileged container, dmesg only says "/dev/sr0: Can't open blockdev"
2) What is the proper way to pass a block device into an LXC container; preferably unprivileged, but if one way works and the other doesn't I'll take that. This isn't a high-security environment, it's a home lab. Details follow.
Specifically, I am building a local web service which provides some means to rip discs directly to my media server via a direct attached drive. The tools which do the ripping need direct (low level) access to the block devices, not just for reading, but for operations like eject, load tray, etc. I've tried both the direct passthrough via the UI, ala:
Code:
dev0: /dev/sr0,gid=24 # Mountable block device
dev1: /dev/sg4,gid=24 # Raw "SCSI" device
dev2: /dev/bus/usb/002/002,mode=0664 # USB device associated with the drive
I've also tried a more esoteric configuration, which I got from here, like this:
Code:
lxc.cgroup2.devices.allow: c 189:129 rwm
lxc.cgroup2.devices.allow: c 11:0 rwm
lxc.cgroup2.devices.allow: c 21:4 rwm
lxc.mount.entry: /dev/sr0 dev/sr0 none bind,optional,create=file,gid=25,uid=0
lxc.mount.entry: /dev/sg4 dev/sg4 none bind,optional,create=file,gid=25,uid=0
lxc.mount.entry: /dev/bus/usb/002/002 dev/bus/usb/002/002 none bind,optional,create=file,uid=0,gid=0
With both options, /dev/sr0 shows up correctly but any time I try to mount it I get the following error:
Code:
$ sudo mount /dev/sr0 /mnt/sr0
mount: /mnt/sr0: permission denied.
dmesg(1) may have more information after failed mount system call.
Code:
[3745122.476147] /dev/sr0: Can't open blockdev