All of lore.kernel.org
 help / color / mirror / Atom feed
* sector size other than 512 bytes
@ 2016-04-14 18:44 TK (Tzung-Kwang) Wang-SSI
  2016-04-14 19:45 ` Sitsofe Wheeler
  0 siblings, 1 reply; 8+ messages in thread
From: TK (Tzung-Kwang) Wang-SSI @ 2016-04-14 18:44 UTC (permalink / raw)
  To: fio

Hi All,

I have been using FIO on SATA drives for some times and all were fine until recently I added SAS drives to the test list. Some of the SAS drives have 520-byte sector size, with DIF, and my FIO setup was not able to run on those drives. I have not found related postings in archive for possible workaround. My had also upgrade from v2.1.14 to v2.8 with the same result.

Is there a patch available for supporting sector size other than 512-byte for either Windows 7 and/or Ubuntu 14 LTS environment?

Thanks,
TK


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

* Re: sector size other than 512 bytes
  2016-04-14 18:44 sector size other than 512 bytes TK (Tzung-Kwang) Wang-SSI
@ 2016-04-14 19:45 ` Sitsofe Wheeler
  2016-04-14 20:06   ` TK (Tzung-Kwang) Wang-SSI
  0 siblings, 1 reply; 8+ messages in thread
From: Sitsofe Wheeler @ 2016-04-14 19:45 UTC (permalink / raw)
  To: TK (Tzung-Kwang) Wang-SSI; +Cc: fio

On 14 April 2016 at 19:44, TK (Tzung-Kwang) Wang-SSI
<tk.wang@ssi.samsung.com> wrote:
>
> I have been using FIO on SATA drives for some times and all were fine until recently I added SAS drives to the test list. Some of the SAS drives have 520-byte sector size, with DIF, and my FIO setup was not able to run on those drives. I have not found related postings in archive for possible workaround. My had also upgrade from v2.1.14 to v2.8 with the same result.
>
> Is there a patch available for supporting sector size other than 512-byte for either Windows 7 and/or Ubuntu 14 LTS environment?

Does linux report the block size as 520 in /sys ?

-- 
Sitsofe | http://sucs.org/~sits/

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

* RE: sector size other than 512 bytes
  2016-04-14 19:45 ` Sitsofe Wheeler
@ 2016-04-14 20:06   ` TK (Tzung-Kwang) Wang-SSI
  2016-04-15  3:19     ` Sitsofe Wheeler
  0 siblings, 1 reply; 8+ messages in thread
From: TK (Tzung-Kwang) Wang-SSI @ 2016-04-14 20:06 UTC (permalink / raw)
  To: Sitsofe Wheeler; +Cc: fio

Yes, according to sg_readcap output. 

Regards,
TK

-----Original Message-----
From: Sitsofe Wheeler [mailto:sitsofe@gmail.com] 
Sent: Thursday, April 14, 2016 12:46 PM
To: TK (Tzung-Kwang) Wang-SSI
Cc: fio@vger.kernel.org
Subject: Re: sector size other than 512 bytes

On 14 April 2016 at 19:44, TK (Tzung-Kwang) Wang-SSI <tk.wang@ssi.samsung.com> wrote:
>
> I have been using FIO on SATA drives for some times and all were fine until recently I added SAS drives to the test list. Some of the SAS drives have 520-byte sector size, with DIF, and my FIO setup was not able to run on those drives. I have not found related postings in archive for possible workaround. My had also upgrade from v2.1.14 to v2.8 with the same result.
>
> Is there a patch available for supporting sector size other than 512-byte for either Windows 7 and/or Ubuntu 14 LTS environment?

Does linux report the block size as 520 in /sys ?

--
Sitsofe | http://sucs.org/~sits/

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

* Re: sector size other than 512 bytes
  2016-04-14 20:06   ` TK (Tzung-Kwang) Wang-SSI
@ 2016-04-15  3:19     ` Sitsofe Wheeler
  2016-04-15 21:19       ` TK (Tzung-Kwang) Wang-SSI
  0 siblings, 1 reply; 8+ messages in thread
From: Sitsofe Wheeler @ 2016-04-15  3:19 UTC (permalink / raw)
  To: TK (Tzung-Kwang) Wang-SSI; +Cc: fio

On 14 April 2016 at 21:06, TK (Tzung-Kwang) Wang-SSI
<tk.wang@ssi.samsung.com> wrote:
> Yes, according to sg_readcap output.

It ought to be the same but what about via

/sys/block/<device>/queue/logical_block_size

?

-- 
Sitsofe | http://sucs.org/~sits/

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

* RE: sector size other than 512 bytes
  2016-04-15  3:19     ` Sitsofe Wheeler
@ 2016-04-15 21:19       ` TK (Tzung-Kwang) Wang-SSI
  2016-04-16 10:34         ` Sitsofe Wheeler
  0 siblings, 1 reply; 8+ messages in thread
From: TK (Tzung-Kwang) Wang-SSI @ 2016-04-15 21:19 UTC (permalink / raw)
  To: Sitsofe Wheeler; +Cc: fio

That shows 512 instead of 520,

# cat /sys/block/sdb/queue/logical_block_size
512
# sg_readcap /dev/sdb
Read Capacity results:
   Last logical block address=918552575 (0x36bfffff), Number of blocks=918552576
   Logical block length=520 bytes
Hence:
   Device size: 477647339520 bytes, 455520.0 MiB, 477.65 GB

Regards,
TK


-----Original Message-----
From: Sitsofe Wheeler [mailto:sitsofe@gmail.com] 
Sent: Thursday, April 14, 2016 8:19 PM
To: TK (Tzung-Kwang) Wang-SSI
Cc: fio@vger.kernel.org
Subject: Re: sector size other than 512 bytes

