Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jan 2024 21:40:28 +0000
From:      bugzilla-noreply@freebsd.org
To:        virtualization@FreeBSD.org
Subject:   [Bug 276524] Setting LUN block size in ctl.conf to 512 will use volblocksize instead
Message-ID:  <bug-276524-27103-w3MS2PS8zl@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-276524-27103@https.bugs.freebsd.org/bugzilla/>
References:  <bug-276524-27103@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D276524

--- Comment #11 from balchen@ste.no ---
Here's what Ubuntu 22.04 has to say about the same iSCSI LUN that I connect=
ed
to ESXi.=20
Does this make sense to you? It seems inconsistent to me in Linux as well.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D

volblocksize=3D8K
LUN Block Size=3D512
LUN Physical Block Size=3D<blank>

balchen@blocksize-test:~$ sudo dmesg
[....]
[   15.960107] Loading iSCSI transport class v2.0-870.
[   16.341346] iscsi: registered transport (tcp)
[   16.412853] scsi host33: iSCSI Initiator over TCP/IP
[   16.500664] scsi 33:0:0:0: Direct-Access     FreeBSD  iSCSI Disk       0=
123
PQ: 0 ANSI: 7
[   16.503518] scsi 33:0:0:0: alua: supports implicit TPGS
[   16.503527] scsi 33:0:0:0: alua: device t10.FreeBSD MYDEVID0000\0\0\0\0\0
port group 1 rel port 3
[   16.503752] sd 33:0:0:0: Power-on or device reset occurred
[   16.504341] sd 33:0:0:0: [sdb] 3865470576 512-byte logical blocks: (1.98
TB/1.80 TiB)
[   16.504346] sd 33:0:0:0: [sdb] 8192-byte physical blocks
[   16.504427] sd 33:0:0:0: [sdb] Write Protect is off
[   16.504432] sd 33:0:0:0: [sdb] Mode Sense: 7f 00 10 08
[   16.504585] sd 33:0:0:0: [sdb] Write cache: enabled, read cache: enabled,
supports DPO and FUA
[   16.504799] sd 33:0:0:0: [sdb] Optimal transfer size 1048576 bytes
[   16.505500] sd 33:0:0:0: Attached scsi generic sg2 type 0
[   16.509214]  sdb: sdb1
[   16.511646] sd 33:0:0:0: [sdb] Attached SCSI disk
[   16.515220] sd 33:0:0:0: alua: transition timeout set to 60 seconds
[   16.515228] sd 33:0:0:0: alua: port group 01 state A non-preferred suppo=
rts
TolUSNA
[   65.600593] loop5: detected capacity change from 0 to 8

balchen@blocksize-test:~$ sudo blockdev --report /dev/sdb
RO    RA   SSZ   BSZ        StartSec            Size   Device
rw  4096   512  4096               0   1979120934912   /dev/sdb

balchen@blocksize-test:~$ sudo sg_format -v /dev/sdb
    FreeBSD   iSCSI Disk        0123   peripheral_type: disk [0x0]
      PROTECT=3D0
      Unit serial number: MYSERIAL0000
      LU name: @Pr=E2=96=92
    mode sense(10) cdb: [5a 00 01 00 00 00 00 00 fc 00]
Mode Sense (block descriptor) data, prior to changes:
  Number of blocks=3D3865470576 [0xe6666670]
  Block size=3D512 [0x200]
    read capacity(10) cdb: [25 00 00 00 00 00 00 00 00 00]
Read Capacity (10) results:
   Number of logical blocks=3D3865470576
   Logical block size=3D512 bytes
No changes made. To format use '--format'. To resize use '--resize'

balchen@blocksize-test:~$ sudo blockdev -v --getbsz /dev/sdb
get blocksize: 4096

balchen@blocksize-test:~$ sudo blockdev -v --getpbsz /dev/sdb
get physical block (sector) size: 8192

balchen@blocksize-test:~$ sudo blockdev -v --getss /dev/sdb
get logical block (sector) size: 512

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D

volblocksize=3D8K
LUN Block Size=3D4K
LUN Physical Block Size=3D<blank>

balchen@blocksize-test:~$ sudo dmesg
[....]
[   15.026385] Loading iSCSI transport class v2.0-870.
[   15.428041] iscsi: registered transport (tcp)
[   15.484360] scsi host33: iSCSI Initiator over TCP/IP
[   15.570188] scsi 33:0:0:0: Direct-Access     FreeBSD  iSCSI Disk       0=
123
PQ: 0 ANSI: 7
[   15.574942] scsi 33:0:0:0: alua: supports implicit TPGS
[   15.574951] scsi 33:0:0:0: alua: device t10.FreeBSD MYDEVID0000\0\0\0\0\0
port group 1 rel port 3
[   15.575206] sd 33:0:0:0: Power-on or device reset occurred
[   15.575843] sd 33:0:0:0: [sdb] 483183822 4096-byte logical blocks: (1.98
TB/1.80 TiB)
[   15.575849] sd 33:0:0:0: [sdb] 8192-byte physical blocks
[   15.575934] sd 33:0:0:0: [sdb] Write Protect is off
[   15.575939] sd 33:0:0:0: [sdb] Mode Sense: 7f 00 10 08
[   15.576096] sd 33:0:0:0: [sdb] Write cache: enabled, read cache: enabled,
supports DPO and FUA
[   15.576349] sd 33:0:0:0: [sdb] Optimal transfer size 1048576 bytes
[   15.579762] sd 33:0:0:0: [sdb] Attached SCSI disk
[   15.580794] sd 33:0:0:0: Attached scsi generic sg2 type 0
[   15.583250] sd 33:0:0:0: alua: transition timeout set to 60 seconds
[   15.583258] sd 33:0:0:0: alua: port group 01 state A non-preferred suppo=
rts
TolUSNA
[   62.026528] loop5: detected capacity change from 0 to 8


balchen@blocksize-test:~$ sudo sg_format -v /dev/sdb
    FreeBSD   iSCSI Disk        0123   peripheral_type: disk [0x0]
      PROTECT=3D0
      Unit serial number: MYSERIAL0000
      LU name:
    mode sense(10) cdb: [5a 00 01 00 00 00 00 00 fc 00]
Mode Sense (block descriptor) data, prior to changes:
  Number of blocks=3D483183822 [0x1cccccce]
  Block size=3D4096 [0x1000]
    read capacity(10) cdb: [25 00 00 00 00 00 00 00 00 00]
Read Capacity (10) results:
   Number of logical blocks=3D483183822
   Logical block size=3D4096 bytes
No changes made. To format use '--format'. To resize use '--resize'

balchen@blocksize-test:~$ sudo blockdev --report /dev/sdb
RO    RA   SSZ   BSZ        StartSec            Size   Device
rw  4096  4096  4096               0   1979120934912   /dev/sdb

balchen@blocksize-test:~$ sudo blockdev -v --getbsz /dev/sdb
get blocksize: 4096

balchen@blocksize-test:~$ sudo blockdev -v --getpbsz /dev/sdb
get physical block (sector) size: 8192

balchen@blocksize-test:~$ sudo blockdev -v --getss /dev/sdb
get logical block (sector) size: 4096

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-276524-27103-w3MS2PS8zl>