Comment 2 for bug 1666109

Revision history for this message
Yasuaki Taniguchi (yasuakit) wrote :

This bug is still alive.
(1) I *can* attach more than three uas devices, but
(2) I/O information, which I can get from /sys/block/sd*/queue, is strange,
(3) parted and LVM can't calculate optimal disk geometries.

======== 4 Disk attachment OK ==============================
[ 223.209197] usb 3-2.4: new SuperSpeed USB device number 3 using xhci_hcd
[ 223.221961] usb 3-2.4: New USB device found, idVendor=0584, idProduct=0276
[ 223.221963] usb 3-2.4: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[ 223.221965] usb 3-2.4: Product: RS-EC32-U31R RAID1
[ 223.221967] usb 3-2.4: Manufacturer: RATOC Systems,Inc.
[ 223.221969] usb 3-2.4: SerialNumber: 32311643000A
[ 223.238444] usbcore: registered new interface driver usb-storage
[ 223.242354] scsi host4: uas
[ 223.242429] usbcore: registered new interface driver uas
[ 223.669308] scsi 4:0:0:0: Direct-Access HGST HDN 724040ALE640 MJAO PQ: 0 ANSI: 6
[ 223.683229] sd 4:0:0:0: Attached scsi generic sg2 type 0
[ 223.688262] sd 4:0:0:0: [sdc] 7813988353 512-byte logical blocks: (4.00 TB/3.64 TiB)
[ 223.688263] sd 4:0:0:0: [sdc] 4096-byte physical blocks
[ 223.688387] sd 4:0:0:0: [sdc] Write Protect is off
[ 223.688388] sd 4:0:0:0: [sdc] Mode Sense: 43 00 00 00
[ 223.688547] sd 4:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 223.727131] sd 4:0:0:0: [sdc] Attached SCSI disk
[ 268.475627] usb 3-2.3: new SuperSpeed USB device number 4 using xhci_hcd
[ 268.488441] usb 3-2.3: New USB device found, idVendor=0584, idProduct=0276
[ 268.488442] usb 3-2.3: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[ 268.488444] usb 3-2.3: Product: RS-EC32-U31R RAID1
[ 268.488445] usb 3-2.3: Manufacturer: RATOC Systems,Inc.
[ 268.488446] usb 3-2.3: SerialNumber: 32311643007F
[ 268.492934] scsi host5: uas
[ 268.892450] scsi 5:0:0:0: Direct-Access HGST HDN 724040ALE640 MJAO PQ: 0 ANSI: 6
[ 268.905874] sd 5:0:0:0: Attached scsi generic sg3 type 0
[ 268.911734] sd 5:0:0:0: [sdd] 7813988353 512-byte logical blocks: (4.00 TB/3.64 TiB)
[ 268.911735] sd 5:0:0:0: [sdd] 4096-byte physical blocks
[ 268.911861] sd 5:0:0:0: [sdd] Write Protect is off
[ 268.911862] sd 5:0:0:0: [sdd] Mode Sense: 43 00 00 00
[ 268.912021] sd 5:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 269.015181] sd 5:0:0:0: [sdd] Attached SCSI disk
[ 285.100714] usb 3-2.1: new SuperSpeed USB device number 5 using xhci_hcd
[ 285.113420] usb 3-2.1: New USB device found, idVendor=0480, idProduct=a006
[ 285.113422] usb 3-2.1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[ 285.113423] usb 3-2.1: Product: ASM1351
[ 285.113424] usb 3-2.1: Manufacturer: Asmedia
[ 285.113425] usb 3-2.1: SerialNumber: 123456789116
[ 285.118584] scsi host6: uas
[ 285.119076] scsi 6:0:0:0: Direct-Access ASMT 2135 0 PQ: 0 ANSI: 6
[ 285.143998] sd 6:0:0:0: Attached scsi generic sg4 type 0
[ 285.144114] sd 6:0:0:0: [sde] Spinning up disk...
[ 286.176992] .
[ 287.201323] .
[ 288.225619] .
[ 289.249948] .
[ 290.274258] .
[ 291.298572] .
[ 292.322884] .
[ 293.347203] .
[ 293.347282] ready
[ 293.349561] sd 6:0:0:0: [sde] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[ 293.349680] sd 6:0:0:0: [sde] Write Protect is off
[ 293.349683] sd 6:0:0:0: [sde] Mode Sense: 43 00 00 00
[ 293.349840] sd 6:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 293.357609] sde: sde1
[ 293.358529] sd 6:0:0:0: [sde] Attached SCSI disk
[ 328.878035] usb 3-2.2: new SuperSpeed USB device number 6 using xhci_hcd
[ 328.890749] usb 3-2.2: New USB device found, idVendor=174c, idProduct=1351
[ 328.890750] usb 3-2.2: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[ 328.890751] usb 3-2.2: Product: USB3.1 Device
[ 328.890752] usb 3-2.2: Manufacturer: Generic
[ 328.890752] usb 3-2.2: SerialNumber: 12345678912B
[ 328.894965] scsi host7: uas
[ 328.896180] scsi 7:0:0:0: Direct-Access ST2000DM 001-1CH164 0 PQ: 0 ANSI: 6
[ 328.921343] sd 7:0:0:0: Attached scsi generic sg5 type 0
[ 328.921717] sd 7:0:0:0: [sdf] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[ 328.921718] sd 7:0:0:0: [sdf] 4096-byte physical blocks
[ 328.921795] sd 7:0:0:0: [sdf] Write Protect is off
[ 328.921796] sd 7:0:0:0: [sdf] Mode Sense: 43 00 00 00
[ 328.921955] sd 7:0:0:0: [sdf] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 328.970520] sdf: sdf1
[ 328.971532] sd 7:0:0:0: [sdf] Attached SCSI disk