On 14 April 2016 at 21:06, TK (Tzung-Kwang) Wang-SSI <tk.wang@ssi.samsung.com> wrote:
> Yes, according to sg_readcap output.

It ought to be the same but what about via

/sys/block/<device>/queue/logical_block_size

?

--
Sitsofe | http://sucs.org/~sits/

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

* Re: sector size other than 512 bytes
  2016-04-15 21:19       ` TK (Tzung-Kwang) Wang-SSI
@ 2016-04-16 10:34         ` Sitsofe Wheeler
  2016-04-18 20:56           ` TK (Tzung-Kwang) Wang-SSI
  0 siblings, 1 reply; 8+ messages in thread
From: Sitsofe Wheeler @ 2016-04-16 10:34 UTC (permalink / raw)
  To: TK (Tzung-Kwang) Wang-SSI; +Cc: fio

On 15 April 2016 at 22:19, TK (Tzung-Kwang) Wang-SSI
<tk.wang@ssi.samsung.com> wrote:
> That shows 512 instead of 520,
>
> # cat /sys/block/sdb/queue/logical_block_size
> 512
> # sg_readcap /dev/sdb
> Read Capacity results:
>    Last logical block address=918552575 (0x36bfffff), Number of blocks=918552576
>    Logical block length=520 bytes
> Hence:
>    Device size: 477647339520 bytes, 455520.0 MiB, 477.65 GB

In that case I'd say the issue you're seeing is within the kernel
rather than in fio - the kernel block device is going to refuse
userspace accesses that aren't multiples of 512. Possibly raw SCSI
commands would work?

Is there anything in dmesg about "unsupported sector size" (see
https://github.com/torvalds/linux/blob/v4.5/drivers/scsi/sd.c#L2292
for the check that provokes that message)?

-- 
Sitsofe | http://sucs.org/~sits/

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

* RE: sector size other than 512 bytes
  2016-04-16 10:34         ` Sitsofe Wheeler
@ 2016-04-18 20:56           ` TK (Tzung-Kwang) Wang-SSI
  2016-04-19  5:35             ` Sitsofe Wheeler
  0 siblings, 1 reply; 8+ messages in thread
From: TK (Tzung-Kwang) Wang-SSI @ 2016-04-18 20:56 UTC (permalink / raw)
  To: Sitsofe Wheeler; +Cc: fio

Sitsofe,

Yes, dmesg shows "Unsupported sector size 520.". So solution for this issue is have 520-byte sector size support in linux device driver, it seems.

Regards,
TK

-----Original Message-----
From: Sitsofe Wheeler [mailto:sitsofe@gmail.com] 
Sent: Saturday, April 16, 2016 3:35 AM
To: TK (Tzung-Kwang) Wang-SSI
Cc: fio@vger.kernel.org
Subject: Re: sector size other than 512 bytes

On 15 April 2016 at 22:19, TK (Tzung-Kwang) Wang-SSI <tk.wang@ssi.samsung.com> wrote:
> That shows 512 instead of 520,
>
> # cat /sys/block/sdb/queue/logical_block_size
> 512
> # sg_readcap /dev/sdb
> Read Capacity results:
>    Last logical block address=918552575 (0x36bfffff), Number of blocks=918552576
>    Logical block length=520 bytes
> Hence:
>    Device size: 477647339520 bytes, 455520.0 MiB, 477.65 GB

In that case I'd say the issue you're seeing is within the kernel rather than in fio - the kernel block device is going to refuse userspace accesses that aren't multiples of 512. Possibly raw SCSI commands would work?

Is there anything in dmesg about "unsupported sector size" (see
https://github.com/torvalds/linux/blob/v4.5/drivers/scsi/sd.c#L2292
for the check that provokes that message)?

--
Sitsofe | http://sucs.org/~sits/

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

* Re: sector size other than 512 bytes
  2016-04-18 20:56           ` TK (Tzung-Kwang) Wang-SSI
@ 2016-04-19  5:35             ` Sitsofe Wheeler
  0 siblings, 0 replies; 8+ messages in thread
From: Sitsofe Wheeler @ 2016-04-19  5:35 UTC (permalink / raw)
  To: TK (Tzung-Kwang) Wang-SSI; +Cc: fio

On 18 April 2016 at 21:56, TK (Tzung-Kwang) Wang-SSI
<tk.wang@ssi.samsung.com> wrote:
>
> Yes, dmesg shows "Unsupported sector size 520.". So solution for this issue is have 520-byte sector size support in linux device driver, it seems.

You might find the sg ioengine works but if it depends on regular
block device commands to get information (e.g. the disk size) then
things might fail before I/O can be submitted.

In a previous message you mention DIF (the data integrity extensions)
but to use that it's worth noting your driver and controller have to
support it in addition to the disk. Perhaps you can use lsscsi's
--protection and --protmode to find out what's available? Here's what
Red Hat had to say about DIF support in RHEL 6:
https://access.redhat.com/solutions/41548 but I don't know if that
impacts your case.

-- 
Sitsofe | http://sucs.org/~sits/

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

end of thread, other threads:[~2016-04-19  5:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-14 18:44 sector size other than 512 bytes TK (Tzung-Kwang) Wang-SSI
2016-04-14 19:45 ` Sitsofe Wheeler
2016-04-14 20:06   ` TK (Tzung-Kwang) Wang-SSI
2016-04-15  3:19     ` Sitsofe Wheeler
2016-04-15 21:19       ` TK (Tzung-Kwang) Wang-SSI
2016-04-16 10:34         ` Sitsofe Wheeler
2016-04-18 20:56           ` TK (Tzung-Kwang) Wang-SSI
2016-04-19  5:35             ` Sitsofe Wheeler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.