How to use ISCSI for LXC storage

s4nguine

New Member
Apr 26, 2024
4
0
1
Hello,

I'm a bit confused when it comes to storage options for LXC containers.
I want to move all of my disks to Truenas and migrate all disks there.
In VM I can easily use ISCSI as backend storage, no issues here.

But documentation on LXC containers also states that remote storages like ISCSI is supported though I don't see option to use it when creating container - probably because valid content for ISCSI is only "disk images".

Documentation states that ISCSI can be used so I'm a bit confused here:

https://pve01.incloud.tech:8006/pve-docs/chapter-pct.html#pct_container_storage
Any storage type supported by the Proxmox VE storage library can be used. This means that containers can be stored on local (for example lvm, zfs or directory),shared external (like iSCSI, NFS) or even distributed storage systems like Ceph.

Can someone provide any input on how this can be achieved for LXC containers?
Do I need to mount ISCSI drive on host and then pass-through to LXC as path?
Is there any documentation about such setup?

Thank you
 
Can someone provide any input on how this can be achieved for LXC containers?
The storage content required for Containers is "rootdir". Not all supported storage pool types support all content types. For example, raw iSCSI storage (Block) does not support Snippets or ISO. The built-in iSCSI type also does not support "rootdir" : https://github.com/proxmox/pve-storage/blob/master/src/PVE/Storage/ISCSIPlugin.pm#L335

The documentation is speaking in general terms. There are other storage types that provide iSCSI and NVMe/TCP, and are compatible with Container storage.

You could combine iSCSI with LVM and get support for containers.
https://github.com/proxmox/pve-storage/blob/master/src/PVE/Storage/LVMPlugin.pm#L410
https://github.com/proxmox/pve-storage/blob/master/src/PVE/Storage/LvmThinPlugin.pm#L33


Blockbridge: Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited:
Ahh, now I see, you can create LVM with ISCSI block device so it's like shared storage for containers with remote storage.
Thank you for advice
 
Last edited: