Proxmox VE 7.3: Resize disk of running instances with disks in iSCSI storage

jbe-dw

New Member
Feb 17, 2023
3
0
1
Hello,

I have read a similar post with detailed step about that, the main difference is that each of my VM disks is a single LUN (not a large LUN that stores raw or qcow2 disk images). I can:

- Resize the disk on the SAN host
- Rescan iSCSI session and upgrade multipath size on the proxmox servers

I was able to resize the disk inside the vm after i shut it down then started it again.

However, the old size is still showing up in the instance hardware list, and the new size is not notified to the instance kernel (it needed a cold reboot). Is there a way to tell Proxmox to rescan the disk and update its size (in the GUI) and notify the VM.

I'm not sure if `qm resize` safely applies to this kind of disk.

Thank you
Jerome
 
I am dealing with a similar issue in my non-production lab and looking for answers. Did you ever figure out how to rescan the disk in Proxmox without having to recreate it?
 
Hello, I am also interested in this topic. Have you tried this with 8.3 yet? Anything new ?
 
Ok, I did a little test and it still seems to be like the original poster described it, i.e. after resizing the lun on the storage, doing iscsiadm session rescan and multipath map force reload and a cold start of the vm, then the size of the disk within the vm is the new size. But the hardware details still show the size like it was before. Trying to resize it with the gui result in the error:

volume resize is not possible on iscsi device at /usr/share/perl5/PVE/Storage/ISCSIPlugin.pm line 575.
 
I have a similar problem.
Resize on the San side dosent effect the hostside.
Newly createtd luns not fully active, without a restart of 3 out of 5 host in the cluster.

Running on 8.3.3 with 5 hosts, and Purestorage as Storage. Single lun pr Vm.
Regards

Jens
 
Hi,
Same here, single lun pr VM. (running 9.1)
I'm able to resize the lun on the host, but the block size is not propagated to the guest, it might be a kvm restriction. as far as I recall block_resize(qm monitor) doesn't work
I guess I'm going back to xen then ! :cool:
 
Hi All, could any of the participants who are sharing their experience here post:
- VM config pre-resize
- storage.cfg
- Storage config (lsscsi, lsblk, pvs, vgs, lvs, multipath -ll ) pre-resize
- Resize steps with outputs
- Storage config post-resize
- VM config post-resize


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
storage is not handled by pve, to reproduce and keep it simple
- script to attach a lun to a pve host => /dev/mapper/my.lun (size 50G)
- create a vm with qm create id --scsihw virtio-scsi-single --scsi0 /dev/mapper/my.lun (,size=50G is added to the scsi0 definition in id.conf but "This is purely informational and has no effect."
- expand LUN on the SAN + script to do all the resizing on the host => /dev/mapper/my.lun size new size is 100G
with xen the guest immediately detects the size change.
I just found a solution for kvm,
- blockdev --getsize64/dev/mapper/my.lun to get the size in bytes
- socat - UNIX-CONNECT:/var/run/qemu-server/ID.qmp to connect to the QMP socket
- type { "execute": "qmp_capabilities" }
- then {"execute":"query-block"} to confirm the correct node-name for /dev/mapper/my.lun => "drive-scsi0"
- and
JSON:
{
  "execute": "block_resize",
  "arguments": {
    "size": 107374182400,
    "node-name": "drive-scsi0"
  }
}

et voila ! :cool:
 
would "qm monitor" achieve the same?

Code:
qm monitor <vmid>

       Enter QEMU Monitor interface.

       <vmid>: <integer> (100 - 999999999)
           The (unique) ID of the VM.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
it would be easier, "qm monitor" provides access to the Human Monitor Interface (HMP)
and I haven't had success with "block_resize device size -- resize a block image"
(qemu) block_resize drive-scsi0 107374182400
Error: Cannot grow device files
(qemu) block_resize test 107374182400
Error: Cannot find device='test' nor node-name=''

if you look at {"execute":"query-block"} output => the device attribute is empty.
I don't know if we can pass node-name="drive-scsi0" to the hmp command.
I am going to script it anyway, json is easier and safer to parse.
 
Last edited: