dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* Adding target device caused an alignment inconsistency
@ 2016-03-01 22:25 Bart Van Assche
  2016-03-01 23:43 ` Bart Van Assche
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Van Assche @ 2016-03-01 22:25 UTC (permalink / raw)
  To: device-mapper development

Hello,

With kernel 4.4.0 (openSuSE Tumbleweed) I see the following message 
appear systematically in the kernel log if udev reports a new path to 
multipathd:

[958779.753012] device-mapper: table: 254:0: adding target device sdg 
caused an alignment inconsistency: physical_block_size=4096, 
logical_block_size=512, alignment_offset=0, start=0

This did not happen with previous kernel versions. This causes the 
initiator to report the new paths as faulty until I run the following 
command:

echo reconfigure | multipathd -k

Is this a know issue?

Thanks,

Bart.

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

* Re: Adding target device caused an alignment inconsistency
  2016-03-01 22:25 Adding target device caused an alignment inconsistency Bart Van Assche
@ 2016-03-01 23:43 ` Bart Van Assche
  2016-03-02  0:06   ` Bart Van Assche
  2016-03-02  8:41   ` Zdenek Kabelac
  0 siblings, 2 replies; 4+ messages in thread
From: Bart Van Assche @ 2016-03-01 23:43 UTC (permalink / raw)
  To: device-mapper development

On 03/01/2016 02:25 PM, Bart Van Assche wrote:
> With kernel 4.4.0 (openSuSE Tumbleweed) I see the following message
> appear systematically in the kernel log if udev reports a new path to
> multipathd:
>
> [958779.753012] device-mapper: table: 254:0: adding target device sdg
> caused an alignment inconsistency: physical_block_size=4096,
> logical_block_size=512, alignment_offset=0, start=0
>
> This did not happen with previous kernel versions. This causes the
> initiator to report the new paths as faulty until I run the following
> command:
>
> echo reconfigure | multipathd -k
>
> Is this a know issue?

(replying to my own e-mail)

After having run multipath -f + another reconfigure I noticed that the 
optimal_io_size parameter for multipath devices is zero (io_opt) but 
that blk_stack_limits() expects that that parameter is not zero. So i 
tried to repeat the test described in commit 
e9637415a92cf25ad800b7fdeddcd30cce7b44ab:

# modprobe scsi_debug dev_size_mb=10 num_tgts=1 opt_blks=1536
# lsscsi | grep debug
[17352:0:0:0]disk    Linux    scsi_debug       0184  /dev/sds
# cat /sys/block/sds/queue/optimal_io_size
1536
# dmsetup create node --table "0 100 linear /dev/sds 0"
(hangs in the semop() system call)
^C

Bart.

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

* Re: Adding target device caused an alignment inconsistency
  2016-03-01 23:43 ` Bart Van Assche
@ 2016-03-02  0:06   ` Bart Van Assche
  2016-03-02  8:41   ` Zdenek Kabelac
  1 sibling, 0 replies; 4+ messages in thread
From: Bart Van Assche @ 2016-03-02  0:06 UTC (permalink / raw)
  To: device-mapper development

On 03/01/2016 03:43 PM, Bart Van Assche wrote:
> After having run multipath -f + another reconfigure I noticed that the
> optimal_io_size parameter for multipath devices is zero (io_opt) but
> that blk_stack_limits() expects that that parameter is not zero. So i
> tried to repeat the test described in commit
> e9637415a92cf25ad800b7fdeddcd30cce7b44ab:
>
> # modprobe scsi_debug dev_size_mb=10 num_tgts=1 opt_blks=1536
> # lsscsi | grep debug
> [17352:0:0:0]disk    Linux    scsi_debug       0184  /dev/sds
> # cat /sys/block/sds/queue/optimal_io_size
> 1536
> # dmsetup create node --table "0 100 linear /dev/sds 0"
> (hangs in the semop() system call)
> ^C

(again replying to my own e-mail)

Apparently this works fine with kernel v4.5-rc6:

# modprobe scsi_debug dev_size_mb=10 num_tgts=1 opt_blks=1536
# lsscsi | grep debug
[42:0:0:0]   disk    Linux    scsi_debug       0184  /dev/sdai
# cat /sys/block/sdai/queue/optimal_io_size
786432
# dmsetup create node --table "0 100 linear /dev/sdai 0"
# dmsetup table | grep linear
node: 0 100 linear 66:32 0
# dmsetup ls | grep node
node    (254:2)
# cat /sys/block/dm-2/queue/optimal_io_size
786432

I will report this to the proper bugzilla. Sorry for the noise.

Bart.

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

* Re: Adding target device caused an alignment inconsistency
  2016-03-01 23:43 ` Bart Van Assche
  2016-03-02  0:06   ` Bart Van Assche
@ 2016-03-02  8:41   ` Zdenek Kabelac
  1 sibling, 0 replies; 4+ messages in thread
From: Zdenek Kabelac @ 2016-03-02  8:41 UTC (permalink / raw)
  To: Bart Van Assche, device-mapper development

Dne 2.3.2016 v 00:43 Bart Van Assche napsal(a):
> On 03/01/2016 02:25 PM, Bart Van Assche wrote:
>> With kernel 4.4.0 (openSuSE Tumbleweed) I see the following message
>> appear systematically in the kernel log if udev reports a new path to
>> multipathd:
>>
>> [958779.753012] device-mapper: table: 254:0: adding target device sdg
>> caused an alignment inconsistency: physical_block_size=4096,
>> logical_block_size=512, alignment_offset=0, start=0
>>
>> This did not happen with previous kernel versions. This causes the
>> initiator to report the new paths as faulty until I run the following
>> command:
>>
>> echo reconfigure | multipathd -k
>>
>> Is this a know issue?
>
> (replying to my own e-mail)
>
> After having run multipath -f + another reconfigure I noticed that the
> optimal_io_size parameter for multipath devices is zero (io_opt) but that
> blk_stack_limits() expects that that parameter is not zero. So i tried to
> repeat the test described in commit e9637415a92cf25ad800b7fdeddcd30cce7b44ab:
>
> # modprobe scsi_debug dev_size_mb=10 num_tgts=1 opt_blks=1536
> # lsscsi | grep debug
> [17352:0:0:0]disk    Linux    scsi_debug       0184  /dev/sds
> # cat /sys/block/sds/queue/optimal_io_size
> 1536
> # dmsetup create node --table "0 100 linear /dev/sds 0"
> (hangs in the semop() system call)
> ^C
>


It's known  there was a broken  patch in  4.5-rc0-rc4
which mistakenly used  'sector' units instead of bytes of
optimal_io_size.

So it seems someone has backported this broken patch without the fixing part 
to the stable 4.4 kernel.

Zdenek

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

end of thread, other threads:[~2016-03-02  8:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-01 22:25 Adding target device caused an alignment inconsistency Bart Van Assche
2016-03-01 23:43 ` Bart Van Assche
2016-03-02  0:06   ` Bart Van Assche
2016-03-02  8:41   ` 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).