Can't add iSCSI LVM Storage

Marcelo Costa

Member
Jun 27, 2017
17
0
6
50
Hi,

I have a freenas storage with iSCSI share. I want migrate from xenserver.

In the Proxmox, I have create the iSCSI storage and when I try create the LVM Storage based on the iSCSI, the following message show: "create storage failed: error with cfs lock 'file-storage_cfg': device '/dev/disk/by-id/scsi-36589cfc000000d58f5e3d475d6ad70dc' is already used by volume group 'VG_XenStorage-49faa339-76d0-c8c6-7fdd-2114703b73fe' (500) "

Code:
root@vmobc-pve01:/mnt# vgdisplay
  WARNING: Not using device /dev/sdd for PV 955tEr-0dJG-mLrK-yaGU-0odD-La0N-2fBM8D.
  WARNING: PV 955tEr-0dJG-mLrK-yaGU-0odD-La0N-2fBM8D prefers device /dev/sdc because device is used by LV.
  --- Volume group ---
  VG Name               VG_XenStorage-49faa339-76d0-c8c6-7fdd-2114703b73fe
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  6
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <2.00 TiB
  PE Size               4.00 MiB
  Total PE              524285
  Alloc PE / Size       262659 / 1.00 TiB
  Free  PE / Size       261626 / <1021.98 GiB
  VG UUID               pNg1PJ-muSV-A29X-uQoN-maky-MwGN-EqzkQg

Code:
root@vmobc-pve01:~# pvdisplay
  WARNING: Not using device /dev/sdd for PV 955tEr-0dJG-mLrK-yaGU-0odD-La0N-2fBM8D.
  WARNING: PV 955tEr-0dJG-mLrK-yaGU-0odD-La0N-2fBM8D prefers device /dev/sdc because device is used by LV.
  --- Physical volume ---
  PV Name               /dev/sdc
  VG Name               VG_XenStorage-49faa339-76d0-c8c6-7fdd-2114703b73fe
  PV Size               2.00 TiB / not usable 12.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              524285
  Free PE               261626
  Allocated PE          262659
  PV UUID               955tEr-0dJG-mLrK-yaGU-0odD-La0N-2fBM8D

Code:
root@vmobc-pve01:~# lvdisplay
  WARNING: Not using device /dev/sdd for PV 955tEr-0dJG-mLrK-yaGU-0odD-La0N-2fBM8D.
  WARNING: PV 955tEr-0dJG-mLrK-yaGU-0odD-La0N-2fBM8D prefers device /dev/sdc because device is used by LV.
  --- Logical volume ---
  LV Path                /dev/VG_XenStorage-49faa339-76d0-c8c6-7fdd-2114703b73fe/MGT
  LV Name                MGT
  VG Name                VG_XenStorage-49faa339-76d0-c8c6-7fdd-2114703b73fe
  LV UUID                94SCE1-6Cwd-mSkH-3fwN-Ik6c-gRaR-jH1D58
  LV Write Access        read/write
  LV Creation host, time vmobcxenserver01.vmobc.local, 2017-09-11 18:23:18 -0300
  LV Status              available
  # open                 0
  LV Size                4.00 MiB
  Current LE             1
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

  --- Logical volume ---
  LV Path                /dev/VG_XenStorage-49faa339-76d0-c8c6-7fdd-2114703b73fe/VHD-bb176be7-e580-4722-afdd-5d9dbe53415b
  LV Name                VHD-bb176be7-e580-4722-afdd-5d9dbe53415b
  VG Name                VG_XenStorage-49faa339-76d0-c8c6-7fdd-2114703b73fe
  LV UUID                3hwn1F-jF6t-wkXS-QSS0-E8fs-FjRB-dldR35
  LV Write Access        read/write
  LV Creation host, time vmobcxenserver01.vmobc.local, 2017-09-11 18:25:48 -0300
  LV Status              available
  # open                 0
  LV Size                1.00 TiB
  Current LE             262658
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1



How solve this issue?

help me, please!


Thanks,
Marcelo Costa
 
Last edited:
I am afraid just adding the iSCSI storage that you used on XenServer to Proxmox VE and booting VMs from it will not work.

One problem is that the LV naming schemes are very different.

You will have to migrate your VMs.
https://pve.proxmox.com/wiki/Migration_of_servers_to_Proxmox_VE

Hello,

I create from command line, a storage based on VGName and a iSCSI disk based on LVName, but when I start the VM 100, the message appear: TASK ERROR: unable to parse lvm volume name 'VHD-bb176be7-e580-4722-afdd-5d9dbe53415b'



Code:
~# cat /etc/pve/storage.cfg

iscsi: Dados-srvArquivos-iSCSI
        portal 192.168.50.15
        target iqn.2019-12.local.vmobc.freenas:target-dados-srvrquivos
        content images

lvm: Dados-srvArquivos-iSCSI-LVM
        vgname VG_XenStorage-49faa339-76d0-c8c6-7fdd-2114703b73fe
        base Dados-srvArquivos-iSCSI:0.0.1.scsi-36589cfc000000d58f5e3d475d6ad70dc
        content images,rootdir
        shared 1


Code:
~# cat /etc/pve/qemu-server/100.conf

agent: 1
balloon: 2048
boot: cdn
bootdisk: ide0
cores: 3
ide0: local-zfs:vm-100-disk-0,size=12G
virtio1: Dados-srvArquivos-iSCSI-LVM:VHD-bb176be7-e580-4722-afdd-5d9dbe53415b,size=1024
#virtio1: /dev/VG_XenStorage-49faa339-76d0-c8c6-7fdd-2114703b73fe/VHD-bb176be7-e580-4722-afdd-5d9dbe53415b, size=1024
memory: 4096
name: srvArquivos
net0: virtio=BE:AD:41:37:2C:F7,bridge=vmbr0
net1: virtio=22:6C:DA:D6:71:F9,bridge=vmbr1
net2: virtio=1E:16:38:8F:24:49,bridge=vmbr3
numa: 0
ostype: l26
scsihw: virtio-scsi-pci
smbios1: uuid=2c39dc7a-3d86-44db-a52b-4c793a41c7a4
sockets: 1
vmgenid: c7c6be9f-6efc-44eb-a2d0-a43dee634bfe

Thanks,
Marcelo Costa
 

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!