I have a question very similar to this one: Pass USB Device to LXC
I have my externel disk enclosure that is plugged in USB on host:
I have this major and minor on host :
in my ct.conf I added those two lines (I tried also with create=dir) :
I also created a
I then indeed have my node file created in my ct (with nobody/nogroup idk if that's part of the issue):
But i don't have any device node under /dev/sdX as it should be.
I do have it under my host:
So I can't mount anything in my ct as I'm aware.
I have my externel disk enclosure that is plugged in USB on host:
Bash:
root@pve:~# lsusb
Bus 004 Device 006: ID 174c:55aa ASMedia Technology Inc. ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge, ASM1153E SATA 6Gb/s bridge
I have this major and minor on host :
Bash:
root@pve:~# ls -al /dev/bus/usb/004/006
crw-rw-r-- 1 root root 189, 388 Apr 23 17:52 /dev/bus/usb/004/006
in my ct.conf I added those two lines (I tried also with create=dir) :
Bash:
lxc.cgroup2.devices.allow: c 189:388 rwm
lxc.mount.entry: /dev/bus/usb/004/006 dev/bus/usb/004/006 none bind,optional,create=file
I also created a
/etc/udev/rules.d/50-myusb.rules
file and triggered udevadm just after:
Code:
root@pve:~# udevadm info -a -n /dev/bus/usb/004/006 | grep '{idVendor}' | head -n1
ATTR{idVendor}=="174c"
root@pve:~# udevadm info -a -n /dev/bus/usb/004/006 | grep '{idProduct}' | head -n1
ATTR{idProduct}=="55aa"
root@pve:~# cat <<EOT >> /etc/udev/rules.d/50-myusb.rules
SUBSYSTEMS=="usb", ATTRS{idVendor}=="174c", ATTRS{idProduct}=="55aa", GROUP="users", MODE="0666"
EOT
root@pve:~# udevadm trigger
I then indeed have my node file created in my ct (with nobody/nogroup idk if that's part of the issue):
Bash:
root@ct:/# stat /dev/bus/usb/004/006
File: /dev/bus/usb/004/006
Size: 0 Blocks: 0 IO Block: 4096 character special file
Device: 5h/5d Inode: 1818 Links: 1 Device type: bd,186
Access: (0666/crw-rw-rw-) Uid: (65534/ nobody) Gid: (65534/ nogroup)
Access: 2024-04-25 13:19:44.944646064 +0000
Modify: 2024-04-25 13:19:44.944646064 +0000
Change: 2024-04-25 13:19:44.944646064 +0000
Birth: 2024-04-25 13:19:44.932645524 +0000
But i don't have any device node under /dev/sdX as it should be.
I do have it under my host:
Bash:
root@pve:~# ls -lah /dev/ | grep sd
brw-rw-rw- 1 root disk 8, 0 Apr 25 15:19 sda
brw-rw-rw- 1 root users 8, 1 Apr 25 15:40 sda1
So I can't mount anything in my ct as I'm aware.
Last edited: