[SOLVED] Virtual disk physical/logical sector sise

milennium

New Member
Feb 26, 2024
9
1
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.
 
Thank you for your answer, I tried it too quickly.
I found this one too, to sélect only some devices:

args: -set device.scsi0.logical_block_size=4096 -set device.scsi0.physical_block_size=4096
 
  • Like
Reactions: leesteken

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!