28 Jul

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.

Proxmox UI

Datacenter → Storage → select the LVM storage → Remove

In a single node

# show which PV (mpath/WWID) maps to which VG
pvs -o pv_name,vg_name
# remove the VG and all its LVs vgremove -f <vgname> # remove the physical volume pvremove /dev/mapper/<wwid>


In all nodes


Remove WWID from multipath file

# remove the WWID line from the multipath allow-list so it isn't reclaimed on reboot
sed -i "\|/<wwid>/|d" /etc/multipath/wwids

# confirm it's gone
grep -c 36589cfc /etc/multipath/wwids

# flush the map if it still exists
multipath -f <wwid>
multipath -ll

Example

sed -i "\|/36589cfc000000e98a19d7f5f3bd4716d/|d" /etc/multipath/wwids
grep -c 36589cfc /etc/multipath/wwids
multipath -f 36589cfc000000e98a19d7f5f3bd4716d
multipath -ll


Session logout

# list iscsi sessions to identify the target IQN
iscsiadm -m session
# disconnect from the iscsi target iscsiadm -m node -T <target_iqn> --logout # delete the target record so it doesn't reconnect on reboot iscsiadm -m node -T <target_iqn> -o delete


Example: Removing general-vms and general-vms2

# general-vms
iscsiadm -m node -T iqn.2005-10.org.freenas.ctl:general-vms --logout
iscsiadm -m node -T iqn.2005-10.org.freenas.ctl:general-vms -o delete
# general-vms2 iscsiadm -m node -T iqn.2005-10.org.freenas.ctl:general-vms2 --logout iscsiadm -m node -T iqn.2005-10.org.freenas.ctl:general-vms2 -o delete



Comments
* The email will not be published on the website.