From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from molly.corsac.net (pic75-3-78-194-244-226.fbxo.proxad.net [78.194.244.226]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Mon, 4 Jan 2016 23:20:51 +0100 (CET) Message-ID: <1451946046.3914.13.camel@debian.org> From: Yves-Alexis Perez Date: Mon, 04 Jan 2016 23:20:46 +0100 In-Reply-To: <568AEA2C.6010809@whgl.uni-frankfurt.de> References: <1451943067.3914.4.camel@debian.org> <568AEA2C.6010809@whgl.uni-frankfurt.de> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-d1twkhq7Z77XjCFGzN1L" Mime-Version: 1.0 Subject: Re: [dm-crypt] Alignment issue with 4K disk List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sven Eschenberg , dm-crypt@saout.de --=-d1twkhq7Z77XjCFGzN1L Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On lun., 2016-01-04 at 22:54 +0100, Sven Eschenberg wrote: > Hi, >=20 > start=3D4194304 -> assumind this is in 512 byte blocks, the start sector= =C2=A0 > is aligned to MByte boundary and thus 4k boundary. >=20 > Anyway, if your device only has one partition which is encrypted with=C2= =A0 > dm-crypt, set it up to start at sector 2048 (which should be default for= =C2=A0 > parted, fdisk and so on). Pass align-payload 2048 during creation of the= =C2=A0 > LUKS header, which will give you an MByte boundary and should always be= =C2=A0 > okay. >=20 > If the kernel still complains, then something else might be going wrong. Right now I have: root@scapa:~# lsblk -o +ALIGNMENT /dev/sdc NAME=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0MAJ:MIN RM=C2=A0=C2=A0=C2=A0SIZE RO TYPE=C2=A0=C2=A0MOUNTPOINT=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0ALIGNMENT sdc=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A08:32=C2=A0=C2=A0=C2=A00 931.5G=C2=A0=C2=A00 disk=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A00 =E2=94=94=E2=94=80sdc1=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A08:33=C2=A0=C2=A0=C2=A00 931.5G=C2=A0=C2=A00 part= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0512 =C2=A0 =E2=94=94=E2=94=80scapa-backup 253:4=C2=A0=C2=A0=C2=A0=C2=A00 931.4G= =C2=A0=C2=A00 crypt /mnt/scapa-backup=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0-1 And: scapa-backup: 0 1953336209 crypt aes-xts-plain64 0000000000000000000000000000000000000000000000000000000000000000 0 8:33 655= 36 root@scapa:~# fdisk -l /dev/sdc Disk /dev/sdc: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors Units: sectors of 1 * 512 =3D 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 33553920 bytes Disklabel type: gpt Disk identifier: EBA98857-89BA-4B2C-8366-4A77A527A8E0 Device=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Start=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0End=C2=A0=C2=A0=C2=A0=C2=A0Sectors=C2=A0=C2=A0=C2=A0Size Typ= e /dev/sdc1=C2=A0=C2=A065535 1953467279 1953401745 931.5G Linux filesystem Partition 1 does not start on physical sector boundary. [I'm a bit concerned with that, but since I'm using a GPT and not MBR it mi= ght be related] root@scapa:~# gdisk -l /dev/sdc GPT fdisk (gdisk) version 1.0.1 Partition table scan: =C2=A0 MBR: protective =C2=A0 BSD: not present =C2=A0 APM: not present =C2=A0 GPT: present Found valid GPT with protective MBR; using GPT. Disk /dev/sdc: 1953525168 sectors, 931.5 GiB Logical sector size: 512 bytes Disk identifier (GUID): EBA98857-89BA-4B2C-8366-4A77A527A8E0 Partition table holds up to 128 entries First usable sector is 34, last usable sector is 1953525134 Partitions will be aligned on 8-sector boundaries Total free space is 123356 sectors (60.2 MiB) Number=C2=A0=C2=A0Start (sector)=C2=A0=C2=A0=C2=A0=C2=A0End (sector)=C2=A0= =C2=A0Size=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Code=C2=A0=C2=A0Name =C2=A0=C2=A0=C2=A01=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A065535=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A01953467279=C2=A0=C2=A0= =C2=A0931.5 GiB=C2=A0=C2=A0=C2=A08300=C2=A0=C2=A0scapa-backup Regards, --=20 Yves-Alexis --=-d1twkhq7Z77XjCFGzN1L Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJWivA+AAoJEG3bU/KmdcClAXEH/1KnT8BQoJ1k4MSofe01iLsk 6WMWWqeSioAnWEKJEwFKoxMeuIwo6AUxF2AKT/wWPgSxY6rp8c3PhxnC3RmWgWXF wxef6Qob+Ci3wUJBknwg8C4Cr3Ruu+afE3a3qZtS4AluKFIktef9Mz1jzgr8u7bB MUpKDQdVoKSkq66LICcRkkjU78sxnWyrLaYXqu08081kqLCoxdsZUnH0EMux/djx RweJadeCOgVHzwUlXxZhIxDMANgLcoRpaI6duxmLONwTu5vrIUzSE1jnAnsjkGKR CLm7orC+gBAtljAK9ffLbD/ZUNjBan2Y4jrhbj1mKMOEV+ivXZupOAGlGG9RDCM= =ijA4 -----END PGP SIGNATURE----- --=-d1twkhq7Z77XjCFGzN1L--