Cannot Create LVM on iSCSI storage

mbartho

Member
Jan 5, 2021
8
0
6
48
I set up a new instance of TrueNas 12 Core. I am attempting to setup iscsi storage to TrueNas in Proxmox. The vdev was created in TrueNas along with the iscsi target. I have created the iscsi connection in proxmox and it is showing as available but receive the following error when I attempt to create the LVM storage in proxmox.

create storage failed: error during cfs-locked 'file-storage_cfg' operation: command '/sbin/pvs --separator : --noheadings --units k --unbuffered --nosuffix --options pv_name,pv_size,vg_name,pv_uuid /dev/disk/by-id/scsi-36589cfc000000fbe2029fe2d7139fde7' failed: exit code 5 (500)

Can someone tell me exactly what this error means and possibly how to resolve the problem? I have basic knowledge on how to set things up but I'm not familiar with how to troubleshoot issues when things do not go as planned. Hopefully, I can make this a learning experience.

Thanks in advance!
 
did you add the iscsi target via the PVE GUI? (if yes please share your /etc/pve/storage.cfg)

any relevant messages from iscsiadm or the kernel on the PVE-node? (`journalctl -b` gives you the logs since the last boot)

the output of `lsblk`, `pvs`, `vgs` could also provide some hints

I hope this helps!
 
I was also getting this error when trying to add LVM on iSCSI target. I was using a drobo iscsi that had 2 ips (redundant paths). If i unplugged the LAN side (the other is directly attached to my PVE host) the notice changed to a "cannot find device" error. The trick (for me) was configuring multipath following this article: https://pve.proxmox.com/wiki/ISCSI_Multipath

You can tell if multipath might be your issue if you do a dir on /etc/iscsi/nodes/<<target of your iscsi>>/ and you see more than one port/ip set listed. For me it was easier to start from scratch when following the article mentioned above. I removed my ISCSI from the GUI and then I rm -R my /etc/iscsi/nodes/ folder (removing from gui doesn't remove entries of nodes). Removing these allowed me to just modify /etc/iscsi/iscsid.conf file instead of doing this for each iscsi target. THIS WILL DELETE EVERYTHING IN THE NODES FOLDER SO IF YOU HAVE OTHER ISCSI WORKING DONT DO THIS, instead modify the default file for each iscsi target folder or just remove those folders for the iscsi target you removed and will readd.

After you configure the iscsid.conf file make sure you go add your iscsi target back or you'll be at a loss for the next steps.

"fdisk -l" will help you identify the device id for the config step that says "# /lib/udev/scsi_id -g -u -d /dev/sda" (mine was sdd not sda). Helpful tip if you're a linux gumby like me.

Hope this helps someone. I wanted to add this because I'm hoping i can see this next time i have this issue (aka - add another LUN).
 
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!