resize zfs disk

tirili

Member
Sep 19, 2018
55
1
8
50
I tried to resize a VMs disk, using the following command, but it fails:


# qm resize 3210 scsi0:pve-data:vm-3210-disk-0 +10G
400 Parameter verification failed.
disk: value 'scsi0:pve-data:vm-3210-disk-0' does not have a value in the enumeration 'ide0, ide1, ide2, ide3, scsi0, scsi1, scsi2, scsi3, scsi4, scsi5, scsi6, scsi7, scsi8, scsi9, scsi10, scsi11, scsi12, scsi13, virtio0, virtio1, virtio2, virtio3, virtio4, virtio5, virtio6, virtio7, virtio8, virtio9, virtio10, virtio11, virtio12, virtio13, virtio14, virtio15, sata0, sata1, sata2, sata3, sata4, sata5, efidisk0'
qm resize <vmid> <disk> <size> [OPTIONS]

#
# cat /etc/pve/qemu-server/3210.conf
agent: 1
bootdisk: scsi0
cores: 2
keyboard: de
memory: 4096
name: vm3210
net0: virtio=aa:bb:cc:dd:ee:ff,bridge=vmbr1
scsi0: pve-data:vm-3210-disk-0
scsihw: virtio-scsi-pci


I also tried only

# qm resize 3210 vm-3210-disk-0 +10G

and

# qm resize 3210 scsi0:vm-3210-disk-0 +10G

these both failed as well.


Any help is appreciated.
 
Which is the disk name in this case?

# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 54.7G 3.40T 104K /rpool
rpool/data 29.5G 3.40T 96K /rpool/data
rpool/data/vm-3210-disk-0 18.3G 3.40T 18.3G -

# cat /etc/pve/qemu-server/3210.conf
agent: 1
bootdisk: scsi0
cores: 2
keyboard: de
memory: 4096
name: vm3210
net0: virtio=aa:bb:cc:dd:ee:ff,bridge=vmbr1
scsi0: pve-data:vm-3210-disk-0
scsihw: virtio-scsi-pci
 
Perfect this works. Online, without any reboot :)

Journalctl says:

Dec 24 21:27:08 vm3210 kernel: sd 2:0:0:0: Capacity data has changed
Dec 24 21:27:08 vm3210 kernel: sd 2:0:0:0: [sda] 545259520 512-byte logical blocks: (279 GB/260 GiB)

Thank you and Merry X-Mas
 
For those wanting the explicit answer, this worked for me.

qm resize 205 scsi0 +80G

205 is the vm id number

What I think are pertinent details from my conf:
Please replace your "my_pvename" with your own for reference when checking. Also, note I'm using cloud-init which you might not need to.

root@my_pvename:~# cat /etc/pve/nodes/my_pvename/qemu-server/205.conf

bootdisk: scsi0
ide2: local-lvm:vm-205-cloudinit,media=cdrom,size=4M
memory: 2048
scsi0: local-lvm:vm-205-disk-0,size=84172M
scsihw: virtio-scsi-pci
cores: 2


For reference: qm command line docs
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!