Mounting iSCSI Share to LXC Container

MFB1205

New Member
Jan 5, 2024
1
0
1
Hello,

I am currently trying to mount a iSCSI Share to an LXC Container.

If I try to mount the iSCSI Share directly to the LXC Container I get the following error message:
"iscsiadm: read error (-1/104), daemon died?
iscsiadm: iSCSI driver tcp is not loaded. Load the module then retry the command.
iscsiadm: Could not perform SendTargets discovery: iSCSI driver not found. Please make sure it is loaded, and retry the operation"

But the module seems to be loaded:
lsmod |grep scsi
iscsi_tcp 24576 1
libiscsi_tcp 32768 1 isci_tcp

I tried many different LXC Containers, rebooted them, nothing.

If I mount the iSCSI Share directly to Proxmox it just works fine.
Is there a way to maybe passtrough the iSCSI Share I mounted to Proxmox to a LXC Container?
 
Last edited:
Hi,

mounting such shares in LXC containers is always a hassle due to privilege separation.

If I mount the iSCSI Share directly to Proxmox it just works fine.
Is there a way to maybe passtrough the iSCSI Share I mounted to Proxmox to a LXC Container?
You can do these using bind-mounts. In your case e.g.:
Code:
 pct set <vmid> -mp0 /path/to/iscsi/share/on/host,mp=/path/in/container

-mp0 might be adjusted if you already have some other bind-mounts. You can check this using pct config <vmid> | grep ^mp, then simply choose the next free number.

You can find more information about bind mounts in our documentation.

Hope this helps!
 
Last edited:

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!