Re: cryptsetup align problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 5, 2010 at 12:07 PM, Milan Broz <mbroz@xxxxxxxxxx> wrote:
>
> Teo's post is completely obsolete regarding default kvm metadata sizes.
>
> Align cryptsetup to multiple of 1MiB
> (2048 sectors in the cryptsetup) and you will have safe configuration.
>
> If you do not understand LVM, please use most recent version and everything
> will be aligned automatically.
>
> It can be fine-tuned, but in most cases default is ok now.
> (See "man pvcreate" --dataalignment if you want to force overwrite it.)
>
> In lvm you can check alignment of PV with "pvs -o +pe_start --units k"
> (If you have extent multiple of 512KiB then LVs are aligned automatically
> even if fragmented - this is almost always true, default PE is 4M).
>
>> The disk i am using has a erase block size on 512K, therefore my
>> values is different.
>
> 1MiB is multiple of 512KiB so you are ok with above.
>
> You do not need to align "to 512" but to "multiple of 512". Important
> is that data start offset will start on erase block boundary.
>
> Milan
>

Thank you very much, this information was what i needed to finally
configure my Intel SSD correctly.

I researched the info you provided, and i realized that the LVM
version and linux kernel used was already prepared for automatically
alignment. sysfs contained aligment_offset and
data_alignment_detection was enabled in lvm.conf.

Just for laughs i tested the --dataalignment option with 512k and this
also aligns the LVs, so if i was using an older linux kernel this
could be done.

99% of all information available about LVM and SSDs is copied from
Teo's article so i guess that many (including myself before i read
your post) will be using the --metadatasize option when configuring a
SSD and think that everything is okay.

If cryptsetup was able to use alignment information then nothing at
all had to be done when configuring LUKS and LVM on SSDs, although it
is easy to append the --align-payload=2048 option.

Anyway partitions->LUKS->LVM2->filesystem are now aligned on my disk,
thanks again.
_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
http://www.saout.de/mailman/listinfo/dm-crypt


[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux