Environment:
- WHMCS
- Proxmox VE
- Modules Gardens Proxmox VE Module
- TrueNAS Scale iSCSI NAS
After a client automatically upgraded a service the disk resize command was sent. However, the Proxmox server console showed this:
TASK ERROR: VM xxx qmp command ‘block_resize’ failed – iSCSI: failed to send readcapacity10/16 command
The operator SSH’ed to the Forge server, check the disk size, and saw this:
$ df -h | awk '$NF == "/" {print $0}' /dev/sda1 145G 8.4G 136G 6% /
However, the Proxmox UI shows this:
As you can see, the Bootdisk size is 20 GiB but Linux output 145 G. So there is a mismatch between the Proxmox UI and the actual disk size. On the surface this could be problematic if the server miscalculates hypervisor’s disk space.
Here are the two commands you can use to check it, and then fix it:
- qm config VMID
- qm disk rescan –vmid VMID
Here is the output of running those commands:
# qm config xxx ... boot: order=scsi0 ... ide2: nas03:vm-171-cloudinit,media=cdrom,size=4M ... meta: creation-qemu=9.0.0,ctime=1719946914 ... scsi0: nas03:base-9000-disk-0/vm-171-disk-0,cache=none,iothread=1,size=20G scsihw: virtio-scsi-single
This is the output running the fix command:
# qm disk rescan --vmid xxx rescan volumes... iscsiadm: No session found. iscsiadm: No session found. VM xxx (scsi0): size of disk 'nas03:base-9000-disk-0/vm-xxx-disk-0' updated from 20G to 150G
Reference