[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sector size = 4096?
|
From: |
Michael Tokarev |
|
Subject: |
sector size = 4096? |
|
Date: |
Sat, 14 Oct 2023 22:01:15 +0300 |
|
User-agent: |
Mozilla Thunderbird |
Hi!
I wanted to experiment with sector size = 4096, to see how an OS
reacts. And naturally, the first instinct is to try it in qemu.
But it turned to be.. difficult.
First, there's no documentation. But I remember seeing properties
of ide-hd device, like physical_sector_size etc. Ok.
$ qemu-img create -f raw img 32G
$ kvm -machine q35 -drive file=img,format=raw,if=none,id=d \
-device ide-hd,drive=d,physical_sector_size=4096
This way, the guest see size of the drive as 0. This is obviously
not right (tm).
Okay, lets try full 4096 sectors:
-device ide-hd,drive=d,physical_sector_size=4096,logical_sector_size=4096
This fails:
discard_granularity must be a multiple of logical_block_size
Let's adjust discard_granularity (I think it'd be good if qemu does
this based on physical_sector_size already):
-device
ide-hd,drive=d,physical_sector_size=4096,logical_sector_size=4096,discard_granularity=0
This fails:
logical_block_size must be 512 for IDE
Huh? Should the tell all the sata Advanced-Format (AF) drives manufacturers
their drives does not exist, or what? :)
Ok. Tried the same with nvme. There, sector sizes seems to be entirely
ignored, - no matter which values I choose, guest always see them as
512.
What's the proper way to run guest with 4096-byte sector size in qemu?
Thanks,
/mjt
| [Prev in Thread] |
Current Thread |
[Next in Thread] |
- sector size = 4096?,
Michael Tokarev <=