Shrinking partitioned LVM volumes

Backup partition table:
# sfdisk -d /dev/dc02-core02-vg/vm-main > vm-main.part

Map partitions to volume
# partprobe /dev/mapper/dc02--core02--vg-vm--main

Open gparted and make needed changes
# gparted /dev/mapper/dc02-core02--vg-vm--main

Find all open mapper devices
# dmsetup info -c | grep dc02-core02--vg-vm--main
dc02--core02--vg-vm--main 253 2 L--w 3 1 0 LVM-12345de2
dc02--core02--vg-vm--main1 253 13 L--w 0 1 0 part1-LVM-12345de2
dc02--core02--vg-vm--main14 253 14 L--w 0 1 0 part14-LVM-12345de2
dc02--core02--vg-vm--main15 253 15 L--w 0 1 0 part15-LVM-12345de2

List holders
# ls -lh /sys/dev/block/253\:2/holders/
total 0
lrwxrwxrwx 1 root root 0 Aug 15 01:34 dm-13 -> ../../dm-13
lrwxrwxrwx 1 root root 0 Aug 15 01:34 dm-14 -> ../../dm-14
lrwxrwxrwx 1 root root 0 Aug 15 01:34 dm-15 -> ../../dm-15

Remove holders
# dmsetup remove /dev/dm-13
# dmsetup remove /dev/dm-14
# dmsetup remove /dev/dm-15

Disable LVM volume
# lvchange -an /dev/dc02-core02-vg/vm-main

Shrink LVM volume to 100GB
# lvresize -L 100G /dev/dc02-core02-vg/vm-main

Enable LVM volume
# lvchange -ay /dev/dc02-core02-vg/vm-main

Verify partition table
# sfdisk -d /dev/dc02-core02-vg/vm-main

MCX354A-QCBT to MCX354A-FCBT

# wget http://www.mellanox.com/downloads/firmware/fw-ConnectX3-rel-2_42_5000-MCX354A-FCB_A2-A5-FlexBoot-3.4.752.bin.zip
# unzip fw-ConnectX3-rel-2_42_5000-MCX354A-FCB_A2-A5-FlexBoot-3.4.752.bin.zip
# mstflint -d 03:00.0 -i fw-ConnectX3-rel-2_42_5000-MCX354A-FCB_A2-A5-FlexBoot-3.4.752.bin -allow_psid_change burn
# reboot

# mst start
# mlxconfig -d /dev/mst/mt4099_pciconf0 set LINK_TYPE_P1=2 LINK_TYPE_P2=2
reboot