[SOLVED] 2. LVM auf 2. Iscsi LUN klappt nicht

Tompa

Member
Jul 1, 2021
19
1
8
36
Hallo Zusammen

Ich habe das Problem das wenn ich ein LVM auf einem Iscsi LUN anlegen möchte immer folgende Fehlermeldung erscheint.

create storage failed: pvcreate '/dev/disk/by-id/scsi-SSYNOLOGY_iSCSI_Storage_ccfbe117-aeec-439b-a568-b170d85dd7ed' error: Cannot use device /dev/sdb with duplicates. (500)

Die Ausgangslage ist die folgende:

Proxmox: 7.1-10
Cluster: 3 Nodes
NAS: Synology

Aktuell sind zwei LUN's mit Proxmox VE verknüpft das hat alles wunderbar geklappt.
Multipath ist eingerichtet und beide wwid's der jeweiligen LUN's sind eingetragen, Multipath ist auch aktiviert.

sdb ist das bestehende LUN welches funktioniert, das neue LUN wäre sdc aber da steht noch disk und nicht mpath obwohl es als Iscsi eingelesen ist.

sda 8:0 0 7.8T 0 disk
└─360014058d45b805de27fd4690dbb32d2 253:5 0 7.8T 0 mpath
└─iscsi_LUN2-vm--110--disk--0 253:6 0 2.9T 0 lvm
sdb 8:16 0 7.8T 0 disk
└─360014058d45b805de27fd4690dbb32d2 253:5 0 7.8T 0 mpath
└─iscsi_LUN2-vm--110--disk--0 253:6 0 2.9T 0 lvm
sdc 8:32 0 500G 0 disk
sdd 8:48 0 500G 0 disk

Auf dem 1. LUN wurde ein LVM draufgelegt so das darin ein Debian aufgesetzt und betrieben werden kann, das klappte auch ohne Probleme.
Nun möchte ich das gerne wiederholen, also nochmals ein LUN erstellt wieder mit Proxmox verbunden und dann versucht ein LVM darauf zu legen. Dann erscheint die Fehlermeldung.

Grundsätzlich sollte das doch möglich sein das man eines oder mehrere Iscsi LUN's verwendet und dann darauf LVM's legen kann.
Jedes LUN ist ja wie eine eigene Festplatte.

Die Target Beschriftung also iqn ist bei beiden unterschiedlich so das auch ich diese einfach auseinander halten kann.
Die LUN's liegen natürlich auf dem selben NAS mit der gleichen IP Adresse, aber denke das sollte kein Problem sein für da ist Iscsi ja gedacht.

Auf der Synology kann ich nichts finden was man noch anpassen könnte, mehrere Verbindungen zulassen ist bereits aktiviert.

Ich hoffe es hat jemand eine zündende Idee.

Vielen Dank,
 
Something appears to be misconfigured. If you do indeed have multipath configured you should never be using the underlying sda/sdb for any operation.

The error above, I think, is a pre-check error. The pvcreate is looking at disks and finds that sdb is a duplicate of an already found sda. This indicates that multipath is misconfigured.
Its also strange that there is no second path for sdc device in your output, but perhaps you cut it off. In general its best to show all output, more is better than less.

What does "multipath -ll" show? What about "lsblk" ?


Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
The export from multipath -ll

360014058d45b805de27fd4690dbb32d2 dm-6 SYNOLOGY,iSCSI Storage
size=7.8T features='0' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| `- 7:0:0:1 sdd 8:48 active ready running
`-+- policy='service-time 0' prio=50 status=enabled
`- 8:0:0:1 sde 8:64 active ready running

The export from lsblk:

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
└─sda1 8:1 0 931.5G 0 part /mnt/pve/Migrationsordner
sdb 8:16 0 500G 0 disk
sdc 8:32 0 500G 0 disk
sdd 8:48 0 7.8T 0 disk
└─360014058d45b805de27fd4690dbb32d2
253:6 0 7.8T 0 mpath
└─iscsi_LUN2-vm--110--disk--0 253:7 0 2.9T 0 lvm
sde 8:64 0 7.8T 0 disk
└─360014058d45b805de27fd4690dbb32d2
253:6 0 7.8T 0 mpath
└─iscsi_LUN2-vm--110--disk--0 253:7 0 2.9T 0 lvm
nvme0n1 259:0 0 119.2G 0 disk
├─nvme0n1p1 259:1 0 1007K 0 part
├─nvme0n1p2 259:2 0 512M 0 part /boot/efi
└─nvme0n1p3 259:3 0 118.7G 0 part
├─pve-swap 253:0 0 8G 0 lvm [SWAP]
├─pve-root 253:1 0 29.5G 0 lvm /
├─pve-data_tmeta 253:2 0 1G 0 lvm
│ └─pve-data-tpool 253:4 0 64.5G 0 lvm
│ └─pve-data 253:5 0 64.5G 1 lvm
└─pve-data_tdata 253:3 0 64.5G 0 lvm
└─pve-data-tpool 253:4 0 64.5G 0 lvm
└─pve-data 253:5 0 64.5G 1 lvm

Multipath shows only one Storage, but i have two iscsi LUN's activatet.
1647862443398.png
 
The outputs between opening post and last one changed, which indicates that they are either from different systems in the cluster or you've rebooted and all the disk label assignments changed. The latter is not unusual but makes it difficult to get a good picture.

It sill appears that your multipath is not configured correctly, based on your description of what is connected to the system. I suggest you carefully examine and compare each host's configuration. They should be close to identical.
The short of it is : as long as you have two iscsi sessions that access the same LUN (by id), your multipath should detect it and present an mpath dm-x device. That device should be used in all of your application level configuration (lvm, file system, pve, etc).


Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Das was effektiv das Problem.
Ich habe immer nur bei Node 1 nach den Multipath Verzeichnissen geschaut. Auf Node 2 und 3 wurde die WWID nicht übertragen.

In dem Fall muss man jedes mal wenn ein neues Iscsi Laufwerk dazukommt die Einträge auf alle Nodes manuell eintragen über die Shell.

Nun konnte ich ohne Probleme ein LVM anlegen auf dem neuen LUN.

Vielen Dank für die schnelle Hilfe.
 

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!