[SOLVED] Virtual disk physical/logical sector sise

Feb 26, 2024
9
2
3
Hi,

I was trying to set physical sector for the virtual disks. I see in the documentation I can use:
secs=<integer>
Force the drive’s physical geometry to have a specific sector count.

But I have an error when the vm starts:

kvm: -drive file=/dev/zvol/tank/datas/vm-450208-disk-0,if=none,id=drive-scsi3,secs=4096,discard=on,format=raw,cache=none,aio=io_uring,detect-zeroes=unmap: Block format 'raw' does not support the option 'secs'
TASK ERROR: start failed: QEMU exited with code 1

Is it there a way to present disk with 4k physical and logical sector to a VM running on a ZVOL?

thanks
 
I was trying to set physical sector for the virtual disks. I see in the documentation I can use:
secs=<integer>
Force the drive’s physical geometry to have a specific sector count.
I don''t think that's what you are looking for. Sector count is not sector size.
Is it there a way to present disk with 4k physical and logical sector to a VM running on a ZVOL?
args: -global scsi-hd.physical_block_size=4k -global scsi-hd.logical_block_size=4k will set the physical and logical sector size for all virtual SCSI disks for your VM. You probably need to add this before installing an operating system inside the VM (or you might have to fix the partition table manually). Use physical_block_size to 8k or 16k if the volblocksize is the old or new default of ZFS/Proxmox.