How to change the size of zvol if it is used by VM

gusto

Well-Known Member
Feb 10, 2018
78
0
46
24
In Proxmox I created from 4x 18TB HDD Raidz (52TB). Then I created a 12 TB zvol and assigned it to VM (Debian). In my debian, I formatted the disc to ext4 and everything works well.

I have some data on the 12 TB section. Now I would like to increase the section to 16TB. Is it possible without data loss?
 
Yes, by setting the zvol size larger (via a zfs command) and by increasing the ext4 size (with resize2fs). If you partitioned the zvol, you need to remove and recreate the same partition with a larger size (with gdisk and partprobe).
All of this can be done while the VM is running. Make sure you have a backup if anything goes wrong. If you stop the VM, you can also boot it (after growing the zvol) with a Gparted Live which provides a GUI for resizing partitions and filesystems.
I hope this gives you some pointers to get started. There are more threads about this on this forum and it's quite similar to using a larger physical drive on a real machine (for which there are guides on the internet).
 

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!