On Jul 28, 2018, at 1:28 PM, Henrique de Moraes Holschuh <h...@debian.org> wrote:
> On Sat, 28 Jul 2018, David Wright wrote: >> On Sat 28 Jul 2018 at 10:57:45 (-0300), Henrique de Moraes Holschuh wrote: >>> On Sat, 28 Jul 2018, Rick Thomas wrote: >>>>> 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? >>> >>> Keep in mind that you *offset*-align the outer container *only*, and then >>> inside >>> you just keep the size alignment. >>> >>> So, the above ensures correct use of the partitions even if sda1 is >>> unaligned. >>> >>> If you offset-align sda1 to -1, everything inside it should have an offset >>> of >>> zero to keep the alignment correct. >> >> I don't think I fully understand the explanation. Can you point out >> the number(s) that's wrong, and how it should be corrected. > > There is nothing wrong on the table above as far as I can tell, > *assuming* the device does need the -1 alignment. Since sda1 isn't > aligned, everything inside it at the first level must be (and is) > aligned at -1 to compensate. > > Where sda1 aligned at -1, nothing inside it should be, as sda1 would > already provide the required alignemnt to anything inside it. Thanks for the clarification, Henrique! Let me see if I have this right… 1) If I had heeded the warning in “man pvcreate” and set up the physical volume with pvcreate —dataalignmentoffset 7s /dev/sda to accommodate the -1 offset (provided either by the drive itself or the USB enclosure it is in — we don’t know) then all the “-1”s in the above table would be “0”s and I would not be getting the error messages at boot time. Is this correct? 2) But as it is, I did not do that, so when I used vgcreate to make the volume group called “small”, it realized that the partition was out of alignment and compensated — thus causing the alignment of “-1” for all of the logical volumes. And, most importantly, therefor the logical volumes are, in fact, properly aligned and I can stop worrying. Furthermore, the warnings at boot time are just noting that an alignment of “-1” has been applied by the device-mapper and all is well. Is this correct? 3) Or are you saying that the messages are _not_ just warnings: I should go back and re-format the disk to use the “—dataalignmentoffset 7s” option. (I can do this if I do it soon. I don’t have much data on the disk yet.) Thanks, Rick