Score:2

Proxmox VE: add a LVM storage on top of iSCSI: how to find "base" value for pvesm

bd flag

I'm using Proxmox VE platform, version 6 or 7, and I'm currently documenting the initial setup with the idea of automating it later. So I'm looking for all command line commands to do all that I must do on the web UI.

My problem is in the storage configuration step: I try to configure an LVM volume on top of an iSCSI LUN.

If I do this setup with the web UI, the /etc/pve/storage.cfg looks like

iscsi: <ID1>
    portal <portal>
    target <target>
    content none

lvm: <ID2>
    vgname <vgname>
    base <ID SCSI>
    content rootdir,images
    shared 1

I can use the pvesm utility to do it with the following commands

pvesm add iscsi <ID> --portal <SERVER> --target <TARGET> --content none

pvesm add lvm <ID> --vgname <vgname> --base <ID SCSI>

The problem is I don't know how to find this ID SCSI, neither using any PVE or open-iscsi tool.

ps: the "ID SCSI" looks like <ID1>:0.0.0.scsi-<1234000afbc....>

Score:1
bd flag

It seems that I found the answer by myself just half an hour after asking the question... well... that happens...

pvesm list <ID> returns this ID SCSI which I needs to configure/create the LVM VG

# pvesm list <ID1>
Volid                                                               Format  Type                Size VMID
<ID SCSI> raw     images    <number>
# pvesm add lvm <ID2> --vgname <vgname> --base <ID SCSI>
  Physical volume "/dev/disk/by-id/<ID SCSI>" successfully created.
  Volume group "<vgname>" successfully created
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.