I want to passthrough my /dev/sdb to a LXC container running OpenMediaVault.
Running
	
	
	
		
Seems to work perfectly, and /dev/sdb is visible in the container. Unfortunately this command is temporary and doesn't survive a reboot
The solution seems to be to use lxc.cgroup.devices.allow
I first needed to discover the major and minor ID's for my device:
	
	
	
		
b = This is a block device
8 is the major ID
16 is the minor ID
Adding this to the container conf:
	
	
	
		
After adding these two lines, the Proxmox GUI shows the error:
				
			Running
		Code:
	
	# lxc-device add -n 102 /dev/sdbThe solution seems to be to use lxc.cgroup.devices.allow
I first needed to discover the major and minor ID's for my device:
		Code:
	
	# ls -al /dev/sdb
[B]b[/B]rw-rw---- 1 root disk [B]8[/B], [B]16[/B] Aug 14 21:02 /dev/sdb8 is the major ID
16 is the minor ID
Adding this to the container conf:
		Code:
	
	# devices - set profile to allow mounting block devices (constrained by default)
lxc.aa_profile = lxc-container-default-with-mounting
# lxc.cgroup.devices.allow = typeofdevice majornumber:minornumber rwm
lxc.cgroup.devices.allow = b 8:16 rwmAfter adding these two lines, the Proxmox GUI shows the error:
Invalid Key 'lxc.cgroup.devices.allow' (500)
- What am I doing wrong?
- Is this feature not implemented in Proxmox yet?
- Is there a way to achieve persistent block device passthrough?
 
	 
	 
 
		
 
 
		

