Re: kernel: device-mapper: table: 254:1: adding target device sda1 caused an alignment inconsistency
Here’s something interesting that may be relevant, given the note from “man pvcreate”:
> rbthomas@small:~$ lsblk -t
> NAME ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC ROTA SCHED RQ-SIZE RA WSAME
> sda 0 4096 33553920 4096 512 1 mq-deadline 60 128 0B
> `-sda1 0 4096 33553920 4096 512 1 mq-deadline 60 128 0B
> |-small-swap -1 4096 0 4096 512 1 128 128 32M
> |-small-root -1 4096 0 4096 512 1 128 128 32M
> `-small-home -1 4096 0 4096 512 1 128 128 32M
> mmcblk2 0 512 0 512 512 0 mq-deadline 128 128 0B
> |-mmcblk2p1 0 512 0 512 512 0 mq-deadline 128 128 0B
> `-mmcblk2p2 0 512 0 512 512 0 mq-deadline 128 128 0B
> rbthomas@small:~$
Note the alignment values of “-1” for the lvm entries but not for the GPT partition or the whole disk.
Why do you suppose that is?
Rick
On Jul 28, 2018, at 12:26 AM, Rick Thomas <rbthomas@pobox.com> wrote:
>
> On Jul 27, 2018, at 8:19 PM, David Wright <deblis@lionunicorn.co.uk> wrote:
>
>> On Fri 27 Jul 2018 at 18:46:02 (-0700), Rick Thomas wrote:
>>> When booting, I get 12 error messages similar to the following (three groups of four, each group with a different “start” value and corresponding minor device)
>>>
>>>> Jul 24 03:40:08 small kernel: device-mapper: table: 254:1: adding target device sda1 caused an alignment inconsistency: physical_block_size=4096, logical_block_size=512, alignment_offset=0, start=33553920
>>>
>>> Can anyone tell me what it means and what I should do about it?
>>
>> That's the same message as I reported on an MBR disk in
>> https://lists.debian.org/debian-user/2018/02/msg00466.html
>>
>> The post gives full details of the partitioning and the
>> creation of the encrypted filesystem which precede getting
>> the messages (in pairs).
>>
>> There were no follow-ups.
>
> Googling the contents of the subject line of this post gives:
>
> https://unix.stackexchange.com/questions/340484/device-mapper-table-alignment-inconsistency
>
> which is slightly helpful.
>
> Something else that is interesting is the following from “man pvcreate”:
>
>> If a device is a 4KiB sector drive that compensates for windows partitioning (sector 7 is the lowest aligned logical
>> block, the 4KiB sectors start at LBA -1, and consequently sector 63 is aligned on a 4KiB boundary) manually account
>> for this when initializing for use by LVM.
>> pvcreate --dataalignmentoffset 7s /dev/sdb
>
> Is it possible that I have such a device?
>
> Enjoy!
> Rick
Reply to: