23 Apr

This post is based on Proxmox's official multipath guide. After some trial and error, we think we have distilled it down to a few core steps. Hope this is as useful to you as it has been to us.

Some steps need to be done on every host in your cluster. Others only need to be done once, on a single host. We have tried to call out which is which at each step.


We assume the following;

  1. You have 2 network paths dedicated to iSCSI, 110 and 111.
  2. These network interfaces for iSCSI have been named iscsi-110 and iscsi-111, we can add details about this if required, send us a message.
  3. Test LUN name generic-vm01.
  4. You are using TrueNAS.

Add new iSCSI LUN

In all nodes

# add iSCSI target via both paths
iscsiadm -m node --targetname iqn.2005-10.org.freenas.ctl:generic-vm01 --portal 10.22.110.104:3260 -I iscsi-110 --op=new
iscsiadm -m node --targetname iqn.2005-10.org.freenas.ctl:generic-vm01 --portal 10.22.111.104:3260 -I iscsi-111 --op=new
# login to the target iscsiadm -m node -T iqn.2005-10.org.freenas.ctl:generic-vm01 -l # verify session is active iscsiadm -m session


In a single node

# find new block devices
lsblk
# you should see the devices at the very bottom, match size or other details
# get the WWID of the new disk (replace sde with your new disk), this assumes we are dealing with device called sde /lib/udev/scsi_id -g -u -d /dev/sde


In all nodes

# register WWID  
multipath -a <WWID>
# refresh multipath -r # verify multipath device is present multipath -ll


In a single node

# create the physical volume
pvcreate /dev/mapper/<WWID>
# create the volume group (this is where you define the name) vgcreate generic-vm01 /dev/mapper/<WWID>


In all nodes

# refresh LVM cache so other nodes see the new VG
pvscan --cache


Proxmox UI

Datacenter → Storage → Add → LVM → Existing volume groups → generic-vm01 → Shared
Comments
* The email will not be published on the website.