This guide explains how to connect a Synology iSCSI LUN to a Proxmox host and mount it for use with containers (LXC).
⚠️ Important: If using a standard filesystem such as
ext4, only one node should mount the LUN at a time. Mounting the same LUN on multiple nodes without a cluster filesystem can cause data corruption.
1) Discover the iSCSI Target
Run the discovery command from your Proxmox node:
iscsiadm -m discovery -t sendtargets -p NAS_IP
Example:
iscsiadm -m discovery -t sendtargets -p 192.168.x.x
You should see output similar to:
192.168.x.x:3260,1 iqn.YYYY-MM.com.synology:target-name
2) Get the Proxmox Initiator Name
You’ll need to add this to the Allow List in Synology DSM.
cat /etc/iscsi/initiatorname.iscsi
Output will look like:
InitiatorName=iqn.YYYY-MM.org.debian:unique-id
Copy everything from iqn onwards and add it to your Synology iSCSI target permissions.
3) Log In to the iSCSI Target
iscsiadm -m node --login
If successful, the session will establish without errors.
To log out from another node (if required):
iscsiadm -m node --logout
4) Confirm the Disk Appears
Check block devices:
lsblk
Or confirm the by-path entry:
ls -l /dev/disk/by-path | grep iscsi
You should see something similar to:
ip-192.168.x.x:3260-iscsi-iqn...-lun-1 -> ../../sdb
5) Format the LUN (If Required)
If this is a new LUN:
mkfs.ext4 /dev/sdX
Replace sdX with the correct device.
6) Create a Mount Point
mkdir -p /mnt/storage
7) Add to /etc/fstab
Edit:
nano /etc/fstab
Add:
/dev/disk/by-path/ip-NAS_IP:3260-iscsi-iqn.TARGET_NAME-lun-1 /mnt/storage ext4 _netdev,noatime,discard 0 2
Reload systemd and mount:
systemctl daemon-reload
mount -a
8) Ensure iSCSI Auto-Starts on Boot
iscsiadm -m node --op update -n node.startup -v automatic
Verify:
iscsiadm -m node
9) Add Mount to an LXC Container
Edit the container config file:
nano /etc/pve/lxc/CTID.conf
Add at the bottom:
mp0: /mnt/storage,mp=/mnt/storage,backup=0
Restart the container after saving.
Optional Security Recommendation
Consider enabling CHAP authentication on your Synology iSCSI target to prevent unauthorised access, even on internal networks.