28 Jul

Space can only be increased, not reduced.

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.

Target IQN = "iSCSI Base name:Target Name"

example:

iqn.2005-10.org.freenas.ctl:general-vms

Obtaining WWID and volume group

pvs -o pv_name,vg_name


Obtaining current iSCSI sessions

cat /sys/class/iscsi_session/session*/targetname | sort -u


In all nodes

# check current size
lsblk -o NAME,SIZE,TYPE,MOUNTPOINT
# rescan the iscsi session to pick up the new size iscsiadm -m node -T <target_iqn> --rescan # confirm block devices picked up new size lsblk -o NAME,SIZE,TYPE,MOUNTPOINT # resize the multipath device to match multipathd resize map <wwid> # confirm mpath shows new size lsblk -o NAME,SIZE,TYPE,MOUNTPOINT


In a single node

# resize the physical volume (use the multipath device, not /dev/sdX)
pvresize /dev/mapper/<wwid>
# confirm VG has the new free space vgs
Comments
* The email will not be published on the website.