4kn Advanced Format passthrough - Args execution ordering?

AlphaSparqy

Member
Feb 7, 2018
3
0
21
45
Hello,

I have 4kn (4KiB logical and physical bytes per sector) Advanced Format SAS drives on an Adaptec 81605ZQ hardware RAID controller. I have a logical drive on the controller, that maintains the 4kn formatting, and having it passed to a Windows Server 2016 VM.

Debian sees them as 4kn, and Windows Server 2016 seems them as 4kn when booted natively, but when passed with standard parameters from PVE GUI, they are being read as 512 logical. This causes all sorts off problems with GPT placement, etc... (If I partition in Debian with gdisk or parted, Windows doesn't even see it as a GPT drive. If I convert to GPT, and partition in Windows, Debian sees a corrupted MBR).

I have explored, and I used the "qm showcmd <vmid>" to a text file, and added "physical_block_size=4096,logical_block_size=4096" to the -device 'virtio-blk-pci ... ' section and then just launch the command line manually from debian terminal, and it works properly.

If I add 'physical_block_size=4096,logical_block_size=4096, to the vmid.conf file, I get a schema error, and it won't save them.

If I add the "args: -device '...' " , or "args: -drive '...' -device '...' " to the vmid.conf, it executes the args before reading the q35 config, and there is no pci.0 created yet.

Is there a away to modify the schema to allow for the physical_block_size=4096,logical_block_size=4096 in the vmid.conf file on the virtio0: area, and have it parsed and passed to the -device 'virtio-blk-pci,...' start command?

Alternatively, Is there a way to ensure the args: runs AFTER the reading of the q35 config, thus ensuring pci.0 already exists?

Thank you!
 
Did anything ever get resolved here?
I'm in the same boat (native 4k HDD), but QEMU DISK reports 512B.
The VM works, but I *really* prefer to be able to mount the disks from the Promox host too,
 
Did anything ever get resolved here?
I'm in the same boat (native 4k HDD), but QEMU DISK reports 512B.
The VM works, but I *really* prefer to be able to mount the disks from the Promox host too,
I only ever used the 4kn drives with a logical volume on a h/w RAID controller, and passing them directly to the VM with my manual starting script.

I had other issues with Proxmox updates and went to generic kvm/qemu/virtio on fedora for the last couple years since then.

FWIW, Fedora has been able to work with the 4kn logical volume.
 
in proxmox, you can add this to the vmid.conf for every scsi device, that guest this work even with multiple scsi disks:

args: -global scsiX.physical_block_size=4096 -global scsiX.logical_block_size=4096 -global scsiY...... -global sysiY....