disk passthrought

lyan_fr

New Member
Jun 11, 2024
6
0
1
hi there,
i need to passthrought a disk to an unprivileged container with debian 12.
i have this on the host:
Code:
root@pve:~# ls -al /dev/sd*
brw-rw---- 1 root disk 8,  0 Jul 31 14:21 /dev/sda
brw-rw---- 1 root disk 8,  1 Jul 31 14:21 /dev/sda1
brw-rw---- 1 root disk 8,  2 Jul 31 14:21 /dev/sda2
brw-rw---- 1 root disk 8,  3 Jul 31 14:21 /dev/sda3
brw-rw---- 1 root disk 8, 16 Jul 31 14:21 /dev/sdb
brw-rw---- 1 root disk 8, 17 Jul 31 14:21 /dev/sdb1

I used the webui to config the passthrought : Resources > Add > Device passthrought
path: /dev/sdb
uid: 0
gid: 0
Access: 0666

after that i have /dev/sdb in CT, but if try to mount the device i get permission denied.

In CT /dev/sdb and the created mountpoint are root owned.
container's root ids are 0:0
why it doesn't work?

thanks in advance.
 
thanks for reply.
reading this post it seem to be possible to do it also in webui, but i haven't found documentation about that.

however, about your link, i'm going crazy to understand it... please help me.
in CT i have root with UID=0 GID=0 and a user with UID=1000 GID=1000. i want to get access for both.
what i should add in the .conf file?
Code:
lxc.idmap = u 0 100000 1005
lxc.idmap = g 0 100000 1005
is this right?
then... where are the files /etc/subuid and /etc/subgid? in CT or PVE?
i need to create the mountpoint in CT?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!