========= Strange I/O Information from sysfs ======================
Good physical_block_size
[root@test03 work]# cat /sys/block/sdc/queue/physical_block_size
4096

Good logical_block_size
[root@test03 work]# cat /sys/block/sdc/queue/logical_block_size
512

*BAD* optimal_io_size (512*0xffff)
[root@test03 work]# cat /sys/block/sdc/queue/optimal_io_size
33553920
========= parted alignment warning ================================
[root@test03 work]# parted /dev/sdc
GNU Parted 3.2
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt
(parted) mkpart primary 1MiB 100%
Warning: The resulting partition is not properly aligned for best performance:
2048s % 65535s != 0s
Ignore/Cancel? I
(parted) print
Model: HGST HDN 724040ALE640 (scsi)
Disk /dev/sdc: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
 1 1049kB 4001GB 4001GB xfs primary

(parted) quit
Information: You may need to update /etc/fstab.

[root@test03 work]# mkfs.xfs /dev/sdc1
meta-data=/dev/sdc1 isize=512 agcount=4, agsize=244187071 blks
         = sectsz=4096 attr=2, projid32bit=1
         = crc=1 finobt=1, sparse=0, rmapbt=0, reflink=0
data = bsize=4096 blocks=976748284, imaxpct=5
         = sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=476927, version=2
         = sectsz=4096 sunit=1 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0

======LV Creation (pe_start is set 32MB)====================================
[root@test03 work]# pvcreate /dev/sdc1
  Physical volume "/dev/sdc1" successfully created.
[root@test03 work]# vgcreate vg_test /dev/sdc1
  Volume group "vg_test" successfully created
[root@test03 work]# lvcreate -n lv_test -l 100%VG vg_test /dev/sdc1
  Logical volume "lv_test" created.
[root@test03 work]# lvdisplay lv_test/vg_test
  Volume group "lv_test" not found
  Cannot process volume group lv_test
[root@test03 work]# lvdisplay vg_test/lv_test
  --- Logical volume ---
  LV Path /dev/vg_test/lv_test
  LV Name lv_test
  VG Name vg_test
  LV UUID ciLxVq-RYjz-dkbJ-cCrM-ldpT-Z97b-GJF3tY
  LV Write Access read/write
  LV Creation host, time test03, 2017-04-12 18:38:40 +0900
  LV Status available
  # open 0
  LV Size 3.64 TiB
  Current LE 953847
  Segments 1
  Allocation inherit
  Read ahead sectors auto
  - currently set to 256
  Block device 253:2
[root@test03 work]# pvs -o +pe_start /dev/sdc1
  PV VG Fmt Attr PSize PFree 1st PE
  /dev/sdc1 vg_test lvm2 a-- 3.64t 0 32.00m

Kernel message
[ 3650.389051] device-mapper: table: 253:2: adding target device sdc1 caused an alignment inconsistency: physical_block_size=4096, logical_block_size=512, alignment_offset=0, start=33553920
[ 3650.389053] device-mapper: table: 253:2: adding target device sdc1 caused an alignment inconsistency: physical_block_size=4096, logical_block_size=512, alignment_offset=0, start=33553920
=================================================================
4KB sector disk
[root@test04 ~]# cat /sys/block/sdd/queue/physical_block_size
4096
[root@test04 ~]# cat /sys/block/sdd/queue/logical_block_size
512
[root@test04 ~]# cat /sys/block/sdd/queue/optimal_io_size
33553920
[root@test04 ~]# cat /sys/block/sdd/queue/minimum_io_size
4096

512B sector disk
[root@test04 ~]# cat /sys/block/sde/queue/physical_block_size
512
[root@test04 ~]# cat /sys/block/sde/queue/logical_block_size
512
[root@test04 ~]# cat /sys/block/sde/queue/optimal_io_size
33553920
[root@test04 ~]# cat /sys/block/sde/queue/minimum_io_size
512