* what should blockdev getbpsz return 4k disks w/512e?
@ 2017-11-04 9:09 L A Walsh
2017-11-06 10:19 ` Karel Zak
0 siblings, 1 reply; 4+ messages in thread
From: L A Walsh @ 2017-11-04 9:09 UTC (permalink / raw)
To: util-linux
I just tried blockdev on a HW raid device (/dev/sdb) composed of
4K disks that can (w/performance penalty) emulate 512 byte disk
(i.e. have the 512e feature). It is returning 512.
If the disk is composed of 4K disks, shouldn't the raid show 4K
as well? Otherwise, how do utils know what alignment to use or
not to use 512 due to penalty costs? For my formatted disks, I
use 4K allocation units, so for those, I shouldn't see problems,
but some other disk subsystems or raw-disk using progs also need to
know to allocate on 4K boundaries.
Any idea where this info should be showing up?
Thanks!
-linda
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: what should blockdev getbpsz return 4k disks w/512e?
2017-11-04 9:09 what should blockdev getbpsz return 4k disks w/512e? L A Walsh
@ 2017-11-06 10:19 ` Karel Zak
2017-11-14 4:37 ` L A Walsh
0 siblings, 1 reply; 4+ messages in thread
From: Karel Zak @ 2017-11-06 10:19 UTC (permalink / raw)
To: L A Walsh; +Cc: util-linux
On Sat, Nov 04, 2017 at 02:09:51AM -0700, L A Walsh wrote:
>
> I just tried blockdev on a HW raid device (/dev/sdb) composed of
> 4K disks that can (w/performance penalty) emulate 512 byte disk
> (i.e. have the 512e feature). It is returning 512.
>
> If the disk is composed of 4K disks, shouldn't the raid show 4K
> as well? Otherwise, how do utils know what alignment to use or
> not to use 512 due to penalty costs? For my formatted disks, I
> use 4K allocation units, so for those, I shouldn't see problems,
> but some other disk subsystems or raw-disk using progs also need to
> know to allocate on 4K boundaries.
>
> Any idea where this info should be showing up?
Try
--getiomin get minimum I/O size
--getioopt get optimal I/O size
or
lsblk --topology
It's possible that RAID (or another stacked device) uses 512
addressing, but for partitioning or mkfs-like tools we care about
minimal and optimal I/O.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: what should blockdev getbpsz return 4k disks w/512e?
2017-11-06 10:19 ` Karel Zak
@ 2017-11-14 4:37 ` L A Walsh
2017-11-14 10:08 ` Karel Zak
0 siblings, 1 reply; 4+ messages in thread
From: L A Walsh @ 2017-11-14 4:37 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
[-- Attachment #1: Type: text/plain, Size: 2022 bytes --]
Karel Zak wrote:
> On Sat, Nov 04, 2017 at 02:09:51AM -0700, L A Walsh wrote:
>
>> I just tried blockdev on a HW raid device (/dev/sdb) composed of
>> 4K disks that can (w/performance penalty) emulate 512 byte disk
>> (i.e. have the 512e feature). It is returning 512.
>>
>> Any idea where this info should be showing up?
>>
>
> Try
>
> --getiomin get minimum I/O size
> --getioopt get optimal I/O size
>
----
> sudo blockdev --getiomin /dev/sdb
512
> sudo blockdev --getioopt /dev/sdb
0
> or
>
> lsblk --topology
>
-----
(some lines deleted for brevity):
NAME ALIGN IO:MIN OPT PHYSEC LOGSEC ROT SCHED RQSZ RA
WSAME
sda 0 512 0 512 512 1 bfq 256
512 0B
└─sda1 0 512 0 512 512 1 bfq 256
512 0B
└─Backup-Media 0 512 0 512 512 1 128
128 0B
sdb 0 512 0 512 512 1 bfq 256
512 0B
└─sdb1 0 512 0 512 512 1 bfq 256
512 0B
├─Data-Home 0 512 0 512 512 1 128
128 0B
└─Data-Edge 0 512 0 512 512 1 128
128 0B
sdc 0 512 0 512 512 1 bfq 256
512 0B
├─sdc1 0 512 0 512 512 1 bfq 256
512 0B
└─sdc10 0 512 0 512 512 1 bfq 256
512 0B
> It's possible that RAID (or another stacked device) uses 512
> addressing, but for partitioning or mkfs-like tools we care about
> minimal and optimal I/O.
>
----
Nothing but the RAID controller seems to know about the 4096
physical size.
(attached jpg from disk controller SW -- can see size under physical
on right).
If anything used a 512 byte offset anywhere, it would really impact
performance, thus my concern about how or where a util would be able to read
it...
[-- Attachment #2: disk_sizes1.jpg --]
[-- Type: image/jpeg, Size: 175005 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: what should blockdev getbpsz return 4k disks w/512e?
2017-11-14 4:37 ` L A Walsh
@ 2017-11-14 10:08 ` Karel Zak
0 siblings, 0 replies; 4+ messages in thread
From: Karel Zak @ 2017-11-14 10:08 UTC (permalink / raw)
To: L A Walsh; +Cc: util-linux
On Mon, Nov 13, 2017 at 08:37:37PM -0800, L A Walsh wrote:
> Karel Zak wrote:
> > On Sat, Nov 04, 2017 at 02:09:51AM -0700, L A Walsh wrote:
> > > I just tried blockdev on a HW raid device (/dev/sdb) composed of
> > > 4K disks that can (w/performance penalty) emulate 512 byte disk
> > > (i.e. have the 512e feature). It is returning 512.
> > >
> > > Any idea where this info should be showing up?
> >
> > Try
> >
> > --getiomin get minimum I/O size
> > --getioopt get optimal I/O size
> ----
>
> > sudo blockdev --getiomin /dev/sdb
> 512
> > sudo blockdev --getioopt /dev/sdb
> 0
> > or
> >
> > lsblk --topology
> -----
> (some lines deleted for brevity):
>
> NAME ALIGN IO:MIN OPT PHYSEC LOGSEC ROT SCHED RQSZ RA
> WSAME
> sda 0 512 0 512 512 1 bfq 256 512
> 0B
> └─sda1 0 512 0 512 512 1 bfq 256 512
> 0B
> └─Backup-Media 0 512 0 512 512 1 128 128
> 0B
> sdb 0 512 0 512 512 1 bfq 256 512
> 0B
> └─sdb1 0 512 0 512 512 1 bfq 256 512
> 0B
> ├─Data-Home 0 512 0 512 512 1 128 128
> 0B
> └─Data-Edge 0 512 0 512 512 1 128 128
> 0B
> sdc 0 512 0 512 512 1 bfq 256 512
> 0B
> ├─sdc1 0 512 0 512 512 1 bfq 256 512
> 0B
> └─sdc10 0 512 0 512 512 1 bfq 256 512
> 0B
>
> > It's possible that RAID (or another stacked device) uses 512
> > addressing, but for partitioning or mkfs-like tools we care about
> > minimal and optimal I/O.
> ----
> Nothing but the RAID controller seems to know about the 4096 physical
> size.
> (attached jpg from disk controller SW -- can see size under physical on
> right).
>
> If anything used a 512 byte offset anywhere, it would really impact
> performance, thus my concern about how or where a util would be able to read
> it...
Unfortunately userspace tools cannot play any usable role in this
story if your system (kernel) does not provide relevant information.
For mkfs and partitioning tools it's 512-bytes based devices...
Let's ask kernel developers.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-11-14 10:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-04 9:09 what should blockdev getbpsz return 4k disks w/512e? L A Walsh
2017-11-06 10:19 ` Karel Zak
2017-11-14 4:37 ` L A Walsh
2017-11-14 10:08 ` Karel Zak
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.