Comment 14 for bug 1564977

Revision history for this message
Ryan Harper (raharper) wrote :

Blake,

I included some checks of values when running in 512b and 4k mode of blockdev:

""" validate maas setting use of blockdev
        --getsz get size in 512-byte sectors
        --getss get logical block (sector) size
        --getpbsz get physical block (sector) size
        --getbsz get blocksize
"""

MAAS should be using --getss (logical); that is what curtin uses to convert disk/partition sizes to sectors.

On a 512b logical_sector , 512b physical_sector VM: we get the following output against a 10G virtio disk:

vda_blockdev_getbsz: 4096
vda_blockdev_getpbsz: 512
vda_blockdev_getss: 512
vda_blockdev_getsz: 20971520

The same disk with 4k logical / 4k physical is:

vda_blockdev_getbsz: 4096
vda_blockdev_getpbsz: 4096
vda_blockdev_getss: 4096
vda_blockdev_getsz: 20971520