Mailing List Archive

Optimal partition alignment in guests (Was Re: Xen hypervisor and HDDs with 4K sectors)

On Sun, May 26, 2019 at 02:28:46PM +0100, Simon Hobson wrote:
> As long as the hardware is supported in Xen/Dom0, and you
> partition on 4k boundaries, then the guests should be isolated
> from the underlying details. Obviously it would be a good idea to
> also partition any virtual drives on 4k boundaries (if
> partitioning in the guests).

Out of interest, since partitioning utilities like fdisk, gdisk and
parted now do report sub-optimal alignment…

If you have some drives which you partitioned…
…then you put an MD array on partitions of those drives…
…then you use that array as a PV for LVM and create a volume group…
…then you create an LV inside that VG…
…which you partition with one of the aforementioned tools…
…and export to a Xen PV guest as an entire disk…

As long as at every step the utility reports that alignment is
optimal, can you ever end up with sub-optimal alignment inside a Xen


Xen-users mailing list