linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* LVM RAID1 thin-pool shows “alignment inconsistency” warnings
@ 2025-09-18 19:07 Alessandro Brega
  2025-09-19 11:25 ` Zdenek Kabelac
  0 siblings, 1 reply; 2+ messages in thread
From: Alessandro Brega @ 2025-09-18 19:07 UTC (permalink / raw)
  To: linux-lvm

Hello everyone,

on a new debian trixie server (kernel 6.12.43-1, lvm2 2.03.31-2) I’m
trying to set up an LVM RAID-1 thin-pool with these commands:

pvcreate /dev/nvme0n1p5
pvcreate /dev/nvme1n1p5
vgcreate nvme /dev/nvme0n1p5 /dev/nvme1n1p5
lvcreate --type raid1 --mirrors 1 --name thin_raid1_data --size 100G nvme
lvcreate --type raid1 --mirrors 1 --name thin_raid1_metadata --size 100MiB nvme
lvconvert --yes --thin-pool nvme/thin_raid1_data --poolmetadata
nvme/thin_raid1_metadata
lvrename nvme/thin_raid1_data nvme/thin_raid1

The thin pool is created successfully and works as expected, but the
kernel logs warnings such as:

device-mapper: table: 253:4: adding target device (start sect 0 len
209715200) caused an alignment inconsistency

Here’s a sample of the full log while running the commands (truncated
for brevity):

Sep 18 18:43:01 r02-s01 kernel: device-mapper: raid: Superblocks
created for new raid set
Sep 18 18:43:01 r02-s01 kernel: md/raid1:mdX: not clean -- starting
background reconstruction
Sep 18 18:43:01 r02-s01 kernel: md/raid1:mdX: active with 2 out of 2 mirrors
Sep 18 18:43:01 r02-s01 kernel: device-mapper: table: 253:4: adding
target device (start sect 0 len 209715200) caused an alignment
inconsistency
Sep 18 18:43:01 r02-s01 kernel: mdX: bitmap file is out of date, doing
full recovery
Sep 18 18:43:01 r02-s01 kernel: md: resync of RAID array mdX
Sep 18 18:43:01 r02-s01 dmeventd[13507]: Monitoring RAID device
nvme-thin_raid1_data for events.
...

My partition table looks aligned; both NVMe drives share the same layout:

# fdisk -l /dev/nvme0n1
Disk /dev/nvme0n1: 1.75 TiB, 1920383410176 bytes, 3750748848 sectors
Disk model: KIOXIA KCD8XRUG1T92
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 131072 bytes
Disklabel type: gpt
Disk identifier: AFD9F465-0F1F-4453-A92A-EB3EC6C142B0

Device            Start        End    Sectors  Size Type
/dev/nvme0n1p1     2048       6143       4096    2M BIOS boot
/dev/nvme0n1p2     6144     530431     524288  256M EFI System
/dev/nvme0n1p3   530432    2627583    2097152    1G Linux RAID
/dev/nvme0n1p4  2627584   34084863   31457280   15G Linux RAID
/dev/nvme0n1p5 34084864 3750748159 3716663296  1.7T Linux filesystem

I don’t see any misalignment here. Does anyone know how to resolve -
or safely ignore - these “alignment inconsistency” warnings?

Thanks for any insights.

Kind regards,
Alessandro

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: LVM RAID1 thin-pool shows “alignment inconsistency” warnings
  2025-09-18 19:07 LVM RAID1 thin-pool shows “alignment inconsistency” warnings Alessandro Brega
@ 2025-09-19 11:25 ` Zdenek Kabelac
  0 siblings, 0 replies; 2+ messages in thread
From: Zdenek Kabelac @ 2025-09-19 11:25 UTC (permalink / raw)
  To: Alessandro Brega, linux-lvm

Dne 18. 09. 25 v 21:07 Alessandro Brega napsal(a):
> Hello everyone,
> 
> on a new debian trixie server (kernel 6.12.43-1, lvm2 2.03.31-2) I’m
> trying to set up an LVM RAID-1 thin-pool with these commands:
> 
> pvcreate /dev/nvme0n1p5
> pvcreate /dev/nvme1n1p5
> vgcreate nvme /dev/nvme0n1p5 /dev/nvme1n1p5
> lvcreate --type raid1 --mirrors 1 --name thin_raid1_data --size 100G nvme
> lvcreate --type raid1 --mirrors 1 --name thin_raid1_metadata --size 100MiB nvme
> lvconvert --yes --thin-pool nvme/thin_raid1_data --poolmetadata
> nvme/thin_raid1_metadata
> lvrename nvme/thin_raid1_data nvme/thin_raid1
> 
> The thin pool is created successfully and works as expected, but the
> kernel logs warnings such as:
> 
> device-mapper: table: 253:4: adding target device (start sect 0 len
> 209715200) caused an alignment inconsistency


Hi

Recently solved in kernel - see this patch:

"dm-raid: don't set io_min and io_opt for raid1"

https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux.git/+/a86556264696b797d94238d99d8284d0d34ed960


Regards


Zdenek


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-09-19 11:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-18 19:07 LVM RAID1 thin-pool shows “alignment inconsistency” warnings Alessandro Brega
2025-09-19 11:25 ` Zdenek Kabelac

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).