Passthrough disk block size mismatch

KciNicK

Member
May 27, 2024
48
1
8
Hi there, the disk on the server:

Code:
Disk /dev/sdb: 3.64 TiB, 3999998672896 bytes, 976562176 sectors
Disk model: HITHERE
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: E373A6E4-1A92-3D46-8441-BFA9AAF05019

Device         Start       End   Sectors  Size Type
/dev/sdb1       2048 976543743 976541696  3.6T Solaris /usr & Apple ZFS
/dev/sdb9  976543744 976560127     16384   64M Solaris reserved 1

the disk on the vm:
Code:
GPT PMBR size mismatch (976562175 != 7812497407) will be corrected by write.
Disk /dev/sdf: 3.64 TiB, 3999998672896 bytes, 7812497408 sectors
Disk model: QEMU HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x51cabd30

Device     Boot Start        End    Sectors Size Id Type
/dev/sdf1           1 4294967295 4294967295   2T ee GPT

problem, i guess, the sector size 512 vs 4096, the GPT says disk partition start at sector x, but 512 by x is something, and 4096 by x is something else, is there a way to fix this? i wanna be able to mount the disk on the server and on the vm, don't worry about data corruption, thanks!
 
found a workaround, manually adding this to each disk that need 4k sector size on the vm configuration file, fix the problem:

Code:
args: -set device.scsi0.logical_block_size=4096 -set device.scsi0.physical_block_size=4096

it would be nice to have this on the GUI.
 

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!