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

Re: kernel: device-mapper: table: 254:1: adding target device sda1 caused an alignment inconsistency



Alignment ensures optimal use of your drive, sometimes software gets this wrong and compensates by using a larger cache, check

cat /sys/block/sd?/queue/optimal_io_size

to correct that you have to re format (likely both the GPT/LVM layers) look into --dataalignment and --dataalignmentoffset of pvcreate

shareimprove this answer
edited Jun 8 '17 at 7:26
answered Jun 8 '17 at 7:18

user1133275
1,932412
	• $ cat /sys/block/sdb/queue/optimal_io_size 33553920 33MB for a 2TB USB HDD? 268431360 for a 4TB??? – Tom Hale Jun 10 '17 at 5:17 
	• @Tom they both should drop to 0 if you fix the alignment – user1133275 Jun 11 '17 at 10:38
	• I'm seeing this, but realised that 33553920 / 512 = 65535. Is it possible something's reporting "-1" as optimal IO size in sectors? – Steve Dee Mar 18 at 11:33


Reply to: